commondream-google-spreadsheet-ruby 0.0.7 → 0.0.8
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/lib/google_spreadsheet.rb +3 -3
- metadata +1 -1
data/lib/google_spreadsheet.rb
CHANGED
@@ -483,6 +483,7 @@ module GoogleSpreadsheet
|
|
483
483
|
# Updates cell values using batch operation.
|
484
484
|
cells = @modified.size
|
485
485
|
current_cell = 0
|
486
|
+
modified_cells = @modified.to_a
|
486
487
|
|
487
488
|
while current_cell < cells
|
488
489
|
batch_count = 0
|
@@ -493,8 +494,8 @@ module GoogleSpreadsheet
|
|
493
494
|
<id>#{h(@cells_feed_url)}</id>
|
494
495
|
EOS
|
495
496
|
|
496
|
-
until batch_count
|
497
|
-
row,col =
|
497
|
+
until batch_count > 250
|
498
|
+
row,col = modified_cells[current_cell]
|
498
499
|
value = @cells[[row, col]]
|
499
500
|
entry = cell_entries[[row, col]]
|
500
501
|
id = entry.search("id").text
|
@@ -510,7 +511,6 @@ module GoogleSpreadsheet
|
|
510
511
|
</entry>
|
511
512
|
EOS
|
512
513
|
|
513
|
-
# close each batch out at 500 cells
|
514
514
|
current_cell +=1
|
515
515
|
batch_count += 1
|
516
516
|
end
|