couch_tomato 0.1.3 → 0.1.4

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.
Files changed (2) hide show
  1. data/lib/couch_tomato/migration.rb +6 -4
  2. metadata +1 -1
@@ -11,10 +11,12 @@ module CouchTomato
11
11
  end
12
12
 
13
13
  time = Benchmark.measure do
14
- docs = db.get('_all_docs', :include_docs => true)['rows']
15
- docs.each do |doc|
16
- next if /^_design/ =~ doc['id']
17
- send(direction, doc['doc'])
14
+ rows = db.get('_all_docs', :include_docs => true)['rows']
15
+ docs = []
16
+ rows.each do |row|
17
+ next if row['id'] =~ /^_design/
18
+ send(direction, row['doc'])
19
+ docs << row['doc']
18
20
  end
19
21
  db.bulk_save(docs)
20
22
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: couch_tomato
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Plastic Trophy