ripple 0.9.2 → 0.9.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -13,6 +13,8 @@
13
13
  # limitations under the License.
14
14
 
15
15
  require 'riak'
16
+ require 'erb'
17
+ require 'yaml'
16
18
  require 'active_model'
17
19
  require 'ripple/core_ext'
18
20
  require 'ripple/translation'
@@ -54,10 +54,6 @@ module Ripple
54
54
  obj = create(attrs, &block)
55
55
  (raise Ripple::DocumentInvalid.new(obj) if obj.new?) || obj
56
56
  end
57
-
58
- def validates_associated(*attr_names)
59
- validates_with AssociatedValidator, _merge_attributes(attr_names)
60
- end
61
57
  end
62
58
 
63
59
  module InstanceMethods
@@ -24,5 +24,11 @@ module Ripple
24
24
  record.errors.add(attribute, :invalid, options.merge(:value => value))
25
25
  end
26
26
  end
27
+
28
+ module ClassMethods
29
+ def validates_associated(*attr_names)
30
+ validates_with AssociatedValidator, _merge_attributes(attr_names)
31
+ end
32
+ end
27
33
  end
28
34
  end
@@ -2,11 +2,11 @@
2
2
 
3
3
  Gem::Specification.new do |s|
4
4
  s.name = %q{ripple}
5
- s.version = "0.9.2"
5
+ s.version = "0.9.3"
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-11}
9
+ s.date = %q{2011-04-18}
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
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"]
@@ -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.2"])
24
+ s.add_runtime_dependency(%q<riak-client>, ["~> 0.9.3"])
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.2"])
29
+ s.add_dependency(%q<riak-client>, ["~> 0.9.3"])
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.2"])
35
+ s.add_dependency(%q<riak-client>, ["~> 0.9.3"])
36
36
  s.add_dependency(%q<activesupport>, ["~> 3.0.0"])
37
37
  s.add_dependency(%q<activemodel>, ["~> 3.0.0"])
38
38
  end
@@ -1,3 +1,3 @@
1
1
  Dir[File.expand_path("../models/*.rb", __FILE__)].each do |file|
2
- require file
2
+ require "support/models/#{File.basename(file)}"
3
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.2
5
+ version: 0.9.3
6
6
  platform: ruby
7
7
  authors:
8
8
  - Sean Cribbs
@@ -10,7 +10,7 @@ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
12
 
13
- date: 2011-04-11 00:00:00 Z
13
+ date: 2011-04-18 00:00:00 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rspec
@@ -31,7 +31,7 @@ dependencies:
31
31
  requirements:
32
32
  - - ~>
33
33
  - !ruby/object:Gem::Version
34
- version: 0.9.2
34
+ version: 0.9.3
35
35
  type: :runtime
36
36
  version_requirements: *id002
37
37
  - !ruby/object:Gem::Dependency