mosql 0.4.2 → 0.4.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/mosql/streamer.rb +1 -1
- data/lib/mosql/version.rb +1 -1
- data/mosql.gemspec +9 -2
- data/test/functional/streamer.rb +12 -0
- metadata +21 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ab6a5314ffebd1eeb1db35d8f9886c9263e69576
|
4
|
+
data.tar.gz: dfe8cf38a3834710a06a6cf392cb2a21e6fc4ef5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7c540d934fa473697a0bc27980d891673dcb614d193e5227d4ebeb00c46db2ccd335d62d0f15e6881bbc6d2096bb8de53ebd607694800e80a13a627274c1422f
|
7
|
+
data.tar.gz: 2649f825c29f960adaaa2f36670ae00bc92021a957966b71f34e6bccfdbb96dd12d74a2598d8f51c3bd46eafb1b323eaf290046b60042b4d92245e200c24913d
|
data/lib/mosql/streamer.rb
CHANGED
data/lib/mosql/version.rb
CHANGED
data/mosql.gemspec
CHANGED
@@ -16,10 +16,17 @@ Gem::Specification.new do |gem|
|
|
16
16
|
gem.require_paths = ["lib"]
|
17
17
|
gem.version = MoSQL::VERSION
|
18
18
|
|
19
|
-
|
20
|
-
|
19
|
+
gem.add_runtime_dependency "sequel"
|
20
|
+
gem.add_runtime_dependency "pg"
|
21
|
+
gem.add_runtime_dependency "rake"
|
22
|
+
gem.add_runtime_dependency "log4r"
|
23
|
+
gem.add_runtime_dependency "json"
|
24
|
+
|
21
25
|
gem.add_runtime_dependency "mongoriver", "0.4"
|
26
|
+
|
27
|
+
gem.add_runtime_dependency "mongo", "~> 1.10"
|
22
28
|
gem.add_runtime_dependency "bson", "~> 1.10"
|
29
|
+
gem.add_runtime_dependency "bson_ext", "~> 1.10"
|
23
30
|
|
24
31
|
gem.add_development_dependency "minitest"
|
25
32
|
gem.add_development_dependency "mocha"
|
data/test/functional/streamer.rb
CHANGED
@@ -95,6 +95,18 @@ EOF
|
|
95
95
|
assert_equal(27, sequel[:sqltable].where(:_id => o['_id'].to_s).select.first[:var])
|
96
96
|
end
|
97
97
|
|
98
|
+
it 'handle "u" ops without _id and a renamed _id mapping' do
|
99
|
+
o = { '_id' => BSON::ObjectId.new, 'var' => 17 }
|
100
|
+
@adapter.upsert_ns('mosql_test.renameid', o)
|
101
|
+
|
102
|
+
@streamer.handle_op({ 'ns' => 'mosql_test.renameid',
|
103
|
+
'op' => 'u',
|
104
|
+
'o2' => { '_id' => o['_id'] },
|
105
|
+
'o' => { 'goats' => 27 }
|
106
|
+
})
|
107
|
+
assert_equal(27, sequel[:sqltable2].where(:id => o['_id'].to_s).select.first[:goats])
|
108
|
+
end
|
109
|
+
|
98
110
|
it 'applies ops performed via applyOps' do
|
99
111
|
o = { '_id' => BSON::ObjectId.new, 'var' => 17 }
|
100
112
|
@adapter.upsert_ns('mosql_test.collection', o)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mosql
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nelson Elhage
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2015-04-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sequel
|
@@ -39,7 +39,7 @@ dependencies:
|
|
39
39
|
- !ruby/object:Gem::Version
|
40
40
|
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: rake
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - ">="
|
@@ -53,7 +53,7 @@ dependencies:
|
|
53
53
|
- !ruby/object:Gem::Version
|
54
54
|
version: '0'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: log4r
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - ">="
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: json
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -81,49 +81,49 @@ dependencies:
|
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: '0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: mongoriver
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
|
-
- -
|
87
|
+
- - '='
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '0'
|
89
|
+
version: '0.4'
|
90
90
|
type: :runtime
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
|
-
- -
|
94
|
+
- - '='
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '0'
|
96
|
+
version: '0.4'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: mongo
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
|
-
- - "
|
101
|
+
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version: '
|
103
|
+
version: '1.10'
|
104
104
|
type: :runtime
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
|
-
- - "
|
108
|
+
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version: '
|
110
|
+
version: '1.10'
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: bson
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
|
-
- -
|
115
|
+
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: '
|
117
|
+
version: '1.10'
|
118
118
|
type: :runtime
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
|
-
- -
|
122
|
+
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: '
|
124
|
+
version: '1.10'
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: bson_ext
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|