couchbase-orm 0.0.9 → 0.0.10
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.
- checksums.yaml +4 -4
 - data/lib/couchbase-orm/base.rb +2 -2
 - data/lib/couchbase-orm/railtie.rb +1 -1
 - data/lib/couchbase-orm/version.rb +1 -1
 - data/spec/base_spec.rb +2 -0
 - metadata +2 -2
 
    
        checksums.yaml
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            ---
         
     | 
| 
       2 
2 
     | 
    
         
             
            SHA1:
         
     | 
| 
       3 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       4 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 3 
     | 
    
         
            +
              metadata.gz: 337cd9767138dc33f0f8c5e37efeaa702939549b
         
     | 
| 
      
 4 
     | 
    
         
            +
              data.tar.gz: ecbff763de775b31be872e00bc4d92e1f8d72a88
         
     | 
| 
       5 
5 
     | 
    
         
             
            SHA512:
         
     | 
| 
       6 
     | 
    
         
            -
              metadata.gz:  
     | 
| 
       7 
     | 
    
         
            -
              data.tar.gz:  
     | 
| 
      
 6 
     | 
    
         
            +
              metadata.gz: 89cfe54e91222fec853e1d17749d01b8410afd1d595a3b4180f9ea769f9b2b238fc7b6f69ae4e1c5e79b19d4cbeb1c82c0da63122b47033660a65321615bae51
         
     | 
| 
      
 7 
     | 
    
         
            +
              data.tar.gz: 016a9c19ffe4f39f5f9cf856a26138081f17e1216878136c735c2d346278c695dfa05d8150ca49c593b0e7778ad7b6c1c628bf2fea7024f4525a4c946c48d85c
         
     | 
    
        data/lib/couchbase-orm/base.rb
    CHANGED
    
    | 
         @@ -165,10 +165,10 @@ module CouchbaseOrm 
     | 
|
| 
       165 
165 
     | 
    
         
             
                                attributes.delete(:id)
         
     | 
| 
       166 
166 
     | 
    
         
             
                                @__attributes__ = attributes
         
     | 
| 
       167 
167 
     | 
    
         
             
                            else
         
     | 
| 
       168 
     | 
    
         
            -
                                super( 
     | 
| 
      
 168 
     | 
    
         
            +
                                super(attributes.merge(Hash(model)))
         
     | 
| 
       169 
169 
     | 
    
         
             
                            end
         
     | 
| 
       170 
170 
     | 
    
         
             
                        else
         
     | 
| 
       171 
     | 
    
         
            -
                            super( 
     | 
| 
      
 171 
     | 
    
         
            +
                            super(attributes)
         
     | 
| 
       172 
172 
     | 
    
         
             
                        end
         
     | 
| 
       173 
173 
     | 
    
         | 
| 
       174 
174 
     | 
    
         
             
                        yield self if block_given?
         
     | 
| 
         @@ -25,7 +25,7 @@ module Rails #:nodoc: 
     | 
|
| 
       25 
25 
     | 
    
         
             
                    class Railtie < Rails::Railtie #:nodoc:
         
     | 
| 
       26 
26 
     | 
    
         | 
| 
       27 
27 
     | 
    
         
             
                        config.couchbase = ActiveSupport::OrderedOptions.new
         
     | 
| 
       28 
     | 
    
         
            -
                        config.couchbase.ensure_design_documents  
     | 
| 
      
 28 
     | 
    
         
            +
                        config.couchbase.ensure_design_documents = true
         
     | 
| 
       29 
29 
     | 
    
         | 
| 
       30 
30 
     | 
    
         
             
                        # Maping of rescued exceptions to HTTP responses
         
     | 
| 
       31 
31 
     | 
    
         
             
                        #
         
     | 
    
        data/spec/base_spec.rb
    CHANGED
    
    | 
         @@ -17,6 +17,7 @@ describe CouchbaseOrm::Base do 
     | 
|
| 
       17 
17 
     | 
    
         
             
                it "should be comparable to other objects" do
         
     | 
| 
       18 
18 
     | 
    
         
             
                    base  = BaseTest.create!(name: 'joe')
         
     | 
| 
       19 
19 
     | 
    
         
             
                    base2 = BaseTest.create!(name: 'joe')
         
     | 
| 
      
 20 
     | 
    
         
            +
                    base3 = BaseTest.create!(ActiveSupport::HashWithIndifferentAccess.new(name: 'joe'))
         
     | 
| 
       20 
21 
     | 
    
         | 
| 
       21 
22 
     | 
    
         
             
                    expect(base).to eq(base)
         
     | 
| 
       22 
23 
     | 
    
         
             
                    expect(base).to be(base)
         
     | 
| 
         @@ -29,6 +30,7 @@ describe CouchbaseOrm::Base do 
     | 
|
| 
       29 
30 
     | 
    
         | 
| 
       30 
31 
     | 
    
         
             
                    base.delete
         
     | 
| 
       31 
32 
     | 
    
         
             
                    base2.delete
         
     | 
| 
      
 33 
     | 
    
         
            +
                    base3.delete
         
     | 
| 
       32 
34 
     | 
    
         
             
                end
         
     | 
| 
       33 
35 
     | 
    
         | 
| 
       34 
36 
     | 
    
         
             
                it "should load database responses" do
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,14 +1,14 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: couchbase-orm
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.10
         
     | 
| 
       5 
5 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       6 
6 
     | 
    
         
             
            authors:
         
     | 
| 
       7 
7 
     | 
    
         
             
            - Stephen von Takach
         
     | 
| 
       8 
8 
     | 
    
         
             
            autorequire: 
         
     | 
| 
       9 
9 
     | 
    
         
             
            bindir: bin
         
     | 
| 
       10 
10 
     | 
    
         
             
            cert_chain: []
         
     | 
| 
       11 
     | 
    
         
            -
            date: 2016-11- 
     | 
| 
      
 11 
     | 
    
         
            +
            date: 2016-11-23 00:00:00.000000000 Z
         
     | 
| 
       12 
12 
     | 
    
         
             
            dependencies:
         
     | 
| 
       13 
13 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       14 
14 
     | 
    
         
             
              name: libcouchbase
         
     |