auser-poolparty 1.3.5 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Rakefile +2 -2
- data/VERSION.yml +1 -1
- data/bin/cloud-misc +34 -0
- data/bin/{poolparty-setup → cloud-setup} +0 -0
- data/bin/cloud-ssh +4 -1
- data/config/jeweler.rb +4 -3
- data/examples/monitored_cloud.rb +1 -1
- data/examples/thrift/thrift_example.rb +5 -3
- data/examples/vmware.rb +10 -0
- data/lib/cloud_providers/cloud_provider_instance.rb +13 -4
- data/lib/cloud_providers/connections.rb +1 -1
- data/lib/core/file.rb +12 -0
- data/lib/dependency_resolvers/base.rb +1 -1
- data/lib/dependency_resolvers/chef.rb +7 -5
- data/lib/dependency_resolvers/proxy_object.rb +11 -3
- data/lib/poolparty.rb +3 -1
- data/lib/poolparty/base.rb +1 -2
- data/lib/poolparty/cloud.rb +20 -5
- data/lib/poolparty/default.rb +1 -0
- data/lib/poolparty/plugin.rb +1 -5
- data/lib/poolparty/plugins/apache.rb +8 -6
- data/lib/poolparty/plugins/collectd.rb +24 -0
- data/lib/poolparty/plugins/collectd/templates/collectd.conf.erb +369 -0
- data/lib/poolparty/plugins/hermes.rb +89 -0
- data/lib/poolparty/pool.rb +26 -3
- data/lib/poolparty/resource.rb +12 -11
- data/lib/poolparty/resources/line.rb +2 -2
- data/lib/poolparty/resources/variable.rb +4 -3
- data/lib/proto/command_interface_handler.rb +17 -1
- data/lib/proto/gen-py/cloudthrift/CommandInterface.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/constants.pyc +0 -0
- data/lib/proto/gen-py/cloudthrift/ttypes.pyc +0 -0
- data/lib/proto/gen-py/thrift/Thrift.pyc +0 -0
- data/lib/proto/gen-py/thrift/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TBinaryProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/TProtocol.pyc +0 -0
- data/lib/proto/gen-py/thrift/protocol/__init__.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TSocket.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/TTransport.pyc +0 -0
- data/lib/proto/gen-py/thrift/transport/__init__.pyc +0 -0
- data/test/lib/dependency_resolvers/chef_test.rb +92 -100
- data/test/lib/poolparty/cloud_test.rb +50 -2
- data/test/lib/poolparty/monitor_test.rb +2 -2
- data/test/lib/poolparty/resource_test.rb +5 -0
- data/test/lib/poolparty/resources/variable_test.rb +33 -10
- metadata +11 -4
| @@ -3,14 +3,14 @@ require "#{File.dirname(__FILE__)}/../../test_helper" | |
| 3 3 | 
             
            class MonitorTest < Test::Unit::TestCase
         | 
| 4 4 |  | 
| 5 5 | 
             
              def setup
         | 
| 6 | 
            -
                @mon = PoolParty::Monitor.new(:cpu) do |c|
         | 
| 6 | 
            +
                @mon = PoolParty::Monitor.new(:'cpu-idle') do |c|
         | 
| 7 7 | 
             
                  vote_for(:expand) if c > 0.8
         | 
| 8 8 | 
             
                  configure if c < 0.1
         | 
| 9 9 | 
             
                end
         | 
| 10 10 | 
             
              end
         | 
| 11 11 |  | 
| 12 12 | 
             
              def test_monitor_initialize    
         | 
| 13 | 
            -
                assert_equal @mon.name, :cpu
         | 
| 13 | 
            +
                assert_equal @mon.name, :'cpu-idle'
         | 
| 14 14 | 
             
                assert_equal Proc, @mon.monitor_block.class
         | 
| 15 15 | 
             
              end
         | 
| 16 16 |  | 
| @@ -48,6 +48,11 @@ class ResourceTest < Test::Unit::TestCase | |
| 48 48 | 
             
                assert_equal "real", parent.testers[1].name
         | 
| 49 49 | 
             
              end
         | 
| 50 50 |  | 
| 51 | 
            +
              def test_does_not_have_a_resource_call
         | 
| 52 | 
            +
                o = @inst.does_not_have_tester "bob"
         | 
| 53 | 
            +
                assert !@inst.testers.last.exists?
         | 
| 54 | 
            +
              end
         | 
| 55 | 
            +
              
         | 
| 51 56 | 
             
              context "print_to methods" do
         | 
| 52 57 | 
             
                setup do
         | 
| 53 58 | 
             
                  @inst = FakeResource.new
         | 
| @@ -1,20 +1,43 @@ | |
| 1 1 | 
             
            require "#{File.dirname(__FILE__)}/../../../test_helper"
         | 
| 2 2 |  | 
| 3 | 
            +
            include_chef_only_resources
         | 
| 3 4 | 
             
            include_fixture_resources
         | 
| 4 5 |  | 
| 5 6 | 
             
            class VariableResourceTest < Test::Unit::TestCase
         | 
| 6 | 
            -
             | 
| 7 | 
            -
             | 
| 8 | 
            -
             | 
| 9 | 
            -
             | 
| 10 | 
            -
             | 
| 11 | 
            -
                end
         | 
| 7 | 
            +
             | 
| 8 | 
            +
              def setup
         | 
| 9 | 
            +
                PoolParty::Resource.define_resource_methods
         | 
| 10 | 
            +
                @res = PoolParty::Resources::Variable.new "files", ["a_file", "b_file"]
         | 
| 11 | 
            +
                @base = DependencyResolvers::Chef
         | 
| 12 12 |  | 
| 13 | 
            -
                 | 
| 14 | 
            -
                  assert_equal @res.name, "files"
         | 
| 15 | 
            -
                  assert_equal @res.value, ["a_file", "b_file"]
         | 
| 16 | 
            -
                end
         | 
| 13 | 
            +
                FileUtils.rm_rf test_dir
         | 
| 17 14 |  | 
| 15 | 
            +
                @comp_dir = test_dir/"tests"/"something"/"new"
         | 
| 16 | 
            +
                @attribute_filepath = @comp_dir/"cookbooks"/"poolparty"/"attributes"/"poolparty.rb"    
         | 
| 17 | 
            +
              end
         | 
| 18 | 
            +
              
         | 
| 19 | 
            +
              def test_add_the_name_and_value_as_options_on_the_variable_instance
         | 
| 20 | 
            +
                assert_equal @res.name, "files"
         | 
| 21 | 
            +
                assert_equal @res.value, ["a_file", "b_file"]
         | 
| 18 22 | 
             
              end
         | 
| 19 23 |  | 
| 24 | 
            +
              def test_handle_printing_from_chef_all_sorts_of_fun_variables
         | 
| 25 | 
            +
                vars = [
         | 
| 26 | 
            +
                  PoolParty::Resources::Variable.new(:the_animal, "Duck"),
         | 
| 27 | 
            +
                  PoolParty::Resources::Variable.new(:hash, {:b => "b"}),
         | 
| 28 | 
            +
                  PoolParty::Resources::Variable.new(:array, [:a, :b, :c, "d"]),
         | 
| 29 | 
            +
                  PoolParty::Resources::Variable.new(:symbol, :d),
         | 
| 30 | 
            +
                ]
         | 
| 31 | 
            +
             | 
| 32 | 
            +
                FileUtils.rm(@attribute_filepath) if File.file?(@attribute_filepath)
         | 
| 33 | 
            +
                
         | 
| 34 | 
            +
                @base.compile_to(vars, @comp_dir)
         | 
| 35 | 
            +
                cont = open(@attribute_filepath).read
         | 
| 36 | 
            +
             | 
| 37 | 
            +
                assert_match /poolparty\[:the_animal\] = "Duck"/, cont
         | 
| 38 | 
            +
                assert_match /poolparty\[:hash\] = \{:b => "b"\}/, cont
         | 
| 39 | 
            +
                assert_match /poolparty\[:array\] = \[ :a, :b, :c, "d" \]/, cont
         | 
| 40 | 
            +
                assert_match /poolparty\[:symbol\] = :d/, cont
         | 
| 41 | 
            +
              end
         | 
| 42 | 
            +
             | 
| 20 43 | 
             
            end
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: auser-poolparty
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              version: 1.3. | 
| 4 | 
            +
              version: 1.3.6
         | 
| 5 5 | 
             
            platform: ruby
         | 
| 6 6 | 
             
            authors: 
         | 
| 7 7 | 
             
            - Ari Lerner
         | 
| @@ -11,7 +11,7 @@ autorequire: | |
| 11 11 | 
             
            bindir: bin
         | 
| 12 12 | 
             
            cert_chain: []
         | 
| 13 13 |  | 
| 14 | 
            -
            date: 2009- | 
| 14 | 
            +
            date: 2009-09-02 00:00:00 -07:00
         | 
| 15 15 | 
             
            default_executable: 
         | 
| 16 16 | 
             
            dependencies: []
         | 
| 17 17 |  | 
| @@ -26,18 +26,20 @@ executables: | |
| 26 26 | 
             
            - cloud-contract
         | 
| 27 27 | 
             
            - cloud-expand
         | 
| 28 28 | 
             
            - cloud-list
         | 
| 29 | 
            +
            - cloud-misc
         | 
| 29 30 | 
             
            - cloud-osxcopy
         | 
| 31 | 
            +
            - cloud-setup
         | 
| 30 32 | 
             
            - cloud-show
         | 
| 31 33 | 
             
            - cloud-ssh
         | 
| 32 34 | 
             
            - cloud-start
         | 
| 33 35 | 
             
            - cloud-terminate
         | 
| 34 36 | 
             
            - cloud-thrift
         | 
| 35 37 | 
             
            - cloud-verify
         | 
| 36 | 
            -
            - poolparty-setup
         | 
| 37 38 | 
             
            extensions: []
         | 
| 38 39 |  | 
| 39 40 | 
             
            extra_rdoc_files: 
         | 
| 40 41 | 
             
            - License.txt
         | 
| 42 | 
            +
            - README.rdoc
         | 
| 41 43 | 
             
            files: 
         | 
| 42 44 | 
             
            - License.txt
         | 
| 43 45 | 
             
            - README.rdoc
         | 
| @@ -51,14 +53,15 @@ files: | |
| 51 53 | 
             
            - bin/cloud-contract
         | 
| 52 54 | 
             
            - bin/cloud-expand
         | 
| 53 55 | 
             
            - bin/cloud-list
         | 
| 56 | 
            +
            - bin/cloud-misc
         | 
| 54 57 | 
             
            - bin/cloud-osxcopy
         | 
| 58 | 
            +
            - bin/cloud-setup
         | 
| 55 59 | 
             
            - bin/cloud-show
         | 
| 56 60 | 
             
            - bin/cloud-ssh
         | 
| 57 61 | 
             
            - bin/cloud-start
         | 
| 58 62 | 
             
            - bin/cloud-terminate
         | 
| 59 63 | 
             
            - bin/cloud-thrift
         | 
| 60 64 | 
             
            - bin/cloud-verify
         | 
| 61 | 
            -
            - bin/poolparty-setup
         | 
| 62 65 | 
             
            - config/jeweler.rb
         | 
| 63 66 | 
             
            - config/requirements.rb
         | 
| 64 67 | 
             
            - examples/basic.rb
         | 
| @@ -133,6 +136,7 @@ files: | |
| 133 136 | 
             
            - lib/cloud_providers/vmware/vmware.rb
         | 
| 134 137 | 
             
            - lib/cloud_providers/vmware/vmware_instance.rb
         | 
| 135 138 | 
             
            - lib/core/array.rb
         | 
| 139 | 
            +
            - lib/core/file.rb
         | 
| 136 140 | 
             
            - lib/core/hash.rb
         | 
| 137 141 | 
             
            - lib/core/integer.rb
         | 
| 138 142 | 
             
            - lib/core/module.rb
         | 
| @@ -178,8 +182,11 @@ files: | |
| 178 182 | 
             
            - lib/poolparty/plugins/apache2/passenger_site.rb
         | 
| 179 183 | 
             
            - lib/poolparty/plugins/apache2/php5.rb
         | 
| 180 184 | 
             
            - lib/poolparty/plugins/apache2/virtual_host.rb
         | 
| 185 | 
            +
            - lib/poolparty/plugins/collectd.rb
         | 
| 186 | 
            +
            - lib/poolparty/plugins/collectd/templates/collectd.conf.erb
         | 
| 181 187 | 
             
            - lib/poolparty/plugins/git.rb
         | 
| 182 188 | 
             
            - lib/poolparty/plugins/git/git_repository.rb
         | 
| 189 | 
            +
            - lib/poolparty/plugins/hermes.rb
         | 
| 183 190 | 
             
            - lib/poolparty/plugins/rails.rb
         | 
| 184 191 | 
             
            - lib/poolparty/plugins/rails/app.rb
         | 
| 185 192 | 
             
            - lib/poolparty/pool.rb
         |