commondream-google-spreadsheet-ruby 0.0.6 → 0.0.7

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/google_spreadsheet.rb +6 -8
  2. metadata +1 -1
@@ -486,20 +486,20 @@ module GoogleSpreadsheet
486
486
 
487
487
  while current_cell < cells
488
488
  batch_count = 0
489
- xml = <<-"EOS"
489
+ xml = <<-EOS
490
490
  <feed xmlns="http://www.w3.org/2005/Atom"
491
491
  xmlns:batch="http://schemas.google.com/gdata/batch"
492
492
  xmlns:gs="http://schemas.google.com/spreadsheets/2006">
493
493
  <id>#{h(@cells_feed_url)}</id>
494
494
  EOS
495
495
 
496
- while batch_count <= 250
496
+ until batch_count >= 250
497
497
  row,col = @modified[current_cell]
498
498
  value = @cells[[row, col]]
499
499
  entry = cell_entries[[row, col]]
500
500
  id = entry.search("id").text
501
501
  edit_url = entry.search("link[@rel='edit']")[0]["href"]
502
- xml << <<-"EOS"
502
+ xml << <<-EOS
503
503
  <entry>
504
504
  <batch:id>#{h(row)},#{h(col)}</batch:id>
505
505
  <batch:operation type="update"/>
@@ -511,13 +511,11 @@ module GoogleSpreadsheet
511
511
  EOS
512
512
 
513
513
  # close each batch out at 500 cells
514
- current_cell++
515
- batch_count++
514
+ current_cell +=1
515
+ batch_count += 1
516
516
  end
517
517
 
518
- xml << <<-"EOS"
519
- </feed>
520
- EOS
518
+ xml << "</feed>"
521
519
 
522
520
  result = @session.post("#{@cells_feed_url}/batch", xml)
523
521
  for entry in result.search("atom:entry")
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.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hiroshi Ichikawa