roo 1.11.2 → 1.12.0
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +26 -1
- data/Gemfile +2 -1
- data/Gemfile.lock +26 -0
- data/README.markdown +82 -62
- data/Rakefile +1 -1
- data/VERSION +1 -1
- data/examples/roo_soap_server.rb +1 -1
- data/lib/roo.rb +28 -10
- data/lib/roo/{generic_spreadsheet.rb → base.rb} +127 -159
- data/lib/roo/csv.rb +28 -30
- data/lib/roo/excel.rb +38 -48
- data/lib/roo/excel2003xml.rb +24 -36
- data/lib/roo/excelx.rb +59 -61
- data/lib/roo/google.rb +36 -59
- data/lib/roo/openoffice.rb +41 -65
- data/lib/roo/roo_rails_helper.rb +2 -1
- data/lib/roo/spreadsheet.rb +17 -8
- data/roo.gemspec +20 -8
- data/spec/fixtures/vcr_cassettes/google_drive.yml +165 -0
- data/spec/fixtures/vcr_cassettes/google_drive_access_token.yml +73 -0
- data/spec/lib/roo/base_spec.rb +7 -0
- data/spec/lib/roo/csv_spec.rb +54 -0
- data/spec/lib/roo/excel_spec.rb +17 -0
- data/spec/lib/roo/excelx_spec.rb +13 -0
- data/spec/lib/roo/google_spec.rb +36 -0
- data/spec/lib/roo/libreoffice_spec.rb +19 -0
- data/spec/lib/roo/openoffice_spec.rb +21 -0
- data/spec/lib/roo/spreadsheet_spec.rb +13 -1
- data/spec/spec_helper.rb +7 -0
- data/test/all_ss.rb +1 -1
- data/test/files/1900_base.xlsx +0 -0
- data/test/files/1904_base.xlsx +0 -0
- data/test/rm_sub_test.rb +1 -1
- data/test/test_generic_spreadsheet.rb +68 -66
- data/test/test_helper.rb +3 -84
- data/test/test_roo.rb +85 -708
- data/website/index.html +16 -16
- data/website/index.txt +42 -42
- metadata +44 -7
- data/TODO +0 -2
data/roo.gemspec
CHANGED
@@ -5,17 +5,16 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = "roo"
|
8
|
-
s.version = "1.
|
8
|
+
s.version = "1.12.0"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Thomas Preymesser", "Hugh McGowan", "Ben Woosley"]
|
12
|
-
s.date = "2013-
|
13
|
-
s.description = "Roo can access the contents of various spreadsheet files. It can handle\n*
|
12
|
+
s.date = "2013-08-18"
|
13
|
+
s.description = "Roo can access the contents of various spreadsheet files. It can handle\n* OpenOffice\n* Excel\n* Google spreadsheets\n* Excelx\n* LibreOffice\n* CSV"
|
14
14
|
s.email = "ruby.ruby.ruby.roo@gmail.com"
|
15
15
|
s.extra_rdoc_files = [
|
16
16
|
"LICENSE",
|
17
|
-
"README.markdown"
|
18
|
-
"TODO"
|
17
|
+
"README.markdown"
|
19
18
|
]
|
20
19
|
s.files = [
|
21
20
|
"CHANGELOG",
|
@@ -24,17 +23,16 @@ Gem::Specification.new do |s|
|
|
24
23
|
"LICENSE",
|
25
24
|
"README.markdown",
|
26
25
|
"Rakefile",
|
27
|
-
"TODO",
|
28
26
|
"VERSION",
|
29
27
|
"examples/roo_soap_client.rb",
|
30
28
|
"examples/roo_soap_server.rb",
|
31
29
|
"examples/write_me.rb",
|
32
30
|
"lib/roo.rb",
|
31
|
+
"lib/roo/base.rb",
|
33
32
|
"lib/roo/csv.rb",
|
34
33
|
"lib/roo/excel.rb",
|
35
34
|
"lib/roo/excel2003xml.rb",
|
36
35
|
"lib/roo/excelx.rb",
|
37
|
-
"lib/roo/generic_spreadsheet.rb",
|
38
36
|
"lib/roo/google.rb",
|
39
37
|
"lib/roo/openoffice.rb",
|
40
38
|
"lib/roo/roo_rails_helper.rb",
|
@@ -42,13 +40,24 @@ Gem::Specification.new do |s|
|
|
42
40
|
"lib/roo/worksheet.rb",
|
43
41
|
"roo.gemspec",
|
44
42
|
"scripts/txt2html",
|
43
|
+
"spec/fixtures/vcr_cassettes/google_drive.yml",
|
44
|
+
"spec/fixtures/vcr_cassettes/google_drive_access_token.yml",
|
45
|
+
"spec/lib/roo/base_spec.rb",
|
46
|
+
"spec/lib/roo/csv_spec.rb",
|
45
47
|
"spec/lib/roo/excel2003xml_spec.rb",
|
48
|
+
"spec/lib/roo/excel_spec.rb",
|
46
49
|
"spec/lib/roo/excelx/format_spec.rb",
|
50
|
+
"spec/lib/roo/excelx_spec.rb",
|
51
|
+
"spec/lib/roo/google_spec.rb",
|
52
|
+
"spec/lib/roo/libreoffice_spec.rb",
|
53
|
+
"spec/lib/roo/openoffice_spec.rb",
|
47
54
|
"spec/lib/roo/spreadsheet_spec.rb",
|
48
55
|
"spec/spec_helper.rb",
|
49
56
|
"test/all_ss.rb",
|
50
57
|
"test/files/1900_base.xls",
|
58
|
+
"test/files/1900_base.xlsx",
|
51
59
|
"test/files/1904_base.xls",
|
60
|
+
"test/files/1904_base.xlsx",
|
52
61
|
"test/files/Bibelbund.csv",
|
53
62
|
"test/files/Bibelbund.ods",
|
54
63
|
"test/files/Bibelbund.xls",
|
@@ -165,7 +174,7 @@ Gem::Specification.new do |s|
|
|
165
174
|
s.rubyforge_project = "roo"
|
166
175
|
s.rubygems_version = "1.8.24"
|
167
176
|
s.summary = "Roo can access the contents of various spreadsheet files."
|
168
|
-
s.test_files = ["spec/lib/roo/excel2003xml_spec.rb", "spec/lib/roo/excelx/format_spec.rb", "spec/lib/roo/spreadsheet_spec.rb", "spec/spec_helper.rb", "test/all_ss.rb", "test/files/1900_base.xls", "test/files/1904_base.xls", "test/files/bad_excel_date.xls", "test/files/bbu.ods", "test/files/bbu.xls", "test/files/bbu.xlsx", "test/files/bbu.xml", "test/files/Bibelbund.csv", "test/files/Bibelbund.ods", "test/files/Bibelbund.xls", "test/files/Bibelbund.xlsx", "test/files/Bibelbund.xml", "test/files/Bibelbund1.ods", "test/files/bode-v1.ods.zip", "test/files/bode-v1.xls.zip", "test/files/boolean.ods", "test/files/boolean.xls", "test/files/boolean.xlsx", "test/files/boolean.xml", "test/files/borders.ods", "test/files/borders.xls", "test/files/borders.xlsx", "test/files/borders.xml", "test/files/bug-row-column-fixnum-float.xls", "test/files/bug-row-column-fixnum-float.xml", "test/files/comments.ods", "test/files/comments.xls", "test/files/comments.xlsx", "test/files/csvtypes.csv", "test/files/datetime.ods", "test/files/datetime.xls", "test/files/datetime.xlsx", "test/files/datetime.xml", "test/files/datetime_floatconv.xls", "test/files/datetime_floatconv.xml", "test/files/dreimalvier.ods", "test/files/emptysheets.ods", "test/files/emptysheets.xls", "test/files/emptysheets.xlsx", "test/files/emptysheets.xml", "test/files/excel2003.xml", "test/files/false_encoding.xls", "test/files/false_encoding.xml", "test/files/formula.ods", "test/files/formula.xls", "test/files/formula.xlsx", "test/files/formula.xml", "test/files/formula_parse_error.xls", "test/files/formula_parse_error.xml", "test/files/formula_string_error.xlsx", "test/files/html-escape.ods", "test/files/matrix.ods", "test/files/matrix.xls", "test/files/named_cells.ods", "test/files/named_cells.xls", "test/files/named_cells.xlsx", "test/files/no_spreadsheet_file.txt", "test/files/numbers1.csv", "test/files/numbers1.ods", "test/files/numbers1.xls", "test/files/numbers1.xlsx", "test/files/numbers1.xml", "test/files/only_one_sheet.ods", "test/files/only_one_sheet.xls", "test/files/only_one_sheet.xlsx", "test/files/only_one_sheet.xml", "test/files/paragraph.ods", "test/files/paragraph.xls", "test/files/paragraph.xlsx", "test/files/paragraph.xml", "test/files/Pfand_from_windows_phone.xlsx", "test/files/prova.xls", "test/files/ric.ods", "test/files/simple_spreadsheet.ods", "test/files/simple_spreadsheet.xls", "test/files/simple_spreadsheet.xlsx", "test/files/simple_spreadsheet.xml", "test/files/simple_spreadsheet_from_italo.ods", "test/files/simple_spreadsheet_from_italo.xls", "test/files/simple_spreadsheet_from_italo.xml", "test/files/so_datetime.csv", "test/files/style.ods", "test/files/style.xls", "test/files/style.xlsx", "test/files/style.xml", "test/files/time-test.csv", "test/files/time-test.ods", "test/files/time-test.xls", "test/files/time-test.xlsx", "test/files/time-test.xml", "test/files/type_excel.ods", "test/files/type_excel.xlsx", "test/files/type_excelx.ods", "test/files/type_excelx.xls", "test/files/type_openoffice.xls", "test/files/type_openoffice.xlsx", "test/files/whitespace.ods", "test/files/whitespace.xls", "test/files/whitespace.xlsx", "test/files/whitespace.xml", "test/rm_sub_test.rb", "test/rm_test.rb", "test/test_generic_spreadsheet.rb", "test/test_helper.rb", "test/test_roo.rb"]
|
177
|
+
s.test_files = ["spec/fixtures/vcr_cassettes/google_drive.yml", "spec/fixtures/vcr_cassettes/google_drive_access_token.yml", "spec/lib/roo/base_spec.rb", "spec/lib/roo/csv_spec.rb", "spec/lib/roo/excel2003xml_spec.rb", "spec/lib/roo/excel_spec.rb", "spec/lib/roo/excelx/format_spec.rb", "spec/lib/roo/excelx_spec.rb", "spec/lib/roo/google_spec.rb", "spec/lib/roo/libreoffice_spec.rb", "spec/lib/roo/openoffice_spec.rb", "spec/lib/roo/spreadsheet_spec.rb", "spec/spec_helper.rb", "test/all_ss.rb", "test/files/1900_base.xls", "test/files/1900_base.xlsx", "test/files/1904_base.xls", "test/files/1904_base.xlsx", "test/files/bad_excel_date.xls", "test/files/bbu.ods", "test/files/bbu.xls", "test/files/bbu.xlsx", "test/files/bbu.xml", "test/files/Bibelbund.csv", "test/files/Bibelbund.ods", "test/files/Bibelbund.xls", "test/files/Bibelbund.xlsx", "test/files/Bibelbund.xml", "test/files/Bibelbund1.ods", "test/files/bode-v1.ods.zip", "test/files/bode-v1.xls.zip", "test/files/boolean.ods", "test/files/boolean.xls", "test/files/boolean.xlsx", "test/files/boolean.xml", "test/files/borders.ods", "test/files/borders.xls", "test/files/borders.xlsx", "test/files/borders.xml", "test/files/bug-row-column-fixnum-float.xls", "test/files/bug-row-column-fixnum-float.xml", "test/files/comments.ods", "test/files/comments.xls", "test/files/comments.xlsx", "test/files/csvtypes.csv", "test/files/datetime.ods", "test/files/datetime.xls", "test/files/datetime.xlsx", "test/files/datetime.xml", "test/files/datetime_floatconv.xls", "test/files/datetime_floatconv.xml", "test/files/dreimalvier.ods", "test/files/emptysheets.ods", "test/files/emptysheets.xls", "test/files/emptysheets.xlsx", "test/files/emptysheets.xml", "test/files/excel2003.xml", "test/files/false_encoding.xls", "test/files/false_encoding.xml", "test/files/formula.ods", "test/files/formula.xls", "test/files/formula.xlsx", "test/files/formula.xml", "test/files/formula_parse_error.xls", "test/files/formula_parse_error.xml", "test/files/formula_string_error.xlsx", "test/files/html-escape.ods", "test/files/matrix.ods", "test/files/matrix.xls", "test/files/named_cells.ods", "test/files/named_cells.xls", "test/files/named_cells.xlsx", "test/files/no_spreadsheet_file.txt", "test/files/numbers1.csv", "test/files/numbers1.ods", "test/files/numbers1.xls", "test/files/numbers1.xlsx", "test/files/numbers1.xml", "test/files/only_one_sheet.ods", "test/files/only_one_sheet.xls", "test/files/only_one_sheet.xlsx", "test/files/only_one_sheet.xml", "test/files/paragraph.ods", "test/files/paragraph.xls", "test/files/paragraph.xlsx", "test/files/paragraph.xml", "test/files/Pfand_from_windows_phone.xlsx", "test/files/prova.xls", "test/files/ric.ods", "test/files/simple_spreadsheet.ods", "test/files/simple_spreadsheet.xls", "test/files/simple_spreadsheet.xlsx", "test/files/simple_spreadsheet.xml", "test/files/simple_spreadsheet_from_italo.ods", "test/files/simple_spreadsheet_from_italo.xls", "test/files/simple_spreadsheet_from_italo.xml", "test/files/so_datetime.csv", "test/files/style.ods", "test/files/style.xls", "test/files/style.xlsx", "test/files/style.xml", "test/files/time-test.csv", "test/files/time-test.ods", "test/files/time-test.xls", "test/files/time-test.xlsx", "test/files/time-test.xml", "test/files/type_excel.ods", "test/files/type_excel.xlsx", "test/files/type_excelx.ods", "test/files/type_excelx.xls", "test/files/type_openoffice.xls", "test/files/type_openoffice.xlsx", "test/files/whitespace.ods", "test/files/whitespace.xls", "test/files/whitespace.xlsx", "test/files/whitespace.xml", "test/rm_sub_test.rb", "test/rm_test.rb", "test/test_generic_spreadsheet.rb", "test/test_helper.rb", "test/test_roo.rb"]
|
169
178
|
|
170
179
|
if s.respond_to? :specification_version then
|
171
180
|
s.specification_version = 3
|
@@ -174,17 +183,20 @@ Gem::Specification.new do |s|
|
|
174
183
|
s.add_runtime_dependency(%q<spreadsheet>, ["> 0.6.4"])
|
175
184
|
s.add_runtime_dependency(%q<nokogiri>, [">= 0"])
|
176
185
|
s.add_runtime_dependency(%q<rubyzip>, [">= 0"])
|
186
|
+
s.add_development_dependency(%q<google_drive>, [">= 0"])
|
177
187
|
s.add_development_dependency(%q<jeweler>, [">= 0"])
|
178
188
|
else
|
179
189
|
s.add_dependency(%q<spreadsheet>, ["> 0.6.4"])
|
180
190
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
181
191
|
s.add_dependency(%q<rubyzip>, [">= 0"])
|
192
|
+
s.add_dependency(%q<google_drive>, [">= 0"])
|
182
193
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
183
194
|
end
|
184
195
|
else
|
185
196
|
s.add_dependency(%q<spreadsheet>, ["> 0.6.4"])
|
186
197
|
s.add_dependency(%q<nokogiri>, [">= 0"])
|
187
198
|
s.add_dependency(%q<rubyzip>, [">= 0"])
|
199
|
+
s.add_dependency(%q<google_drive>, [">= 0"])
|
188
200
|
s.add_dependency(%q<jeweler>, [">= 0"])
|
189
201
|
end
|
190
202
|
end
|
@@ -0,0 +1,165 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: post
|
5
|
+
uri: https://www.google.com/accounts/ClientLogin
|
6
|
+
body:
|
7
|
+
encoding: UTF-8
|
8
|
+
string: accountType=HOSTED_OR_GOOGLE&Email=user&Passwd=password&service=wise&source=Gimite-RubyGoogleDrive-1.00
|
9
|
+
headers:
|
10
|
+
Content-Type:
|
11
|
+
- application/x-www-form-urlencoded
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- text/plain
|
25
|
+
Cache-Control:
|
26
|
+
- no-cache, no-store
|
27
|
+
Pragma:
|
28
|
+
- no-cache
|
29
|
+
Expires:
|
30
|
+
- Mon, 01-Jan-1990 00:00:00 GMT
|
31
|
+
Date:
|
32
|
+
- Thu, 15 Aug 2013 00:43:34 GMT
|
33
|
+
X-Content-Type-Options:
|
34
|
+
- nosniff
|
35
|
+
X-Xss-Protection:
|
36
|
+
- 1; mode=block
|
37
|
+
Content-Length:
|
38
|
+
- '881'
|
39
|
+
Server:
|
40
|
+
- GSE
|
41
|
+
body:
|
42
|
+
encoding: UTF-8
|
43
|
+
string: |
|
44
|
+
SID=DQAAAMoAAAA8IKlqi2aGAAGTzd6pCfMwqwabb79_cvhermJV2M78CNvpiYiujQEkQMienaye4SnKIV-oS6r6KEdGp46SZy5radXnkV5pxGSHLWvExZh7pGH7o3cgmvF8N3WX_FWdGQatg_-ypztq4tgHb_E3wlQtRmT1snh8lqVDIqoaXXdlQJ_WKvgPW8NBAOQBMsnb2fV0FX2abuth0DzS6t9gpR_f-1w8d8jI7rwgBhVg0PxxHPUJMnciPDaEjK3WxLj-zGgPCZfr6vBG8asFAjFzCDYO
|
45
|
+
LSID=DQAAAMsAAADMWltQuejlYd78Px9RfXhcHnb7tlPHfKPY4i69F9Hi0dhIQbyFRlHVcyMKaR3ajpm39Tx27o5qgddVcti2kZ3CoOB6bthhPlKls7s4G9nz8ObyHSilTTNP5tjNdNNz0--4NP9lacZ-UHhKoDGKnH6lgKFi6BaCAHpQzXo-vsvStxXqo0D1OE81zL2UOYRvN1rc9evr04qtlSvCHQ8THv7eH8SGwZrdf_okjtKQDyLaEJFn5d0_YP-CiM1JLNyNtjwk6E3cWEi8NUrZh459-Lif
|
46
|
+
Auth=DQAAAMwAAADMWltQuejlYd78Px9RfXhcHnb7tlPHfKPY4i69F9Hi0dhIQbyFRlHVcyMKaR3ajpn7yZLj-g3LYQk1SM-i9ejg3r4yH0rj9yZsBcy0ZiJV1L45w4jGXlgrvse68D5axixvDp7T7u6P6K-eOJj2SaKw8vBj156hBEyn4CQFJ0tVUjl5UPAN9Wt8hJmRNqULG3LoxYwLidLgPVjCtL-lF0YnUiSwbolVBzZAbyeYk1QSzX9xT5ms3sTQ4ESz42Bg9SQbc6kdlcWzvmQ_sO5GfrTY
|
47
|
+
http_version:
|
48
|
+
recorded_at: Thu, 15 Aug 2013 00:43:35 GMT
|
49
|
+
- request:
|
50
|
+
method: post
|
51
|
+
uri: https://www.google.com/accounts/ClientLogin
|
52
|
+
body:
|
53
|
+
encoding: UTF-8
|
54
|
+
string: accountType=HOSTED_OR_GOOGLE&Email=user&Passwd=password&service=writely&source=Gimite-RubyGoogleDrive-1.00
|
55
|
+
headers:
|
56
|
+
Content-Type:
|
57
|
+
- application/x-www-form-urlencoded
|
58
|
+
Accept-Encoding:
|
59
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
60
|
+
Accept:
|
61
|
+
- '*/*'
|
62
|
+
User-Agent:
|
63
|
+
- Ruby
|
64
|
+
response:
|
65
|
+
status:
|
66
|
+
code: 200
|
67
|
+
message: OK
|
68
|
+
headers:
|
69
|
+
Content-Type:
|
70
|
+
- text/plain
|
71
|
+
Cache-Control:
|
72
|
+
- no-cache, no-store
|
73
|
+
Pragma:
|
74
|
+
- no-cache
|
75
|
+
Expires:
|
76
|
+
- Mon, 01-Jan-1990 00:00:00 GMT
|
77
|
+
Date:
|
78
|
+
- Thu, 15 Aug 2013 00:43:35 GMT
|
79
|
+
X-Content-Type-Options:
|
80
|
+
- nosniff
|
81
|
+
X-Xss-Protection:
|
82
|
+
- 1; mode=block
|
83
|
+
Content-Length:
|
84
|
+
- '881'
|
85
|
+
Server:
|
86
|
+
- GSE
|
87
|
+
body:
|
88
|
+
encoding: UTF-8
|
89
|
+
string: |
|
90
|
+
SID=DQAAAMkAAADzBWY1u2YIJ65CWCMcGU45anMr2oknuts_SHI6BUKE9_XcnpF9Cd3LEx3nEwj8BWT4VYJSYCLMHj7PRTnT8y3L1qbs6kVLocXDqMDfPiZGI199x7RIoxNTJm6h6eS1oWnHOJ2ap_TgHSrPLYiIzt-Ajlb2R8fciXwyJM2G1BbiB66BOGQzGd1GPiCWB5cEVzRDRAlF_FKF9tS89XKdMwSBaNQQmYvs8rhWwGew6g4bGk5j2YGQzCfQARBJR-RIP1P6grQKKk50RlQViCy289AQ
|
91
|
+
LSID=DQAAAMsAAAD6x-FEGLu8C22vipJ5KzJRieLdSnd-bxlIF6iewUK4s-DUIlBl9TXOzWxUby3siw_0s_CVXjDO-0eCpUqlDSr9bTK4Z97xboEkx3TAltwZ7rfidhhx1kKEPV6wLyEqQsxLuF58kMGxPneo1ohb9wdBx6019XMG_N_R2npslywmtJSjKeZUFCNhcIOxD3kDjRFOhU9zqTiPguvKGA1QvT8xr2GdUVGNBRH9Xz4XQzth4Pj0Q01Qow0EzOwTp9uCYf1mvf_dQVSpGnTHL3Srv7gH
|
92
|
+
Auth=DQAAAMwAAAD6x-FEGLu8C22vipJ5KzJRieLdSnd-bxlIF6iewUK4s-DUIlBl9TXOzWxUby3siw-4fXJ3tHBJ8XUfzqBe5HXc1vMlzuIPmM7yDOXBV2Jdp4c1hqIn08tfgZOkFH0F1WBpS6UqB3xBOyTZWwdT4ULLHi9fnLEjn8hE_FwnSzKf2YxezpuLbuTR6wlJI8xnXTP2s_hZDfRlr-UYS7OTr8G50beHZtGDgbFDAAEPr21TU_VsQmPBSz5frybOZ0MAbYnOi-zrV-ogwk6fIP6fI7EW
|
93
|
+
http_version:
|
94
|
+
recorded_at: Thu, 15 Aug 2013 00:43:35 GMT
|
95
|
+
- request:
|
96
|
+
method: get
|
97
|
+
uri: https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full
|
98
|
+
body:
|
99
|
+
encoding: US-ASCII
|
100
|
+
string: ''
|
101
|
+
headers:
|
102
|
+
Authorization:
|
103
|
+
- GoogleLogin auth=DQAAAMwAAADMWltQuejlYd78Px9RfXhcHnb7tlPHfKPY4i69F9Hi0dhIQbyFRlHVcyMKaR3ajpn7yZLj-g3LYQk1SM-i9ejg3r4yH0rj9yZsBcy0ZiJV1L45w4jGXlgrvse68D5axixvDp7T7u6P6K-eOJj2SaKw8vBj156hBEyn4CQFJ0tVUjl5UPAN9Wt8hJmRNqULG3LoxYwLidLgPVjCtL-lF0YnUiSwbolVBzZAbyeYk1QSzX9xT5ms3sTQ4ESz42Bg9SQbc6kdlcWzvmQ_sO5GfrTY
|
104
|
+
Accept-Encoding:
|
105
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
106
|
+
Accept:
|
107
|
+
- '*/*'
|
108
|
+
User-Agent:
|
109
|
+
- Ruby
|
110
|
+
response:
|
111
|
+
status:
|
112
|
+
code: 200
|
113
|
+
message: OK
|
114
|
+
headers:
|
115
|
+
Content-Type:
|
116
|
+
- application/atom+xml; charset=UTF-8
|
117
|
+
Expires:
|
118
|
+
- Thu, 15 Aug 2013 00:43:35 GMT
|
119
|
+
Date:
|
120
|
+
- Thu, 15 Aug 2013 00:43:35 GMT
|
121
|
+
Cache-Control:
|
122
|
+
- private, max-age=0, must-revalidate, no-transform
|
123
|
+
Vary:
|
124
|
+
- Accept, X-GData-Authorization, GData-Version
|
125
|
+
Gdata-Version:
|
126
|
+
- '1.0'
|
127
|
+
Last-Modified:
|
128
|
+
- Wed, 14 Aug 2013 23:58:45 GMT
|
129
|
+
Set-Cookie:
|
130
|
+
- NID=67=WgYgh5rhvD-JfsREiq1hlwTrGNEKfKnyUBpIGER1YFhlyyhT9BNfI6L1oLVMRz1vqOVUpZxR9HZYItza622-_uOnkfbvdqytSMRP9bHkJhMM-Wk6Y0u1KpKfIaUagmxb;Domain=.google.com;Path=/;Expires=Fri,
|
131
|
+
14-Feb-2014 00:43:35 GMT;HttpOnly
|
132
|
+
P3p:
|
133
|
+
- CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657
|
134
|
+
for more info."
|
135
|
+
X-Content-Type-Options:
|
136
|
+
- nosniff
|
137
|
+
X-Frame-Options:
|
138
|
+
- SAMEORIGIN
|
139
|
+
X-Xss-Protection:
|
140
|
+
- 1; mode=block
|
141
|
+
Server:
|
142
|
+
- GSE
|
143
|
+
Transfer-Encoding:
|
144
|
+
- chunked
|
145
|
+
body:
|
146
|
+
encoding: UTF-8
|
147
|
+
string: <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'
|
148
|
+
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gs='http://schemas.google.com/spreadsheets/2006'><id>https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full</id><updated>2013-08-14T23:58:45.821Z</updated><category
|
149
|
+
scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#worksheet'/><title
|
150
|
+
type='text'>Test</title><link rel='alternate' type='text/html' href='https://spreadsheets.google.com/ccc?key=0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c'/><link
|
151
|
+
rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><link
|
152
|
+
rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><link
|
153
|
+
rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><author><name>cecillemanalang</name><email>cecillemanalang@gmail.com</email></author><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry><id>https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6</id><updated>2013-08-14T23:58:45.821Z</updated><category
|
154
|
+
scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#worksheet'/><title
|
155
|
+
type='text'>Sheet1</title><content type='text'>Sheet1</content><link rel='http://schemas.google.com/spreadsheets/2006#listfeed'
|
156
|
+
type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/od6/private/full'/><link
|
157
|
+
rel='http://schemas.google.com/spreadsheets/2006#cellsfeed' type='application/atom+xml'
|
158
|
+
href='https://spreadsheets.google.com/feeds/cells/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/od6/private/full'/><link
|
159
|
+
rel='http://schemas.google.com/visualization/2008#visualizationApi' type='application/atom+xml'
|
160
|
+
href='https://spreadsheets.google.com/tq?key=0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c&sheet=od6'/><link
|
161
|
+
rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6'/><link
|
162
|
+
rel='edit' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6/0'/><gs:rowCount>100</gs:rowCount><gs:colCount>20</gs:colCount></entry></feed>
|
163
|
+
http_version:
|
164
|
+
recorded_at: Thu, 15 Aug 2013 00:43:36 GMT
|
165
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,73 @@
|
|
1
|
+
---
|
2
|
+
http_interactions:
|
3
|
+
- request:
|
4
|
+
method: get
|
5
|
+
uri: https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full
|
6
|
+
body:
|
7
|
+
encoding: US-ASCII
|
8
|
+
string: ''
|
9
|
+
headers:
|
10
|
+
Authorization:
|
11
|
+
- Bearer ya29.AHES6ZR1kGjlmlLJG9skjpO0IjzQ6qDohXwFJclzD7mHI9xa-cFzlg
|
12
|
+
Accept-Encoding:
|
13
|
+
- gzip;q=1.0,deflate;q=0.6,identity;q=0.3
|
14
|
+
Accept:
|
15
|
+
- '*/*'
|
16
|
+
User-Agent:
|
17
|
+
- Ruby
|
18
|
+
response:
|
19
|
+
status:
|
20
|
+
code: 200
|
21
|
+
message: OK
|
22
|
+
headers:
|
23
|
+
Content-Type:
|
24
|
+
- application/atom+xml; charset=UTF-8
|
25
|
+
Expires:
|
26
|
+
- Thu, 15 Aug 2013 04:00:09 GMT
|
27
|
+
Date:
|
28
|
+
- Thu, 15 Aug 2013 04:00:09 GMT
|
29
|
+
Cache-Control:
|
30
|
+
- private, max-age=0, must-revalidate, no-transform
|
31
|
+
Vary:
|
32
|
+
- Accept, X-GData-Authorization, GData-Version
|
33
|
+
Gdata-Version:
|
34
|
+
- '1.0'
|
35
|
+
Last-Modified:
|
36
|
+
- Wed, 14 Aug 2013 23:58:45 GMT
|
37
|
+
Set-Cookie:
|
38
|
+
- NID=67=D_rMebxz1goCYPpOwOoQ0-aPMBQZeyMKudylvS2tIjwbMutBHnzJI57QMteOlIww8SWXXxkrak_-8SQ2RevOOV9ENC4we-6hR0LM_vRnbxPkAAqtkyaWtVgyNbCkAy4k;Domain=.google.com;Path=/;Expires=Fri,
|
39
|
+
14-Feb-2014 04:00:09 GMT;HttpOnly
|
40
|
+
P3p:
|
41
|
+
- CP="This is not a P3P policy! See http://www.google.com/support/accounts/bin/answer.py?hl=en&answer=151657
|
42
|
+
for more info."
|
43
|
+
X-Content-Type-Options:
|
44
|
+
- nosniff
|
45
|
+
X-Frame-Options:
|
46
|
+
- SAMEORIGIN
|
47
|
+
X-Xss-Protection:
|
48
|
+
- 1; mode=block
|
49
|
+
Server:
|
50
|
+
- GSE
|
51
|
+
Transfer-Encoding:
|
52
|
+
- chunked
|
53
|
+
body:
|
54
|
+
encoding: UTF-8
|
55
|
+
string: <?xml version='1.0' encoding='UTF-8'?><feed xmlns='http://www.w3.org/2005/Atom'
|
56
|
+
xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:gs='http://schemas.google.com/spreadsheets/2006'><id>https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full</id><updated>2013-08-14T23:58:45.821Z</updated><category
|
57
|
+
scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#worksheet'/><title
|
58
|
+
type='text'>Test</title><link rel='alternate' type='text/html' href='https://spreadsheets.google.com/ccc?key=0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c'/><link
|
59
|
+
rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><link
|
60
|
+
rel='http://schemas.google.com/g/2005#post' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><link
|
61
|
+
rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full'/><author><name>cecillemanalang</name><email>cecillemanalang@gmail.com</email></author><openSearch:totalResults>1</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><entry><id>https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6</id><updated>2013-08-14T23:58:45.821Z</updated><category
|
62
|
+
scheme='http://schemas.google.com/spreadsheets/2006' term='http://schemas.google.com/spreadsheets/2006#worksheet'/><title
|
63
|
+
type='text'>Sheet1</title><content type='text'>Sheet1</content><link rel='http://schemas.google.com/spreadsheets/2006#listfeed'
|
64
|
+
type='application/atom+xml' href='https://spreadsheets.google.com/feeds/list/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/od6/private/full'/><link
|
65
|
+
rel='http://schemas.google.com/spreadsheets/2006#cellsfeed' type='application/atom+xml'
|
66
|
+
href='https://spreadsheets.google.com/feeds/cells/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/od6/private/full'/><link
|
67
|
+
rel='http://schemas.google.com/visualization/2008#visualizationApi' type='application/atom+xml'
|
68
|
+
href='https://spreadsheets.google.com/tq?key=0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c&sheet=od6'/><link
|
69
|
+
rel='self' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6'/><link
|
70
|
+
rel='edit' type='application/atom+xml' href='https://spreadsheets.google.com/feeds/worksheets/0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c/private/full/od6/0'/><gs:rowCount>100</gs:rowCount><gs:colCount>20</gs:colCount></entry></feed>
|
71
|
+
http_version:
|
72
|
+
recorded_at: Thu, 15 Aug 2013 04:00:09 GMT
|
73
|
+
recorded_with: VCR 2.5.0
|
@@ -0,0 +1,54 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Roo::CSV do
|
4
|
+
let(:path) { 'test/files/csvtypes.csv' }
|
5
|
+
let(:csv) { Roo::CSV.new(path) }
|
6
|
+
|
7
|
+
describe '.new' do
|
8
|
+
it 'creates an instance' do
|
9
|
+
expect(csv).to be_a(Roo::CSV)
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
describe '#parse' do
|
14
|
+
subject {
|
15
|
+
csv.parse(options)
|
16
|
+
}
|
17
|
+
context 'with headers: true' do
|
18
|
+
let(:options) { {headers: true} }
|
19
|
+
|
20
|
+
it "doesn't blow up" do
|
21
|
+
expect { subject }.to_not raise_error
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
describe '#csv_options' do
|
27
|
+
context 'when created with the csv_options option' do
|
28
|
+
let(:options) {
|
29
|
+
{
|
30
|
+
col_sep: '\t',
|
31
|
+
quote_char: "'"
|
32
|
+
}
|
33
|
+
}
|
34
|
+
|
35
|
+
it 'returns the csv options' do
|
36
|
+
csv = Roo::CSV.new(path, csv_options: options)
|
37
|
+
csv.csv_options.should == options
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
context 'when created without the csv_options option' do
|
42
|
+
it 'returns a hash' do
|
43
|
+
csv = Roo::CSV.new(path)
|
44
|
+
csv.csv_options.should == {}
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
describe Roo::Csv do
|
51
|
+
it 'is an alias of LibreOffice' do
|
52
|
+
expect(Roo::Csv).to eq(Roo::CSV)
|
53
|
+
end
|
54
|
+
end
|
@@ -0,0 +1,17 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Roo::Excel do
|
4
|
+
let(:excel) { Roo::Excel.new('test/files/boolean.xls') }
|
5
|
+
|
6
|
+
describe '.new' do
|
7
|
+
it 'creates an instance' do
|
8
|
+
expect(excel).to be_a(Roo::Excel)
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
12
|
+
describe '#sheets' do
|
13
|
+
it 'returns the sheet names of the file' do
|
14
|
+
expect(excel.sheets).to eq(["Sheet1", "Sheet2", "Sheet3"])
|
15
|
+
end
|
16
|
+
end
|
17
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Roo::Google do
|
4
|
+
let(:key) { '0AiokXJytm-hjdDhYbTNvZ3pDWm9oZm9yWURLX3ZoR2c' }
|
5
|
+
|
6
|
+
describe '.new' do
|
7
|
+
context 'given a username and password' do
|
8
|
+
let(:user) { 'user' }
|
9
|
+
let(:password) { 'password' }
|
10
|
+
|
11
|
+
subject {
|
12
|
+
Roo::Google.new(key, user: user, password: password)
|
13
|
+
}
|
14
|
+
|
15
|
+
it 'creates an instance' do
|
16
|
+
VCR.use_cassette('google_drive') do
|
17
|
+
expect(subject).to be_a(Roo::Google)
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
|
22
|
+
context 'given an access token' do
|
23
|
+
let(:access_token) { 'ya29.AHES6ZR1kGjlmlLJG9skjpO0IjzQ6qDohXwFJclzD7mHI9xa-cFzlg' }
|
24
|
+
|
25
|
+
subject {
|
26
|
+
Roo::Google.new(key, access_token: access_token)
|
27
|
+
}
|
28
|
+
|
29
|
+
it 'creates an instance' do
|
30
|
+
VCR.use_cassette('google_drive_access_token') do
|
31
|
+
expect(subject).to be_a(Roo::Google)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
36
|
+
end
|