commondream-google-spreadsheet-ruby 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (2) hide show
  1. data/lib/google_spreadsheet.rb +3 -3
  2. metadata +1 -1
@@ -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 >= 250
497
- row,col = @modified[current_cell]
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: commondream-google-spreadsheet-ruby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Ichikawa