drudgery 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.
@@ -1,3 +1,3 @@
1
1
  module Drudgery
2
- VERSION = '0.2.0'
2
+ VERSION = '0.2.1'
3
3
  end
@@ -28,25 +28,26 @@ module Drudgery
28
28
  loader.name.must_equal 'sqlite3:memory.cities'
29
29
  end
30
30
  end
31
+ end
31
32
 
32
- describe '#load' do
33
- it 'writes each record in single transaction' do
34
- record1 = { :a => 1, :b => 2 }
35
- record2 = { :a => 3, :b => 4 }
36
-
37
- loader = SQLite3Loader.new(@db, 'records')
38
- loader.load([record1, record2])
33
+ describe '#load' do
34
+ it 'writes each record in single transaction' do
35
+ record1 = { :a => 1, :b => 2 }
36
+ record2 = { :a => 3, :b => 4 }
39
37
 
40
- results = []
41
- @db.execute('SELECT * FROM records') do |result|
42
- results << result
43
- end
38
+ loader = SQLite3Loader.new(@db, 'records')
39
+ loader.load([record1, record2])
44
40
 
45
- results.must_equal([
46
- { 'a' => 1, 'b' => 2, 0 => 1, 1 => 2 },
47
- { 'a' => 3, 'b' => 4, 0 => 3, 1 => 4}
48
- ])
41
+ results = []
42
+ @db.execute('SELECT * FROM records') do |result|
43
+ result.reject! { |key, value| key.kind_of?(Integer) }
44
+ results << result
49
45
  end
46
+
47
+ results.must_equal([
48
+ { 'a' => 1, 'b' => 2 },
49
+ { 'a' => 3, 'b' => 4 }
50
+ ])
50
51
  end
51
52
  end
52
53
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: drudgery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-08-10 00:00:00.000000000 Z
12
+ date: 2012-08-11 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rake
@@ -193,7 +193,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
193
193
  version: '0'
194
194
  segments:
195
195
  - 0
196
- hash: 2447573395712005243
196
+ hash: -3178934934273626286
197
197
  requirements: []
198
198
  rubyforge_project: drudgery
199
199
  rubygems_version: 1.8.24