plainprograms-merb_virtuozzo 0.3.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +28 -0
- data/Rakefile +2 -2
- data/lib/merb_virtuozzo.rb +1 -2
- data/merb_virtuozzo.gemspec +7 -7
- metadata +4 -6
- data/lib/merb_virtuozzo/mixins/sample_configurations_mixin.rb +0 -44
data/README.rdoc
CHANGED
@@ -6,6 +6,34 @@
|
|
6
6
|
A plugin for the Merb framework that provides integration with the virtuozzo
|
7
7
|
gem.
|
8
8
|
|
9
|
+
== Requirements
|
10
|
+
|
11
|
+
* virtuozzo (~> 0.7.0)
|
12
|
+
|
13
|
+
== Installation
|
14
|
+
|
15
|
+
$ sudo gem install merb_virtuozzo
|
16
|
+
|
17
|
+
== Usage
|
18
|
+
|
19
|
+
Add the following line to your Merb app's config/dependencies.rb file:
|
20
|
+
|
21
|
+
dependency "merb_virtuozzo", "~>1.0"
|
22
|
+
|
23
|
+
Run +merb+ from the command line to have config/virtuozzo.yml.sample generated
|
24
|
+
for you. Then go and copy config/virtuozzo.yml.sample to config/virtuozzo.yml.
|
25
|
+
Once that is done you should modify the parameters in config/virtuozzo.yml to
|
26
|
+
match authentication parameters for your Virtuozzo instance.
|
27
|
+
|
28
|
+
+merb_virtuozzo+ automatically initiates a SOAP session when your application
|
29
|
+
is started. So, to access any of the drivers available in the +virtuozzo+ gem
|
30
|
+
you can simply invoke them via Merb::Virtuozzo.connection like the following:
|
31
|
+
|
32
|
+
Merb::Virtuozzo.connection.envm.get_list(nil) # Returns list of containers.
|
33
|
+
|
34
|
+
Refer to the +virtuozzo+ gem's documentation for how to use each driver and
|
35
|
+
its related calls.
|
36
|
+
|
9
37
|
== LICENSE
|
10
38
|
|
11
39
|
(The MIT License)
|
data/Rakefile
CHANGED
@@ -3,7 +3,7 @@ require 'echoe'
|
|
3
3
|
require 'merb-core'
|
4
4
|
require 'merb-core/tasks/merb'
|
5
5
|
|
6
|
-
Echoe.new('merb_virtuozzo', '0.
|
6
|
+
Echoe.new('merb_virtuozzo', '1.0.0') do |p|
|
7
7
|
p.description = "Merb plugin for working with Virtuozzo."
|
8
8
|
p.url = "http://github.com/plainprograms/merb_virtuozzo"
|
9
9
|
p.author = "James Thompson"
|
@@ -11,7 +11,7 @@ Echoe.new('merb_virtuozzo', '0.3.0') do |p|
|
|
11
11
|
p.project = "virtuozzo"
|
12
12
|
p.ignore_pattern = ["tmp/*, script/*"]
|
13
13
|
p.development_dependencies = ["echoe ~>3.0"]
|
14
|
-
p.runtime_dependencies = ["merb ~>1.0", "virtuozzo ~>0.
|
14
|
+
p.runtime_dependencies = ["merb ~>1.0", "virtuozzo ~>0.7"]
|
15
15
|
end
|
16
16
|
|
17
17
|
Dir["#{File.dirname(__FILE__)}/tasks/*.rake"].sort.each { |ext| load ext }
|
data/lib/merb_virtuozzo.rb
CHANGED
@@ -1,9 +1,8 @@
|
|
1
1
|
# make sure we're running inside Merb
|
2
2
|
if defined?(Merb::Plugins)
|
3
|
-
dependency 'virtuozzo', '~>0.
|
3
|
+
dependency 'virtuozzo', '~>0.7'
|
4
4
|
|
5
5
|
require File.join(File.dirname(__FILE__) / "merb_virtuozzo" / "merb_virtuozzo")
|
6
|
-
require File.join(File.dirname(__FILE__) / "merb_virtuozzo" / "mixins" / "sample_configurations_mixin")
|
7
6
|
|
8
7
|
Merb::BootLoader.before_app_loads do
|
9
8
|
# code that can be required before the application loads
|
data/merb_virtuozzo.gemspec
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{merb_virtuozzo}
|
5
|
-
s.version = "0.
|
5
|
+
s.version = "1.0.0"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["James Thompson"]
|
9
|
-
s.date = %q{2008-11-
|
9
|
+
s.date = %q{2008-11-22}
|
10
10
|
s.description = %q{Merb plugin for working with Virtuozzo.}
|
11
11
|
s.email = %q{james@plainprograms.com}
|
12
|
-
s.extra_rdoc_files = ["lib/merb_virtuozzo/merb_virtuozzo.rb", "lib/merb_virtuozzo/merbtasks.rb", "lib/merb_virtuozzo/
|
13
|
-
s.files = ["lib/merb_virtuozzo/merb_virtuozzo.rb", "lib/merb_virtuozzo/merbtasks.rb", "lib/merb_virtuozzo/
|
12
|
+
s.extra_rdoc_files = ["lib/merb_virtuozzo/merb_virtuozzo.rb", "lib/merb_virtuozzo/merbtasks.rb", "lib/merb_virtuozzo/virtuozzo.yml.sample", "lib/merb_virtuozzo.rb", "README.rdoc"]
|
13
|
+
s.files = ["lib/merb_virtuozzo/merb_virtuozzo.rb", "lib/merb_virtuozzo/merbtasks.rb", "lib/merb_virtuozzo/virtuozzo.yml.sample", "lib/merb_virtuozzo.rb", "Manifest", "merb_virtuozzo.gemspec", "Rakefile", "README.rdoc", "spec/spec_helper.rb", "spec/virtuozzo_spec.rb"]
|
14
14
|
s.has_rdoc = true
|
15
15
|
s.homepage = %q{http://github.com/plainprograms/merb_virtuozzo}
|
16
16
|
s.rdoc_options = ["--line-numbers", "--inline-source", "--title", "Merb_virtuozzo", "--main", "README.rdoc"]
|
@@ -25,16 +25,16 @@ Gem::Specification.new do |s|
|
|
25
25
|
|
26
26
|
if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
|
27
27
|
s.add_runtime_dependency(%q<merb>, ["~> 1.0"])
|
28
|
-
s.add_runtime_dependency(%q<virtuozzo>, ["~> 0.
|
28
|
+
s.add_runtime_dependency(%q<virtuozzo>, ["~> 0.7"])
|
29
29
|
s.add_development_dependency(%q<echoe>, ["~> 3.0"])
|
30
30
|
else
|
31
31
|
s.add_dependency(%q<merb>, ["~> 1.0"])
|
32
|
-
s.add_dependency(%q<virtuozzo>, ["~> 0.
|
32
|
+
s.add_dependency(%q<virtuozzo>, ["~> 0.7"])
|
33
33
|
s.add_dependency(%q<echoe>, ["~> 3.0"])
|
34
34
|
end
|
35
35
|
else
|
36
36
|
s.add_dependency(%q<merb>, ["~> 1.0"])
|
37
|
-
s.add_dependency(%q<virtuozzo>, ["~> 0.
|
37
|
+
s.add_dependency(%q<virtuozzo>, ["~> 0.7"])
|
38
38
|
s.add_dependency(%q<echoe>, ["~> 3.0"])
|
39
39
|
end
|
40
40
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: plainprograms-merb_virtuozzo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Thompson
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-11-
|
12
|
+
date: 2008-11-22 00:00:00 -08:00
|
13
13
|
default_executable:
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
@@ -28,7 +28,7 @@ dependencies:
|
|
28
28
|
requirements:
|
29
29
|
- - ~>
|
30
30
|
- !ruby/object:Gem::Version
|
31
|
-
version: "0.
|
31
|
+
version: "0.7"
|
32
32
|
version:
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
34
|
name: echoe
|
@@ -48,22 +48,20 @@ extensions: []
|
|
48
48
|
extra_rdoc_files:
|
49
49
|
- lib/merb_virtuozzo/merb_virtuozzo.rb
|
50
50
|
- lib/merb_virtuozzo/merbtasks.rb
|
51
|
-
- lib/merb_virtuozzo/mixins/sample_configurations_mixin.rb
|
52
51
|
- lib/merb_virtuozzo/virtuozzo.yml.sample
|
53
52
|
- lib/merb_virtuozzo.rb
|
54
53
|
- README.rdoc
|
55
54
|
files:
|
56
55
|
- lib/merb_virtuozzo/merb_virtuozzo.rb
|
57
56
|
- lib/merb_virtuozzo/merbtasks.rb
|
58
|
-
- lib/merb_virtuozzo/mixins/sample_configurations_mixin.rb
|
59
57
|
- lib/merb_virtuozzo/virtuozzo.yml.sample
|
60
58
|
- lib/merb_virtuozzo.rb
|
61
59
|
- Manifest
|
60
|
+
- merb_virtuozzo.gemspec
|
62
61
|
- Rakefile
|
63
62
|
- README.rdoc
|
64
63
|
- spec/spec_helper.rb
|
65
64
|
- spec/virtuozzo_spec.rb
|
66
|
-
- merb_virtuozzo.gemspec
|
67
65
|
has_rdoc: true
|
68
66
|
homepage: http://github.com/plainprograms/merb_virtuozzo
|
69
67
|
post_install_message:
|
@@ -1,44 +0,0 @@
|
|
1
|
-
module Merb
|
2
|
-
module Viruozzo
|
3
|
-
module Mixins
|
4
|
-
module SampleConfigurationsMixin
|
5
|
-
##
|
6
|
-
# Returns all available sample configurations. This method caches the
|
7
|
-
# results and does no automatic refresh. To force refreshing of the
|
8
|
-
# cache pass true as the sole argument.
|
9
|
-
#
|
10
|
-
# @param [Boolean] refresh whether to force a new SOAP call to be made
|
11
|
-
#
|
12
|
-
# @return [Array] sample configurations available for use
|
13
|
-
# @api public
|
14
|
-
def available_samples(refresh = false)
|
15
|
-
unless refresh
|
16
|
-
@available_confs ||= _get_available_samples
|
17
|
-
else
|
18
|
-
@available_confs = _get_available_samples
|
19
|
-
end
|
20
|
-
|
21
|
-
return @available_confs
|
22
|
-
end
|
23
|
-
|
24
|
-
private
|
25
|
-
|
26
|
-
##
|
27
|
-
# Does the work of retrieving available sample configurations.
|
28
|
-
#
|
29
|
-
# @return [Array] sample configurations available for use
|
30
|
-
# @api private
|
31
|
-
def _get_available_samples
|
32
|
-
res = Merb::Virtuozzo.connection.sample_configurations.get_sample_conf(nil)
|
33
|
-
|
34
|
-
confs = []
|
35
|
-
|
36
|
-
res.sample_conf.each { |c| confs << c }
|
37
|
-
|
38
|
-
return confs
|
39
|
-
end
|
40
|
-
|
41
|
-
end
|
42
|
-
end
|
43
|
-
end
|
44
|
-
end
|