rest_connection 0.0.21 → 0.0.22
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/VERSION
    CHANGED
    
    | @@ -1 +1 @@ | |
| 1 | 
            -
            0.0. | 
| 1 | 
            +
            0.0.22
         | 
| @@ -67,9 +67,9 @@ module RightScale | |
| 67 67 | 
             
                  # 1) takes href (URI), 
         | 
| 68 68 | 
             
                  # 2) or id (Integer)
         | 
| 69 69 | 
             
                  # 3) or symbol :all, :first, :last
         | 
| 70 | 
            -
                  def find(href, &block)
         | 
| 70 | 
            +
                  def find(href, additional_params={}, &block)
         | 
| 71 71 | 
             
                    if href.is_a?(Integer)
         | 
| 72 | 
            -
                      return self.new(connection.get(self.resource_plural_name + "/#{href}"))
         | 
| 72 | 
            +
                      return self.new(connection.get(self.resource_plural_name + "/#{href}", additional_params))
         | 
| 73 73 | 
             
                    elsif href.is_a?(Symbol)
         | 
| 74 74 | 
             
                      results = self.find_all
         | 
| 75 75 | 
             
                      if block_given?
         | 
| @@ -143,6 +143,11 @@ class Server | |
| 143 143 | 
             
                else
         | 
| 144 144 | 
             
                  raise "Invalid class passed to run_executable, needs Executable or RightScript, was:#{executable.class}"
         | 
| 145 145 | 
             
                end
         | 
| 146 | 
            +
                
         | 
| 147 | 
            +
                if not opts.nil? and opts.has_key?(:ignore_lock)
         | 
| 148 | 
            +
                  script_options[:server][:ignore_lock] = "true"
         | 
| 149 | 
            +
                  opts.delete(:ignore_lock)
         | 
| 150 | 
            +
                end
         | 
| 146 151 |  | 
| 147 152 | 
             
                serv_href = URI.parse(self.href)
         | 
| 148 153 | 
             
                script_options[:server][:parameters] = opts unless opts.nil?
         | 
| @@ -17,8 +17,10 @@ class Tag | |
| 17 17 | 
             
              include RightScale::Api::Base
         | 
| 18 18 | 
             
              extend RightScale::Api::BaseExtend
         | 
| 19 19 |  | 
| 20 | 
            -
              def self.search(resource_name, tags)
         | 
| 21 | 
            -
                 | 
| 20 | 
            +
              def self.search(resource_name, tags, opts=nil)
         | 
| 21 | 
            +
                parameters = { :resource_type => resource_name.to_s, :tags => tags }
         | 
| 22 | 
            +
                parameters.merge!(opts) unless opts.nil?
         | 
| 23 | 
            +
                result = connection.get("tags/search", parameters)
         | 
| 22 24 | 
             
              end
         | 
| 23 25 |  | 
| 24 26 | 
             
              def self.search_by_href(resource_href)
         | 
    
        data/rest_connection.gemspec
    CHANGED
    
    | @@ -5,11 +5,11 @@ | |
| 5 5 |  | 
| 6 6 | 
             
            Gem::Specification.new do |s|
         | 
| 7 7 | 
             
              s.name = %q{rest_connection}
         | 
| 8 | 
            -
              s.version = "0.0. | 
| 8 | 
            +
              s.version = "0.0.22"
         | 
| 9 9 |  | 
| 10 10 | 
             
              s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
         | 
| 11 11 | 
             
              s.authors = ["Jeremy Deininger"]
         | 
| 12 | 
            -
              s.date = %q{2011- | 
| 12 | 
            +
              s.date = %q{2011-09-10}
         | 
| 13 13 | 
             
              s.description = %q{provides rest_connection}
         | 
| 14 14 | 
             
              s.email = %q{jeremy@rubyonlinux.org}
         | 
| 15 15 | 
             
              s.extra_rdoc_files = [
         | 
| @@ -76,28 +76,8 @@ Gem::Specification.new do |s| | |
| 76 76 | 
             
              ]
         | 
| 77 77 | 
             
              s.homepage = %q{http://github.com/jeremyd/rest_connection}
         | 
| 78 78 | 
             
              s.require_paths = ["lib"]
         | 
| 79 | 
            -
              s.rubygems_version = %q{1. | 
| 79 | 
            +
              s.rubygems_version = %q{1.6.2}
         | 
| 80 80 | 
             
              s.summary = %q{lib for restful connections to the rightscale api}
         | 
| 81 | 
            -
              s.test_files = [
         | 
| 82 | 
            -
                "examples/console.rb",
         | 
| 83 | 
            -
                "examples/cucumber/step_definitions/deployment_steps.rb",
         | 
| 84 | 
            -
                "examples/cucumber/step_definitions/mysql_steps.rb",
         | 
| 85 | 
            -
                "examples/cucumber/step_definitions/recipe_steps.rb",
         | 
| 86 | 
            -
                "examples/cucumber/step_definitions/spot_check_steps.rb",
         | 
| 87 | 
            -
                "examples/relaunch_deployment.rb",
         | 
| 88 | 
            -
                "examples/right_scale_ec2_instances_api_test.rb",
         | 
| 89 | 
            -
                "spec/ec2_server_array_spec.rb",
         | 
| 90 | 
            -
                "spec/ec2_ssh_key_internal_spec.rb",
         | 
| 91 | 
            -
                "spec/image_jockey.rb",
         | 
| 92 | 
            -
                "spec/method_missing_spec.rb",
         | 
| 93 | 
            -
                "spec/right_script_internal.rb",
         | 
| 94 | 
            -
                "spec/rs_internal_spec.rb",
         | 
| 95 | 
            -
                "spec/server_internal_spec.rb",
         | 
| 96 | 
            -
                "spec/server_spec.rb",
         | 
| 97 | 
            -
                "spec/server_template_internal.rb",
         | 
| 98 | 
            -
                "spec/spec_helper.rb",
         | 
| 99 | 
            -
                "spec/tag_spec.rb"
         | 
| 100 | 
            -
              ]
         | 
| 101 81 |  | 
| 102 82 | 
             
              if s.respond_to? :specification_version then
         | 
| 103 83 | 
             
                s.specification_version = 3
         | 
    
        metadata
    CHANGED
    
    | @@ -1,8 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: rest_connection
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            +
              hash: 51
         | 
| 4 5 | 
             
              prerelease: 
         | 
| 5 | 
            -
               | 
| 6 | 
            +
              segments: 
         | 
| 7 | 
            +
              - 0
         | 
| 8 | 
            +
              - 0
         | 
| 9 | 
            +
              - 22
         | 
| 10 | 
            +
              version: 0.0.22
         | 
| 6 11 | 
             
            platform: ruby
         | 
| 7 12 | 
             
            authors: 
         | 
| 8 13 | 
             
            - Jeremy Deininger
         | 
| @@ -10,7 +15,8 @@ autorequire: | |
| 10 15 | 
             
            bindir: bin
         | 
| 11 16 | 
             
            cert_chain: []
         | 
| 12 17 |  | 
| 13 | 
            -
            date: 2011- | 
| 18 | 
            +
            date: 2011-09-10 00:00:00 -07:00
         | 
| 19 | 
            +
            default_executable: 
         | 
| 14 20 | 
             
            dependencies: 
         | 
| 15 21 | 
             
            - !ruby/object:Gem::Dependency 
         | 
| 16 22 | 
             
              name: activesupport
         | 
| @@ -20,6 +26,11 @@ dependencies: | |
| 20 26 | 
             
                requirements: 
         | 
| 21 27 | 
             
                - - "="
         | 
| 22 28 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 29 | 
            +
                    hash: 23
         | 
| 30 | 
            +
                    segments: 
         | 
| 31 | 
            +
                    - 2
         | 
| 32 | 
            +
                    - 3
         | 
| 33 | 
            +
                    - 10
         | 
| 23 34 | 
             
                    version: 2.3.10
         | 
| 24 35 | 
             
              type: :runtime
         | 
| 25 36 | 
             
              version_requirements: *id001
         | 
| @@ -31,6 +42,9 @@ dependencies: | |
| 31 42 | 
             
                requirements: 
         | 
| 32 43 | 
             
                - - ">="
         | 
| 33 44 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 45 | 
            +
                    hash: 3
         | 
| 46 | 
            +
                    segments: 
         | 
| 47 | 
            +
                    - 0
         | 
| 34 48 | 
             
                    version: "0"
         | 
| 35 49 | 
             
              type: :runtime
         | 
| 36 50 | 
             
              version_requirements: *id002
         | 
| @@ -42,6 +56,9 @@ dependencies: | |
| 42 56 | 
             
                requirements: 
         | 
| 43 57 | 
             
                - - ">="
         | 
| 44 58 | 
             
                  - !ruby/object:Gem::Version 
         | 
| 59 | 
            +
                    hash: 3
         | 
| 60 | 
            +
                    segments: 
         | 
| 61 | 
            +
                    - 0
         | 
| 45 62 | 
             
                    version: "0"
         | 
| 46 63 | 
             
              type: :runtime
         | 
| 47 64 | 
             
              version_requirements: *id003
         | 
| @@ -111,6 +128,7 @@ files: | |
| 111 128 | 
             
            - spec/server_template_internal.rb
         | 
| 112 129 | 
             
            - spec/spec_helper.rb
         | 
| 113 130 | 
             
            - spec/tag_spec.rb
         | 
| 131 | 
            +
            has_rdoc: true
         | 
| 114 132 | 
             
            homepage: http://github.com/jeremyd/rest_connection
         | 
| 115 133 | 
             
            licenses: []
         | 
| 116 134 |  | 
| @@ -124,36 +142,25 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 124 142 | 
             
              requirements: 
         | 
| 125 143 | 
             
              - - ">="
         | 
| 126 144 | 
             
                - !ruby/object:Gem::Version 
         | 
| 145 | 
            +
                  hash: 3
         | 
| 146 | 
            +
                  segments: 
         | 
| 147 | 
            +
                  - 0
         | 
| 127 148 | 
             
                  version: "0"
         | 
| 128 149 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement 
         | 
| 129 150 | 
             
              none: false
         | 
| 130 151 | 
             
              requirements: 
         | 
| 131 152 | 
             
              - - ">="
         | 
| 132 153 | 
             
                - !ruby/object:Gem::Version 
         | 
| 154 | 
            +
                  hash: 3
         | 
| 155 | 
            +
                  segments: 
         | 
| 156 | 
            +
                  - 0
         | 
| 133 157 | 
             
                  version: "0"
         | 
| 134 158 | 
             
            requirements: []
         | 
| 135 159 |  | 
| 136 160 | 
             
            rubyforge_project: 
         | 
| 137 | 
            -
            rubygems_version: 1. | 
| 161 | 
            +
            rubygems_version: 1.6.2
         | 
| 138 162 | 
             
            signing_key: 
         | 
| 139 163 | 
             
            specification_version: 3
         | 
| 140 164 | 
             
            summary: lib for restful connections to the rightscale api
         | 
| 141 | 
            -
            test_files: 
         | 
| 142 | 
            -
             | 
| 143 | 
            -
            - examples/cucumber/step_definitions/deployment_steps.rb
         | 
| 144 | 
            -
            - examples/cucumber/step_definitions/mysql_steps.rb
         | 
| 145 | 
            -
            - examples/cucumber/step_definitions/recipe_steps.rb
         | 
| 146 | 
            -
            - examples/cucumber/step_definitions/spot_check_steps.rb
         | 
| 147 | 
            -
            - examples/relaunch_deployment.rb
         | 
| 148 | 
            -
            - examples/right_scale_ec2_instances_api_test.rb
         | 
| 149 | 
            -
            - spec/ec2_server_array_spec.rb
         | 
| 150 | 
            -
            - spec/ec2_ssh_key_internal_spec.rb
         | 
| 151 | 
            -
            - spec/image_jockey.rb
         | 
| 152 | 
            -
            - spec/method_missing_spec.rb
         | 
| 153 | 
            -
            - spec/right_script_internal.rb
         | 
| 154 | 
            -
            - spec/rs_internal_spec.rb
         | 
| 155 | 
            -
            - spec/server_internal_spec.rb
         | 
| 156 | 
            -
            - spec/server_spec.rb
         | 
| 157 | 
            -
            - spec/server_template_internal.rb
         | 
| 158 | 
            -
            - spec/spec_helper.rb
         | 
| 159 | 
            -
            - spec/tag_spec.rb
         | 
| 165 | 
            +
            test_files: []
         | 
| 166 | 
            +
             |