aunderwo-roo 1.1.1 → 1.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -18,7 +18,7 @@ Roo is available here and on Rubyforge. You can install the official release wit
18
18
 
19
19
  s = Openoffice.new("myspreadsheet.ods") # creates an Openoffice Spreadsheet instance
20
20
  s = Excel.new("myspreadsheet.xls") # creates an Excel Spreadsheet instance
21
- s = Google.new("myspreadsheetkey_at_google") # creates an Google Spreadsheet instance
21
+ s = GoogleDoc.new("myspreadsheetkey_at_google") # creates an Google Spreadsheet instance
22
22
  s = Excelx.new("myspreadsheet.xlsx") # creates an Excel Spreadsheet instance for Excel .xlsx files
23
23
 
24
24
  s.default_sheet = s.sheets.first # first sheet in the spreadsheet file will be used
data/lib/roo.rb CHANGED
@@ -12,7 +12,7 @@ module Roo
12
12
  when '.xml'
13
13
  Excel2003XML.new(file)
14
14
  when ''
15
- Google.new(file)
15
+ GoogleDoc.new(file)
16
16
  else
17
17
  raise ArgumentError, "Don't know how to open file #{file}"
18
18
  end
@@ -95,7 +95,7 @@ module GData
95
95
  end # class
96
96
  end # module
97
97
 
98
- class Google < GenericSpreadsheet
98
+ class GoogleDoc < GenericSpreadsheet
99
99
  attr_accessor :date_format, :datetime_format
100
100
 
101
101
  # Creates a new Google spreadsheet object.
@@ -203,8 +203,8 @@ class TestRoo < Test::Unit::TestCase
203
203
  assert_kind_of Excel, oo
204
204
  end
205
205
  if GOOGLE
206
- oo = Google.new(key_of("numbers1"))
207
- assert_kind_of Google, oo
206
+ oo = GoogleDoc.new(key_of("numbers1"))
207
+ assert_kind_of GoogleDoc, oo
208
208
  end
209
209
  if EXCELX
210
210
  oo = Excelx.new(File.join(TESTDIR,"numbers1.xlsx"))
@@ -366,7 +366,7 @@ class TestRoo < Test::Unit::TestCase
366
366
  else
367
367
  assert_raise(RangeError) { dummy = oo.formula?('C',5,"non existing sheet name")}
368
368
  assert_raise(RangeError) { dummy = oo.formula('C',5,"non existing sheet name")}
369
- assert_raise(RangeError) { dummy = oo.set('C',5,42,"non existing sheet name")} unless oo.class == Google
369
+ assert_raise(RangeError) { dummy = oo.set('C',5,42,"non existing sheet name")} unless oo.class == GoogleDoc
370
370
  assert_raise(RangeError) { dummy = oo.formulas("non existing sheet name")}
371
371
  end
372
372
  assert_raise(RangeError) { dummy = oo.to_yaml({},1,1,1,1,"non existing sheet name")}
@@ -1052,7 +1052,7 @@ class TestRoo < Test::Unit::TestCase
1052
1052
  def test_simple_spreadsheet_find_by_condition
1053
1053
  with_each_spreadsheet(:name=>'simple_spreadsheet') do |oo|
1054
1054
  oo.header_line = 3
1055
- oo.date_format = '%m/%d/%Y' if oo.class == Google
1055
+ oo.date_format = '%m/%d/%Y' if oo.class == GoogleDoc
1056
1056
  erg = oo.find(:all, :conditions => {'Comment' => 'Task 1'})
1057
1057
  assert_equal Date.new(2007,05,07), erg[1]['Date']
1058
1058
  assert_equal 10.75 , erg[1]['Start time']
@@ -1119,7 +1119,7 @@ class TestRoo < Test::Unit::TestCase
1119
1119
  ".xlsx"
1120
1120
  when Excel2003XML
1121
1121
  ".xml"
1122
- when Google
1122
+ when GoogleDoc
1123
1123
  ""
1124
1124
  end
1125
1125
  end
@@ -1156,7 +1156,7 @@ class TestRoo < Test::Unit::TestCase
1156
1156
  with_each_spreadsheet(:name=>'numbers1') do |oo|
1157
1157
  ext = get_extension(oo)
1158
1158
  expected = sprintf(expected_templ,ext)
1159
- if oo.class == Google
1159
+ if oo.class == GoogleDoc
1160
1160
  assert_equal expected.gsub(/numbers1/,key_of("numbers1")), oo.info
1161
1161
  else
1162
1162
  assert_equal expected, oo.info
@@ -1368,7 +1368,7 @@ Sheet 3:
1368
1368
  def test_no_remaining_tmp_files_google
1369
1369
  if GOOGLE
1370
1370
  assert_raise(GoogleReadError) {
1371
- oo = Google.new(key_of("no_spreadsheet_file.txt"))
1371
+ oo = GoogleDoc.new(key_of("no_spreadsheet_file.txt"))
1372
1372
  }
1373
1373
  a=Dir.glob("oo_*")
1374
1374
  assert_equal [], a
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: aunderwo-roo
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anthony Underwood
@@ -11,7 +11,7 @@ autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
13
 
14
- date: 2010-02-26 00:00:00 +00:00
14
+ date: 2010-03-14 00:00:00 +00:00
15
15
  default_executable:
16
16
  dependencies:
17
17
  - !ruby/object:Gem::Dependency