Project framework + socket connector
The socket connector is responsible for reading from a socket and converting the lines that were read to messages, using a passed-in deserialiser. It also provides an interface to push messages onto the socket, via a serialiser which is also passed in.
This commit is contained in:
59
Rakefile
Normal file
59
Rakefile
Normal file
@@ -0,0 +1,59 @@
|
||||
require 'rubygems'
|
||||
require 'rake'
|
||||
require 'rake/clean'
|
||||
require 'rake/gempackagetask'
|
||||
require 'rake/rdoctask'
|
||||
require 'rake/testtask'
|
||||
|
||||
spec = Gem::Specification.new do |s|
|
||||
s.name = 'qmp_client'
|
||||
s.version = '0.0.1'
|
||||
s.has_rdoc = true
|
||||
s.extra_rdoc_files = ['README', 'LICENSE']
|
||||
s.summary = 'QMP client library '
|
||||
s.description = "Library that interfaces with running QEMU processes over QMP"
|
||||
s.author = 'Nicholas Thomas'
|
||||
s.email = 'nick@lupine.me.uk'
|
||||
# s.executables = ['your_executable_here']
|
||||
s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec,test}/**/*")
|
||||
s.require_path = "lib"
|
||||
s.bindir = "bin"
|
||||
end
|
||||
|
||||
Rake::GemPackageTask.new(spec) do |p|
|
||||
p.gem_spec = spec
|
||||
p.need_tar = true
|
||||
p.need_zip = true
|
||||
end
|
||||
|
||||
Rake::RDocTask.new do |rdoc|
|
||||
files =['README', 'LICENSE', 'lib/**/*.rb']
|
||||
rdoc.rdoc_files.add(files)
|
||||
rdoc.main = "README" # page to start on
|
||||
rdoc.title = "qmp-client Docs"
|
||||
rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
|
||||
rdoc.options << '--line-numbers'
|
||||
end
|
||||
|
||||
Rake::TestTask.new do |t|
|
||||
t.libs << ["test/unit"]
|
||||
t.test_files = FileList['test/unit/**/test_*.rb']
|
||||
t.options="-v"
|
||||
t.name = "test:unit"
|
||||
end
|
||||
|
||||
SCHEMA_HOST = 'http://git.kernel.org/'
|
||||
SCHEMA_QUERY = 'p=virt/kvm/qemu-kvm.git;a=blob_plain;f=qapi-schema.json'
|
||||
|
||||
SCHEMA_LOC = [SCHEMA_HOST, SCHEMA_QUERY].join('?')
|
||||
SCHEMA_OUTPUT = File.join(
|
||||
Rake::application.original_dir,
|
||||
'lib', 'qmp_client', 'qapi-schema.json'
|
||||
)
|
||||
|
||||
namespace :dev do
|
||||
desc "Download the QMP schema filelinux-x86_64/pty netbeans"
|
||||
task :fetch_schema do
|
||||
`wget '#{SCHEMA_LOC}' -O '#{SCHEMA_OUTPUT}'`
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user