right_support 2.3.5 → 2.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/lib/right_support/db/cassandra_model.rb +10 -5
- data/right_support.gemspec +2 -2
- metadata +4 -4
| @@ -166,14 +166,19 @@ module RightSupport::DB | |
| 166 166 | 
             
                    @@default_keyspace = (kyspc + "_" + (ENV['RACK_ENV'] || 'development'))
         | 
| 167 167 | 
             
                  end
         | 
| 168 168 |  | 
| 169 | 
            -
                  #  | 
| 169 | 
            +
                  # Temporarily change the working keyspace for this class for the duration of
         | 
| 170 | 
            +
                  # the block. Resets working keyspace back to default once control has
         | 
| 171 | 
            +
                  # returned to the caller.
         | 
| 170 172 | 
             
                  #
         | 
| 171 173 | 
             
                  # === Parameters
         | 
| 172 | 
            -
                  #  | 
| 174 | 
            +
                  # keyspace(String):: Keyspace name
         | 
| 175 | 
            +
                  # append_env(true|false):: optional; default true - whether to append the environment name
         | 
| 173 176 | 
             
                  # block(Proc):: Code that will be called in keyspace context
         | 
| 174 | 
            -
             | 
| 175 | 
            -
             | 
| 176 | 
            -
                     | 
| 177 | 
            +
                  def with_keyspace(keyspace, append_env=true, &block)
         | 
| 178 | 
            +
                    @@current_keyspace = keyspace
         | 
| 179 | 
            +
                    if append_env
         | 
| 180 | 
            +
                      @@current_keyspace = "#{@@current_keyspace}_#{ENV['RACK_ENV'] || 'development'}"
         | 
| 181 | 
            +
                    end
         | 
| 177 182 | 
             
                    block.call
         | 
| 178 183 | 
             
                    ensure
         | 
| 179 184 | 
             
                      @@current_keyspace = nil
         | 
    
        data/right_support.gemspec
    CHANGED
    
    | @@ -7,8 +7,8 @@ spec = Gem::Specification.new do |s| | |
| 7 7 | 
             
              s.required_ruby_version = Gem::Requirement.new(">= 1.8.7")
         | 
| 8 8 |  | 
| 9 9 | 
             
              s.name    = 'right_support'
         | 
| 10 | 
            -
              s.version = '2.3. | 
| 11 | 
            -
              s.date    = '2012-09- | 
| 10 | 
            +
              s.version = '2.3.6'
         | 
| 11 | 
            +
              s.date    = '2012-09-17'
         | 
| 12 12 |  | 
| 13 13 | 
             
              s.authors = ['Tony Spataro', 'Sergey Sergyenko', 'Ryan Williamson', 'Lee Kirchhoff', 'Sergey Enin']
         | 
| 14 14 | 
             
              s.email   = 'support@rightscale.com'
         | 
    
        metadata
    CHANGED
    
    | @@ -1,13 +1,13 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification 
         | 
| 2 2 | 
             
            name: right_support
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version 
         | 
| 4 | 
            -
              hash:  | 
| 4 | 
            +
              hash: 15
         | 
| 5 5 | 
             
              prerelease: false
         | 
| 6 6 | 
             
              segments: 
         | 
| 7 7 | 
             
              - 2
         | 
| 8 8 | 
             
              - 3
         | 
| 9 | 
            -
              -  | 
| 10 | 
            -
              version: 2.3. | 
| 9 | 
            +
              - 6
         | 
| 10 | 
            +
              version: 2.3.6
         | 
| 11 11 | 
             
            platform: ruby
         | 
| 12 12 | 
             
            authors: 
         | 
| 13 13 | 
             
            - Tony Spataro
         | 
| @@ -19,7 +19,7 @@ autorequire: | |
| 19 19 | 
             
            bindir: bin
         | 
| 20 20 | 
             
            cert_chain: []
         | 
| 21 21 |  | 
| 22 | 
            -
            date: 2012-09- | 
| 22 | 
            +
            date: 2012-09-17 00:00:00 -07:00
         | 
| 23 23 | 
             
            default_executable: 
         | 
| 24 24 | 
             
            dependencies: []
         | 
| 25 25 |  |