attr_encrypted 1.3.4 → 1.3.5
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/README.rdoc +1 -1
- data/lib/attr_encrypted/adapters/active_record.rb +5 -1
- data/lib/attr_encrypted/version.rb +1 -1
- data/test/test_helper.rb +2 -4
- metadata +21 -10
    
        data/README.rdoc
    CHANGED
    
    | @@ -1,4 +1,4 @@ | |
| 1 | 
            -
            = attr_encrypted {<img src="https://travis-ci.org/attr-encrypted/attr_encrypted.png" />}[https://travis-ci.org/attr-encrypted/attr_encrypted] | 
| 1 | 
            +
            = attr_encrypted {<img src="https://travis-ci.org/attr-encrypted/attr_encrypted.png" />}[https://travis-ci.org/attr-encrypted/attr_encrypted]
         | 
| 2 2 |  | 
| 3 3 | 
             
            Generates attr_accessors that encrypt and decrypt attributes transparently
         | 
| 4 4 |  | 
| @@ -56,7 +56,11 @@ if defined?(ActiveRecord::Base) | |
| 56 56 | 
             
                        # We add accessor methods of the db columns to the list of instance
         | 
| 57 57 | 
             
                        # methods returned to let ActiveRecord define the accessor methods
         | 
| 58 58 | 
             
                        # for the db columns
         | 
| 59 | 
            -
                         | 
| 59 | 
            +
                        
         | 
| 60 | 
            +
                        # Use with_connection so the connection doesn't stay pinned to the thread.
         | 
| 61 | 
            +
                        connected = ::ActiveRecord::Base.connection_pool.with_connection(&:active?) rescue false
         | 
| 62 | 
            +
                        
         | 
| 63 | 
            +
                        if connected && table_exists?
         | 
| 60 64 | 
             
                          columns_hash.keys.inject(super) {|instance_methods, column_name| instance_methods.concat [column_name.to_sym, :"#{column_name}="]}
         | 
| 61 65 | 
             
                        else
         | 
| 62 66 | 
             
                          super
         | 
    
        data/test/test_helper.rb
    CHANGED
    
    | @@ -12,10 +12,6 @@ if RUBY_VERSION >= '1.9.3' | |
| 12 12 | 
             
              end
         | 
| 13 13 | 
             
            end
         | 
| 14 14 |  | 
| 15 | 
            -
            require 'minitest'
         | 
| 16 | 
            -
            require "codeclimate-test-reporter"
         | 
| 17 | 
            -
            CodeClimate::TestReporter.start
         | 
| 18 | 
            -
             | 
| 19 15 | 
             
            require 'minitest/autorun'
         | 
| 20 16 | 
             
            require 'digest/sha2'
         | 
| 21 17 | 
             
            require 'rubygems'
         | 
| @@ -31,6 +27,8 @@ require 'attr_encrypted' | |
| 31 27 |  | 
| 32 28 | 
             
            puts "\nTesting with ActiveRecord #{ActiveRecord::VERSION::STRING rescue ENV['ACTIVE_RECORD_VERSION']}"
         | 
| 33 29 |  | 
| 30 | 
            +
            Minitest::Test = Minitest::Unit::TestCase if ActiveRecord::VERSION::STRING >= '4.0.0'
         | 
| 31 | 
            +
             | 
| 34 32 | 
             
            DB = Sequel.sqlite
         | 
| 35 33 |  | 
| 36 34 | 
             
            # The :after_initialize hook was removed in Sequel 4.0
         | 
    
        metadata
    CHANGED
    
    | @@ -1,7 +1,7 @@ | |
| 1 1 | 
             
            --- !ruby/object:Gem::Specification
         | 
| 2 2 | 
             
            name: attr_encrypted
         | 
| 3 3 | 
             
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            -
              version: 1.3. | 
| 4 | 
            +
              version: 1.3.5
         | 
| 5 5 | 
             
              prerelease: 
         | 
| 6 6 | 
             
            platform: ruby
         | 
| 7 7 | 
             
            authors:
         | 
| @@ -12,14 +12,14 @@ authors: | |
| 12 12 | 
             
            autorequire: 
         | 
| 13 13 | 
             
            bindir: bin
         | 
| 14 14 | 
             
            cert_chain: []
         | 
| 15 | 
            -
            date:  | 
| 15 | 
            +
            date: 2016-01-12 00:00:00.000000000 Z
         | 
| 16 16 | 
             
            dependencies:
         | 
| 17 17 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 18 18 | 
             
              name: encryptor
         | 
| 19 19 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| 20 20 | 
             
                none: false
         | 
| 21 21 | 
             
                requirements:
         | 
| 22 | 
            -
                - -  | 
| 22 | 
            +
                - - ~>
         | 
| 23 23 | 
             
                  - !ruby/object:Gem::Version
         | 
| 24 24 | 
             
                    version: 1.3.0
         | 
| 25 25 | 
             
              type: :runtime
         | 
| @@ -27,7 +27,7 @@ dependencies: | |
| 27 27 | 
             
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 28 28 | 
             
                none: false
         | 
| 29 29 | 
             
                requirements:
         | 
| 30 | 
            -
                - -  | 
| 30 | 
            +
                - - ~>
         | 
| 31 31 | 
             
                  - !ruby/object:Gem::Version
         | 
| 32 32 | 
             
                    version: 1.3.0
         | 
| 33 33 | 
             
            - !ruby/object:Gem::Dependency
         | 
| @@ -78,6 +78,22 @@ dependencies: | |
| 78 78 | 
             
                - - ! '>='
         | 
| 79 79 | 
             
                  - !ruby/object:Gem::Version
         | 
| 80 80 | 
             
                    version: '0'
         | 
| 81 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 82 | 
            +
              name: addressable
         | 
| 83 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 84 | 
            +
                none: false
         | 
| 85 | 
            +
                requirements:
         | 
| 86 | 
            +
                - - '='
         | 
| 87 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 88 | 
            +
                    version: 2.3.7
         | 
| 89 | 
            +
              type: :development
         | 
| 90 | 
            +
              prerelease: false
         | 
| 91 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 92 | 
            +
                none: false
         | 
| 93 | 
            +
                requirements:
         | 
| 94 | 
            +
                - - '='
         | 
| 95 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 96 | 
            +
                    version: 2.3.7
         | 
| 81 97 | 
             
            - !ruby/object:Gem::Dependency
         | 
| 82 98 | 
             
              name: mocha
         | 
| 83 99 | 
             
              requirement: !ruby/object:Gem::Requirement
         | 
| @@ -236,18 +252,12 @@ required_ruby_version: !ruby/object:Gem::Requirement | |
| 236 252 | 
             
              - - ! '>='
         | 
| 237 253 | 
             
                - !ruby/object:Gem::Version
         | 
| 238 254 | 
             
                  version: '0'
         | 
| 239 | 
            -
                  segments:
         | 
| 240 | 
            -
                  - 0
         | 
| 241 | 
            -
                  hash: -1997953751590493696
         | 
| 242 255 | 
             
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 243 256 | 
             
              none: false
         | 
| 244 257 | 
             
              requirements:
         | 
| 245 258 | 
             
              - - ! '>='
         | 
| 246 259 | 
             
                - !ruby/object:Gem::Version
         | 
| 247 260 | 
             
                  version: '0'
         | 
| 248 | 
            -
                  segments:
         | 
| 249 | 
            -
                  - 0
         | 
| 250 | 
            -
                  hash: -1997953751590493696
         | 
| 251 261 | 
             
            requirements: []
         | 
| 252 262 | 
             
            rubyforge_project: 
         | 
| 253 263 | 
             
            rubygems_version: 1.8.23.2
         | 
| @@ -267,3 +277,4 @@ test_files: | |
| 267 277 | 
             
            - test/run.sh
         | 
| 268 278 | 
             
            - test/sequel_test.rb
         | 
| 269 279 | 
             
            - test/test_helper.rb
         | 
| 280 | 
            +
            has_rdoc: false
         |