couchbase-model 0.5.3 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: ca53bd57fa7de8fb80866fb9aef809ff7c6e929a
4
+ data.tar.gz: adbaa8e5683b998e26bb3f15f102e049b50178d4
5
+ SHA512:
6
+ metadata.gz: 65d95c35108dec976cd76f5c3f528b43a64b9753e96ab4a1be67c8ee7fb99c49008c14c5dc794a1ac3858d276d96abc5bf140f98037ef3bf6c40efaa561c038e
7
+ data.tar.gz: 8072842e1586925101d9515690036c58da7cec5fc1de46dc3aa23ff8ea80185d97cf9bbe3e2b8045f5a952ffa54201f47e86ad7d4d0eee2a3ce4236701ed7ebe
@@ -1,3 +1,8 @@
1
+ ## 0.5.4 / 2014-08-30
2
+
3
+ * Improved ActiveModel support
4
+ * Fixed stale CAS on model reload
5
+
1
6
  ## 0.5.3 / 2013-06-06
2
7
 
3
8
  * Prefer single-quoted strings (Andrey Koleshko)
@@ -16,7 +16,8 @@ Gem::Specification.new do |s|
16
16
  s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
17
17
  s.require_paths = ['lib']
18
18
 
19
- s.add_runtime_dependency 'couchbase', '~> 1.3.0'
19
+ s.add_runtime_dependency 'couchbase', '~> 1.3.3'
20
+ s.add_runtime_dependency 'activemodel'
20
21
 
21
22
  s.add_development_dependency 'rake'
22
23
  s.add_development_dependency 'minitest'
@@ -0,0 +1,70 @@
1
+ module Couchbase
2
+ module ActiveModel
3
+
4
+ def self.included(base)
5
+ base.class_eval do
6
+ extend ::ActiveModel::Callbacks
7
+ extend ::ActiveModel::Naming
8
+ include ::ActiveModel::Conversion
9
+ include ::ActiveModel::Validations
10
+ include ::ActiveModel::Validations::Callbacks
11
+ include ::ActiveModel::Dirty
12
+
13
+ define_model_callbacks :create, :update, :delete, :save, :initialize
14
+ [:save, :create, :update, :delete, :initialize].each do |meth|
15
+ class_eval <<-EOC
16
+ alias #{meth}_without_callbacks #{meth}
17
+ def #{meth}(*args, &block)
18
+ run_callbacks(:#{meth}) do
19
+ #{meth}_without_callbacks(*args, &block)
20
+ end
21
+ end
22
+ EOC
23
+ end
24
+ end
25
+ end
26
+
27
+ # Public: Allows for access to ActiveModel functionality.
28
+ #
29
+ # Returns self.
30
+ def to_model
31
+ self
32
+ end
33
+
34
+ # Public: Hashes our unique key instead of the entire object.
35
+ # Ruby normally hashes an object to be used in comparisons. In our case
36
+ # we may have two techincally different objects referencing the same entity id,
37
+ # so we will hash just the class and id (via to_key) to compare so we get the
38
+ # expected result
39
+ #
40
+ # Returns a string representing the unique key.
41
+ def hash
42
+ to_param.hash
43
+ end
44
+
45
+ # Public: Overrides eql? to use == in the comparison.
46
+ #
47
+ # other - Another object to compare to
48
+ #
49
+ # Returns a boolean.
50
+ def eql?(other)
51
+ self == other
52
+ end
53
+
54
+ # Public: Overrides == to compare via class and entity id.
55
+ #
56
+ # other - Another object to compare to
57
+ #
58
+ # Example
59
+ #
60
+ # movie = Movie.find(1234)
61
+ # movie.to_key
62
+ # # => 'movie-1234'
63
+ #
64
+ # Returns a string representing the unique key.
65
+ def ==(other)
66
+ hash == other.hash
67
+ end
68
+
69
+ end
70
+ end
@@ -18,9 +18,11 @@
18
18
  require 'digest/md5'
19
19
 
20
20
  require 'couchbase'
21
+ require 'couchbase/active_model'
21
22
  require 'couchbase/model/version'
22
23
  require 'couchbase/model/uuid'
23
24
  require 'couchbase/model/configuration'
25
+ require 'active_model'
24
26
 
25
27
  unless Object.respond_to?(:singleton_class)
26
28
  require 'couchbase/model/ext/singleton_class'
@@ -100,6 +102,7 @@ module Couchbase
100
102
  # connect :port => 80, :bucket => 'blog'
101
103
  # end
102
104
  class Model
105
+
103
106
  # Each model must have identifier
104
107
  #
105
108
  # @since 0.0.1
@@ -217,7 +220,7 @@ module Couchbase
217
220
  # | | `- reduce.js
218
221
  #
219
222
  # The directory structure above demonstrate layout for design document
220
- # with id +_design/link+ and three views: +by_create_at+,
223
+ # with id +_design/link+ and three views: +by_created_at+,
221
224
  # +by_session_id` and `total_views`.
222
225
  def self.ensure_design_document!
223
226
  unless Configuration.design_documents_paths
@@ -288,10 +291,13 @@ module Couchbase
288
291
  def read_attribute(attr_name)
289
292
  @_attributes[attr_name]
290
293
  end
294
+ alias :[] :read_attribute
291
295
 
292
296
  def write_attribute(attr_name, value)
297
+ attribute_will_change!(attr_name) unless @_attributes[attr_name] == value
293
298
  @_attributes[attr_name] = value
294
299
  end
300
+ alias :[]= :write_attribute
295
301
 
296
302
  # Defines an attribute for the model
297
303
  #
@@ -383,7 +389,7 @@ module Couchbase
383
389
  def self.belongs_to(name, options = {})
384
390
  ref = "#{name}_id"
385
391
  attribute(ref)
386
- assoc = name.to_s.camelize.constantize
392
+ assoc = (options[:class_name] || name).to_s.camelize.constantize
387
393
  define_method(name) do
388
394
  assoc.find(self.send(ref))
389
395
  end
@@ -482,7 +488,9 @@ module Couchbase
482
488
  case attrs
483
489
  when Hash
484
490
  if defined?(HashWithIndifferentAccess) && !attrs.is_a?(HashWithIndifferentAccess)
485
- attrs = attrs.with_indifferent_access
491
+ if attrs.respond_to?(:with_indifferent_access)
492
+ attrs = attrs.with_indifferent_access
493
+ end
486
494
  end
487
495
  @id = attrs.delete(:id)
488
496
  @key = attrs.delete(:key)
@@ -491,6 +499,8 @@ module Couchbase
491
499
  @meta = attrs.delete(:meta)
492
500
  @raw = attrs.delete(:raw)
493
501
  update_attributes(@doc || attrs)
502
+ @previously_changed = nil
503
+ @changed_attributes.clear unless @changed_attributes.nil?
494
504
  else
495
505
  @raw = attrs
496
506
  end
@@ -563,6 +573,8 @@ module Couchbase
563
573
  options = model.defaults.merge(options)
564
574
  value = (options[:format] == :plain) ? @raw : attributes_with_values
565
575
  @meta['cas'] = model.bucket.replace(@id, value, options)
576
+ @previously_changed = changes
577
+ @changed_attributes.clear unless @changed_attributes.nil?
566
578
  self
567
579
  end
568
580
 
@@ -695,7 +707,7 @@ module Couchbase
695
707
  #
696
708
  # @return [Hash]
697
709
  def attributes
698
- @_attributes
710
+ @_attributes || {}
699
711
  end
700
712
 
701
713
  # Update all attributes without persisting the changes.
@@ -723,8 +735,9 @@ module Couchbase
723
735
  # attribute
724
736
  def reload
725
737
  raise Couchbase::Error::MissingId, 'missing id attribute' unless @id
726
- attrs = model.find(@id).attributes
727
- update_attributes(attrs)
738
+ pristine = model.find(@id)
739
+ update_attributes(pristine.attributes)
740
+ @meta[:cas] = pristine.meta[:cas]
728
741
  self
729
742
  end
730
743
 
@@ -827,26 +840,7 @@ module Couchbase
827
840
  ret
828
841
  end
829
842
 
830
- protected :attributes_with_values
831
-
832
- if defined?(::ActiveModel)
833
- extend ActiveModel::Callbacks
834
- extend ActiveModel::Naming
835
- include ActiveModel::Conversion
836
- include ActiveModel::Validations
837
-
838
- define_model_callbacks :create, :update, :delete, :save
839
- [:save, :create, :update, :delete].each do |meth|
840
- class_eval <<-EOC
841
- alias #{meth}_without_callbacks #{meth}
842
- def #{meth}(*args, &block)
843
- run_callbacks(:#{meth}) do
844
- #{meth}_without_callbacks(*args, &block)
845
- end
846
- end
847
- EOC
848
- end
849
- end
843
+ private :attributes_with_values
850
844
 
851
845
  # Redefine (if exists) #to_key to use #key if #id is missing
852
846
  def to_key
@@ -860,6 +854,10 @@ module Couchbase
860
854
  keys.join('-')
861
855
  end
862
856
  end
857
+
858
+ include Couchbase::ActiveModel
859
+ ActiveSupport.run_load_hooks :couchbase_model, self
863
860
  end
864
861
 
865
862
  end
863
+
@@ -16,11 +16,7 @@
16
16
  #
17
17
 
18
18
  module Couchbase
19
-
20
19
  class Model
21
-
22
- VERSION = '0.5.3'
23
-
20
+ VERSION = '0.5.4'
24
21
  end
25
-
26
22
  end
@@ -19,7 +19,7 @@ require 'rake/testtask'
19
19
  require 'rake/clean'
20
20
 
21
21
  rule 'test/CouchbaseMock.jar' do |task|
22
- jar_path = "0.5-SNAPSHOT/CouchbaseMock-0.5-20120726.220757-19.jar"
22
+ jar_path = "0.8-SNAPSHOT/CouchbaseMock-0.8-20140621.030439-1.jar"
23
23
  sh %{wget -q -O test/CouchbaseMock.jar http://files.couchbase.com/maven2/org/couchbase/mock/CouchbaseMock/#{jar_path}}
24
24
  end
25
25
 
@@ -163,6 +163,9 @@ class MiniTest::Unit::TestCase
163
163
  end
164
164
 
165
165
  def uniq_id(*suffixes)
166
- [caller.first[/.*[` ](.*)'/, 1], suffixes].join('_')
166
+ test_id = [caller.first[/.*[` ](.*)'/, 1], suffixes].compact.join('_')
167
+ @ids ||= {}
168
+ @ids[test_id] ||= Time.now.to_f
169
+ [test_id, @ids[test_id]].join('_')
167
170
  end
168
171
  end
@@ -0,0 +1,146 @@
1
+ # Author:: Couchbase <info@couchbase.com>
2
+ # Copyright:: 2011, 2012 Couchbase, Inc.
3
+ # License:: Apache License, Version 2.0
4
+ #
5
+ # Licensed under the Apache License, Version 2.0 (the "License");
6
+ # you may not use this file except in compliance with the License.
7
+ # You may obtain a copy of the License at
8
+ #
9
+ # http://www.apache.org/licenses/LICENSE-2.0
10
+ #
11
+ # Unless required by applicable law or agreed to in writing, software
12
+ # distributed under the License is distributed on an "AS IS" BASIS,
13
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14
+ # See the License for the specific language governing permissions and
15
+ # limitations under the License.
16
+ #
17
+
18
+ require File.join(File.dirname(__FILE__), 'setup')
19
+
20
+ class ActiveUser < Couchbase::Model
21
+ attribute :name
22
+ attribute :email
23
+ attribute :role
24
+ attribute :created_at, :updated_at, :default => lambda { Time.now.utc }
25
+
26
+ validates_presence_of :email
27
+ validates :role, :presence => true, :inclusion => { :in => %w(admin editor) }
28
+
29
+ before_create :upcase_name
30
+
31
+ private
32
+
33
+ def upcase_name
34
+ self.name = self.name.upcase unless self.name.nil?
35
+ end
36
+ end
37
+
38
+ class ActiveObj < Couchbase::Model
39
+ end
40
+
41
+ class TestActiveModelIntegration < MiniTest::Unit::TestCase
42
+
43
+ include ActiveModel::Lint::Tests
44
+
45
+ def setup
46
+ @model = ActiveUser.new # used by ActiveModel::Lint::Tests
47
+ @mock = start_mock
48
+ bucket = Couchbase.connect(:hostname => @mock.host, :port => @mock.port)
49
+ ActiveObj.bucket = ActiveUser.bucket = bucket
50
+ end
51
+
52
+ def teardown
53
+ stop_mock(@mock)
54
+ end
55
+
56
+ def test_active_model_includes
57
+ [
58
+ ActiveModel::Conversion,
59
+ ActiveModel::Validations,
60
+ ActiveModel::Validations::Callbacks,
61
+ ActiveModel::Validations::HelperMethods
62
+ ].each do |mod|
63
+ assert ActiveUser.ancestors.include?(mod), "Model not including #{mod}"
64
+ end
65
+ end
66
+
67
+ def test_callbacks
68
+ [
69
+ :before_validation, :after_validation,
70
+ :after_initialize, :before_create, :around_create,
71
+ :after_create, :before_delete, :around_delete,
72
+ :after_delete, :before_save, :around_save, :after_save,
73
+ :before_update, :around_update, :after_update
74
+ ].each do |callback|
75
+ assert ActiveObj.respond_to?(callback), "Model doesn't support callback: #{callback}"
76
+ end
77
+ end
78
+
79
+ def test_active_model_validations
80
+ no_role = ActiveUser.new(:email => 'joe@example.com', :role => nil)
81
+ bad_role = ActiveUser.new(:email => 'joe@example.com', :role => 'bad')
82
+ good_role = ActiveUser.new(:email => 'joe@example.com', :role => 'admin')
83
+
84
+ refute no_role.valid?
85
+ refute bad_role.valid?
86
+ assert good_role.valid?
87
+ end
88
+
89
+ def test_active_model_validation_helpers
90
+ valid = ActiveUser.new(:email => 'joe@example.com', :role => 'editor')
91
+ invalid = ActiveUser.new(:name => 'Joe', :role => 'editor')
92
+
93
+ assert valid.valid?
94
+ refute invalid.valid?
95
+ end
96
+
97
+ def test_before_save_callback
98
+ assert user = ActiveUser.create(:name => 'joe', :role => 'admin', :email => 'joe@example.com')
99
+ assert_equal 'JOE', user.name
100
+ end
101
+
102
+ def test_model_name_exposes_singular_and_human_name
103
+ assert_equal 'active_user', @model.class.model_name.singular
104
+ assert_equal 'Active user', @model.class.model_name.human
105
+ end
106
+
107
+ def test_model_equality
108
+ obj1 = ActiveObj.create
109
+ obj2 = ActiveObj.find(obj1.id)
110
+
111
+ assert_equal obj1, obj2
112
+ end
113
+
114
+ def test_to_key
115
+ assert_equal ['the-id'], ActiveObj.new(:id => 'the-id').to_key
116
+ assert_equal ['the-key'], ActiveObj.new(:key => 'the-key').to_key
117
+ end
118
+
119
+ def test_to_param
120
+ assert_equal 'the-id', ActiveObj.new(:id => 'the-id').to_param
121
+ assert_equal 'the-key', ActiveObj.new(:key => ['the', 'key']).to_param
122
+ end
123
+
124
+ def test_dirty_tracking_on_attribute
125
+ tester = ActiveUser.create(:email => 'joe@example.com', :role => 'admin')
126
+ tester.email = 'bob@example.com'
127
+ assert tester.changed?
128
+ assert_equal tester.changed, ["email"]
129
+ end
130
+
131
+ def test_dirty_tracking_reset_on_save
132
+ tester = ActiveUser.create(:email => 'joe@example.com', :role => 'admin')
133
+ tester.email = 'bob@example.com'
134
+ assert tester.changed?
135
+ tester.save
136
+ refute tester.changed?
137
+ end
138
+
139
+ def test_dirty_tracking_previous_values
140
+ tester = ActiveUser.create(:email => 'joe@example.com', :role => 'admin')
141
+ tester.email = 'bob@example.com'
142
+ tester.save
143
+ assert_equal tester.previous_changes[:email], ['joe@example.com', 'bob@example.com']
144
+ end
145
+
146
+ end
@@ -41,6 +41,11 @@ class Beer < Couchbase::Model
41
41
  belongs_to :brewery
42
42
  end
43
43
 
44
+ class Wine < Couchbase::Model
45
+ attribute :name
46
+ belongs_to :winery, :class_name => :Brewery
47
+ end
48
+
44
49
  class Attachment < Couchbase::Model
45
50
  defaults :format => :plain
46
51
  end
@@ -59,7 +64,7 @@ class TestModel < MiniTest::Unit::TestCase
59
64
  def setup
60
65
  @mock = start_mock
61
66
  bucket = Couchbase.connect(:hostname => @mock.host, :port => @mock.port)
62
- [Post, ValidPost, Brewery, Beer, Attachment].each do |model|
67
+ [Post, ValidPost, Brewery, Beer, Attachment, Wine].each do |model|
63
68
  model.bucket = bucket
64
69
  end
65
70
  end
@@ -100,6 +105,17 @@ class TestModel < MiniTest::Unit::TestCase
100
105
  assert_equal 'foo', post.title
101
106
  end
102
107
 
108
+ def test_access_attribute_by_key
109
+ post = Post.new(:title => 'Hello, world')
110
+ assert_equal 'Hello, world', post[:title]
111
+ end
112
+
113
+ def test_update_attribute_by_key
114
+ post = Post.new(:title => 'Hello, world')
115
+ post[:title] = 'world, Hello'
116
+ assert_equal 'world, Hello', post.title
117
+ end
118
+
103
119
  def test_assigns_attributes_from_the_hash
104
120
  post = Post.new(:title => 'Hello, world')
105
121
  assert_equal 'Hello, world', post.title
@@ -140,6 +156,15 @@ class TestModel < MiniTest::Unit::TestCase
140
156
  assert_equal 'Good bye, world', orig.title
141
157
  end
142
158
 
159
+ def test_reloads_cas_value_with_reload_method
160
+ orig = Post.create(:title => "Hello, world")
161
+ double = Post.find(orig.id)
162
+ orig.update(:title => "Good bye, world")
163
+ double.reload
164
+
165
+ assert_equal orig.meta[:cas], double.meta[:cas]
166
+ end
167
+
143
168
  def test_it_raises_not_found_exception
144
169
  assert_raises Couchbase::Error::NotFound do
145
170
  Post.find('missing_key')
@@ -208,6 +233,16 @@ class TestModel < MiniTest::Unit::TestCase
208
233
  end
209
234
  end
210
235
 
236
+ def test_belongs_to_with_class_name_assoc
237
+ brewery = Brewery.create(:name => "R Wines")
238
+ assert_includes Wine.attributes.keys, :winery_id
239
+ wine = Wine.create(:name => "Classy", :winery_id => brewery.id)
240
+ assert_respond_to wine, :winery
241
+ assoc = wine.winery
242
+ assert_instance_of Brewery, assoc
243
+ assert_equal "R Wines", assoc.name
244
+ end
245
+
211
246
  def test_fails_to_delete_model_without_id
212
247
  post = Post.new(:title => 'Hello')
213
248
  refute post.id
metadata CHANGED
@@ -1,93 +1,94 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: couchbase-model
3
- version: !ruby/object:Gem::Version
4
- hash: 13
5
- prerelease:
6
- segments:
7
- - 0
8
- - 5
9
- - 3
10
- version: 0.5.3
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.4
11
5
  platform: ruby
12
- authors:
6
+ authors:
13
7
  - Couchbase
14
8
  autorequire:
15
9
  bindir: bin
16
10
  cert_chain: []
17
-
18
- date: 2013-06-06 00:00:00 +03:00
19
- default_executable:
20
- dependencies:
21
- - !ruby/object:Gem::Dependency
22
- type: :runtime
23
- requirement: &id001 !ruby/object:Gem::Requirement
24
- none: false
25
- requirements:
26
- - - ~>
27
- - !ruby/object:Gem::Version
28
- hash: 27
29
- segments:
30
- - 1
31
- - 3
32
- - 0
33
- version: 1.3.0
11
+ date: 2014-08-29 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
34
14
  name: couchbase
35
- version_requirements: *id001
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: 1.3.3
20
+ type: :runtime
36
21
  prerelease: false
37
- - !ruby/object:Gem::Dependency
38
- type: :development
39
- requirement: &id002 !ruby/object:Gem::Requirement
40
- none: false
41
- requirements:
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: 1.3.3
27
+ - !ruby/object:Gem::Dependency
28
+ name: activemodel
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
42
31
  - - ">="
43
- - !ruby/object:Gem::Version
44
- hash: 3
45
- segments:
46
- - 0
47
- version: "0"
48
- name: rake
49
- version_requirements: *id002
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
50
35
  prerelease: false
51
- - !ruby/object:Gem::Dependency
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rake
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
52
48
  type: :development
53
- requirement: &id003 !ruby/object:Gem::Requirement
54
- none: false
55
- requirements:
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
56
52
  - - ">="
57
- - !ruby/object:Gem::Version
58
- hash: 3
59
- segments:
60
- - 0
61
- version: "0"
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
62
56
  name: minitest
63
- version_requirements: *id003
64
- prerelease: false
65
- - !ruby/object:Gem::Dependency
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
66
62
  type: :development
67
- requirement: &id004 !ruby/object:Gem::Requirement
68
- none: false
69
- requirements:
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
70
66
  - - ">="
71
- - !ruby/object:Gem::Version
72
- hash: 3
73
- segments:
74
- - 0
75
- version: "0"
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
76
70
  name: activesupport
77
- version_requirements: *id004
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :development
78
77
  prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
79
83
  description: ORM-like interface allows you to persist your models to Couchbase
80
84
  email: support@couchbase.com
81
85
  executables: []
82
-
83
86
  extensions: []
84
-
85
87
  extra_rdoc_files: []
86
-
87
- files:
88
- - .gitignore
89
- - .travis.yml
90
- - .yardopts
88
+ files:
89
+ - ".gitignore"
90
+ - ".travis.yml"
91
+ - ".yardopts"
91
92
  - CONTRIBUTING.markdown
92
93
  - Gemfile
93
94
  - HISTORY.markdown
@@ -95,6 +96,7 @@ files:
95
96
  - Rakefile
96
97
  - couchbase-model.gemspec
97
98
  - lib/couchbase-model.rb
99
+ - lib/couchbase/active_model.rb
98
100
  - lib/couchbase/model.rb
99
101
  - lib/couchbase/model/configuration.rb
100
102
  - lib/couchbase/model/ext/camelize.rb
@@ -113,42 +115,36 @@ files:
113
115
  - tasks/test.rake
114
116
  - tasks/util.rake
115
117
  - test/setup.rb
118
+ - test/test_active_model_integration.rb
116
119
  - test/test_model.rb
117
120
  - test/test_model_rails_integration.rb
118
121
  - test/test_uuid.rb
119
- has_rdoc: true
120
122
  homepage: https://github.com/couchbase/couchbase-ruby-model
121
123
  licenses: []
122
-
124
+ metadata: {}
123
125
  post_install_message:
124
126
  rdoc_options: []
125
-
126
- require_paths:
127
+ require_paths:
127
128
  - lib
128
- required_ruby_version: !ruby/object:Gem::Requirement
129
- none: false
130
- requirements:
129
+ required_ruby_version: !ruby/object:Gem::Requirement
130
+ requirements:
131
131
  - - ">="
132
- - !ruby/object:Gem::Version
133
- hash: 3
134
- segments:
135
- - 0
136
- version: "0"
137
- required_rubygems_version: !ruby/object:Gem::Requirement
138
- none: false
139
- requirements:
132
+ - !ruby/object:Gem::Version
133
+ version: '0'
134
+ required_rubygems_version: !ruby/object:Gem::Requirement
135
+ requirements:
140
136
  - - ">="
141
- - !ruby/object:Gem::Version
142
- hash: 3
143
- segments:
144
- - 0
145
- version: "0"
137
+ - !ruby/object:Gem::Version
138
+ version: '0'
146
139
  requirements: []
147
-
148
140
  rubyforge_project:
149
- rubygems_version: 1.6.2
141
+ rubygems_version: 2.3.0
150
142
  signing_key:
151
- specification_version: 3
143
+ specification_version: 4
152
144
  summary: Declarative interface to Couchbase
153
- test_files: []
154
-
145
+ test_files:
146
+ - test/setup.rb
147
+ - test/test_active_model_integration.rb
148
+ - test/test_model.rb
149
+ - test/test_model_rails_integration.rb
150
+ - test/test_uuid.rb