jwthompson2-vzagent 0.0.0

Sign up to get free protection for your applications and to get access to all the features.
data/History.txt ADDED
File without changes
data/Manifest.txt ADDED
File without changes
data/README.rdoc ADDED
@@ -0,0 +1,55 @@
1
+ = vzagent-ruby
2
+ by James Thompson
3
+ http://github.com/jwthompson2/vzagent-ruby
4
+
5
+ == DESCRIPTION
6
+
7
+ vzagent-ruby is designed to provide access to Parallels/Virtuozzo Agent's XML
8
+ and SOAP APIs from Ruby. It provides the necessary methods to handle
9
+ connecting, authenticating and working withte a Parallels/Virtuozzo Agent
10
+ server.
11
+
12
+ == REQUIREMENTS
13
+
14
+ * libxml-ruby
15
+ * uuid
16
+
17
+ == INSTALL
18
+
19
+ $ gem sources -a http://gems.github.com/
20
+ $ gem install jwthompson2-vzagent
21
+
22
+ == SOURCE
23
+
24
+ vzagent-ruby's git repo is available on GitHub, which can be browsed at:
25
+
26
+ http://github.com/jwthompson2/vzagent-ruby
27
+
28
+ and cloned from:
29
+
30
+ git://github.com/jwthompson2/vzagent-ruby.git
31
+
32
+ == LICENSE
33
+
34
+ (The MIT License)
35
+
36
+ Copyright (c) 2008 James Thompson <james@plainprograms.com>
37
+
38
+ Permission is hereby granted, free of charge, to any person obtaining
39
+ a copy of this software and associated documentation files (the
40
+ 'Software'), to deal in the Software without restriction, including
41
+ without limitation the rights to use, copy, modify, merge, publish,
42
+ distribute, sublicense, and/or sell copies of the Software, and to
43
+ permit persons to whom the Software is furnished to do so, subject to
44
+ the following conditions:
45
+
46
+ The above copyright notice and this permission notice shall be
47
+ included in all copies or substantial portions of the Software.
48
+
49
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
50
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
51
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
52
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
53
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
54
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
55
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,93 @@
1
+ # Adapted from the uuid Rakefile.
2
+
3
+ require 'rubygems'
4
+ #require 'rake/testtask'
5
+ require 'rake/rdoctask'
6
+ require 'rake/gempackagetask'
7
+ require 'rubygems/source_info_cache'
8
+
9
+
10
+ spec = Gem::Specification.load(File.join(File.dirname(__FILE__), 'vzagent.gemspec'))
11
+
12
+ desc "Default Task"
13
+ #task 'default' => ['test', 'rdoc']
14
+ task 'default' => ['rdoc']
15
+
16
+
17
+ desc "If you're building from sources, run this task first to setup the necessary dependencies"
18
+ task 'setup' do
19
+ windows = Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
20
+ rb_bin = File.expand_path(Config::CONFIG['ruby_install_name'], Config::CONFIG['bindir'])
21
+ spec.dependencies.select { |dep| Gem::SourceIndex.from_installed_gems.search(dep).empty? }.each do |missing|
22
+ dep = Gem::Dependency.new(missing.name, missing.version_requirements)
23
+ spec = Gem::SourceInfoCache.search(dep, true, true).last
24
+ fail "#{dep} not found in local or remote repository!" unless spec
25
+ puts "Installing #{spec.full_name} ..."
26
+ args = [rb_bin, '-S', 'gem', 'install', spec.name, '-v', spec.version.to_s]
27
+ args.unshift('sudo') unless windows || ENV['GEM_HOME']
28
+ sh args.map{ |a| a.inspect }.join(' ')
29
+ end
30
+ end
31
+
32
+
33
+ # desc "Run all test cases"
34
+ # Rake::TestTask.new do |test|
35
+ # test.verbose = true
36
+ # test.test_files = ['test/*.rb']
37
+ # test.warning = true
38
+ # end
39
+
40
+ # Create the documentation.
41
+ Rake::RDocTask.new do |rdoc|
42
+ rdoc.main = 'README.rdoc'
43
+ rdoc.rdoc_files.include('README.rdoc', 'lib/**/*.rb')
44
+ rdoc.title = "vzagent-ruby"
45
+ end
46
+
47
+
48
+ gem = Rake::GemPackageTask.new(spec) do |pkg|
49
+ pkg.need_tar = true
50
+ pkg.need_zip = true
51
+ end
52
+
53
+ desc "Install the package locally"
54
+ task 'install'=>['setup', 'package'] do |task|
55
+ rb_bin = File.expand_path(Config::CONFIG['ruby_install_name'], Config::CONFIG['bindir'])
56
+ args = [rb_bin, '-S', 'gem', 'install', "pkg/#{spec.name}-#{spec.version}.gem"]
57
+ windows = Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
58
+ args.unshift('sudo') unless windows || ENV['GEM_HOME']
59
+ sh args.map{ |a| a.inspect }.join(' ')
60
+ end
61
+
62
+ desc "Uninstall previously installed packaged"
63
+ task 'uninstall' do |task|
64
+ rb_bin = File.expand_path(Config::CONFIG['ruby_install_name'], Config::CONFIG['bindir'])
65
+ args = [rb_bin, '-S', 'gem', 'install', spec.name, '-v', spec.version.to_s]
66
+ windows = Config::CONFIG['host_os'] =~ /windows|cygwin|bccwin|cygwin|djgpp|mingw|mswin|wince/i
67
+ args.unshift('sudo') unless windows || ENV['GEM_HOME']
68
+ sh args.map{ |a| a.inspect }.join(' ')
69
+ end
70
+
71
+
72
+ #task 'release'=>['setup', 'test', 'package'] do
73
+ task 'release'=>['setup', 'package'] do
74
+ require 'rubyforge'
75
+ changes = File.read('History.txt')[/\d+.\d+.\d+.*\n((:?^[^\n]+\n)*)/]
76
+ File.open '.changes', 'w' do |file|
77
+ file.write changes
78
+ end
79
+
80
+ puts "Uploading #{spec.name} #{spec.version}"
81
+ files = Dir['pkg/*.{gem,tgz,zip}']
82
+ rubyforge = RubyForge.new
83
+ rubyforge.configure
84
+ rubyforge.login
85
+ rubyforge.userconfig.merge! 'release_changes'=>'.changes', 'preformatted'=>true
86
+ rubyforge.add_release spec.rubyforge_project.downcase, spec.name.downcase, spec.version.to_s, *files
87
+ rm_f '.changes'
88
+ puts "Release #{spec.version} uploaded"
89
+ end
90
+
91
+ task 'clobber' do
92
+ rm_f '.changes'
93
+ end
data/spec/spec.opts ADDED
@@ -0,0 +1,3 @@
1
+ --colour
2
+ --reverse
3
+ --backtrace
@@ -0,0 +1,10 @@
1
+ begin
2
+ require 'spec'
3
+ rescue LoadError
4
+ require 'rubygems'
5
+ gem 'rspec'
6
+ require 'spec'
7
+ end
8
+
9
+ $:.unshift(File.dirname(__FILE__) + '/../lib')
10
+ require 'vzagent'
@@ -0,0 +1,11 @@
1
+ require File.dirname(__FILE__) + '/spec_helper.rb'
2
+
3
+ # Time to add your specs!
4
+ # http://rspec.info/
5
+ describe "Place your specs here" do
6
+
7
+ it "find this spec in spec directory" do
8
+ violated "Be sure to write your specs"
9
+ end
10
+
11
+ end
data/vzagent.gemspec ADDED
@@ -0,0 +1,31 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "vzagent"
3
+ s.version = "0.0.0"
4
+ s.date = "2008-10-22"
5
+ s.summary = "Ruby library for Virtuozzo Agent APIs"
6
+ s.email = "james@plainprograms.com"
7
+ s.homepage = "http://github.com/jwthompson2/vzagent-ruby"
8
+ s.description = "Ruby library for interfacing with Parallels' Virtuozzo Agent APIs."
9
+ s.has_rdoc = true
10
+ s.authors = ["James Thompson"]
11
+
12
+ s.files = [
13
+ "History.txt",
14
+ "Manifest.txt",
15
+ "README.rdoc",
16
+ "Rakefile",
17
+ "vzagent.gemspec",
18
+ ]
19
+
20
+ s.test_files = [
21
+ "spec/spec.opts",
22
+ "spec/spec_helper.rb",
23
+ "spec/vzagent_spec.rb"
24
+ ]
25
+
26
+ s.rdoc_options = ["--main", "README.rdoc"]
27
+ s.extra_rdoc_files = ["HISTORY", "Manifest.txt", "README.rdoc"]
28
+ s.add_dependency("soap4r", ["> 1.5.8"])
29
+ s.add_dependency("libxml-ruby", ["> 0.8.0"])
30
+ s.add_dependency("uuid")
31
+ end
metadata ADDED
@@ -0,0 +1,89 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jwthompson2-vzagent
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.0
5
+ platform: ruby
6
+ authors:
7
+ - James Thompson
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2008-10-22 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: soap4r
17
+ version_requirement:
18
+ version_requirements: !ruby/object:Gem::Requirement
19
+ requirements:
20
+ - - ">"
21
+ - !ruby/object:Gem::Version
22
+ version: 1.5.8
23
+ version:
24
+ - !ruby/object:Gem::Dependency
25
+ name: libxml-ruby
26
+ version_requirement:
27
+ version_requirements: !ruby/object:Gem::Requirement
28
+ requirements:
29
+ - - ">"
30
+ - !ruby/object:Gem::Version
31
+ version: 0.8.0
32
+ version:
33
+ - !ruby/object:Gem::Dependency
34
+ name: uuid
35
+ version_requirement:
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: "0"
41
+ version:
42
+ description: Ruby library for interfacing with Parallels' Virtuozzo Agent APIs.
43
+ email: james@plainprograms.com
44
+ executables: []
45
+
46
+ extensions: []
47
+
48
+ extra_rdoc_files:
49
+ - HISTORY
50
+ - Manifest.txt
51
+ - README.rdoc
52
+ files:
53
+ - History.txt
54
+ - Manifest.txt
55
+ - README.rdoc
56
+ - Rakefile
57
+ - vzagent.gemspec
58
+ - HISTORY
59
+ has_rdoc: true
60
+ homepage: http://github.com/jwthompson2/vzagent-ruby
61
+ post_install_message:
62
+ rdoc_options:
63
+ - --main
64
+ - README.rdoc
65
+ require_paths:
66
+ - lib
67
+ required_ruby_version: !ruby/object:Gem::Requirement
68
+ requirements:
69
+ - - ">="
70
+ - !ruby/object:Gem::Version
71
+ version: "0"
72
+ version:
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - ">="
76
+ - !ruby/object:Gem::Version
77
+ version: "0"
78
+ version:
79
+ requirements: []
80
+
81
+ rubyforge_project:
82
+ rubygems_version: 1.2.0
83
+ signing_key:
84
+ specification_version: 2
85
+ summary: Ruby library for Virtuozzo Agent APIs
86
+ test_files:
87
+ - spec/spec.opts
88
+ - spec/spec_helper.rb
89
+ - spec/vzagent_spec.rb