flipper-mongo 0.2.0 → 0.2.1
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.
data/Guardfile
CHANGED
@@ -6,12 +6,7 @@ guard 'bundler' do
|
|
6
6
|
watch(/^.+\.gemspec/)
|
7
7
|
end
|
8
8
|
|
9
|
-
|
10
|
-
:all_after_pass => false,
|
11
|
-
:all_on_start => false,
|
12
|
-
}
|
13
|
-
|
14
|
-
guard 'rspec', rspec_options do
|
9
|
+
guard 'rspec' do
|
15
10
|
watch(%r{^spec/.+_spec\.rb$}) { "spec" }
|
16
11
|
watch(%r{^lib/(.+)\.rb$}) { "spec" }
|
17
12
|
watch('spec/helper.rb') { "spec" }
|
@@ -10,7 +10,7 @@ module Flipper
|
|
10
10
|
def initialize(collection, options = {})
|
11
11
|
@collection = collection
|
12
12
|
@options = options
|
13
|
-
@id = @options
|
13
|
+
@id = @options[:id] || DefaultId
|
14
14
|
@source = @options.fetch(:source) { {} }
|
15
15
|
@criteria = {:_id => @id}
|
16
16
|
@mongo_options = {:safe => true, :upsert => true}
|
@@ -21,6 +21,10 @@ describe Flipper::Adapters::MongoSingleDocument::Document do
|
|
21
21
|
described_class.new(collection).instance_variable_get("@id").should eq('flipper')
|
22
22
|
end
|
23
23
|
|
24
|
+
it "defaults id to flipper even if nil passed in for id" do
|
25
|
+
described_class.new(collection, :id => nil).instance_variable_get("@id").should eq('flipper')
|
26
|
+
end
|
27
|
+
|
24
28
|
describe "loading document" do
|
25
29
|
before do
|
26
30
|
collection.update(criteria, {'$set' => {'foo' => 'bar', 'people' => [1, 2, 3]}}, options)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: flipper-mongo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2012-08-07 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: flipper
|
16
|
-
requirement: &
|
16
|
+
requirement: &70319593304120 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: '0.2'
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *70319593304120
|
25
25
|
description: Mongo adapter for Flipper
|
26
26
|
email:
|
27
27
|
- nunemaker@gmail.com
|
@@ -60,7 +60,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
60
60
|
version: '0'
|
61
61
|
segments:
|
62
62
|
- 0
|
63
|
-
hash:
|
63
|
+
hash: 3598565635761616349
|
64
64
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
65
|
none: false
|
66
66
|
requirements:
|
@@ -69,7 +69,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
69
69
|
version: '0'
|
70
70
|
segments:
|
71
71
|
- 0
|
72
|
-
hash:
|
72
|
+
hash: 3598565635761616349
|
73
73
|
requirements: []
|
74
74
|
rubyforge_project:
|
75
75
|
rubygems_version: 1.8.10
|