squealer 2.1.1 → 2.2.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,23 +4,28 @@ describe Squealer::Target do
4
4
  let(:table_name) { :test_table }
5
5
  let(:test_table) { {'_id' => 0} }
6
6
 
7
- let(:export_dbc) { mock(Mysql) }
7
+ let(:upsertable?) { Squealer::Database.instance.upsertable? }
8
8
 
9
9
  after(:each) { Squealer::Target::Queue.instance.clear }
10
10
 
11
-
12
11
  context "targeting" do
13
12
  describe "initialize" do
14
- let(:faqs) { [{'_id' => 123}] }
13
+ let(:faqs) { [{'_id' => '123'}] }
14
+ let(:naqs) { [{:_id => 'abc'}] }
15
15
 
16
16
  context "without a target row id" do
17
17
  context "with the inferred variable in scope" do
18
18
  it "infers the value from the _id field in the hashmap referenced by the variable" do
19
- mock_mysql
20
-
21
19
  faqs.each do |faq|
22
- Squealer::Target.new(nil, :faq) do |target|
23
- target.send(:instance_variable_get, '@row_id').should == faq['_id']
20
+ Squealer::TestTarget.new(nil, :faq) do |target|
21
+ target.instance_variable_get('@row_id').should == faq['_id']
22
+ end
23
+ end
24
+ end
25
+ it "infers the value from the :_id field in the hashmap referenced by the variable" do
26
+ naqs.each do |naq|
27
+ Squealer::TestTarget.new(nil, :naq) do |target|
28
+ target.instance_variable_get('@row_id').should == naq[:_id]
24
29
  end
25
30
  end
26
31
  end
@@ -29,7 +34,7 @@ describe Squealer::Target do
29
34
  it "throws an argument error" do
30
35
  hash_with_no_id = {}
31
36
  lambda do
32
- Squealer::Target.new(nil, :hash_with_no_id) {}
37
+ Squealer::TestTarget.new(nil, :hash_with_no_id) {}
33
38
  end.should raise_error(ArgumentError)
34
39
  end
35
40
  end
@@ -38,7 +43,7 @@ describe Squealer::Target do
38
43
  it "throws an argument error" do
39
44
  not_a_hash = nil
40
45
  lambda do
41
- Squealer::Target.new(nil, :not_a_hash) {}
46
+ Squealer::TestTarget.new(nil, :not_a_hash) {}
42
47
  end.should raise_error(ArgumentError)
43
48
  end
44
49
  end
@@ -47,36 +52,23 @@ describe Squealer::Target do
47
52
  context "without the inferred variable in scope" do
48
53
  it "throws a name error" do
49
54
  lambda do
50
- Squealer::Target.new(nil, :missing_variable) {}
55
+ Squealer::TestTarget.new(nil, :missing_variable) {}
51
56
  end.should raise_error(NameError)
52
57
  end
53
58
  end
54
59
  end
55
-
56
- context "with a target row id" do
57
- it "uses the passed value" do
58
- mock_mysql
59
-
60
- faqs.each do |faq|
61
- Squealer::Target.new(nil, :faq, 1) do |target|
62
- target.send(:instance_variable_get, '@row_id').should == 1
63
- end
64
- end
65
- end
66
- end
67
60
  end
68
61
  end
69
62
 
70
63
 
71
64
  context "nesting" do
72
65
  it "pushes itself onto the targets stack when starting" do
73
- mock_mysql
74
66
  @target1 = @target2 = nil
75
67
 
76
- target1 = Squealer::Target.new(export_dbc, table_name) do
68
+ target1 = Squealer::TestTarget.new(nil, table_name) do
77
69
  @target1 = Squealer::Target.current
78
70
  test_table_2 = test_table
79
- Squealer::Target.new(export_dbc, "#{table_name}_2") do
71
+ Squealer::TestTarget.new(nil, "#{table_name}_2") do
80
72
  @target2 = Squealer::Target.current
81
73
  @target2.should_not == @target1
82
74
  end
@@ -85,9 +77,7 @@ describe Squealer::Target do
85
77
  end
86
78
 
87
79
  it "pops itself off the targets stack when finished" do
88
- mock_mysql
89
-
90
- Squealer::Target.new(export_dbc, table_name) { nil }
80
+ Squealer::TestTarget.new(nil, table_name) { nil }
91
81
  Squealer::Target.current.should be_nil
92
82
  end
93
83
  end
@@ -95,21 +85,17 @@ describe Squealer::Target do
95
85
 
96
86
  context "yielding" do
97
87
  it "yields" do
98
- mock_mysql
99
-
100
88
  block_done = false
101
- target = Squealer::Target.new(export_dbc, table_name) { block_done = true }
89
+ target = Squealer::TestTarget.new(nil, table_name) { block_done = true }
102
90
  block_done.should be_true
103
91
  end
104
92
 
105
93
  it "yields inner blocks before executing its own SQL" do
106
- mock_mysql
107
-
108
94
  blocks_done = []
109
- Squealer::Target.new(export_dbc, table_name) do |target_1|
95
+ Squealer::TestTarget.new(nil, table_name) do |target_1|
110
96
  blocks_done << target_1
111
97
  blocks_done.first.sql.should be_empty
112
- Squealer::Target.new(export_dbc, table_name) do |target_2|
98
+ Squealer::TestTarget.new(nil, table_name) do |target_2|
113
99
  blocks_done << target_2
114
100
  blocks_done.first.sql.should be_empty
115
101
  blocks_done.last.sql.should be_empty
@@ -132,10 +118,8 @@ describe Squealer::Target do
132
118
 
133
119
  context "with a block" do
134
120
  it "uses the value from the block" do
135
- mock_mysql
136
-
137
121
  faqs.each do |faq|
138
- Squealer::Target.new(nil, :faq) do
122
+ Squealer::TestTarget.new(nil, :faq) do
139
123
  assign(col1) { value1 }
140
124
  Squealer::Target.current.instance_variable_get('@column_names').should == [col1]
141
125
  Squealer::Target.current.instance_variable_get('@column_values').should == [value1]
@@ -143,10 +127,8 @@ describe Squealer::Target do
143
127
  end
144
128
  end
145
129
  it "uses the value from the block even if it is nil" do
146
- mock_mysql
147
-
148
130
  faqs.each do |faq|
149
- Squealer::Target.new(nil, :faq) do
131
+ Squealer::TestTarget.new(nil, :faq) do
150
132
  assign(col1) { nil }
151
133
  Squealer::Target.current.instance_variable_get('@column_names').should == [col1]
152
134
  Squealer::Target.current.instance_variable_get('@column_values').should == [nil]
@@ -158,10 +140,8 @@ describe Squealer::Target do
158
140
  context "without a block" do
159
141
  context "with the inferred variable in scope" do
160
142
  it "infers source from target name" do
161
- mock_mysql
162
-
163
143
  faqs.each do |faq|
164
- Squealer::Target.new(nil, :faq) do
144
+ Squealer::TestTarget.new(nil, :faq) do
165
145
  assign(col1)
166
146
  Squealer::Target.current.instance_variable_get('@column_names').should == [col1]
167
147
  Squealer::Target.current.instance_variable_get('@column_values').should == [value1]
@@ -169,11 +149,9 @@ describe Squealer::Target do
169
149
  end
170
150
  end
171
151
  it "infers related source from target name" do
172
- mock_mysql
173
-
174
152
  askers.each do |asker|
175
153
  faqs.each do |faq|
176
- Squealer::Target.new(nil, :faq) do
154
+ Squealer::TestTarget.new(nil, :faq) do
177
155
  assign(:asker_id)
178
156
  Squealer::Target.current.instance_variable_get('@column_names').should == [:asker_id]
179
157
  Squealer::Target.current.instance_variable_get('@column_values').should == [2001]
@@ -186,10 +164,8 @@ describe Squealer::Target do
186
164
 
187
165
  context "with an empty block" do
188
166
  it "assumes nil" do
189
- mock_mysql
190
-
191
167
  faqs.each do |faq|
192
- Squealer::Target.new(nil, :faq) do
168
+ Squealer::TestTarget.new(nil, :faq) do
193
169
  assign(col1) {}
194
170
  Squealer::Target.current.instance_variable_get('@column_names').should == [col1]
195
171
  Squealer::Target.current.instance_variable_get('@column_values').should == [nil]
@@ -202,113 +178,106 @@ describe Squealer::Target do
202
178
 
203
179
 
204
180
  context "exporting" do
205
- before(:each) { mock_mysql }
206
-
207
181
  it "sends the sql to the export database" do
208
- Squealer::Target.new(export_dbc, table_name) { nil }
182
+ Squealer::TestTarget.new(nil, table_name) { nil }
209
183
  end
210
184
 
211
185
  describe "#target" do
212
186
  describe "#typecast_values" do
213
187
  subject { target.send(:typecast_values) }
214
- let(:target) { Squealer::Target.new(export_dbc, table_name) {} }
188
+ let(:target) { Squealer::TestTarget.new(nil, table_name) {} }
215
189
 
216
190
  it "casts array to comma-separated string" do
217
191
  target.assign(:colA) { ['1', '2'] }
218
192
  subject.should == ['1,2']
219
193
  end
220
-
221
- it "casts false to 0 (for mysql TINYINT)" do
222
- target.assign(:colA) { false }
223
- subject.should == [0]
224
- end
225
-
226
- it "casts true to 1 (for mysql TINYINT)" do
227
- target.assign(:colA) { true }
228
- subject.should == [1]
229
- end
230
-
231
- it "casts symbol to string" do
232
- target.assign(:colA) { :open }
233
- subject.should == ['open']
234
- end
235
194
  end
236
195
 
237
196
  context "generates SQL command strings" do
238
- let(:target) { Squealer::Target.new(export_dbc, table_name) { nil } }
197
+ let(:target) { Squealer::TestTarget.new(nil, table_name) { nil } }
239
198
 
240
- it "targets the table" do
241
- target.sql.should =~ /^INSERT #{table_name} /
242
- end
199
+ context "insert" do
200
+ it "targets the table" do
201
+ target.sql.should =~ /^INSERT INTO "#{table_name}" / if upsertable?
202
+ target.sql.should =~ /; INSERT INTO "#{table_name}" / unless upsertable?
203
+ end
243
204
 
244
- it "uses an INSERT ... ON DUPLICATE KEY UPDATE statement" do
245
- target.sql.should =~ /^INSERT .* ON DUPLICATE KEY UPDATE /
246
- end
205
+ it "includes the primary key name in the INSERT" do
206
+ target.sql.should =~ / \(id\) VALUES/
207
+ end
247
208
 
248
- it "includes the primary key name in the INSERT" do
249
- target.sql.should =~ / \(id\) VALUES/
209
+ it "includes the primary key value in the INSERT" do
210
+ target.sql.should =~ / VALUES \('0'\)/
211
+ end
250
212
  end
251
213
 
252
- it "includes the primary key value in the INSERT" do
253
- # target.sql.should =~ / VALUES \('#{row_id}'\) /
254
- target.sql.should =~ / VALUES \(\?\) /
214
+ context "upsert" do
215
+ before { Squealer::Database.instance.should_receive(:upsertable?).at_least(:once).and_return(true) }
216
+ it "uses an INSERT ... ON DUPLICATE KEY UPDATE statement" do
217
+ target.sql.should =~ /^INSERT INTO .* ON DUPLICATE KEY UPDATE /
218
+ end
255
219
  end
256
-
257
220
  end
258
221
 
259
222
  context "with 2 columns" do
260
223
  let(:value_1) { 42 }
261
224
  let(:target) do
262
- Squealer::Target.new(export_dbc, table_name) { Squealer::Target.current.assign(:colA) { value_1 } }
225
+ Squealer::TestTarget.new(nil, table_name) { Squealer::Target.current.assign(:colA) { value_1 } }
263
226
  end
264
227
 
265
- it "includes the column name in the INSERT" do
266
- target.sql.should =~ /\(id,`colA`\) VALUES/
267
- end
228
+ context "insert" do
229
+ it "includes the column name in the INSERT" do
230
+ target.sql.should =~ /\(id,"colA"\) VALUES/
231
+ end
268
232
 
269
- it "includes the column value in the INSERT" do
270
- # target.sql.should =~ /VALUES \('#{row_id}','#{value_1}'\)/
271
- target.sql.should =~ /VALUES \(\?,\?\)/
233
+ it "includes the column value in the INSERT" do
234
+ target.sql.should =~ /VALUES \('0',\?\)/
235
+ end
272
236
  end
273
237
 
274
- it "includes the column name and value in the UPDATE" do
275
- # target.sql.should =~ /UPDATE colA='#{value_1}'/
276
- target.sql.should =~ /UPDATE `colA`=\?/
238
+ context "upsert" do
239
+ before { Squealer::Database.instance.should_receive(:upsertable?).at_least(:once).and_return(true) }
240
+ it "includes the column name and value in the UPDATE" do
241
+ target.sql.should =~ /UPDATE "colA"=\?/
242
+ end
277
243
  end
278
-
279
244
  end
280
245
 
281
246
  context "with 3 columns" do
282
247
  let(:value_1) { 42 }
283
248
  let(:value_2) { 'foobar' }
284
249
  let(:target) do
285
- Squealer::Target.new(export_dbc, table_name) do
250
+ Squealer::TestTarget.new(nil, table_name) do |target|
286
251
  Squealer::Target.current.assign(:colA) { value_1 }
287
252
  Squealer::Target.current.assign(:colB) { value_2 }
288
253
  end
289
254
  end
290
255
 
291
- it "includes the column names in the INSERT" do
292
- target.sql.should =~ /\(id,`colA`,`colB`\) VALUES/
293
- end
256
+ context "insert" do
257
+ it "includes the column names in the INSERT" do
258
+ target.sql.should =~ /\(id,"colA","colB"\) VALUES/
259
+ end
294
260
 
295
- it "includes the column values in the INSERT" do
296
- # target.sql.should =~ /VALUES \('#{row_id}','#{value_1}','#{value_2}'\)/
297
- target.sql.should =~ /VALUES \(\?,\?,\?\)/
261
+ it "includes the column values in the INSERT" do
262
+ target.sql.should =~ /VALUES \('0',\?,\?\)/
263
+ end
298
264
  end
299
265
 
300
- it "includes the column names and values in the UPDATE" do
301
- # target.sql.should =~ /UPDATE colA='#{value_1}',colB='#{value_2}'/
302
- target.sql.should =~ /UPDATE `colA`=\?,`colB`=\?/
266
+ context "upsert" do
267
+ before { Squealer::Database.instance.should_receive(:upsertable?).at_least(:once).and_return(true) }
268
+ it "includes the column names and values in the UPDATE" do
269
+ target.sql.should =~ /UPDATE "colA"=\?,"colB"=\?/
270
+ end
303
271
  end
304
272
  end
305
273
  end
306
274
  end
307
275
  end
308
276
 
309
- def mock_mysql
310
- Squealer::Database.instance.should_receive(:export).at_least(:once).and_return(export_dbc)
311
- st = mock(Mysql::Stmt)
312
- export_dbc.should_receive(:prepare).at_least(:once).and_return(st)
313
- st.should_receive(:execute).at_least(:once)
277
+ # Yes, David Chelimsky, an any_instance stub would be handy right about now :-P
278
+ module Squealer
279
+ class TestTarget < Target
280
+ def execute_sql(sql, values)
281
+ end
282
+ end
314
283
  end
data/squealer.gemspec CHANGED
@@ -5,27 +5,28 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{squealer}
8
- s.version = "2.1.1"
8
+ s.version = "2.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Josh Graham", "Durran Jordan", "Matt Yoho", "Bernerd Schaefer"]
12
- s.date = %q{2010-05-20}
12
+ s.date = %q{2010-06-23}
13
13
  s.default_executable = %q{skewer}
14
14
  s.description = %q{Exports mongodb to mysql. More later.}
15
15
  s.email = %q{joshua.graham@grahamis.com}
16
16
  s.executables = ["skewer"]
17
17
  s.extra_rdoc_files = [
18
- "README.md"
18
+ "LICENSE",
19
+ "README.md"
19
20
  ]
20
21
  s.files = [
21
22
  ".gitignore",
22
23
  ".rvmrc",
23
24
  ".watchr",
25
+ "LICENSE",
24
26
  "README.md",
25
27
  "Rakefile",
26
28
  "VERSION",
27
29
  "bin/skewer",
28
- "lib/.example_squeal.rb.swp",
29
30
  "lib/example_squeal.rb",
30
31
  "lib/squealer.rb",
31
32
  "lib/squealer/database.rb",
@@ -33,16 +34,17 @@ Gem::Specification.new do |s|
33
34
  "lib/squealer/object.rb",
34
35
  "lib/squealer/progress_bar.rb",
35
36
  "lib/squealer/target.rb",
36
- "lib/squealer/time.rb",
37
37
  "lib/tasks/jeweler.rake",
38
+ "spec/integration/export_a_record_spec.rb",
38
39
  "spec/spec.opts",
39
40
  "spec/spec_helper.rb",
41
+ "spec/spec_helper_dbms_mysql.rb",
42
+ "spec/spec_helper_dbms_postgres.rb",
40
43
  "spec/squealer/database_spec.rb",
41
44
  "spec/squealer/hash_spec.rb",
42
45
  "spec/squealer/object_spec.rb",
43
46
  "spec/squealer/progress_bar_spec.rb",
44
47
  "spec/squealer/target_spec.rb",
45
- "spec/squealer/time_spec.rb",
46
48
  "squealer.gemspec"
47
49
  ]
48
50
  s.homepage = %q{http://github.com/delitescere/squealer/}
@@ -51,13 +53,15 @@ Gem::Specification.new do |s|
51
53
  s.rubygems_version = %q{1.3.7}
52
54
  s.summary = %q{Document-oriented to Relational database exporter}
53
55
  s.test_files = [
54
- "spec/spec_helper.rb",
56
+ "spec/integration/export_a_record_spec.rb",
57
+ "spec/spec_helper.rb",
58
+ "spec/spec_helper_dbms_mysql.rb",
59
+ "spec/spec_helper_dbms_postgres.rb",
55
60
  "spec/squealer/database_spec.rb",
56
61
  "spec/squealer/hash_spec.rb",
57
62
  "spec/squealer/object_spec.rb",
58
63
  "spec/squealer/progress_bar_spec.rb",
59
- "spec/squealer/target_spec.rb",
60
- "spec/squealer/time_spec.rb"
64
+ "spec/squealer/target_spec.rb"
61
65
  ]
62
66
 
63
67
  if s.respond_to? :specification_version then
@@ -65,18 +69,33 @@ Gem::Specification.new do |s|
65
69
  s.specification_version = 3
66
70
 
67
71
  if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
68
- s.add_runtime_dependency(%q<mysql>, [">= 2.8.1"])
69
72
  s.add_runtime_dependency(%q<mongo>, [">= 0.18.3"])
70
73
  s.add_runtime_dependency(%q<bson_ext>, [">= 1.0.1"])
74
+ s.add_runtime_dependency(%q<data_objects>, [">= 0.10.2"])
75
+ s.add_runtime_dependency(%q<mysql>, [">= 2.8.1"])
76
+ s.add_runtime_dependency(%q<do_mysql>, [">= 0.10.2"])
77
+ s.add_runtime_dependency(%q<pg>, [">= 0.9.0"])
78
+ s.add_runtime_dependency(%q<do_postgres>, [">= 0.10.2"])
79
+ s.add_development_dependency(%q<rspec>, [">= 1.3.0"])
71
80
  else
72
- s.add_dependency(%q<mysql>, [">= 2.8.1"])
73
81
  s.add_dependency(%q<mongo>, [">= 0.18.3"])
74
82
  s.add_dependency(%q<bson_ext>, [">= 1.0.1"])
83
+ s.add_dependency(%q<data_objects>, [">= 0.10.2"])
84
+ s.add_dependency(%q<mysql>, [">= 2.8.1"])
85
+ s.add_dependency(%q<do_mysql>, [">= 0.10.2"])
86
+ s.add_dependency(%q<pg>, [">= 0.9.0"])
87
+ s.add_dependency(%q<do_postgres>, [">= 0.10.2"])
88
+ s.add_dependency(%q<rspec>, [">= 1.3.0"])
75
89
  end
76
90
  else
77
- s.add_dependency(%q<mysql>, [">= 2.8.1"])
78
91
  s.add_dependency(%q<mongo>, [">= 0.18.3"])
79
92
  s.add_dependency(%q<bson_ext>, [">= 1.0.1"])
93
+ s.add_dependency(%q<data_objects>, [">= 0.10.2"])
94
+ s.add_dependency(%q<mysql>, [">= 2.8.1"])
95
+ s.add_dependency(%q<do_mysql>, [">= 0.10.2"])
96
+ s.add_dependency(%q<pg>, [">= 0.9.0"])
97
+ s.add_dependency(%q<do_postgres>, [">= 0.10.2"])
98
+ s.add_dependency(%q<rspec>, [">= 1.3.0"])
80
99
  end
81
100
  end
82
101
 
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: squealer
3
3
  version: !ruby/object:Gem::Version
4
- hash: 9
4
+ hash: 7
5
5
  prerelease: false
6
6
  segments:
7
7
  - 2
8
- - 1
9
- - 1
10
- version: 2.1.1
8
+ - 2
9
+ - 0
10
+ version: 2.2.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Josh Graham
@@ -18,57 +18,137 @@ autorequire:
18
18
  bindir: bin
19
19
  cert_chain: []
20
20
 
21
- date: 2010-05-20 00:00:00 -05:00
21
+ date: 2010-06-23 00:00:00 -05:00
22
22
  default_executable: skewer
23
23
  dependencies:
24
24
  - !ruby/object:Gem::Dependency
25
- name: mysql
25
+ name: mongo
26
26
  prerelease: false
27
27
  requirement: &id001 !ruby/object:Gem::Requirement
28
28
  none: false
29
29
  requirements:
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- hash: 45
32
+ hash: 81
33
33
  segments:
34
- - 2
35
- - 8
36
- - 1
37
- version: 2.8.1
34
+ - 0
35
+ - 18
36
+ - 3
37
+ version: 0.18.3
38
38
  type: :runtime
39
39
  version_requirements: *id001
40
40
  - !ruby/object:Gem::Dependency
41
- name: mongo
41
+ name: bson_ext
42
42
  prerelease: false
43
43
  requirement: &id002 !ruby/object:Gem::Requirement
44
44
  none: false
45
45
  requirements:
46
46
  - - ">="
47
47
  - !ruby/object:Gem::Version
48
- hash: 81
48
+ hash: 21
49
49
  segments:
50
+ - 1
50
51
  - 0
51
- - 18
52
- - 3
53
- version: 0.18.3
52
+ - 1
53
+ version: 1.0.1
54
54
  type: :runtime
55
55
  version_requirements: *id002
56
56
  - !ruby/object:Gem::Dependency
57
- name: bson_ext
57
+ name: data_objects
58
58
  prerelease: false
59
59
  requirement: &id003 !ruby/object:Gem::Requirement
60
60
  none: false
61
61
  requirements:
62
62
  - - ">="
63
63
  - !ruby/object:Gem::Version
64
- hash: 21
64
+ hash: 51
65
65
  segments:
66
- - 1
67
66
  - 0
68
- - 1
69
- version: 1.0.1
67
+ - 10
68
+ - 2
69
+ version: 0.10.2
70
70
  type: :runtime
71
71
  version_requirements: *id003
72
+ - !ruby/object:Gem::Dependency
73
+ name: mysql
74
+ prerelease: false
75
+ requirement: &id004 !ruby/object:Gem::Requirement
76
+ none: false
77
+ requirements:
78
+ - - ">="
79
+ - !ruby/object:Gem::Version
80
+ hash: 45
81
+ segments:
82
+ - 2
83
+ - 8
84
+ - 1
85
+ version: 2.8.1
86
+ type: :runtime
87
+ version_requirements: *id004
88
+ - !ruby/object:Gem::Dependency
89
+ name: do_mysql
90
+ prerelease: false
91
+ requirement: &id005 !ruby/object:Gem::Requirement
92
+ none: false
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ hash: 51
97
+ segments:
98
+ - 0
99
+ - 10
100
+ - 2
101
+ version: 0.10.2
102
+ type: :runtime
103
+ version_requirements: *id005
104
+ - !ruby/object:Gem::Dependency
105
+ name: pg
106
+ prerelease: false
107
+ requirement: &id006 !ruby/object:Gem::Requirement
108
+ none: false
109
+ requirements:
110
+ - - ">="
111
+ - !ruby/object:Gem::Version
112
+ hash: 59
113
+ segments:
114
+ - 0
115
+ - 9
116
+ - 0
117
+ version: 0.9.0
118
+ type: :runtime
119
+ version_requirements: *id006
120
+ - !ruby/object:Gem::Dependency
121
+ name: do_postgres
122
+ prerelease: false
123
+ requirement: &id007 !ruby/object:Gem::Requirement
124
+ none: false
125
+ requirements:
126
+ - - ">="
127
+ - !ruby/object:Gem::Version
128
+ hash: 51
129
+ segments:
130
+ - 0
131
+ - 10
132
+ - 2
133
+ version: 0.10.2
134
+ type: :runtime
135
+ version_requirements: *id007
136
+ - !ruby/object:Gem::Dependency
137
+ name: rspec
138
+ prerelease: false
139
+ requirement: &id008 !ruby/object:Gem::Requirement
140
+ none: false
141
+ requirements:
142
+ - - ">="
143
+ - !ruby/object:Gem::Version
144
+ hash: 27
145
+ segments:
146
+ - 1
147
+ - 3
148
+ - 0
149
+ version: 1.3.0
150
+ type: :development
151
+ version_requirements: *id008
72
152
  description: Exports mongodb to mysql. More later.
73
153
  email: joshua.graham@grahamis.com
74
154
  executables:
@@ -76,16 +156,17 @@ executables:
76
156
  extensions: []
77
157
 
78
158
  extra_rdoc_files:
159
+ - LICENSE
79
160
  - README.md
80
161
  files:
81
162
  - .gitignore
82
163
  - .rvmrc
83
164
  - .watchr
165
+ - LICENSE
84
166
  - README.md
85
167
  - Rakefile
86
168
  - VERSION
87
169
  - bin/skewer
88
- - lib/.example_squeal.rb.swp
89
170
  - lib/example_squeal.rb
90
171
  - lib/squealer.rb
91
172
  - lib/squealer/database.rb
@@ -93,16 +174,17 @@ files:
93
174
  - lib/squealer/object.rb
94
175
  - lib/squealer/progress_bar.rb
95
176
  - lib/squealer/target.rb
96
- - lib/squealer/time.rb
97
177
  - lib/tasks/jeweler.rake
178
+ - spec/integration/export_a_record_spec.rb
98
179
  - spec/spec.opts
99
180
  - spec/spec_helper.rb
181
+ - spec/spec_helper_dbms_mysql.rb
182
+ - spec/spec_helper_dbms_postgres.rb
100
183
  - spec/squealer/database_spec.rb
101
184
  - spec/squealer/hash_spec.rb
102
185
  - spec/squealer/object_spec.rb
103
186
  - spec/squealer/progress_bar_spec.rb
104
187
  - spec/squealer/target_spec.rb
105
- - spec/squealer/time_spec.rb
106
188
  - squealer.gemspec
107
189
  has_rdoc: true
108
190
  homepage: http://github.com/delitescere/squealer/
@@ -139,10 +221,12 @@ signing_key:
139
221
  specification_version: 3
140
222
  summary: Document-oriented to Relational database exporter
141
223
  test_files:
224
+ - spec/integration/export_a_record_spec.rb
142
225
  - spec/spec_helper.rb
226
+ - spec/spec_helper_dbms_mysql.rb
227
+ - spec/spec_helper_dbms_postgres.rb
143
228
  - spec/squealer/database_spec.rb
144
229
  - spec/squealer/hash_spec.rb
145
230
  - spec/squealer/object_spec.rb
146
231
  - spec/squealer/progress_bar_spec.rb
147
232
  - spec/squealer/target_spec.rb
148
- - spec/squealer/time_spec.rb
Binary file