ripple 1.0.0.beta → 1.0.0.beta2
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +10 -6
- data/Gemfile +6 -15
- data/Gemfile.rails30 +3 -0
- data/Gemfile.rails31 +3 -0
- data/Gemfile.rails32 +3 -0
- data/Guardfile +3 -1
- data/LICENSE +16 -0
- data/README.markdown +173 -0
- data/RELEASE_NOTES.textile +286 -0
- data/Rakefile +19 -0
- data/lib/rails/generators/ripple/configuration/templates/ripple.yml +1 -0
- data/lib/rails/generators/ripple/model/model_generator.rb +1 -1
- data/lib/rails/generators/ripple/model/templates/{model.rb → model.rb.erb} +0 -0
- data/lib/rails/generators/ripple/observer/observer_generator.rb +1 -1
- data/lib/rails/generators/ripple/observer/templates/{observer.rb → observer.rb.erb} +0 -2
- data/lib/rails/generators/ripple/test/templates/cucumber.rb.erb +7 -0
- data/lib/rails/generators/ripple/test/test_generator.rb +17 -13
- data/lib/rails/generators/ripple_generator.rb +1 -0
- data/lib/ripple/associations.rb +65 -55
- data/lib/ripple/associations/embedded.rb +1 -1
- data/lib/ripple/associations/linked.rb +1 -1
- data/lib/ripple/associations/many.rb +1 -1
- data/lib/ripple/associations/many_embedded_proxy.rb +3 -2
- data/lib/ripple/associations/many_linked_proxy.rb +1 -1
- data/lib/ripple/associations/many_reference_proxy.rb +7 -5
- data/lib/ripple/associations/proxy.rb +2 -2
- data/lib/ripple/attribute_methods.rb +69 -61
- data/lib/ripple/attribute_methods/dirty.rb +2 -2
- data/lib/ripple/attribute_methods/read.rb +4 -2
- data/lib/ripple/callbacks.rb +23 -26
- data/lib/ripple/conflict/basic_resolver.rb +6 -2
- data/lib/ripple/conflict/document_hooks.rb +26 -0
- data/lib/ripple/conflict/resolver.rb +10 -2
- data/lib/ripple/conflict/test_helper.rb +3 -2
- data/lib/ripple/conversion.rb +1 -0
- data/lib/ripple/core_ext.rb +1 -0
- data/lib/ripple/core_ext/casting.rb +2 -0
- data/lib/ripple/core_ext/indexes.rb +89 -0
- data/lib/ripple/document.rb +23 -22
- data/lib/ripple/document/key.rb +12 -14
- data/lib/ripple/document/persistence.rb +99 -84
- data/lib/ripple/embedded_document.rb +9 -10
- data/lib/ripple/embedded_document/persistence.rb +42 -44
- data/lib/ripple/i18n.rb +4 -1
- data/lib/ripple/indexes.rb +151 -0
- data/lib/ripple/locale/en.yml +4 -0
- data/lib/ripple/locale/fr.yml +24 -0
- data/lib/ripple/nested_attributes.rb +92 -90
- data/lib/ripple/properties.rb +2 -1
- data/lib/ripple/railtie.rb +9 -0
- data/lib/ripple/railties/ripple.rake +32 -15
- data/lib/ripple/serialization.rb +50 -52
- data/lib/ripple/test_server.rb +1 -2
- data/lib/ripple/timestamps.rb +6 -8
- data/lib/ripple/validations.rb +19 -21
- data/lib/ripple/version.rb +1 -1
- data/ripple.gemspec +6 -5
- data/spec/generators/ripple/configuration_generator_spec.rb +9 -0
- data/spec/generators/ripple/js_generator_spec.rb +14 -0
- data/spec/generators/ripple/model_generator_spec.rb +64 -0
- data/spec/generators/ripple/observer_generator_spec.rb +20 -0
- data/spec/generators/ripple/test_generator_spec.rb +116 -0
- data/spec/generators/ripple_generator_spec.rb +11 -0
- data/spec/integration/ripple/conflict_resolution_spec.rb +35 -4
- data/spec/integration/ripple/indexes_spec.rb +47 -0
- data/spec/ripple/associations/many_embedded_proxy_spec.rb +50 -60
- data/spec/ripple/associations/many_linked_proxy_spec.rb +2 -2
- data/spec/ripple/associations/many_reference_proxy_spec.rb +1 -1
- data/spec/ripple/associations_spec.rb +16 -7
- data/spec/ripple/attribute_methods_spec.rb +43 -2
- data/spec/ripple/callbacks_spec.rb +120 -101
- data/spec/ripple/conversion_spec.rb +5 -13
- data/spec/ripple/core_ext_spec.rb +93 -15
- data/spec/ripple/finders_spec.rb +0 -2
- data/spec/ripple/indexes_spec.rb +111 -0
- data/spec/ripple/observable_spec.rb +1 -2
- data/spec/ripple/persistence_spec.rb +55 -32
- data/spec/ripple/properties_spec.rb +1 -1
- data/spec/ripple/ripple_spec.rb +5 -5
- data/spec/ripple/timestamps_spec.rb +9 -2
- data/spec/ripple/validations_spec.rb +50 -52
- data/spec/spec_helper.rb +9 -2
- data/spec/support/generator_setup.rb +26 -0
- data/spec/support/models.rb +1 -0
- data/spec/support/models/box.rb +1 -0
- data/spec/support/models/clock.rb +1 -1
- data/spec/support/models/indexer.rb +26 -0
- data/spec/support/models/post.rb +3 -2
- data/spec/support/models/widget.rb +2 -0
- data/spec/support/search.rb +2 -2
- data/spec/support/test_server.rb +23 -11
- data/spec/support/test_server.yml.example +1 -1
- metadata +159 -135
- data/spec/support/mocks.rb +0 -4
@@ -81,7 +81,7 @@ describe Ripple::Property do
|
|
81
81
|
@prop = Ripple::Property.new('foo', Boolean)
|
82
82
|
end
|
83
83
|
|
84
|
-
[0, 0.0, "", [], false, "f", "FALSE"].each do |v|
|
84
|
+
[0, 0.0, "", "0", [], false, "f", "FALSE"].each do |v|
|
85
85
|
it "should cast #{v.inspect} to false" do
|
86
86
|
@prop.type_cast(v).should == false
|
87
87
|
end
|
data/spec/ripple/ripple_spec.rb
CHANGED
@@ -26,7 +26,7 @@ describe Ripple do
|
|
26
26
|
c = Ripple.client
|
27
27
|
Ripple.config = {:http_port => 9000}
|
28
28
|
Ripple.client.should_not == c
|
29
|
-
Ripple.client.http_port.should == 9000
|
29
|
+
Ripple.client.node.http_port.should == 9000
|
30
30
|
end
|
31
31
|
|
32
32
|
it "should raise No Such File or Directory when given a bad configuration file" do
|
@@ -40,14 +40,14 @@ describe Ripple do
|
|
40
40
|
|
41
41
|
it "should select the configuration hash from the config keys provided" do
|
42
42
|
Ripple.load_config(File.join(File.dirname(__FILE__), '..', 'fixtures', 'config.yml'), ['ripple_rails', 'development'])
|
43
|
-
Ripple.client.http_port.should == 9001
|
44
|
-
Ripple.client.host.should == '127.0.0.1'
|
43
|
+
Ripple.client.node.http_port.should == 9001
|
44
|
+
Ripple.client.node.host.should == '127.0.0.1'
|
45
45
|
end
|
46
46
|
|
47
47
|
it "should apply the configuration under the ripple key" do
|
48
48
|
Ripple.load_config(File.join(File.dirname(__FILE__), '..', 'fixtures', 'config.yml'))
|
49
|
-
Ripple.client.http_port.should == 9000
|
50
|
-
Ripple.client.host.should == 'localhost'
|
49
|
+
Ripple.client.node.http_port.should == 9000
|
50
|
+
Ripple.client.node.host.should == 'localhost'
|
51
51
|
end
|
52
52
|
|
53
53
|
describe "date format" do
|
@@ -40,12 +40,12 @@ end
|
|
40
40
|
describe Ripple::Timestamps do
|
41
41
|
# require 'support/models/clock'
|
42
42
|
|
43
|
-
|
44
|
-
before(:each) { Ripple.client.stub!(:backend).and_return(backend) }
|
43
|
+
before(:each) { clock.robject.stub!(:store).and_return(true) }
|
45
44
|
|
46
45
|
context "for a Ripple::Document" do
|
47
46
|
it_behaves_like "a timestamped model" do
|
48
47
|
subject { Clock.new }
|
48
|
+
let(:clock) { subject }
|
49
49
|
let(:record_to_save) { subject }
|
50
50
|
end
|
51
51
|
end
|
@@ -71,6 +71,13 @@ describe Ripple::Timestamps do
|
|
71
71
|
before(:each) do
|
72
72
|
clock.modes << subject
|
73
73
|
end
|
74
|
+
|
75
|
+
it "should pass-through property options to the created properties" do
|
76
|
+
[:created_at, :updated_at].each do |p|
|
77
|
+
subject.class.properties[p].validation_options.should include(:presence)
|
78
|
+
subject.class.indexes[p].should be
|
79
|
+
end
|
80
|
+
end
|
74
81
|
end
|
75
82
|
end
|
76
83
|
end
|
@@ -2,103 +2,101 @@ require 'spec_helper'
|
|
2
2
|
|
3
3
|
describe Ripple::Validations do
|
4
4
|
# require 'support/models/box'
|
5
|
+
let(:klass) do
|
6
|
+
class self.class::Valid
|
7
|
+
include Ripple::Document
|
8
|
+
self.bucket_name = "validators"
|
9
|
+
end
|
10
|
+
self.class::Valid
|
11
|
+
end
|
5
12
|
|
13
|
+
subject { klass.new }
|
14
|
+
let(:client) { Ripple.client }
|
15
|
+
after(:each) { self.class.send :remove_const, :Valid }
|
6
16
|
before :each do
|
7
|
-
|
8
|
-
@client = Ripple.client
|
9
|
-
@client.stub!(:backend).and_return(mock("Backend", :store_object => true))
|
17
|
+
client.stub(:store_object => true)
|
10
18
|
end
|
11
19
|
|
12
|
-
|
20
|
+
context "adding validation declarations to the class" do
|
13
21
|
[:validates, :validate, :validates_with, :validates_each,
|
14
22
|
:validates_acceptance_of, :validates_confirmation_of, :validates_exclusion_of,
|
15
23
|
:validates_format_of, :validates_inclusion_of, :validates_length_of,
|
16
24
|
:validates_numericality_of, :validates_presence_of].each do |meth|
|
17
|
-
|
25
|
+
its(:class){ should respond_to(meth) }
|
18
26
|
end
|
19
27
|
end
|
20
28
|
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
29
|
+
context "adding validation methods to the instance" do
|
30
|
+
it { should respond_to(:errors) }
|
31
|
+
it { should respond_to(:valid?) }
|
32
|
+
it { should respond_to(:invalid?) }
|
25
33
|
end
|
26
34
|
|
27
35
|
it "should override save to run validations" do
|
28
|
-
|
29
|
-
|
36
|
+
subject.should_receive(:valid?).and_return(false)
|
37
|
+
subject.save.should be_false
|
30
38
|
end
|
31
39
|
|
32
40
|
it "should allow skipping validations by passing save :validate => false" do
|
33
|
-
|
34
|
-
|
35
|
-
@box.save(:validate => false).should be_true
|
41
|
+
subject.should_not_receive(:valid?)
|
42
|
+
subject.save(:validate => false).should be_true
|
36
43
|
end
|
37
44
|
|
38
45
|
describe "when using save! on an invalid record" do
|
39
|
-
before(:each) {
|
40
|
-
|
41
|
-
it "should raise DocumentInvalid" do
|
42
|
-
lambda { @box.save! }.should raise_error(Ripple::DocumentInvalid)
|
43
|
-
end
|
46
|
+
before(:each) { subject.stub!(:valid?).and_return(false) }
|
44
47
|
|
45
48
|
it "should raise an exception that has the invalid document" do
|
46
49
|
begin
|
47
|
-
|
50
|
+
subject.save!
|
48
51
|
rescue Ripple::DocumentInvalid => invalid
|
49
|
-
invalid.document.should ==
|
52
|
+
invalid.document.should == subject
|
53
|
+
else
|
54
|
+
fail "Nothing was raised!"
|
50
55
|
end
|
51
56
|
end
|
52
57
|
end
|
53
58
|
|
54
|
-
it "should not raise an error when save! is called and the document is valid" do
|
55
|
-
@box.stub!(:save).and_return(true)
|
56
|
-
@box.stub!(:valid?).and_return(true)
|
57
|
-
lambda { @box.save! }.should_not raise_error(Ripple::DocumentInvalid)
|
58
|
-
end
|
59
|
-
|
60
59
|
it "should return true from save! when no exception is raised" do
|
61
|
-
|
62
|
-
|
63
|
-
|
60
|
+
subject.stub!(:save).and_return(true)
|
61
|
+
subject.stub!(:valid?).and_return(true)
|
62
|
+
subject.save!.should be_true
|
64
63
|
end
|
65
64
|
|
66
65
|
it "should allow unexpected exceptions to be raised" do
|
67
|
-
robject = mock("robject", :key =>
|
66
|
+
robject = mock("robject", :key => subject.key, "data=" => true, "content_type=" => true, "indexes=" => true)
|
68
67
|
robject.should_receive(:store).and_raise(Riak::HTTPFailedRequest.new(:post, 200, 404, {}, "404 not found"))
|
69
|
-
|
70
|
-
|
71
|
-
lambda {
|
68
|
+
subject.stub!(:robject).and_return(robject)
|
69
|
+
subject.stub!(:valid?).and_return(true)
|
70
|
+
lambda { subject.save! }.should raise_error(Riak::FailedRequest)
|
72
71
|
end
|
73
72
|
|
74
73
|
it "should not raise an error when creating a box with create! succeeds" do
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
74
|
+
subject.stub!(:new?).and_return(false)
|
75
|
+
klass.stub(:create).and_return(subject)
|
76
|
+
new_subject = nil
|
77
|
+
new_subject = klass.create!
|
78
|
+
new_subject.should == subject
|
79
79
|
end
|
80
80
|
|
81
81
|
it "should raise an error when creating a box with create! fails" do
|
82
|
-
|
83
|
-
|
84
|
-
lambda {
|
82
|
+
subject.stub!(:new?).and_return(true)
|
83
|
+
klass.stub(:create).and_return(subject)
|
84
|
+
lambda { klass.create! }.should raise_error(Ripple::DocumentInvalid)
|
85
85
|
end
|
86
86
|
|
87
|
+
|
87
88
|
it "should automatically add validations from property options" do
|
88
|
-
|
89
|
-
|
90
|
-
|
91
|
-
|
89
|
+
klass.property :size, Integer, :inclusion => {:in => 1..30 }
|
90
|
+
|
91
|
+
subject.size = 0
|
92
|
+
subject.should be_invalid
|
92
93
|
end
|
93
94
|
|
94
95
|
it "should run validations at the correct lifecycle state" do
|
95
|
-
|
96
|
-
@box.size = 0
|
97
|
-
@box.should be_valid
|
98
|
-
Box.properties.delete :size
|
99
|
-
end
|
96
|
+
klass.property :size, Integer, :inclusion => {:in => 1..30, :on => :update }
|
100
97
|
|
101
|
-
|
102
|
-
|
98
|
+
subject.stub!(:new?).and_return(true)
|
99
|
+
subject.size = 0
|
100
|
+
subject.should be_valid
|
103
101
|
end
|
104
102
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -6,13 +6,14 @@ require 'rubygems' # Use the gems path only for the spec suite
|
|
6
6
|
require 'ripple'
|
7
7
|
require 'ripple/conflict/test_helper'
|
8
8
|
require 'rspec'
|
9
|
+
require 'ammeter'
|
9
10
|
|
10
11
|
# Only the tests should really get away with this.
|
11
12
|
Riak.disable_list_keys_warnings = true
|
12
13
|
|
13
14
|
%w[
|
14
15
|
integration_setup
|
15
|
-
|
16
|
+
generator_setup
|
16
17
|
test_server
|
17
18
|
search
|
18
19
|
models
|
@@ -27,6 +28,12 @@ RSpec.configure do |config|
|
|
27
28
|
config.treat_symbols_as_metadata_keys_with_true_values = true
|
28
29
|
config.filter_run :focus
|
29
30
|
config.run_all_when_everything_filtered = true
|
30
|
-
config.debug = true
|
31
|
+
# config.debug = true
|
31
32
|
config.include Ripple::Conflict::TestHelper
|
33
|
+
|
34
|
+
if defined? Java
|
35
|
+
config.seed = Time.now.to_i
|
36
|
+
else
|
37
|
+
config.order = :random
|
38
|
+
end
|
32
39
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
require 'ammeter/init'
|
2
|
+
require 'fileutils'
|
3
|
+
|
4
|
+
# Silences warnings on Rails 3.2 that are caused by ammeter. Remove
|
5
|
+
# when ammeter gem version is bumped. See commit:
|
6
|
+
# https://github.com/alexrothenberg/ammeter/commit/08e27fbcd2e710f2129f65e1dac1047eb70542ee
|
7
|
+
if Ammeter::RSpec::Rails::GeneratorExampleGroup.const_defined?(:InstanceMethods)
|
8
|
+
module Ammeter::RSpec::Rails::GeneratorExampleGroup
|
9
|
+
def invoke_task name
|
10
|
+
capture(:stdout) { generator.invoke_task(generator_class.all_tasks[name.to_s]) }
|
11
|
+
end
|
12
|
+
remove_const :InstanceMethods
|
13
|
+
end
|
14
|
+
end
|
15
|
+
|
16
|
+
module GeneratorSetup
|
17
|
+
include FileUtils
|
18
|
+
def self.included(group)
|
19
|
+
group.destination File.expand_path(File.join('..','..','..','tmp'), __FILE__)
|
20
|
+
group.before(:each){ Dir.chdir destination_root }
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
RSpec.configure do |config|
|
25
|
+
config.include GeneratorSetup, :type => :generator
|
26
|
+
end
|
data/spec/support/models.rb
CHANGED
data/spec/support/models/box.rb
CHANGED
@@ -0,0 +1,26 @@
|
|
1
|
+
class IndexedAddress
|
2
|
+
include Ripple::EmbeddedDocument
|
3
|
+
property :street, String, :index => true
|
4
|
+
property :city, String, :index => true
|
5
|
+
end
|
6
|
+
|
7
|
+
class Indexer
|
8
|
+
include Ripple::Document
|
9
|
+
|
10
|
+
property :name, String, :index => true
|
11
|
+
property :age, Fixnum, :index => true
|
12
|
+
one :primary_address, :class => IndexedAddress
|
13
|
+
many :addresses, :class => IndexedAddress
|
14
|
+
index :name_age, String do
|
15
|
+
"#{self.name}-#{self.age}"
|
16
|
+
end
|
17
|
+
index :name_greeting, String
|
18
|
+
|
19
|
+
def name_greeting
|
20
|
+
"#{name}: Hello!"
|
21
|
+
end
|
22
|
+
end
|
23
|
+
|
24
|
+
class SubIndexer < Indexer
|
25
|
+
property :height, String, :index => true
|
26
|
+
end
|
data/spec/support/models/post.rb
CHANGED
@@ -1,10 +1,11 @@
|
|
1
1
|
class Post
|
2
2
|
include Ripple::Document
|
3
|
-
one :user, :using => :stored_key
|
4
|
-
many :comments, :using => :stored_key
|
5
3
|
property :comment_keys, Array
|
6
4
|
property :user_key, String
|
7
5
|
property :title, String
|
6
|
+
|
7
|
+
one :user, :using => :stored_key
|
8
|
+
many :comments, :using => :stored_key
|
8
9
|
end
|
9
10
|
|
10
11
|
class Comment
|
@@ -4,8 +4,10 @@ class Widget
|
|
4
4
|
property :name, String, :default => "widget"
|
5
5
|
property :manufactured, Boolean, :default => false
|
6
6
|
property :shipped_at, Time
|
7
|
+
property :restricted, Boolean, :default => false
|
7
8
|
|
8
9
|
attr_protected :manufactured
|
10
|
+
attr_protected :restricted, :as => :default
|
9
11
|
|
10
12
|
many :widget_parts
|
11
13
|
end
|
data/spec/support/search.rb
CHANGED
@@ -3,12 +3,12 @@ require 'support/test_server'
|
|
3
3
|
class Riak::TestServer
|
4
4
|
# For now this is a local hack - later we'll make it global.
|
5
5
|
def riak_search?
|
6
|
-
(
|
6
|
+
control_script.basename.to_s == 'riaksearch' || (version >= "1.0.0" && env[:riak_search][:enabled])
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
10
|
RSpec.configure do |config|
|
11
11
|
config.before(:all, :search => true) do
|
12
|
-
pending("depends upon riak search, which is not available") unless
|
12
|
+
pending("depends upon riak search, which is not available") unless test_server.riak_search?
|
13
13
|
end
|
14
14
|
end
|
data/spec/support/test_server.rb
CHANGED
@@ -1,27 +1,39 @@
|
|
1
1
|
require 'riak/test_server'
|
2
2
|
|
3
|
-
|
4
|
-
|
3
|
+
module TestServerSupport
|
4
|
+
def test_server
|
5
5
|
unless $test_server
|
6
6
|
begin
|
7
7
|
require 'yaml'
|
8
|
-
config = YAML.load_file("
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
8
|
+
config = YAML.load_file(File.expand_path("../test_server.yml", __FILE__))
|
9
|
+
server = Riak::TestServer.create(:root => config['root'],
|
10
|
+
:source => config['source'],
|
11
|
+
:min_port => config['min_port'] || 15000)
|
12
|
+
$test_server = server
|
13
13
|
rescue => e
|
14
14
|
pending("Can't run ripple integration specs without the test server. Specify the location of your Riak installation in spec/support/test_server.yml\n#{e.inspect}")
|
15
15
|
end
|
16
16
|
end
|
17
|
+
$test_server
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
RSpec.configure do |config|
|
22
|
+
config.include TestServerSupport, :integration => true
|
23
|
+
|
24
|
+
config.before(:each, :integration => true) do
|
17
25
|
Ripple.config = {
|
18
|
-
:http_port =>
|
19
|
-
:pb_port =>
|
26
|
+
:http_port => test_server.http_port,
|
27
|
+
:pb_port => test_server.pb_port
|
20
28
|
}
|
21
|
-
|
29
|
+
test_server.start
|
22
30
|
end
|
23
31
|
|
24
32
|
config.after(:each, :integration => true) do
|
25
|
-
|
33
|
+
test_server.drop
|
34
|
+
end
|
35
|
+
|
36
|
+
config.after(:suite) do
|
37
|
+
$test_server.stop if $test_server
|
26
38
|
end
|
27
39
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
# This is where the test server node will be generated. Something on
|
2
2
|
# /tmp is usually ok.
|
3
|
-
root: .
|
3
|
+
root: .ripplenode
|
4
4
|
|
5
5
|
# This is where Riak is installed on your system, that is, the path to
|
6
6
|
# the 'riak' and 'riak-admin' scripts. I use a self-built node, but
|
metadata
CHANGED
@@ -1,146 +1,153 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: ripple
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0.beta2
|
5
5
|
prerelease: 6
|
6
|
-
segments:
|
7
|
-
- 1
|
8
|
-
- 0
|
9
|
-
- 0
|
10
|
-
- beta
|
11
|
-
version: 1.0.0.beta
|
12
6
|
platform: ruby
|
13
|
-
authors:
|
7
|
+
authors:
|
14
8
|
- Sean Cribbs
|
15
9
|
autorequire:
|
16
10
|
bindir: bin
|
17
11
|
cert_chain: []
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
dependencies:
|
22
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-06-07 00:00:00.000000000 Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
23
15
|
name: rspec
|
24
|
-
|
25
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: !ruby/object:Gem::Requirement
|
26
17
|
none: false
|
27
|
-
requirements:
|
18
|
+
requirements:
|
28
19
|
- - ~>
|
29
|
-
- !ruby/object:Gem::Version
|
30
|
-
|
31
|
-
segments:
|
32
|
-
- 2
|
33
|
-
- 6
|
34
|
-
- 0
|
35
|
-
version: 2.6.0
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: 2.8.0
|
36
22
|
type: :development
|
37
|
-
|
38
|
-
|
23
|
+
prerelease: false
|
24
|
+
version_requirements: !ruby/object:Gem::Requirement
|
25
|
+
none: false
|
26
|
+
requirements:
|
27
|
+
- - ~>
|
28
|
+
- !ruby/object:Gem::Version
|
29
|
+
version: 2.8.0
|
30
|
+
- !ruby/object:Gem::Dependency
|
39
31
|
name: rake
|
32
|
+
requirement: !ruby/object:Gem::Requirement
|
33
|
+
none: false
|
34
|
+
requirements:
|
35
|
+
- - ! '>='
|
36
|
+
- !ruby/object:Gem::Version
|
37
|
+
version: '0'
|
38
|
+
type: :development
|
40
39
|
prerelease: false
|
41
|
-
|
40
|
+
version_requirements: !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ! '>='
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: '0'
|
46
|
+
- !ruby/object:Gem::Dependency
|
47
|
+
name: ammeter
|
48
|
+
requirement: !ruby/object:Gem::Requirement
|
42
49
|
none: false
|
43
|
-
requirements:
|
50
|
+
requirements:
|
44
51
|
- - ~>
|
45
|
-
- !ruby/object:Gem::Version
|
46
|
-
|
47
|
-
segments:
|
48
|
-
- 0
|
49
|
-
- 8
|
50
|
-
- 7
|
51
|
-
version: 0.8.7
|
52
|
+
- !ruby/object:Gem::Version
|
53
|
+
version: 0.2.2
|
52
54
|
type: :development
|
53
|
-
version_requirements: *id002
|
54
|
-
- !ruby/object:Gem::Dependency
|
55
|
-
name: riak-client
|
56
55
|
prerelease: false
|
57
|
-
|
56
|
+
version_requirements: !ruby/object:Gem::Requirement
|
57
|
+
none: false
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 0.2.2
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: riak-client
|
64
|
+
requirement: !ruby/object:Gem::Requirement
|
58
65
|
none: false
|
59
|
-
requirements:
|
66
|
+
requirements:
|
60
67
|
- - ~>
|
61
|
-
- !ruby/object:Gem::Version
|
62
|
-
|
63
|
-
segments:
|
64
|
-
- 1
|
65
|
-
- 0
|
66
|
-
- 0
|
67
|
-
- beta
|
68
|
-
version: 1.0.0.beta
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: 1.0.0
|
69
70
|
type: :runtime
|
70
|
-
version_requirements: *id003
|
71
|
-
- !ruby/object:Gem::Dependency
|
72
|
-
name: activesupport
|
73
71
|
prerelease: false
|
74
|
-
|
72
|
+
version_requirements: !ruby/object:Gem::Requirement
|
75
73
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
79
|
-
|
80
|
-
|
81
|
-
|
82
|
-
|
83
|
-
|
74
|
+
requirements:
|
75
|
+
- - ~>
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: 1.0.0
|
78
|
+
- !ruby/object:Gem::Dependency
|
79
|
+
name: activesupport
|
80
|
+
requirement: !ruby/object:Gem::Requirement
|
81
|
+
none: false
|
82
|
+
requirements:
|
83
|
+
- - ! '>='
|
84
|
+
- !ruby/object:Gem::Version
|
84
85
|
version: 3.0.0
|
85
86
|
- - <
|
86
|
-
- !ruby/object:Gem::Version
|
87
|
-
|
88
|
-
segments:
|
89
|
-
- 3
|
90
|
-
- 2
|
91
|
-
- 0
|
92
|
-
version: 3.2.0
|
87
|
+
- !ruby/object:Gem::Version
|
88
|
+
version: 3.3.0
|
93
89
|
type: :runtime
|
94
|
-
version_requirements: *id004
|
95
|
-
- !ruby/object:Gem::Dependency
|
96
|
-
name: activemodel
|
97
90
|
prerelease: false
|
98
|
-
|
91
|
+
version_requirements: !ruby/object:Gem::Requirement
|
99
92
|
none: false
|
100
|
-
requirements:
|
101
|
-
- -
|
102
|
-
- !ruby/object:Gem::Version
|
103
|
-
hash: 7
|
104
|
-
segments:
|
105
|
-
- 3
|
106
|
-
- 0
|
107
|
-
- 0
|
93
|
+
requirements:
|
94
|
+
- - ! '>='
|
95
|
+
- !ruby/object:Gem::Version
|
108
96
|
version: 3.0.0
|
109
97
|
- - <
|
110
|
-
- !ruby/object:Gem::Version
|
111
|
-
|
112
|
-
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
98
|
+
- !ruby/object:Gem::Version
|
99
|
+
version: 3.3.0
|
100
|
+
- !ruby/object:Gem::Dependency
|
101
|
+
name: activemodel
|
102
|
+
requirement: !ruby/object:Gem::Requirement
|
103
|
+
none: false
|
104
|
+
requirements:
|
105
|
+
- - ! '>='
|
106
|
+
- !ruby/object:Gem::Version
|
107
|
+
version: 3.0.0
|
108
|
+
- - <
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 3.3.0
|
117
111
|
type: :runtime
|
118
|
-
version_requirements: *id005
|
119
|
-
- !ruby/object:Gem::Dependency
|
120
|
-
name: tzinfo
|
121
112
|
prerelease: false
|
122
|
-
|
113
|
+
version_requirements: !ruby/object:Gem::Requirement
|
123
114
|
none: false
|
124
|
-
requirements:
|
125
|
-
- -
|
126
|
-
- !ruby/object:Gem::Version
|
127
|
-
|
128
|
-
|
129
|
-
|
130
|
-
version:
|
115
|
+
requirements:
|
116
|
+
- - ! '>='
|
117
|
+
- !ruby/object:Gem::Version
|
118
|
+
version: 3.0.0
|
119
|
+
- - <
|
120
|
+
- !ruby/object:Gem::Version
|
121
|
+
version: 3.3.0
|
122
|
+
- !ruby/object:Gem::Dependency
|
123
|
+
name: tzinfo
|
124
|
+
requirement: !ruby/object:Gem::Requirement
|
125
|
+
none: false
|
126
|
+
requirements:
|
127
|
+
- - ! '>='
|
128
|
+
- !ruby/object:Gem::Version
|
129
|
+
version: '0'
|
131
130
|
type: :runtime
|
132
|
-
|
133
|
-
|
134
|
-
|
131
|
+
prerelease: false
|
132
|
+
version_requirements: !ruby/object:Gem::Requirement
|
133
|
+
none: false
|
134
|
+
requirements:
|
135
|
+
- - ! '>='
|
136
|
+
- !ruby/object:Gem::Version
|
137
|
+
version: '0'
|
138
|
+
description: ripple is an object-mapper library for Riak, the distributed database
|
139
|
+
by Basho. It uses ActiveModel to provide an experience that integrates well with
|
140
|
+
Rails 3 applications.
|
141
|
+
email:
|
135
142
|
- sean@basho.com
|
136
143
|
executables: []
|
137
|
-
|
138
144
|
extensions: []
|
139
|
-
|
140
145
|
extra_rdoc_files: []
|
141
|
-
|
142
|
-
files:
|
146
|
+
files:
|
143
147
|
- Gemfile
|
148
|
+
- Gemfile.rails30
|
149
|
+
- Gemfile.rails31
|
150
|
+
- Gemfile.rails32
|
144
151
|
- Guardfile
|
145
152
|
- lib/rails/generators/ripple/configuration/configuration_generator.rb
|
146
153
|
- lib/rails/generators/ripple/configuration/templates/ripple.yml
|
@@ -149,11 +156,13 @@ files:
|
|
149
156
|
- lib/rails/generators/ripple/js/templates/js/iso8601.js
|
150
157
|
- lib/rails/generators/ripple/js/templates/js/ripple.js
|
151
158
|
- lib/rails/generators/ripple/model/model_generator.rb
|
152
|
-
- lib/rails/generators/ripple/model/templates/model.rb
|
159
|
+
- lib/rails/generators/ripple/model/templates/model.rb.erb
|
153
160
|
- lib/rails/generators/ripple/observer/observer_generator.rb
|
154
|
-
- lib/rails/generators/ripple/observer/templates/observer.rb
|
161
|
+
- lib/rails/generators/ripple/observer/templates/observer.rb.erb
|
162
|
+
- lib/rails/generators/ripple/test/templates/cucumber.rb.erb
|
155
163
|
- lib/rails/generators/ripple/test/test_generator.rb
|
156
164
|
- lib/rails/generators/ripple_generator.rb
|
165
|
+
- lib/ripple/associations/#many_stored_key_proxy.rb#
|
157
166
|
- lib/ripple/associations/embedded.rb
|
158
167
|
- lib/ripple/associations/instantiators.rb
|
159
168
|
- lib/ripple/associations/linked.rb
|
@@ -175,13 +184,13 @@ files:
|
|
175
184
|
- lib/ripple/attribute_methods/write.rb
|
176
185
|
- lib/ripple/attribute_methods.rb
|
177
186
|
- lib/ripple/callbacks.rb
|
178
|
-
- lib/ripple/conflict/#document_hooks.rb#
|
179
187
|
- lib/ripple/conflict/basic_resolver.rb
|
180
188
|
- lib/ripple/conflict/document_hooks.rb
|
181
189
|
- lib/ripple/conflict/resolver.rb
|
182
190
|
- lib/ripple/conflict/test_helper.rb
|
183
191
|
- lib/ripple/conversion.rb
|
184
192
|
- lib/ripple/core_ext/casting.rb
|
193
|
+
- lib/ripple/core_ext/indexes.rb
|
185
194
|
- lib/ripple/core_ext/object.rb
|
186
195
|
- lib/ripple/core_ext.rb
|
187
196
|
- lib/ripple/document/bucket_access.rb
|
@@ -195,8 +204,10 @@ files:
|
|
195
204
|
- lib/ripple/embedded_document/persistence.rb
|
196
205
|
- lib/ripple/embedded_document.rb
|
197
206
|
- lib/ripple/i18n.rb
|
207
|
+
- lib/ripple/indexes.rb
|
198
208
|
- lib/ripple/inspection.rb
|
199
209
|
- lib/ripple/locale/en.yml
|
210
|
+
- lib/ripple/locale/fr.yml
|
200
211
|
- lib/ripple/nested_attributes.rb
|
201
212
|
- lib/ripple/observable.rb
|
202
213
|
- lib/ripple/properties.rb
|
@@ -211,11 +222,22 @@ files:
|
|
211
222
|
- lib/ripple/validations.rb
|
212
223
|
- lib/ripple/version.rb
|
213
224
|
- lib/ripple.rb
|
225
|
+
- LICENSE
|
226
|
+
- pkg/continuous.sh
|
214
227
|
- Rakefile
|
228
|
+
- README.markdown
|
229
|
+
- RELEASE_NOTES.textile
|
215
230
|
- ripple.gemspec
|
216
231
|
- spec/fixtures/config.yml
|
232
|
+
- spec/generators/ripple/configuration_generator_spec.rb
|
233
|
+
- spec/generators/ripple/js_generator_spec.rb
|
234
|
+
- spec/generators/ripple/model_generator_spec.rb
|
235
|
+
- spec/generators/ripple/observer_generator_spec.rb
|
236
|
+
- spec/generators/ripple/test_generator_spec.rb
|
237
|
+
- spec/generators/ripple_generator_spec.rb
|
217
238
|
- spec/integration/ripple/associations_spec.rb
|
218
239
|
- spec/integration/ripple/conflict_resolution_spec.rb
|
240
|
+
- spec/integration/ripple/indexes_spec.rb
|
219
241
|
- spec/integration/ripple/nested_attributes_spec.rb
|
220
242
|
- spec/integration/ripple/persistence_spec.rb
|
221
243
|
- spec/integration/ripple/search_associations_spec.rb
|
@@ -242,6 +264,7 @@ files:
|
|
242
264
|
- spec/ripple/embedded_document/persistence_spec.rb
|
243
265
|
- spec/ripple/embedded_document_spec.rb
|
244
266
|
- spec/ripple/finders_spec.rb
|
267
|
+
- spec/ripple/indexes_spec.rb
|
245
268
|
- spec/ripple/inspection_spec.rb
|
246
269
|
- spec/ripple/key_spec.rb
|
247
270
|
- spec/ripple/observable_spec.rb
|
@@ -253,10 +276,11 @@ files:
|
|
253
276
|
- spec/ripple/validations/associated_validator_spec.rb
|
254
277
|
- spec/ripple/validations_spec.rb
|
255
278
|
- spec/spec_helper.rb
|
279
|
+
- spec/support/#performance.rb#
|
256
280
|
- spec/support/associations/proxies.rb
|
257
281
|
- spec/support/associations.rb
|
282
|
+
- spec/support/generator_setup.rb
|
258
283
|
- spec/support/integration_setup.rb
|
259
|
-
- spec/support/mocks.rb
|
260
284
|
- spec/support/models/address.rb
|
261
285
|
- spec/support/models/box.rb
|
262
286
|
- spec/support/models/car.rb
|
@@ -269,6 +293,7 @@ files:
|
|
269
293
|
- spec/support/models/email.rb
|
270
294
|
- spec/support/models/family.rb
|
271
295
|
- spec/support/models/favorite.rb
|
296
|
+
- spec/support/models/indexer.rb
|
272
297
|
- spec/support/models/invoice.rb
|
273
298
|
- spec/support/models/late_invoice.rb
|
274
299
|
- spec/support/models/nested.rb
|
@@ -290,46 +315,42 @@ files:
|
|
290
315
|
- spec/support/test_server.rb
|
291
316
|
- spec/support/test_server.yml.example
|
292
317
|
- .gitignore
|
293
|
-
has_rdoc: true
|
294
318
|
homepage: http://seancribbs.github.com/ripple
|
295
319
|
licenses: []
|
296
|
-
|
297
320
|
post_install_message:
|
298
321
|
rdoc_options: []
|
299
|
-
|
300
|
-
require_paths:
|
322
|
+
require_paths:
|
301
323
|
- lib
|
302
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
324
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
303
325
|
none: false
|
304
|
-
requirements:
|
305
|
-
- -
|
306
|
-
- !ruby/object:Gem::Version
|
307
|
-
|
308
|
-
|
309
|
-
- 0
|
310
|
-
version: "0"
|
311
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
326
|
+
requirements:
|
327
|
+
- - ! '>='
|
328
|
+
- !ruby/object:Gem::Version
|
329
|
+
version: '0'
|
330
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
312
331
|
none: false
|
313
|
-
requirements:
|
314
|
-
- -
|
315
|
-
- !ruby/object:Gem::Version
|
316
|
-
hash: 25
|
317
|
-
segments:
|
318
|
-
- 1
|
319
|
-
- 3
|
320
|
-
- 1
|
332
|
+
requirements:
|
333
|
+
- - ! '>'
|
334
|
+
- !ruby/object:Gem::Version
|
321
335
|
version: 1.3.1
|
322
336
|
requirements: []
|
323
|
-
|
324
337
|
rubyforge_project:
|
325
|
-
rubygems_version: 1.
|
338
|
+
rubygems_version: 1.8.23
|
326
339
|
signing_key:
|
327
340
|
specification_version: 3
|
328
|
-
summary: ripple is an object-mapper library for Riak, the distributed database by
|
329
|
-
|
341
|
+
summary: ripple is an object-mapper library for Riak, the distributed database by
|
342
|
+
Basho.
|
343
|
+
test_files:
|
330
344
|
- spec/fixtures/config.yml
|
345
|
+
- spec/generators/ripple/configuration_generator_spec.rb
|
346
|
+
- spec/generators/ripple/js_generator_spec.rb
|
347
|
+
- spec/generators/ripple/model_generator_spec.rb
|
348
|
+
- spec/generators/ripple/observer_generator_spec.rb
|
349
|
+
- spec/generators/ripple/test_generator_spec.rb
|
350
|
+
- spec/generators/ripple_generator_spec.rb
|
331
351
|
- spec/integration/ripple/associations_spec.rb
|
332
352
|
- spec/integration/ripple/conflict_resolution_spec.rb
|
353
|
+
- spec/integration/ripple/indexes_spec.rb
|
333
354
|
- spec/integration/ripple/nested_attributes_spec.rb
|
334
355
|
- spec/integration/ripple/persistence_spec.rb
|
335
356
|
- spec/integration/ripple/search_associations_spec.rb
|
@@ -356,6 +377,7 @@ test_files:
|
|
356
377
|
- spec/ripple/embedded_document/persistence_spec.rb
|
357
378
|
- spec/ripple/embedded_document_spec.rb
|
358
379
|
- spec/ripple/finders_spec.rb
|
380
|
+
- spec/ripple/indexes_spec.rb
|
359
381
|
- spec/ripple/inspection_spec.rb
|
360
382
|
- spec/ripple/key_spec.rb
|
361
383
|
- spec/ripple/observable_spec.rb
|
@@ -367,10 +389,11 @@ test_files:
|
|
367
389
|
- spec/ripple/validations/associated_validator_spec.rb
|
368
390
|
- spec/ripple/validations_spec.rb
|
369
391
|
- spec/spec_helper.rb
|
392
|
+
- spec/support/#performance.rb#
|
370
393
|
- spec/support/associations/proxies.rb
|
371
394
|
- spec/support/associations.rb
|
395
|
+
- spec/support/generator_setup.rb
|
372
396
|
- spec/support/integration_setup.rb
|
373
|
-
- spec/support/mocks.rb
|
374
397
|
- spec/support/models/address.rb
|
375
398
|
- spec/support/models/box.rb
|
376
399
|
- spec/support/models/car.rb
|
@@ -383,6 +406,7 @@ test_files:
|
|
383
406
|
- spec/support/models/email.rb
|
384
407
|
- spec/support/models/family.rb
|
385
408
|
- spec/support/models/favorite.rb
|
409
|
+
- spec/support/models/indexer.rb
|
386
410
|
- spec/support/models/invoice.rb
|
387
411
|
- spec/support/models/late_invoice.rb
|
388
412
|
- spec/support/models/nested.rb
|