seomoz-ripple 1.0.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (149) hide show
  1. data/Gemfile +20 -0
  2. data/Guardfile +15 -0
  3. data/Rakefile +88 -0
  4. data/lib/rails/generators/ripple/configuration/configuration_generator.rb +13 -0
  5. data/lib/rails/generators/ripple/configuration/templates/ripple.yml +24 -0
  6. data/lib/rails/generators/ripple/js/js_generator.rb +13 -0
  7. data/lib/rails/generators/ripple/js/templates/js/contrib.js +63 -0
  8. data/lib/rails/generators/ripple/js/templates/js/iso8601.js +76 -0
  9. data/lib/rails/generators/ripple/js/templates/js/ripple.js +132 -0
  10. data/lib/rails/generators/ripple/model/model_generator.rb +20 -0
  11. data/lib/rails/generators/ripple/model/templates/model.rb +10 -0
  12. data/lib/rails/generators/ripple/observer/observer_generator.rb +16 -0
  13. data/lib/rails/generators/ripple/observer/templates/observer.rb +4 -0
  14. data/lib/rails/generators/ripple/test/templates/test_server.rb +46 -0
  15. data/lib/rails/generators/ripple/test/test_generator.rb +39 -0
  16. data/lib/rails/generators/ripple_generator.rb +78 -0
  17. data/lib/ripple.rb +79 -0
  18. data/lib/ripple/associations.rb +356 -0
  19. data/lib/ripple/associations/embedded.rb +35 -0
  20. data/lib/ripple/associations/instantiators.rb +26 -0
  21. data/lib/ripple/associations/linked.rb +65 -0
  22. data/lib/ripple/associations/many.rb +38 -0
  23. data/lib/ripple/associations/many_embedded_proxy.rb +38 -0
  24. data/lib/ripple/associations/many_linked_proxy.rb +66 -0
  25. data/lib/ripple/associations/many_reference_proxy.rb +93 -0
  26. data/lib/ripple/associations/many_stored_key_proxy.rb +76 -0
  27. data/lib/ripple/associations/one.rb +20 -0
  28. data/lib/ripple/associations/one_embedded_proxy.rb +35 -0
  29. data/lib/ripple/associations/one_key_proxy.rb +58 -0
  30. data/lib/ripple/associations/one_linked_proxy.rb +22 -0
  31. data/lib/ripple/associations/one_stored_key_proxy.rb +43 -0
  32. data/lib/ripple/associations/proxy.rb +118 -0
  33. data/lib/ripple/attribute_methods.rb +118 -0
  34. data/lib/ripple/attribute_methods/dirty.rb +50 -0
  35. data/lib/ripple/attribute_methods/query.rb +34 -0
  36. data/lib/ripple/attribute_methods/read.rb +26 -0
  37. data/lib/ripple/attribute_methods/write.rb +25 -0
  38. data/lib/ripple/callbacks.rb +74 -0
  39. data/lib/ripple/conflict/basic_resolver.rb +82 -0
  40. data/lib/ripple/conflict/document_hooks.rb +20 -0
  41. data/lib/ripple/conflict/resolver.rb +71 -0
  42. data/lib/ripple/conflict/test_helper.rb +33 -0
  43. data/lib/ripple/conversion.rb +28 -0
  44. data/lib/ripple/core_ext.rb +2 -0
  45. data/lib/ripple/core_ext/casting.rb +148 -0
  46. data/lib/ripple/core_ext/object.rb +8 -0
  47. data/lib/ripple/document.rb +104 -0
  48. data/lib/ripple/document/bucket_access.rb +25 -0
  49. data/lib/ripple/document/finders.rb +131 -0
  50. data/lib/ripple/document/key.rb +43 -0
  51. data/lib/ripple/document/link.rb +30 -0
  52. data/lib/ripple/document/persistence.rb +115 -0
  53. data/lib/ripple/embedded_document.rb +64 -0
  54. data/lib/ripple/embedded_document/around_callbacks.rb +18 -0
  55. data/lib/ripple/embedded_document/finders.rb +26 -0
  56. data/lib/ripple/embedded_document/persistence.rb +77 -0
  57. data/lib/ripple/i18n.rb +2 -0
  58. data/lib/ripple/inspection.rb +32 -0
  59. data/lib/ripple/locale/en.yml +21 -0
  60. data/lib/ripple/nested_attributes.rb +265 -0
  61. data/lib/ripple/observable.rb +28 -0
  62. data/lib/ripple/properties.rb +73 -0
  63. data/lib/ripple/property_type_mismatch.rb +12 -0
  64. data/lib/ripple/railtie.rb +13 -0
  65. data/lib/ripple/serialization.rb +84 -0
  66. data/lib/ripple/timestamps.rb +27 -0
  67. data/lib/ripple/translation.rb +14 -0
  68. data/lib/ripple/validations.rb +67 -0
  69. data/lib/ripple/validations/associated_validator.rb +43 -0
  70. data/ripple.gemspec +46 -0
  71. data/seomoz-ripple.gemspec +46 -0
  72. data/spec/fixtures/config.yml +8 -0
  73. data/spec/integration/ripple/associations_spec.rb +220 -0
  74. data/spec/integration/ripple/conflict_resolution_spec.rb +293 -0
  75. data/spec/integration/ripple/nested_attributes_spec.rb +264 -0
  76. data/spec/integration/ripple/persistence_spec.rb +57 -0
  77. data/spec/integration/ripple/search_associations_spec.rb +42 -0
  78. data/spec/ripple/associations/many_embedded_proxy_spec.rb +122 -0
  79. data/spec/ripple/associations/many_linked_proxy_spec.rb +191 -0
  80. data/spec/ripple/associations/many_reference_proxy_spec.rb +170 -0
  81. data/spec/ripple/associations/many_stored_key_proxy_spec.rb +158 -0
  82. data/spec/ripple/associations/one_embedded_proxy_spec.rb +125 -0
  83. data/spec/ripple/associations/one_key_proxy_spec.rb +82 -0
  84. data/spec/ripple/associations/one_linked_proxy_spec.rb +91 -0
  85. data/spec/ripple/associations/one_stored_key_proxy_spec.rb +72 -0
  86. data/spec/ripple/associations/proxy_spec.rb +84 -0
  87. data/spec/ripple/associations_spec.rb +129 -0
  88. data/spec/ripple/attribute_methods/dirty_spec.rb +80 -0
  89. data/spec/ripple/attribute_methods_spec.rb +230 -0
  90. data/spec/ripple/bucket_access_spec.rb +25 -0
  91. data/spec/ripple/callbacks_spec.rb +176 -0
  92. data/spec/ripple/conflict/resolver_spec.rb +42 -0
  93. data/spec/ripple/conversion_spec.rb +22 -0
  94. data/spec/ripple/core_ext_spec.rb +103 -0
  95. data/spec/ripple/document/link_spec.rb +67 -0
  96. data/spec/ripple/document_spec.rb +96 -0
  97. data/spec/ripple/embedded_document/finders_spec.rb +29 -0
  98. data/spec/ripple/embedded_document/persistence_spec.rb +80 -0
  99. data/spec/ripple/embedded_document_spec.rb +84 -0
  100. data/spec/ripple/finders_spec.rb +217 -0
  101. data/spec/ripple/inspection_spec.rb +51 -0
  102. data/spec/ripple/key_spec.rb +30 -0
  103. data/spec/ripple/observable_spec.rb +121 -0
  104. data/spec/ripple/persistence_spec.rb +326 -0
  105. data/spec/ripple/properties_spec.rb +262 -0
  106. data/spec/ripple/ripple_spec.rb +71 -0
  107. data/spec/ripple/serialization_spec.rb +51 -0
  108. data/spec/ripple/timestamps_spec.rb +76 -0
  109. data/spec/ripple/validations/associated_validator_spec.rb +77 -0
  110. data/spec/ripple/validations_spec.rb +104 -0
  111. data/spec/spec_helper.rb +26 -0
  112. data/spec/support/associations.rb +1 -0
  113. data/spec/support/associations/proxies.rb +17 -0
  114. data/spec/support/integration_setup.rb +11 -0
  115. data/spec/support/mocks.rb +4 -0
  116. data/spec/support/models.rb +4 -0
  117. data/spec/support/models/address.rb +12 -0
  118. data/spec/support/models/box.rb +13 -0
  119. data/spec/support/models/car.rb +16 -0
  120. data/spec/support/models/cardboard_box.rb +3 -0
  121. data/spec/support/models/clock.rb +12 -0
  122. data/spec/support/models/clock_observer.rb +3 -0
  123. data/spec/support/models/company.rb +23 -0
  124. data/spec/support/models/customer.rb +4 -0
  125. data/spec/support/models/driver.rb +6 -0
  126. data/spec/support/models/email.rb +4 -0
  127. data/spec/support/models/engine.rb +5 -0
  128. data/spec/support/models/family.rb +16 -0
  129. data/spec/support/models/favorite.rb +4 -0
  130. data/spec/support/models/invoice.rb +7 -0
  131. data/spec/support/models/late_invoice.rb +3 -0
  132. data/spec/support/models/ninja.rb +9 -0
  133. data/spec/support/models/note.rb +5 -0
  134. data/spec/support/models/page.rb +4 -0
  135. data/spec/support/models/paid_invoice.rb +4 -0
  136. data/spec/support/models/passenger.rb +6 -0
  137. data/spec/support/models/profile.rb +10 -0
  138. data/spec/support/models/seat.rb +5 -0
  139. data/spec/support/models/subscription.rb +27 -0
  140. data/spec/support/models/tasks.rb +14 -0
  141. data/spec/support/models/team.rb +11 -0
  142. data/spec/support/models/transactions.rb +17 -0
  143. data/spec/support/models/tree.rb +4 -0
  144. data/spec/support/models/user.rb +10 -0
  145. data/spec/support/models/wheel.rb +6 -0
  146. data/spec/support/models/widget.rb +22 -0
  147. data/spec/support/test_server.rb +18 -0
  148. data/spec/support/test_server.yml.example +2 -0
  149. metadata +362 -0
@@ -0,0 +1,28 @@
1
+
2
+ require 'active_support/concern'
3
+ require 'active_model/observing'
4
+
5
+ module Ripple
6
+ module Observable
7
+ extend ActiveSupport::Concern
8
+ include ActiveModel::Observing
9
+
10
+ included do
11
+ set_callback(:create, :before) { notify_observers :before_create }
12
+ set_callback(:create, :after) { notify_observers :after_create }
13
+
14
+ set_callback(:update, :before) { notify_observers :before_update }
15
+ set_callback(:update, :after) { notify_observers :after_update }
16
+
17
+ set_callback(:save, :before) { notify_observers :before_save }
18
+ set_callback(:save, :after) { notify_observers :after_save }
19
+
20
+ set_callback(:destroy, :before) { notify_observers :before_destroy }
21
+ set_callback(:destroy, :after) { notify_observers :after_destroy }
22
+
23
+ set_callback(:validation, :before) { notify_observers :before_validation }
24
+ set_callback(:validation, :after) { notify_observers :after_validation }
25
+ end
26
+
27
+ end
28
+ end
@@ -0,0 +1,73 @@
1
+ require 'ripple/core_ext/casting'
2
+ require 'active_support/core_ext/hash/except'
3
+ require 'active_support/core_ext/hash/indifferent_access'
4
+
5
+ module Ripple
6
+ # Adds the ability to declare properties on your Ripple::Document class.
7
+ # Properties will automatically generate accessor (get/set/query) methods and
8
+ # handle type-casting between your Ruby type and JSON-compatible types.
9
+ module Properties
10
+ # @private
11
+ def inherited(subclass)
12
+ super
13
+ subclass.properties.merge!(properties)
14
+ end
15
+
16
+ # @return [Hash] the properties defined on the document
17
+ def properties
18
+ @properties ||= {}.with_indifferent_access
19
+ end
20
+
21
+ def property(key, type, options={})
22
+ prop = Property.new(key, type, options)
23
+ properties[prop.key] = prop
24
+ end
25
+ end
26
+
27
+ # Encapsulates a single property on your Ripple::Document class.
28
+ class Property
29
+ # @return [Symbol] the key of this property in the Document
30
+ attr_reader :key
31
+ # @return [Class] the Ruby type of property.
32
+ attr_reader :type
33
+ # @return [Hash] configuration options
34
+ attr_reader :options
35
+
36
+ # Create a new document property.
37
+ # @param [String, Symbol] key the key of the property
38
+ # @param [Class] type the Ruby type of the property. Use {Boolean} for true or false types.
39
+ # @param [Hash] options configuration options
40
+ # @option options [Object, Proc] :default (nil) a default value for the property, or a lambda to evaluate when providing the default.
41
+ def initialize(key, type, options={})
42
+ @options = options.to_options
43
+ @key = key.to_sym
44
+ @type = type
45
+ end
46
+
47
+ # @return [Object] The default value for this property if defined, or nil.
48
+ def default
49
+ default = options[:default]
50
+ default = default.dup if default.duplicable?
51
+
52
+ return nil if default.nil?
53
+ type_cast(default.respond_to?(:call) ? default.call : default)
54
+ end
55
+
56
+ # @return [Hash] options appropriate for the validates class method
57
+ def validation_options
58
+ @options.dup.except(:default)
59
+ end
60
+
61
+ # Attempt to coerce the passed value into this property's type
62
+ # @param [Object] value the value to coerce
63
+ # @return [Object] the value coerced into this property's type
64
+ # @raise [PropertyTypeMismatch] if the value cannot be coerced into the property's type
65
+ def type_cast(value)
66
+ if @type.respond_to?(:ripple_cast)
67
+ @type.ripple_cast(value)
68
+ else
69
+ value
70
+ end
71
+ end
72
+ end
73
+ end
@@ -0,0 +1,12 @@
1
+ require 'ripple/translation'
2
+
3
+ module Ripple
4
+ # Exception raised when the value assigned to a document property
5
+ # cannot be coerced into the property's defined type.
6
+ class PropertyTypeMismatch < StandardError
7
+ include Translation
8
+ def initialize(klass, value)
9
+ super t("property_type_mismatch", :class => klass, :value => value.inspect)
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,13 @@
1
+ require 'rails/railtie'
2
+
3
+ module Ripple
4
+ # Railtie for automatic initialization of the Ripple framework
5
+ # during Rails initialization.
6
+ class Railtie < Rails::Railtie
7
+ initializer "ripple.configure_rails_initialization" do
8
+ if File.exist?(Rails.root + "config/ripple.yml")
9
+ Ripple.load_configuration Rails.root.join('config', 'ripple.yml'), [Rails.env]
10
+ end
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,84 @@
1
+ # Copyright 2010-2011 Sean Cribbs 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_model/serialization'
17
+ require 'active_model/serializers/json'
18
+
19
+ module Ripple
20
+ # Provides methods for serializing Ripple documents to external
21
+ # formats (e.g. JSON). By default, embedded documents will be
22
+ # included in the resulting format.
23
+ module Serialization
24
+ extend ActiveSupport::Concern
25
+ include ::ActiveModel::Serializers::JSON
26
+
27
+ module InstanceMethods
28
+ # Creates a Hash suitable for conversion to an external format.
29
+ # @param [Hash] options (nil) serialization options
30
+ # @option options [Array<Symbol>] :only emit only the specified attributes
31
+ # @option options [Array<Symbol>] :except omit the specified attributes
32
+ # @option options [Array<Symbol>, Hash] :include include the
33
+ # specified associations (with or without extra
34
+ # options). This defaults to all embedded associations.
35
+ # @return [Hash] a hash of attributes and embedded documents
36
+ def serializable_hash(options=nil)
37
+ options = options.try(:clone) || {}
38
+
39
+ unless options.has_key?(:include)
40
+ options[:include] = self.class.embedded_associations.map(&:name)
41
+ end
42
+
43
+ hash = super(options)
44
+
45
+ hash['key'] = key if respond_to?(:key) && key.present? && (!options[:except] || !options[:except].map(&:to_s).include?("key"))
46
+
47
+ serializable_add_includes(options) do |association, records, opts|
48
+ hash[association.to_s] = records.is_a?(Enumerable) ? records.map {|r| r.serializable_hash(opts) } : records.serializable_hash(opts)
49
+ end
50
+ hash
51
+ end
52
+
53
+ private
54
+ def serializable_add_includes(options={})
55
+ return unless include_associations = options.delete(:include)
56
+
57
+ base_only_or_except = {
58
+ :except => options[:except],
59
+ :only => options[:only]
60
+ }
61
+
62
+ include_has_options = include_associations.is_a?(Hash)
63
+ associations = include_has_options ? include_associations.keys : Array.wrap(include_associations)
64
+
65
+ for association in associations
66
+ records = case self.class.associations[association.to_sym].type
67
+ when :many
68
+ send(association).to_a
69
+ when :one
70
+ send(association)
71
+ end
72
+
73
+ unless records.nil?
74
+ association_options = include_has_options ? include_associations[association] : base_only_or_except
75
+ opts = options.merge(association_options)
76
+ yield(association, records, opts)
77
+ end
78
+ end
79
+
80
+ options[:include] = include_associations
81
+ end
82
+ end
83
+ end
84
+ end
@@ -0,0 +1,27 @@
1
+ require 'active_support/time'
2
+ require 'active_support/concern'
3
+
4
+ module Ripple
5
+ # Adds automatic creation and update timestamps to a
6
+ # {Ripple::Document} model.
7
+ module Timestamps
8
+ extend ActiveSupport::Concern
9
+
10
+ module ClassMethods
11
+ # Adds the :created_at and :updated_at timestamp properties to
12
+ # the document.
13
+ def timestamps!
14
+ property :created_at, Time, :default => proc { Time.now }
15
+ property :updated_at, Time
16
+ before_save :touch
17
+ end
18
+ end
19
+
20
+ module InstanceMethods
21
+ # Sets the :updated_at attribute before saving the document.
22
+ def touch
23
+ self.updated_at = Time.now
24
+ end
25
+ end
26
+ end
27
+ end
@@ -0,0 +1,14 @@
1
+ require 'ripple/i18n'
2
+ require 'riak/util/translation'
3
+
4
+ module Ripple
5
+ # Adds i18n translation/string-lookup capabilities.
6
+ module Translation
7
+ include Riak::Util::Translation
8
+
9
+ # The scope of i18n keys to search (:ripple).
10
+ def i18n_scope
11
+ :ripple
12
+ end
13
+ end
14
+ end
@@ -0,0 +1,67 @@
1
+ require 'active_support/concern'
2
+ require 'active_model/validations'
3
+ require 'ripple/translation'
4
+ require 'ripple/validations/associated_validator'
5
+
6
+ module Ripple
7
+ # Raised by <tt>save!</tt> when the document is invalid. Use the
8
+ # +document+ method to retrieve the document which did not validate.
9
+ # begin
10
+ # invalid_document.save!
11
+ # rescue Ripple::DocumentInvalid => invalid
12
+ # puts invalid.document.errors
13
+ # end
14
+ class DocumentInvalid < StandardError
15
+ include Translation
16
+ attr_reader :document
17
+ def initialize(document)
18
+ @document = document
19
+ errors = @document.errors.full_messages.join(", ")
20
+ super(t("document_invalid", :errors => errors))
21
+ end
22
+ end
23
+
24
+ # Adds validations to {Ripple::Document} models. Validations are
25
+ # executed before saving the document.
26
+ module Validations
27
+ extend ActiveSupport::Concern
28
+ include ActiveModel::Validations
29
+
30
+ module ClassMethods
31
+ # @private
32
+ def property(key, type, options={})
33
+ prop = super
34
+ validates key, prop.validation_options unless prop.validation_options.blank?
35
+ end
36
+
37
+ # Instantiates a new document, applies attributes from a block, and saves it
38
+ # Raises Ripple::DocumentInvalid if the record did not save
39
+ def create!(attrs={}, &block)
40
+ obj = create(attrs, &block)
41
+ (raise Ripple::DocumentInvalid.new(obj) if obj.new?) || obj
42
+ end
43
+ end
44
+
45
+ module InstanceMethods
46
+ # @private
47
+ def save(options={:validate => true})
48
+ return false if options[:validate] && !valid?
49
+ super()
50
+ end
51
+
52
+ # Saves the document and raises {DocumentInvalid} exception if
53
+ # validations fail.
54
+ def save!
55
+ (raise Ripple::DocumentInvalid.new(self) unless save) || true
56
+ end
57
+
58
+ # Sets the passed attributes and saves the document, raising a
59
+ # {DocumentInvalid} exception if the validations fail.
60
+ def update_attributes!(attrs)
61
+ self.attributes = attrs
62
+ save!
63
+ end
64
+ end
65
+ end
66
+ end
67
+
@@ -0,0 +1,43 @@
1
+ require 'active_model/validator'
2
+
3
+ module Ripple
4
+ module Validations
5
+ class AssociatedValidator < ActiveModel::EachValidator
6
+ include Translation
7
+ def validate_each(record, attribute, value)
8
+ return if (value.is_a?(Array) ? value : [value]).collect{ |r| r.nil? || r.valid? }.all?
9
+ record.errors.add(attribute, error_message_for(attribute, value))
10
+ end
11
+
12
+ private
13
+
14
+ def error_message_for(attribute, associated_records)
15
+ if associated_records.respond_to?(:each_with_index)
16
+ record_errors = associated_records.enum_for(:each_with_index).collect do |record, index|
17
+ next unless record.errors.any?
18
+
19
+ t("associated_document_error_summary",
20
+ :doc_type => attribute.to_s.singularize,
21
+ :doc_id => index + 1,
22
+ :errors => record.errors.full_messages.to_sentence
23
+ )
24
+ end
25
+ record_errors.compact!
26
+ record_errors.flatten!
27
+
28
+ t("many_association_validation_error",
29
+ :association_errors => record_errors.join('; '))
30
+ else
31
+ t("one_association_validation_error",
32
+ :association_errors => associated_records.errors.full_messages.to_sentence)
33
+ end
34
+ end
35
+ end
36
+
37
+ module ClassMethods
38
+ def validates_associated(*attr_names)
39
+ validates_with AssociatedValidator, _merge_attributes(attr_names)
40
+ end
41
+ end
42
+ end
43
+ end
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{seomoz-ripple}
5
+ s.version = "1.0.0.pre"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Sean Cribbs"]
9
+ s.date = %q{2011-11-18}
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
+ s.email = %q{sean@basho.com}
12
+ s.files = ["Gemfile", "Guardfile", "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/many_reference_proxy.rb", "lib/ripple/associations/many_stored_key_proxy.rb", "lib/ripple/associations/one.rb", "lib/ripple/associations/one_embedded_proxy.rb", "lib/ripple/associations/one_key_proxy.rb", "lib/ripple/associations/one_linked_proxy.rb", "lib/ripple/associations/one_stored_key_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/conflict/basic_resolver.rb", "lib/ripple/conflict/document_hooks.rb", "lib/ripple/conflict/resolver.rb", "lib/ripple/conflict/test_helper.rb", "lib/ripple/conversion.rb", "lib/ripple/core_ext/casting.rb", "lib/ripple/core_ext/object.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/link.rb", "lib/ripple/document/persistence.rb", "lib/ripple/document.rb", "lib/ripple/embedded_document/around_callbacks.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/conflict_resolution_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/integration/ripple/search_associations_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/many_reference_proxy_spec.rb", "spec/ripple/associations/many_stored_key_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_key_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/one_stored_key_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods/dirty_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conflict/resolver_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document/link_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/integration_setup.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/company.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/ninja.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/profile.rb", "spec/support/models/seat.rb", "spec/support/models/subscription.rb", "spec/support/models/tasks.rb", "spec/support/models/team.rb", "spec/support/models/transactions.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
+ s.homepage = %q{http://seancribbs.github.com/ripple}
14
+ s.require_paths = ["lib"]
15
+ s.rubygems_version = %q{1.3.5}
16
+ s.summary = %q{ripple is an object-mapper library for Riak, the distributed database by Basho.}
17
+ s.test_files = ["spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/conflict_resolution_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/integration/ripple/search_associations_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/many_reference_proxy_spec.rb", "spec/ripple/associations/many_stored_key_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_key_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/one_stored_key_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods/dirty_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conflict/resolver_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document/link_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
+
19
+ if s.respond_to? :specification_version then
20
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
21
+ s.specification_version = 3
22
+
23
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
24
+ s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
25
+ s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
26
+ s.add_runtime_dependency(%q<riak-client>, ["~> 1.0.0.pre"])
27
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
28
+ s.add_runtime_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
29
+ s.add_runtime_dependency(%q<tzinfo>, [">= 0"])
30
+ else
31
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
32
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
33
+ s.add_dependency(%q<riak-client>, ["~> 1.0.0.pre"])
34
+ s.add_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
35
+ s.add_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
36
+ s.add_dependency(%q<tzinfo>, [">= 0"])
37
+ end
38
+ else
39
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
40
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
41
+ s.add_dependency(%q<riak-client>, ["~> 1.0.0.pre"])
42
+ s.add_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
43
+ s.add_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
44
+ s.add_dependency(%q<tzinfo>, [">= 0"])
45
+ end
46
+ end
@@ -0,0 +1,46 @@
1
+ # -*- encoding: utf-8 -*-
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = %q{seomoz-ripple}
5
+ s.version = "1.0.0.pre"
6
+
7
+ s.required_rubygems_version = Gem::Requirement.new("> 1.3.1") if s.respond_to? :required_rubygems_version=
8
+ s.authors = ["Sean Cribbs"]
9
+ s.date = %q{2011-11-18}
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
+ s.email = %q{sean@basho.com}
12
+ s.files = ["Gemfile", "Guardfile", "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/many_reference_proxy.rb", "lib/ripple/associations/many_stored_key_proxy.rb", "lib/ripple/associations/one.rb", "lib/ripple/associations/one_embedded_proxy.rb", "lib/ripple/associations/one_key_proxy.rb", "lib/ripple/associations/one_linked_proxy.rb", "lib/ripple/associations/one_stored_key_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/conflict/basic_resolver.rb", "lib/ripple/conflict/document_hooks.rb", "lib/ripple/conflict/resolver.rb", "lib/ripple/conflict/test_helper.rb", "lib/ripple/conversion.rb", "lib/ripple/core_ext/casting.rb", "lib/ripple/core_ext/object.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/link.rb", "lib/ripple/document/persistence.rb", "lib/ripple/document.rb", "lib/ripple/embedded_document/around_callbacks.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", "seomoz-ripple.gemspec", "spec/fixtures/config.yml", "spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/conflict_resolution_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/integration/ripple/search_associations_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/many_reference_proxy_spec.rb", "spec/ripple/associations/many_stored_key_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_key_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/one_stored_key_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods/dirty_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conflict/resolver_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document/link_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/integration_setup.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/company.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/ninja.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/profile.rb", "spec/support/models/seat.rb", "spec/support/models/subscription.rb", "spec/support/models/tasks.rb", "spec/support/models/team.rb", "spec/support/models/transactions.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
+ s.homepage = %q{http://seancribbs.github.com/ripple}
14
+ s.require_paths = ["lib"]
15
+ s.rubygems_version = %q{1.3.5}
16
+ s.summary = %q{ripple is an object-mapper library for Riak, the distributed database by Basho.}
17
+ s.test_files = ["spec/integration/ripple/associations_spec.rb", "spec/integration/ripple/conflict_resolution_spec.rb", "spec/integration/ripple/nested_attributes_spec.rb", "spec/integration/ripple/persistence_spec.rb", "spec/integration/ripple/search_associations_spec.rb", "spec/ripple/associations/many_embedded_proxy_spec.rb", "spec/ripple/associations/many_linked_proxy_spec.rb", "spec/ripple/associations/many_reference_proxy_spec.rb", "spec/ripple/associations/many_stored_key_proxy_spec.rb", "spec/ripple/associations/one_embedded_proxy_spec.rb", "spec/ripple/associations/one_key_proxy_spec.rb", "spec/ripple/associations/one_linked_proxy_spec.rb", "spec/ripple/associations/one_stored_key_proxy_spec.rb", "spec/ripple/associations/proxy_spec.rb", "spec/ripple/associations_spec.rb", "spec/ripple/attribute_methods/dirty_spec.rb", "spec/ripple/attribute_methods_spec.rb", "spec/ripple/bucket_access_spec.rb", "spec/ripple/callbacks_spec.rb", "spec/ripple/conflict/resolver_spec.rb", "spec/ripple/conversion_spec.rb", "spec/ripple/core_ext_spec.rb", "spec/ripple/document/link_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
+
19
+ if s.respond_to? :specification_version then
20
+ current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
21
+ s.specification_version = 3
22
+
23
+ if Gem::Version.new(Gem::RubyGemsVersion) >= Gem::Version.new('1.2.0') then
24
+ s.add_development_dependency(%q<rspec>, ["~> 2.6.0"])
25
+ s.add_development_dependency(%q<rake>, ["~> 0.8.7"])
26
+ s.add_runtime_dependency(%q<seomoz-riak-client>, ["~> 1.0.0.pre"])
27
+ s.add_runtime_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
28
+ s.add_runtime_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
29
+ s.add_runtime_dependency(%q<tzinfo>, [">= 0"])
30
+ else
31
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
32
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
33
+ s.add_dependency(%q<seomoz-riak-client>, ["~> 1.0.0.pre"])
34
+ s.add_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
35
+ s.add_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
36
+ s.add_dependency(%q<tzinfo>, [">= 0"])
37
+ end
38
+ else
39
+ s.add_dependency(%q<rspec>, ["~> 2.6.0"])
40
+ s.add_dependency(%q<rake>, ["~> 0.8.7"])
41
+ s.add_dependency(%q<seomoz-riak-client>, ["~> 1.0.0.pre"])
42
+ s.add_dependency(%q<activesupport>, [">= 3.0.0", "< 3.2.0"])
43
+ s.add_dependency(%q<activemodel>, [">= 3.0.0", "< 3.2.0"])
44
+ s.add_dependency(%q<tzinfo>, [">= 0"])
45
+ end
46
+ end