ripple 0.9.0 → 0.9.2

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.
Files changed (48) hide show
  1. data/Rakefile +1 -1
  2. data/lib/rails/generators/ripple/test/templates/test_server.rb +1 -1
  3. data/lib/ripple.rb +2 -29
  4. data/lib/ripple/associations.rb +15 -13
  5. data/lib/ripple/associations/embedded.rb +3 -1
  6. data/lib/ripple/associations/instantiators.rb +1 -1
  7. data/lib/ripple/associations/linked.rb +2 -1
  8. data/lib/ripple/associations/many.rb +2 -1
  9. data/lib/ripple/associations/many_embedded_proxy.rb +4 -1
  10. data/lib/ripple/associations/many_linked_proxy.rb +4 -1
  11. data/lib/ripple/associations/one.rb +2 -1
  12. data/lib/ripple/associations/one_embedded_proxy.rb +4 -1
  13. data/lib/ripple/associations/one_linked_proxy.rb +4 -1
  14. data/lib/ripple/associations/proxy.rb +2 -1
  15. data/lib/ripple/attribute_methods.rb +9 -7
  16. data/lib/ripple/attribute_methods/dirty.rb +3 -1
  17. data/lib/ripple/attribute_methods/query.rb +2 -2
  18. data/lib/ripple/attribute_methods/read.rb +2 -1
  19. data/lib/ripple/attribute_methods/write.rb +2 -1
  20. data/lib/ripple/callbacks.rb +3 -1
  21. data/lib/ripple/conversion.rb +2 -1
  22. data/lib/ripple/core_ext.rb +1 -0
  23. data/lib/ripple/core_ext/casting.rb +9 -1
  24. data/lib/ripple/document.rb +18 -7
  25. data/lib/ripple/document/bucket_access.rb +2 -1
  26. data/lib/ripple/document/finders.rb +6 -1
  27. data/lib/ripple/document/key.rb +2 -1
  28. data/lib/ripple/document/persistence.rb +2 -2
  29. data/lib/ripple/embedded_document.rb +16 -5
  30. data/lib/ripple/embedded_document/finders.rb +3 -1
  31. data/lib/ripple/embedded_document/persistence.rb +3 -1
  32. data/lib/ripple/i18n.rb +1 -0
  33. data/lib/ripple/inspection.rb +0 -1
  34. data/lib/ripple/nested_attributes.rb +17 -1
  35. data/lib/ripple/observable.rb +3 -1
  36. data/lib/ripple/properties.rb +3 -1
  37. data/lib/ripple/property_type_mismatch.rb +2 -1
  38. data/lib/ripple/railtie.rb +2 -1
  39. data/lib/ripple/serialization.rb +2 -2
  40. data/lib/ripple/timestamps.rb +2 -1
  41. data/lib/ripple/translation.rb +2 -1
  42. data/lib/ripple/validations.rb +5 -4
  43. data/lib/ripple/validations/associated_validator.rb +1 -1
  44. data/ripple.gemspec +7 -7
  45. data/spec/integration/ripple/nested_attributes_spec.rb +1 -0
  46. data/spec/support/associations.rb +1 -0
  47. data/spec/support/models.rb +3 -0
  48. metadata +6 -6
data/Rakefile CHANGED
@@ -66,7 +66,7 @@ namespace :spec do
66
66
 
67
67
  desc "Run All Specs"
68
68
  RSpec::Core::RakeTask.new(:all) do |spec|
69
- spec.pattern = "spec/**/*_spec.rb"
69
+ spec.pattern = "spec/{ripple,integration}/**/*_spec.rb"
70
70
  end
71
71
  end
72
72
 
@@ -13,7 +13,7 @@ module Ripple
13
13
  :map_cache_size => 0, # 0.14
14
14
  :vnode_cache_entries => 0 # 0.13
15
15
  },
16
- :riak_core => { :web_port => Ripple.config[:port] || 8098 }
16
+ :riak_core => { :web_port => Ripple.config[:http_port] || 8098 }
17
17
  },
18
18
  :bin_dir => Ripple.config.delete(:bin_dir),
19
19
  :temp_dir => Rails.root + "tmp/riak_test_server"
@@ -13,42 +13,15 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require 'riak'
16
- require 'active_support/all'
17
- require 'active_support/json'
18
16
  require 'active_model'
19
- require 'ripple/i18n'
20
17
  require 'ripple/core_ext'
21
18
  require 'ripple/translation'
19
+ require 'ripple/document'
20
+ require 'ripple/embedded_document'
22
21
 
23
22
  # Contains the classes and modules related to the ODM built on top of
24
23
  # the basic Riak client.
25
24
  module Ripple
26
- extend ActiveSupport::Autoload
27
-
28
- # Primary models
29
- autoload :EmbeddedDocument
30
- autoload :Document
31
-
32
- # Model mixins and support classes
33
- autoload :Association, "ripple/associations"
34
- autoload :Associations
35
- autoload :AttributeMethods
36
- autoload :Callbacks
37
- autoload :Conversion
38
- autoload :Properties
39
- autoload :Property, "ripple/properties"
40
- autoload :Timestamps
41
- autoload :Validations
42
- autoload :NestedAttributes
43
- autoload :Observable
44
- autoload :Serialization
45
-
46
- # Exceptions
47
- autoload :PropertyTypeMismatch
48
-
49
- # Utilities
50
- autoload :Inspection
51
-
52
25
  class << self
53
26
  # @return [Riak::Client] The client for the current thread.
54
27
  def client
@@ -11,7 +11,21 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'riak/walk_spec'
17
+ require 'ripple/translation'
18
+ require 'ripple/associations/proxy'
19
+ require 'ripple/associations/instantiators'
20
+ require 'ripple/associations/linked'
21
+ require 'ripple/associations/embedded'
22
+ require 'ripple/associations/many'
23
+ require 'ripple/associations/one'
24
+ require 'ripple/associations/linked'
25
+ require 'ripple/associations/one_embedded_proxy'
26
+ require 'ripple/associations/many_embedded_proxy'
27
+ require 'ripple/associations/one_linked_proxy'
28
+ require 'ripple/associations/many_linked_proxy'
15
29
 
16
30
  module Ripple
17
31
  # Adds associations via links and embedding to {Ripple::Document}
@@ -48,18 +62,6 @@ module Ripple
48
62
  # person.account.paid_until = 3.months.from_now
49
63
  module Associations
50
64
  extend ActiveSupport::Concern
51
- extend ActiveSupport::Autoload
52
-
53
- autoload :Proxy
54
- autoload :One
55
- autoload :Many
56
- autoload :Embedded
57
- autoload :Linked
58
- autoload :Instantiators
59
- autoload :OneEmbeddedProxy
60
- autoload :ManyEmbeddedProxy
61
- autoload :OneLinkedProxy
62
- autoload :ManyLinkedProxy
63
65
 
64
66
  module ClassMethods
65
67
  # @private
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/proxy'
16
+ require 'ripple/validations/associated_validator'
15
17
 
16
18
  module Ripple
17
19
  module Associations
@@ -11,7 +11,7 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+ require 'ripple/associations'
15
15
 
16
16
  module Ripple
17
17
  module Associations
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations'
15
16
 
16
17
  module Ripple
17
18
  module Associations
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations'
15
16
 
16
17
  module Ripple
17
18
  module Associations
@@ -11,7 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/proxy'
16
+ require 'ripple/associations/many'
17
+ require 'ripple/associations/embedded'
15
18
 
16
19
  module Ripple
17
20
  module Associations
@@ -11,7 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/proxy'
16
+ require 'ripple/associations/many'
17
+ require 'ripple/associations/linked'
15
18
 
16
19
  module Ripple
17
20
  module Associations
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/instantiators'
15
16
 
16
17
  module Ripple
17
18
  module Associations
@@ -11,7 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/proxy'
16
+ require 'ripple/associations/one'
17
+ require 'ripple/associations/embedded'
15
18
 
16
19
  module Ripple
17
20
  module Associations
@@ -11,7 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations/proxy'
16
+ require 'ripple/associations/one'
17
+ require 'ripple/associations/linked'
15
18
 
16
19
  module Ripple
17
20
  module Associations
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/associations'
15
16
 
16
17
  module Ripple
17
18
  module Associations
@@ -11,7 +11,15 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/translation'
16
+ require 'active_support/concern'
17
+ require 'active_model/attribute_methods'
18
+ require 'active_model/mass_assignment_security'
19
+ require 'ripple/attribute_methods/read'
20
+ require 'ripple/attribute_methods/write'
21
+ require 'ripple/attribute_methods/query'
22
+ require 'ripple/attribute_methods/dirty'
15
23
 
16
24
  module Ripple
17
25
  # Makes ActiveRecord-like attribute accessors based on your
@@ -19,14 +27,8 @@ module Ripple
19
27
  module AttributeMethods
20
28
  include Translation
21
29
  extend ActiveSupport::Concern
22
- extend ActiveSupport::Autoload
23
30
  include ActiveModel::AttributeMethods
24
31
 
25
- autoload :Read
26
- autoload :Write
27
- autoload :Query
28
- autoload :Dirty
29
-
30
32
  included do
31
33
  include Read
32
34
  include Write
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_model/dirty'
15
17
 
16
18
  module Ripple
17
19
  module AttributeMethods
@@ -11,10 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
15
14
 
16
- module Ripple
15
+ require 'active_support/concern'
17
16
 
17
+ module Ripple
18
18
  module AttributeMethods
19
19
  module Query
20
20
  extend ActiveSupport::Concern
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
15
16
 
16
17
  module Ripple
17
18
  module AttributeMethods
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
15
16
 
16
17
  module Ripple
17
18
  module AttributeMethods
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_model/callbacks'
15
17
 
16
18
  module Ripple
17
19
  # Adds lifecycle callbacks to {Ripple::Document} models, in the typical
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_model/conversion'
15
16
 
16
17
  module Ripple
17
18
  # Provides ActionPack compatibility for {Ripple::Document} models.
@@ -11,4 +11,5 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  require 'ripple/core_ext/casting'
@@ -12,9 +12,17 @@
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
14
 
15
+ require 'active_support/json'
15
16
  require 'active_support/core_ext/object/blank'
16
17
  require 'active_support/core_ext/object/to_json'
17
- require 'active_support/time_with_zone'
18
+ require 'active_support/core_ext/date/conversions'
19
+ require 'active_support/core_ext/date/zones'
20
+ require 'active_support/core_ext/date_time/conversions'
21
+ require 'active_support/core_ext/date_time/zones'
22
+ require 'active_support/core_ext/time/conversions'
23
+ require 'active_support/core_ext/time/zones'
24
+ require 'active_support/core_ext/string/conversions'
25
+ require 'ripple/property_type_mismatch'
18
26
 
19
27
  # @private
20
28
  class Object
@@ -11,7 +11,24 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_model/naming'
17
+ require 'ripple/document/bucket_access'
18
+ require 'ripple/document/key'
19
+ require 'ripple/document/persistence'
20
+ require 'ripple/document/finders'
21
+ require 'ripple/properties'
22
+ require 'ripple/attribute_methods'
23
+ require 'ripple/timestamps'
24
+ require 'ripple/validations'
25
+ require 'ripple/associations'
26
+ require 'ripple/callbacks'
27
+ require 'ripple/observable'
28
+ require 'ripple/conversion'
29
+ require 'ripple/inspection'
30
+ require 'ripple/nested_attributes'
31
+ require 'ripple/serialization'
15
32
 
16
33
  module Ripple
17
34
  # Represents a model stored in Riak, serialized in JSON object (document).
@@ -40,12 +57,6 @@ module Ripple
40
57
  #
41
58
  module Document
42
59
  extend ActiveSupport::Concern
43
- extend ActiveSupport::Autoload
44
-
45
- autoload :BucketAccess
46
- autoload :Finders
47
- autoload :Key
48
- autoload :Persistence
49
60
 
50
61
  included do
51
62
  extend ActiveModel::Naming
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple/document'
14
+
15
+ require 'ripple'
15
16
 
16
17
  module Ripple
17
18
  module Document
@@ -11,7 +11,12 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/translation'
16
+ require 'active_support/concern'
17
+ require 'active_support/inflector'
18
+ require 'active_support/core_ext/hash/except'
19
+ require 'active_support/core_ext/hash/slice'
15
20
 
16
21
  module Ripple
17
22
 
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
15
16
 
16
17
  module Ripple
17
18
  module Document
@@ -11,13 +11,13 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
15
16
 
16
17
  module Ripple
17
18
  module Document
18
19
  module Persistence
19
20
  extend ActiveSupport::Concern
20
- extend ActiveSupport::Autoload
21
21
 
22
22
  module ClassMethods
23
23
 
@@ -11,7 +11,22 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_support/core_ext/hash/except'
17
+ require 'ripple/translation'
18
+ require 'ripple/embedded_document/finders'
19
+ require 'ripple/embedded_document/persistence'
20
+ require 'ripple/properties'
21
+ require 'ripple/attribute_methods'
22
+ require 'ripple/timestamps'
23
+ require 'ripple/validations'
24
+ require 'ripple/associations'
25
+ require 'ripple/callbacks'
26
+ require 'ripple/conversion'
27
+ require 'ripple/inspection'
28
+ require 'ripple/nested_attributes'
29
+ require 'ripple/serialization'
15
30
 
16
31
  module Ripple
17
32
  # Represents a document model that is composed into or stored in a parent
@@ -19,10 +34,6 @@ module Ripple
19
34
  # callbacks and validations, but are solely dependent on the parent Document.
20
35
  module EmbeddedDocument
21
36
  extend ActiveSupport::Concern
22
- extend ActiveSupport::Autoload
23
-
24
- autoload :Finders
25
- autoload :Persistence
26
37
  include Translation
27
38
 
28
39
  included do
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_support/inflector'
15
17
 
16
18
  module Ripple
17
19
  module EmbeddedDocument
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'ripple/translation'
15
17
 
16
18
  module Ripple
17
19
  # Exception raised when save is called on an EmbeddedDocument that
@@ -11,5 +11,6 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
+
14
15
  require 'active_support/i18n'
15
16
  I18n.load_path << File.expand_path("../locale/en.yml", __FILE__)
@@ -11,7 +11,6 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
-
15
14
  require 'ripple'
16
15
 
17
16
  module Ripple
@@ -1,4 +1,20 @@
1
- require 'ripple'
1
+ # Copyright 2010 Sean Cribbs, Sonian Inc., and Basho Technologies, Inc.
2
+ #
3
+ # Licensed under the Apache License, Version 2.0 (the "License");
4
+ # you may not use this file except in compliance with the License.
5
+ # You may obtain a copy of the License at
6
+ #
7
+ # http://www.apache.org/licenses/LICENSE-2.0
8
+ #
9
+ # Unless required by applicable law or agreed to in writing, software
10
+ # distributed under the License is distributed on an "AS IS" BASIS,
11
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ # See the License for the specific language governing permissions and
13
+ # limitations under the License.
14
+
15
+ require 'active_support/concern'
16
+ require 'active_support/core_ext/class/inheritable_attributes'
17
+
2
18
  module Ripple
3
19
  module NestedAttributes #:nodoc:
4
20
  extend ActiveSupport::Concern
@@ -11,7 +11,9 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_model/observing'
15
17
 
16
18
  module Ripple
17
19
  module Observable
@@ -11,8 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
15
  require 'ripple/core_ext/casting'
16
+ require 'active_support/core_ext/hash/except'
17
+ require 'active_support/core_ext/hash/indifferent_access'
16
18
 
17
19
  module Ripple
18
20
  # Adds the ability to declare properties on your Ripple::Document class.
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/translation'
15
16
 
16
17
  module Ripple
17
18
  # Exception raised when the value assigned to a document property
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'rails/railtie'
15
16
 
16
17
  module Ripple
17
18
  # Railtie for automatic initialization of the Ripple framework
@@ -11,10 +11,10 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
15
16
  require 'active_model/serialization'
16
17
  require 'active_model/serializers/json'
17
- require 'active_model/serializers/xml'
18
18
 
19
19
  module Ripple
20
20
  # Provides methods for serializing Ripple documents to external
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+ require 'active_support/time'
15
+ require 'active_support/concern'
15
16
 
16
17
  module Ripple
17
18
  # Adds automatic creation and update timestamps to a
@@ -11,7 +11,8 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'ripple/i18n'
15
16
  require 'riak/util/translation'
16
17
 
17
18
  module Ripple
@@ -11,7 +11,11 @@
11
11
  # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
12
  # See the License for the specific language governing permissions and
13
13
  # limitations under the License.
14
- require 'ripple'
14
+
15
+ require 'active_support/concern'
16
+ require 'active_model/validations'
17
+ require 'ripple/translation'
18
+ require 'ripple/validations/associated_validator'
15
19
 
16
20
  module Ripple
17
21
  # Raised by <tt>save!</tt> when the document is invalid. Use the
@@ -35,11 +39,8 @@ module Ripple
35
39
  # executed before saving the document.
36
40
  module Validations
37
41
  extend ActiveSupport::Concern
38
- extend ActiveSupport::Autoload
39
42
  include ActiveModel::Validations
40
43
 
41
- autoload :AssociatedValidator
42
-
43
44
  module ClassMethods
44
45
  # @private
45
46
  def property(key, type, options={})
@@ -14,7 +14,7 @@
14
14
  #
15
15
  # Taken from ActiveRecord::Validations::AssociatedValidators
16
16
  #
17
- require 'ripple'
17
+ require 'active_model/validator'
18
18
 
19
19
  module Ripple
20
20
  module Validations
@@ -2,17 +2,17 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ripple}
5
- s.version = "0.9.0"
5
+ s.version = "0.9.2"
6
6
 
7
7
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
8
8
  s.authors = ["Sean Cribbs"]
9
- s.date = %q{2011-04-03}
9
+ s.date = %q{2011-04-11}
10
10
  s.description = %q{ripple is an object-mapper library for Riak, the distributed database by Basho. It uses ActiveModel to provide an experience that integrates well with Rails 3 applications.}
11
11
  s.email = %q{sean@basho.com}
12
- s.files = ["Gemfile", "lib/rails/generators/ripple/configuration/configuration_generator.rb", "lib/rails/generators/ripple/configuration/templates/ripple.yml", "lib/rails/generators/ripple/js/js_generator.rb", "lib/rails/generators/ripple/js/templates/js/contrib.js", "lib/rails/generators/ripple/js/templates/js/iso8601.js", "lib/rails/generators/ripple/js/templates/js/ripple.js", "lib/rails/generators/ripple/model/model_generator.rb", "lib/rails/generators/ripple/model/templates/model.rb", "lib/rails/generators/ripple/observer/observer_generator.rb", "lib/rails/generators/ripple/observer/templates/observer.rb", "lib/rails/generators/ripple/test/templates/test_server.rb", "lib/rails/generators/ripple/test/test_generator.rb", "lib/rails/generators/ripple_generator.rb", "lib/ripple/associations/embedded.rb", "lib/ripple/associations/instantiators.rb", "lib/ripple/associations/linked.rb", "lib/ripple/associations/many.rb", "lib/ripple/associations/many_embedded_proxy.rb", "lib/ripple/associations/many_linked_proxy.rb", "lib/ripple/associations/one.rb", "lib/ripple/associations/one_embedded_proxy.rb", "lib/ripple/associations/one_linked_proxy.rb", "lib/ripple/associations/proxy.rb", "lib/ripple/associations.rb", "lib/ripple/attribute_methods/dirty.rb", "lib/ripple/attribute_methods/query.rb", "lib/ripple/attribute_methods/read.rb", "lib/ripple/attribute_methods/write.rb", "lib/ripple/attribute_methods.rb", "lib/ripple/callbacks.rb", "lib/ripple/conversion.rb", "lib/ripple/core_ext/casting.rb", "lib/ripple/core_ext.rb", "lib/ripple/document/bucket_access.rb", "lib/ripple/document/finders.rb", "lib/ripple/document/key.rb", "lib/ripple/document/persistence.rb", "lib/ripple/document.rb", "lib/ripple/embedded_document/finders.rb", "lib/ripple/embedded_document/persistence.rb", "lib/ripple/embedded_document.rb", "lib/ripple/i18n.rb", "lib/ripple/inspection.rb", "lib/ripple/locale/en.yml", "lib/ripple/nested_attributes.rb", "lib/ripple/observable.rb", "lib/ripple/properties.rb", "lib/ripple/property_type_mismatch.rb", "lib/ripple/railtie.rb", "lib/ripple/serialization.rb", "lib/ripple/timestamps.rb", "lib/ripple/translation.rb", "lib/ripple/validations/associated_validator.rb", "lib/ripple/validations.rb", "lib/ripple.rb", "Rakefile", "ripple.gemspec", "spec/fixtures/config.yml", "spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document_spec.rb", "spec/ripple/embedded_document/finders_spec.rb", "spec/ripple/embedded_document/persistence_spec.rb", "spec/ripple/embedded_document_spec.rb", "spec/ripple/finders_spec.rb", "spec/ripple/inspection_spec.rb", "spec/ripple/key_spec.rb", "spec/ripple/observable_spec.rb", "spec/ripple/persistence_spec.rb", "spec/ripple/properties_spec.rb", "spec/ripple/ripple_spec.rb", "spec/ripple/serialization_spec.rb", "spec/ripple/timestamps_spec.rb", "spec/ripple/validations/associated_validator_spec.rb", "spec/ripple/validations_spec.rb", "spec/spec_helper.rb", "spec/support/associations/proxies.rb", "spec/support/mocks.rb", "spec/support/models/address.rb", "spec/support/models/box.rb", "spec/support/models/car.rb", "spec/support/models/cardboard_box.rb", "spec/support/models/clock.rb", "spec/support/models/clock_observer.rb", "spec/support/models/customer.rb", "spec/support/models/driver.rb", "spec/support/models/email.rb", "spec/support/models/engine.rb", "spec/support/models/family.rb", "spec/support/models/favorite.rb", "spec/support/models/invoice.rb", "spec/support/models/late_invoice.rb", "spec/support/models/note.rb", "spec/support/models/page.rb", "spec/support/models/paid_invoice.rb", "spec/support/models/passenger.rb", "spec/support/models/seat.rb", "spec/support/models/tasks.rb", "spec/support/models/tree.rb", "spec/support/models/user.rb", "spec/support/models/wheel.rb", "spec/support/models/widget.rb", "spec/support/test_server.rb", "spec/support/test_server.yml.example"]
12
+ s.files = ["Gemfile", "lib/rails/generators/ripple/configuration/configuration_generator.rb", "lib/rails/generators/ripple/configuration/templates/ripple.yml", "lib/rails/generators/ripple/js/js_generator.rb", "lib/rails/generators/ripple/js/templates/js/contrib.js", "lib/rails/generators/ripple/js/templates/js/iso8601.js", "lib/rails/generators/ripple/js/templates/js/ripple.js", "lib/rails/generators/ripple/model/model_generator.rb", "lib/rails/generators/ripple/model/templates/model.rb", "lib/rails/generators/ripple/observer/observer_generator.rb", "lib/rails/generators/ripple/observer/templates/observer.rb", "lib/rails/generators/ripple/test/templates/test_server.rb", "lib/rails/generators/ripple/test/test_generator.rb", "lib/rails/generators/ripple_generator.rb", "lib/ripple/associations/embedded.rb", "lib/ripple/associations/instantiators.rb", "lib/ripple/associations/linked.rb", "lib/ripple/associations/many.rb", "lib/ripple/associations/many_embedded_proxy.rb", "lib/ripple/associations/many_linked_proxy.rb", "lib/ripple/associations/one.rb", "lib/ripple/associations/one_embedded_proxy.rb", "lib/ripple/associations/one_linked_proxy.rb", "lib/ripple/associations/proxy.rb", "lib/ripple/associations.rb", "lib/ripple/attribute_methods/dirty.rb", "lib/ripple/attribute_methods/query.rb", "lib/ripple/attribute_methods/read.rb", "lib/ripple/attribute_methods/write.rb", "lib/ripple/attribute_methods.rb", "lib/ripple/callbacks.rb", "lib/ripple/conversion.rb", "lib/ripple/core_ext/casting.rb", "lib/ripple/core_ext.rb", "lib/ripple/document/bucket_access.rb", "lib/ripple/document/finders.rb", "lib/ripple/document/key.rb", "lib/ripple/document/persistence.rb", "lib/ripple/document.rb", "lib/ripple/embedded_document/finders.rb", "lib/ripple/embedded_document/persistence.rb", "lib/ripple/embedded_document.rb", "lib/ripple/i18n.rb", "lib/ripple/inspection.rb", "lib/ripple/locale/en.yml", "lib/ripple/nested_attributes.rb", "lib/ripple/observable.rb", "lib/ripple/properties.rb", "lib/ripple/property_type_mismatch.rb", "lib/ripple/railtie.rb", "lib/ripple/serialization.rb", "lib/ripple/timestamps.rb", "lib/ripple/translation.rb", "lib/ripple/validations/associated_validator.rb", "lib/ripple/validations.rb", "lib/ripple.rb", "Rakefile", "ripple.gemspec", "spec/fixtures/config.yml", "spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document_spec.rb", "spec/ripple/embedded_document/finders_spec.rb", "spec/ripple/embedded_document/persistence_spec.rb", "spec/ripple/embedded_document_spec.rb", "spec/ripple/finders_spec.rb", "spec/ripple/inspection_spec.rb", "spec/ripple/key_spec.rb", "spec/ripple/observable_spec.rb", "spec/ripple/persistence_spec.rb", "spec/ripple/properties_spec.rb", "spec/ripple/ripple_spec.rb", "spec/ripple/serialization_spec.rb", "spec/ripple/timestamps_spec.rb", "spec/ripple/validations/associated_validator_spec.rb", "spec/ripple/validations_spec.rb", "spec/spec_helper.rb", "spec/support/associations/proxies.rb", "spec/support/associations.rb", "spec/support/mocks.rb", "spec/support/models/address.rb", "spec/support/models/box.rb", "spec/support/models/car.rb", "spec/support/models/cardboard_box.rb", "spec/support/models/clock.rb", "spec/support/models/clock_observer.rb", "spec/support/models/customer.rb", "spec/support/models/driver.rb", "spec/support/models/email.rb", "spec/support/models/engine.rb", "spec/support/models/family.rb", "spec/support/models/favorite.rb", "spec/support/models/invoice.rb", "spec/support/models/late_invoice.rb", "spec/support/models/note.rb", "spec/support/models/page.rb", "spec/support/models/paid_invoice.rb", "spec/support/models/passenger.rb", "spec/support/models/seat.rb", "spec/support/models/tasks.rb", "spec/support/models/tree.rb", "spec/support/models/user.rb", "spec/support/models/wheel.rb", "spec/support/models/widget.rb", "spec/support/models.rb", "spec/support/test_server.rb", "spec/support/test_server.yml.example"]
13
13
  s.homepage = %q{http://seancribbs.github.com/ripple}
14
14
  s.require_paths = ["lib"]
15
- s.rubygems_version = %q{1.6.1}
15
+ s.rubygems_version = %q{1.7.2}
16
16
  s.summary = %q{ripple is an object-mapper library for Riak, the distributed database by Basho.}
17
17
  s.test_files = ["spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document_spec.rb", "spec/ripple/embedded_document/finders_spec.rb", "spec/ripple/embedded_document/persistence_spec.rb", "spec/ripple/embedded_document_spec.rb", "spec/ripple/finders_spec.rb", "spec/ripple/inspection_spec.rb", "spec/ripple/key_spec.rb", "spec/ripple/observable_spec.rb", "spec/ripple/persistence_spec.rb", "spec/ripple/properties_spec.rb", "spec/ripple/ripple_spec.rb", "spec/ripple/serialization_spec.rb", "spec/ripple/timestamps_spec.rb", "spec/ripple/validations/associated_validator_spec.rb", "spec/ripple/validations_spec.rb"]
18
18
 
@@ -21,18 +21,18 @@ Gem::Specification.new do |s|
21
21
 
22
22
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
23
23
  s.add_development_dependency(%q<rspec>, ["~> 2.4.0"])
24
- s.add_runtime_dependency(%q<riak-client>, ["~> 0.9.0"])
24
+ s.add_runtime_dependency(%q<riak-client>, ["~> 0.9.2"])
25
25
  s.add_runtime_dependency(%q<activesupport>, ["~> 3.0.0"])
26
26
  s.add_runtime_dependency(%q<activemodel>, ["~> 3.0.0"])
27
27
  else
28
28
  s.add_dependency(%q<rspec>, ["~> 2.4.0"])
29
- s.add_dependency(%q<riak-client>, ["~> 0.9.0"])
29
+ s.add_dependency(%q<riak-client>, ["~> 0.9.2"])
30
30
  s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
31
31
  s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
32
32
  end
33
33
  else
34
34
  s.add_dependency(%q<rspec>, ["~> 2.4.0"])
35
- s.add_dependency(%q<riak-client>, ["~> 0.9.0"])
35
+ s.add_dependency(%q<riak-client>, ["~> 0.9.2"])
36
36
  s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
37
37
  s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
38
38
  end
@@ -1,4 +1,5 @@
1
1
  require File.expand_path(File.dirname(__FILE__) + '/../../spec_helper')
2
+ require 'active_support/core_ext/array'
2
3
 
3
4
  describe Ripple::NestedAttributes do
4
5
  require 'support/models/car'
@@ -0,0 +1 @@
1
+ require File.expand_path("../associations/proxies", __FILE__)
@@ -0,0 +1,3 @@
1
+ Dir[File.expand_path("../models/*.rb", __FILE__)].each do |file|
2
+ require file
3
+ end
metadata CHANGED
@@ -2,7 +2,7 @@
2
2
  name: ripple
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 0.9.0
5
+ version: 0.9.2
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Cribbs
@@ -10,8 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-03 00:00:00 -04:00
14
- default_executable:
13
+ date: 2011-04-11 00:00:00 Z
15
14
  dependencies:
16
15
  - !ruby/object:Gem::Dependency
17
16
  name: rspec
@@ -32,7 +31,7 @@ dependencies:
32
31
  requirements:
33
32
  - - ~>
34
33
  - !ruby/object:Gem::Version
35
- version: 0.9.0
34
+ version: 0.9.2
36
35
  type: :runtime
37
36
  version_requirements: *id002
38
37
  - !ruby/object:Gem::Dependency
@@ -156,6 +155,7 @@ files:
156
155
  - spec/ripple/validations_spec.rb
157
156
  - spec/spec_helper.rb
158
157
  - spec/support/associations/proxies.rb
158
+ - spec/support/associations.rb
159
159
  - spec/support/mocks.rb
160
160
  - spec/support/models/address.rb
161
161
  - spec/support/models/box.rb
@@ -181,9 +181,9 @@ files:
181
181
  - spec/support/models/user.rb
182
182
  - spec/support/models/wheel.rb
183
183
  - spec/support/models/widget.rb
184
+ - spec/support/models.rb
184
185
  - spec/support/test_server.rb
185
186
  - spec/support/test_server.yml.example
186
- has_rdoc: true
187
187
  homepage: http://seancribbs.github.com/ripple
188
188
  licenses: []
189
189
 
@@ -207,7 +207,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
207
207
  requirements: []
208
208
 
209
209
  rubyforge_project:
210
- rubygems_version: 1.6.1
210
+ rubygems_version: 1.7.2
211
211
  signing_key:
212
212
  specification_version: 3
213
213
  summary: ripple is an object-mapper library for Riak, the distributed database by Basho.