osheet 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +5 -3
- data/Gemfile +2 -0
- data/Gemfile.lock +13 -37
- data/Rakefile +3 -3
- data/lib/osheet/format/numeric.rb +0 -2
- data/lib/osheet/instance.rb +1 -3
- data/lib/osheet/version.rb +2 -2
- data/osheet.gemspec +3 -9
- data/test/cell_test.rb +96 -104
- data/test/column_test.rb +90 -97
- data/test/format/accounting_test.rb +115 -128
- data/test/format/currency_test.rb +115 -128
- data/test/format/custom_test.rb +13 -13
- data/test/format/datetime_test.rb +13 -13
- data/test/format/fraction_test.rb +63 -63
- data/test/format/general_test.rb +11 -11
- data/test/format/number_test.rb +67 -69
- data/test/format/percentage_test.rb +89 -91
- data/test/format/scientific_test.rb +89 -91
- data/test/format/special_test.rb +35 -35
- data/test/format/text_test.rb +9 -9
- data/test/format_test.rb +24 -24
- data/test/helper.rb +42 -47
- data/test/irb.rb +9 -0
- data/test/mixin_test.rb +55 -59
- data/test/osheet_test.rb +7 -10
- data/test/partial_set_test.rb +41 -61
- data/test/partial_test.rb +44 -46
- data/test/row_test.rb +92 -99
- data/test/style_set_test.rb +34 -37
- data/test/style_test.rb +72 -97
- data/test/template_set_test.rb +52 -73
- data/test/template_test.rb +31 -49
- data/test/workbook_test.rb +186 -199
- data/test/worksheet_test.rb +99 -103
- data/test/xmlss_writer/base_test.rb +72 -73
- data/test/xmlss_writer/elements_test.rb +141 -140
- data/test/xmlss_writer/styles_test.rb +197 -208
- metadata +27 -247
- data/.bundle/config +0 -2
- data/test/app_helper.rb +0 -66
- data/test/env.rb +0 -10
- data/test/rails/three/.gitignore +0 -4
- data/test/rails/three/Gemfile +0 -5
- data/test/rails/three/Gemfile.lock +0 -88
- data/test/rails/three/app/controllers/application_controller.rb +0 -3
- data/test/rails/three/app/controllers/things_controller.rb +0 -10
- data/test/rails/three/app/helpers/application_helper.rb +0 -2
- data/test/rails/three/app/views/layouts/application.html.erb +0 -14
- data/test/rails/three/app/views/things/index.xls.osheet +0 -13
- data/test/rails/three/config/application.rb +0 -42
- data/test/rails/three/config/boot.rb +0 -13
- data/test/rails/three/config/database.yml +0 -22
- data/test/rails/three/config/environment.rb +0 -5
- data/test/rails/three/config/environments/development.rb +0 -26
- data/test/rails/three/config/environments/production.rb +0 -49
- data/test/rails/three/config/environments/test.rb +0 -35
- data/test/rails/three/config/initializers/app.rb +0 -0
- data/test/rails/three/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails/three/config/initializers/inflections.rb +0 -10
- data/test/rails/three/config/initializers/mime_types.rb +0 -5
- data/test/rails/three/config/initializers/secret_token.rb +0 -7
- data/test/rails/three/config/initializers/session_store.rb +0 -8
- data/test/rails/three/config/locales/en.yml +0 -5
- data/test/rails/three/config/routes.rb +0 -3
- data/test/rails/three/config.ru +0 -4
- data/test/rails/three/db/seeds.rb +0 -7
- data/test/rails/three/doc/README_FOR_APP +0 -2
- data/test/rails/three/lib/tasks/.gitkeep +0 -0
- data/test/rails/three/script/rails +0 -6
- data/test/rails/two/.bundle/config +0 -2
- data/test/rails/two/Booting +0 -0
- data/test/rails/two/Gemfile +0 -5
- data/test/rails/two/Gemfile.lock +0 -45
- data/test/rails/two/Rails +0 -0
- data/test/rails/two/app/controllers/application_controller.rb +0 -20
- data/test/rails/two/app/controllers/things_controller.rb +0 -10
- data/test/rails/two/app/helpers/application_helper.rb +0 -3
- data/test/rails/two/app/views/things/index.xls.osheet +0 -15
- data/test/rails/two/config/boot.rb +0 -128
- data/test/rails/two/config/database.yml +0 -22
- data/test/rails/two/config/environment.rb +0 -41
- data/test/rails/two/config/environments/development.rb +0 -17
- data/test/rails/two/config/environments/production.rb +0 -28
- data/test/rails/two/config/environments/test.rb +0 -28
- data/test/rails/two/config/initializers/app.rb +0 -2
- data/test/rails/two/config/initializers/backtrace_silencers.rb +0 -7
- data/test/rails/two/config/initializers/cookie_verification_secret.rb +0 -7
- data/test/rails/two/config/initializers/inflections.rb +0 -10
- data/test/rails/two/config/initializers/mime_types.rb +0 -5
- data/test/rails/two/config/initializers/new_rails_defaults.rb +0 -21
- data/test/rails/two/config/initializers/session_store.rb +0 -15
- data/test/rails/two/config/locales/en.yml +0 -5
- data/test/rails/two/config/routes.rb +0 -3
- data/test/rails/two/db/development.sqlite3 +0 -0
- data/test/rails/two/db/seeds.rb +0 -7
- data/test/rails/two/script/about +0 -4
- data/test/rails/two/script/console +0 -3
- data/test/rails/two/script/dbconsole +0 -3
- data/test/rails/two/script/destroy +0 -3
- data/test/rails/two/script/generate +0 -3
- data/test/rails/two/script/performance/benchmarker +0 -3
- data/test/rails/two/script/performance/profiler +0 -3
- data/test/rails/two/script/plugin +0 -3
- data/test/rails/two/script/runner +0 -3
- data/test/rails/two/script/server +0 -3
- data/test/rails/two/tmp/pids/server.pid +0 -1
- data/test/rails_test.rb +0 -38
- data/test/sinatra/app.rb +0 -16
- data/test/sinatra/views/index.osheet +0 -13
- data/test/sinatra_test.rb +0 -19
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: osheet
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 63
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 8
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.8.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Kelly Redding
|
@@ -15,11 +15,11 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-
|
18
|
+
date: 2011-08-25 00:00:00 Z
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
21
|
-
name: bundler
|
22
21
|
prerelease: false
|
22
|
+
type: :development
|
23
23
|
requirement: &id001 !ruby/object:Gem::Requirement
|
24
24
|
none: false
|
25
25
|
requirements:
|
@@ -30,132 +30,53 @@ dependencies:
|
|
30
30
|
- 1
|
31
31
|
- 0
|
32
32
|
version: "1.0"
|
33
|
-
|
33
|
+
name: bundler
|
34
34
|
version_requirements: *id001
|
35
35
|
- !ruby/object:Gem::Dependency
|
36
|
-
name: test-belt
|
37
36
|
prerelease: false
|
38
|
-
requirement: &id002 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - "="
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
hash: 21
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
- 2
|
47
|
-
- 1
|
48
|
-
version: 0.2.1
|
49
37
|
type: :development
|
50
|
-
|
51
|
-
- !ruby/object:Gem::Dependency
|
52
|
-
name: sinatra
|
53
|
-
prerelease: false
|
54
|
-
requirement: &id003 !ruby/object:Gem::Requirement
|
55
|
-
none: false
|
56
|
-
requirements:
|
57
|
-
- - ">="
|
58
|
-
- !ruby/object:Gem::Version
|
59
|
-
hash: 51
|
60
|
-
segments:
|
61
|
-
- 0
|
62
|
-
- 9
|
63
|
-
- 4
|
64
|
-
version: 0.9.4
|
65
|
-
type: :development
|
66
|
-
version_requirements: *id003
|
67
|
-
- !ruby/object:Gem::Dependency
|
68
|
-
name: rack-test
|
69
|
-
prerelease: false
|
70
|
-
requirement: &id004 !ruby/object:Gem::Requirement
|
38
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
71
39
|
none: false
|
72
40
|
requirements:
|
73
|
-
- -
|
41
|
+
- - ~>
|
74
42
|
- !ruby/object:Gem::Version
|
75
43
|
hash: 13
|
76
44
|
segments:
|
77
45
|
- 0
|
78
|
-
- 5
|
79
46
|
- 3
|
80
|
-
version: 0.
|
81
|
-
|
82
|
-
version_requirements: *
|
83
|
-
- !ruby/object:Gem::Dependency
|
84
|
-
name: webrat
|
85
|
-
prerelease: false
|
86
|
-
requirement: &id005 !ruby/object:Gem::Requirement
|
87
|
-
none: false
|
88
|
-
requirements:
|
89
|
-
- - ">="
|
90
|
-
- !ruby/object:Gem::Version
|
91
|
-
hash: 7
|
92
|
-
segments:
|
93
|
-
- 0
|
94
|
-
- 6
|
95
|
-
- 0
|
96
|
-
version: 0.6.0
|
97
|
-
type: :development
|
98
|
-
version_requirements: *id005
|
99
|
-
- !ruby/object:Gem::Dependency
|
100
|
-
name: open4
|
101
|
-
prerelease: false
|
102
|
-
requirement: &id006 !ruby/object:Gem::Requirement
|
103
|
-
none: false
|
104
|
-
requirements:
|
105
|
-
- - ">="
|
106
|
-
- !ruby/object:Gem::Version
|
107
|
-
hash: 3
|
108
|
-
segments:
|
109
|
-
- 0
|
110
|
-
version: "0"
|
111
|
-
type: :development
|
112
|
-
version_requirements: *id006
|
113
|
-
- !ruby/object:Gem::Dependency
|
114
|
-
name: rest-client
|
115
|
-
prerelease: false
|
116
|
-
requirement: &id007 !ruby/object:Gem::Requirement
|
117
|
-
none: false
|
118
|
-
requirements:
|
119
|
-
- - ">="
|
120
|
-
- !ruby/object:Gem::Version
|
121
|
-
hash: 3
|
122
|
-
segments:
|
123
|
-
- 0
|
124
|
-
version: "0"
|
125
|
-
type: :development
|
126
|
-
version_requirements: *id007
|
47
|
+
version: "0.3"
|
48
|
+
name: assert
|
49
|
+
version_requirements: *id002
|
127
50
|
- !ruby/object:Gem::Dependency
|
128
|
-
name: enumeration
|
129
51
|
prerelease: false
|
130
|
-
|
52
|
+
type: :runtime
|
53
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
131
54
|
none: false
|
132
55
|
requirements:
|
133
56
|
- - ~>
|
134
57
|
- !ruby/object:Gem::Version
|
135
|
-
hash:
|
58
|
+
hash: 11
|
136
59
|
segments:
|
137
60
|
- 1
|
138
|
-
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
version_requirements: *id008
|
61
|
+
- 2
|
62
|
+
version: "1.2"
|
63
|
+
name: enumeration
|
64
|
+
version_requirements: *id003
|
143
65
|
- !ruby/object:Gem::Dependency
|
144
|
-
name: xmlss
|
145
66
|
prerelease: false
|
146
|
-
|
67
|
+
type: :runtime
|
68
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
147
69
|
none: false
|
148
70
|
requirements:
|
149
71
|
- - ~>
|
150
72
|
- !ruby/object:Gem::Version
|
151
|
-
hash:
|
73
|
+
hash: 15
|
152
74
|
segments:
|
153
75
|
- 0
|
154
76
|
- 2
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
version_requirements: *id009
|
77
|
+
version: "0.2"
|
78
|
+
name: xmlss
|
79
|
+
version_requirements: *id004
|
159
80
|
description: A DSL for specifying and generating spreadsheets using Ruby
|
160
81
|
email:
|
161
82
|
- kelly@kelredd.com
|
@@ -166,7 +87,6 @@ extensions: []
|
|
166
87
|
extra_rdoc_files: []
|
167
88
|
|
168
89
|
files:
|
169
|
-
- .bundle/config
|
170
90
|
- .gitignore
|
171
91
|
- Gemfile
|
172
92
|
- Gemfile.lock
|
@@ -220,10 +140,8 @@ files:
|
|
220
140
|
- lib/osheet/xmlss_writer/elements.rb
|
221
141
|
- lib/osheet/xmlss_writer/styles.rb
|
222
142
|
- osheet.gemspec
|
223
|
-
- test/app_helper.rb
|
224
143
|
- test/cell_test.rb
|
225
144
|
- test/column_test.rb
|
226
|
-
- test/env.rb
|
227
145
|
- test/format/accounting_test.rb
|
228
146
|
- test/format/currency_test.rb
|
229
147
|
- test/format/custom_test.rb
|
@@ -237,81 +155,13 @@ files:
|
|
237
155
|
- test/format/text_test.rb
|
238
156
|
- test/format_test.rb
|
239
157
|
- test/helper.rb
|
158
|
+
- test/irb.rb
|
240
159
|
- test/mixin_test.rb
|
241
160
|
- test/mixins.rb
|
242
161
|
- test/osheet_test.rb
|
243
162
|
- test/partial_set_test.rb
|
244
163
|
- test/partial_test.rb
|
245
|
-
- test/rails/three/.gitignore
|
246
|
-
- test/rails/three/Gemfile
|
247
|
-
- test/rails/three/Gemfile.lock
|
248
|
-
- test/rails/three/app/controllers/application_controller.rb
|
249
|
-
- test/rails/three/app/controllers/things_controller.rb
|
250
|
-
- test/rails/three/app/helpers/application_helper.rb
|
251
|
-
- test/rails/three/app/views/layouts/application.html.erb
|
252
|
-
- test/rails/three/app/views/things/index.xls.osheet
|
253
|
-
- test/rails/three/config.ru
|
254
|
-
- test/rails/three/config/application.rb
|
255
|
-
- test/rails/three/config/boot.rb
|
256
|
-
- test/rails/three/config/database.yml
|
257
|
-
- test/rails/three/config/environment.rb
|
258
|
-
- test/rails/three/config/environments/development.rb
|
259
|
-
- test/rails/three/config/environments/production.rb
|
260
|
-
- test/rails/three/config/environments/test.rb
|
261
|
-
- test/rails/three/config/initializers/app.rb
|
262
|
-
- test/rails/three/config/initializers/backtrace_silencers.rb
|
263
|
-
- test/rails/three/config/initializers/inflections.rb
|
264
|
-
- test/rails/three/config/initializers/mime_types.rb
|
265
|
-
- test/rails/three/config/initializers/secret_token.rb
|
266
|
-
- test/rails/three/config/initializers/session_store.rb
|
267
|
-
- test/rails/three/config/locales/en.yml
|
268
|
-
- test/rails/three/config/routes.rb
|
269
|
-
- test/rails/three/db/seeds.rb
|
270
|
-
- test/rails/three/doc/README_FOR_APP
|
271
|
-
- test/rails/three/lib/tasks/.gitkeep
|
272
|
-
- test/rails/three/script/rails
|
273
|
-
- test/rails/two/.bundle/config
|
274
|
-
- test/rails/two/Booting
|
275
|
-
- test/rails/two/Gemfile
|
276
|
-
- test/rails/two/Gemfile.lock
|
277
|
-
- test/rails/two/Rails
|
278
|
-
- test/rails/two/app/controllers/application_controller.rb
|
279
|
-
- test/rails/two/app/controllers/things_controller.rb
|
280
|
-
- test/rails/two/app/helpers/application_helper.rb
|
281
|
-
- test/rails/two/app/views/things/index.xls.osheet
|
282
|
-
- test/rails/two/config/boot.rb
|
283
|
-
- test/rails/two/config/database.yml
|
284
|
-
- test/rails/two/config/environment.rb
|
285
|
-
- test/rails/two/config/environments/development.rb
|
286
|
-
- test/rails/two/config/environments/production.rb
|
287
|
-
- test/rails/two/config/environments/test.rb
|
288
|
-
- test/rails/two/config/initializers/app.rb
|
289
|
-
- test/rails/two/config/initializers/backtrace_silencers.rb
|
290
|
-
- test/rails/two/config/initializers/cookie_verification_secret.rb
|
291
|
-
- test/rails/two/config/initializers/inflections.rb
|
292
|
-
- test/rails/two/config/initializers/mime_types.rb
|
293
|
-
- test/rails/two/config/initializers/new_rails_defaults.rb
|
294
|
-
- test/rails/two/config/initializers/session_store.rb
|
295
|
-
- test/rails/two/config/locales/en.yml
|
296
|
-
- test/rails/two/config/routes.rb
|
297
|
-
- test/rails/two/db/development.sqlite3
|
298
|
-
- test/rails/two/db/seeds.rb
|
299
|
-
- test/rails/two/script/about
|
300
|
-
- test/rails/two/script/console
|
301
|
-
- test/rails/two/script/dbconsole
|
302
|
-
- test/rails/two/script/destroy
|
303
|
-
- test/rails/two/script/generate
|
304
|
-
- test/rails/two/script/performance/benchmarker
|
305
|
-
- test/rails/two/script/performance/profiler
|
306
|
-
- test/rails/two/script/plugin
|
307
|
-
- test/rails/two/script/runner
|
308
|
-
- test/rails/two/script/server
|
309
|
-
- test/rails/two/tmp/pids/server.pid
|
310
|
-
- test/rails_test.rb
|
311
164
|
- test/row_test.rb
|
312
|
-
- test/sinatra/app.rb
|
313
|
-
- test/sinatra/views/index.osheet
|
314
|
-
- test/sinatra_test.rb
|
315
165
|
- test/style_set_test.rb
|
316
166
|
- test/style_test.rb
|
317
167
|
- test/template_set_test.rb
|
@@ -350,15 +200,13 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
350
200
|
requirements: []
|
351
201
|
|
352
202
|
rubyforge_project:
|
353
|
-
rubygems_version: 1.
|
203
|
+
rubygems_version: 1.8.8
|
354
204
|
signing_key:
|
355
205
|
specification_version: 3
|
356
206
|
summary: A DSL for specifying and generating spreadsheets using Ruby
|
357
207
|
test_files:
|
358
|
-
- test/app_helper.rb
|
359
208
|
- test/cell_test.rb
|
360
209
|
- test/column_test.rb
|
361
|
-
- test/env.rb
|
362
210
|
- test/format/accounting_test.rb
|
363
211
|
- test/format/currency_test.rb
|
364
212
|
- test/format/custom_test.rb
|
@@ -372,81 +220,13 @@ test_files:
|
|
372
220
|
- test/format/text_test.rb
|
373
221
|
- test/format_test.rb
|
374
222
|
- test/helper.rb
|
223
|
+
- test/irb.rb
|
375
224
|
- test/mixin_test.rb
|
376
225
|
- test/mixins.rb
|
377
226
|
- test/osheet_test.rb
|
378
227
|
- test/partial_set_test.rb
|
379
228
|
- test/partial_test.rb
|
380
|
-
- test/rails/three/.gitignore
|
381
|
-
- test/rails/three/Gemfile
|
382
|
-
- test/rails/three/Gemfile.lock
|
383
|
-
- test/rails/three/app/controllers/application_controller.rb
|
384
|
-
- test/rails/three/app/controllers/things_controller.rb
|
385
|
-
- test/rails/three/app/helpers/application_helper.rb
|
386
|
-
- test/rails/three/app/views/layouts/application.html.erb
|
387
|
-
- test/rails/three/app/views/things/index.xls.osheet
|
388
|
-
- test/rails/three/config.ru
|
389
|
-
- test/rails/three/config/application.rb
|
390
|
-
- test/rails/three/config/boot.rb
|
391
|
-
- test/rails/three/config/database.yml
|
392
|
-
- test/rails/three/config/environment.rb
|
393
|
-
- test/rails/three/config/environments/development.rb
|
394
|
-
- test/rails/three/config/environments/production.rb
|
395
|
-
- test/rails/three/config/environments/test.rb
|
396
|
-
- test/rails/three/config/initializers/app.rb
|
397
|
-
- test/rails/three/config/initializers/backtrace_silencers.rb
|
398
|
-
- test/rails/three/config/initializers/inflections.rb
|
399
|
-
- test/rails/three/config/initializers/mime_types.rb
|
400
|
-
- test/rails/three/config/initializers/secret_token.rb
|
401
|
-
- test/rails/three/config/initializers/session_store.rb
|
402
|
-
- test/rails/three/config/locales/en.yml
|
403
|
-
- test/rails/three/config/routes.rb
|
404
|
-
- test/rails/three/db/seeds.rb
|
405
|
-
- test/rails/three/doc/README_FOR_APP
|
406
|
-
- test/rails/three/lib/tasks/.gitkeep
|
407
|
-
- test/rails/three/script/rails
|
408
|
-
- test/rails/two/.bundle/config
|
409
|
-
- test/rails/two/Booting
|
410
|
-
- test/rails/two/Gemfile
|
411
|
-
- test/rails/two/Gemfile.lock
|
412
|
-
- test/rails/two/Rails
|
413
|
-
- test/rails/two/app/controllers/application_controller.rb
|
414
|
-
- test/rails/two/app/controllers/things_controller.rb
|
415
|
-
- test/rails/two/app/helpers/application_helper.rb
|
416
|
-
- test/rails/two/app/views/things/index.xls.osheet
|
417
|
-
- test/rails/two/config/boot.rb
|
418
|
-
- test/rails/two/config/database.yml
|
419
|
-
- test/rails/two/config/environment.rb
|
420
|
-
- test/rails/two/config/environments/development.rb
|
421
|
-
- test/rails/two/config/environments/production.rb
|
422
|
-
- test/rails/two/config/environments/test.rb
|
423
|
-
- test/rails/two/config/initializers/app.rb
|
424
|
-
- test/rails/two/config/initializers/backtrace_silencers.rb
|
425
|
-
- test/rails/two/config/initializers/cookie_verification_secret.rb
|
426
|
-
- test/rails/two/config/initializers/inflections.rb
|
427
|
-
- test/rails/two/config/initializers/mime_types.rb
|
428
|
-
- test/rails/two/config/initializers/new_rails_defaults.rb
|
429
|
-
- test/rails/two/config/initializers/session_store.rb
|
430
|
-
- test/rails/two/config/locales/en.yml
|
431
|
-
- test/rails/two/config/routes.rb
|
432
|
-
- test/rails/two/db/development.sqlite3
|
433
|
-
- test/rails/two/db/seeds.rb
|
434
|
-
- test/rails/two/script/about
|
435
|
-
- test/rails/two/script/console
|
436
|
-
- test/rails/two/script/dbconsole
|
437
|
-
- test/rails/two/script/destroy
|
438
|
-
- test/rails/two/script/generate
|
439
|
-
- test/rails/two/script/performance/benchmarker
|
440
|
-
- test/rails/two/script/performance/profiler
|
441
|
-
- test/rails/two/script/plugin
|
442
|
-
- test/rails/two/script/runner
|
443
|
-
- test/rails/two/script/server
|
444
|
-
- test/rails/two/tmp/pids/server.pid
|
445
|
-
- test/rails_test.rb
|
446
229
|
- test/row_test.rb
|
447
|
-
- test/sinatra/app.rb
|
448
|
-
- test/sinatra/views/index.osheet
|
449
|
-
- test/sinatra_test.rb
|
450
230
|
- test/style_set_test.rb
|
451
231
|
- test/style_test.rb
|
452
232
|
- test/template_set_test.rb
|
data/.bundle/config
DELETED
data/test/app_helper.rb
DELETED
@@ -1,66 +0,0 @@
|
|
1
|
-
require 'rack/test'
|
2
|
-
require 'webrat'
|
3
|
-
|
4
|
-
class Test::Unit::TestCase
|
5
|
-
include Rack::Test::Methods
|
6
|
-
include Webrat::Methods
|
7
|
-
include Webrat::Matchers
|
8
|
-
|
9
|
-
Webrat.configure do |config|
|
10
|
-
config.mode = :rack
|
11
|
-
end
|
12
|
-
|
13
|
-
def assert_osheet_response(app, response)
|
14
|
-
assert_equal 200, response.status, "status is not '#{Rack::Utils::HTTP_STATUS_CODES[200]}'"
|
15
|
-
assert response.headers["Content-Type"].include?(Osheet::MIME_TYPE), "content type is not '#{Osheet::MIME_TYPE}'"
|
16
|
-
assert_osheet_data(app, response.body)
|
17
|
-
end
|
18
|
-
|
19
|
-
def assert_osheet_data(app, body)
|
20
|
-
correct_body = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<Workbook xmlns:ss=\"urn:schemas-microsoft-com:office:spreadsheet\" xmlns=\"urn:schemas-microsoft-com:office:spreadsheet\"><Styles/><Worksheet ss:Name=\"from #{app}\"><Table><Row><Cell><Data ss:Type=\"Number\">1</Data></Cell><Cell><Data ss:Type=\"Number\">2</Data></Cell></Row></Table></Worksheet></Workbook>"
|
21
|
-
assert_equal correct_body, body.strip, "incorrect osheet data"
|
22
|
-
end
|
23
|
-
|
24
|
-
end
|
25
|
-
|
26
|
-
module Osheet
|
27
|
-
module RailsTestHelpers
|
28
|
-
|
29
|
-
module StartStop
|
30
|
-
def test_rails_app(version, action, host, port)
|
31
|
-
case action
|
32
|
-
when :start
|
33
|
-
puts
|
34
|
-
# puts "starting Rails #{version} app on port #{port}..."
|
35
|
-
@test_app_pid = Open4.popen4(case version
|
36
|
-
when :two
|
37
|
-
"ruby test/rails/two/script/server -p #{port}"
|
38
|
-
when :three
|
39
|
-
pwd = `pwd`.strip
|
40
|
-
cmd = "test/rails/three/script/rails server --pid=#{pwd}/test/rails/three/tmp/pids/test_server.pid --config=#{pwd}/test/rails/three/config.ru -p 3003"
|
41
|
-
cmd
|
42
|
-
end)[0]
|
43
|
-
puts "\nwaiting for rails #{version} app to start (#{@test_app_pid})"
|
44
|
-
sleep 3
|
45
|
-
while !(g = Open4.popen4("</dev/tcp/#{host}/#{port}")[3].gets).nil?
|
46
|
-
puts "waiting for rails #{version} app to start (#{@test_app_pid}): #{g.inspect}"
|
47
|
-
sleep 0.1
|
48
|
-
end
|
49
|
-
when :stop
|
50
|
-
puts
|
51
|
-
# puts "\nstopping Rails #{version} app on port #{port}..."
|
52
|
-
Process.kill(9, @test_app_pid)
|
53
|
-
while Open4.popen4("</dev/tcp/#{host}/#{port}")[3].gets.nil?
|
54
|
-
puts "\nwaiting for rails #{version} app to stop (#{@test_app_pid})"
|
55
|
-
sleep 0.5
|
56
|
-
end
|
57
|
-
end
|
58
|
-
end
|
59
|
-
end
|
60
|
-
|
61
|
-
def self.included(receiver)
|
62
|
-
receiver.send :extend, StartStop
|
63
|
-
end
|
64
|
-
|
65
|
-
end
|
66
|
-
end
|
data/test/env.rb
DELETED
@@ -1,10 +0,0 @@
|
|
1
|
-
# Add test and lib paths to the $LOAD_PATH
|
2
|
-
[ File.dirname(__FILE__),
|
3
|
-
File.join(File.dirname(__FILE__), '..', 'lib')
|
4
|
-
].each do |path|
|
5
|
-
full_path = File.expand_path(path)
|
6
|
-
$LOAD_PATH.unshift(full_path) unless $LOAD_PATH.include?(full_path)
|
7
|
-
end
|
8
|
-
|
9
|
-
puts "osheet require"
|
10
|
-
require 'osheet'
|
data/test/rails/three/.gitignore
DELETED
data/test/rails/three/Gemfile
DELETED
@@ -1,88 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: ../../..
|
3
|
-
specs:
|
4
|
-
osheet (0.7.0)
|
5
|
-
enumeration (~> 1.1.0)
|
6
|
-
xmlss (~> 0.2.0)
|
7
|
-
|
8
|
-
GEM
|
9
|
-
remote: http://rubygems.org/
|
10
|
-
specs:
|
11
|
-
abstract (1.0.0)
|
12
|
-
actionmailer (3.0.3)
|
13
|
-
actionpack (= 3.0.3)
|
14
|
-
mail (~> 2.2.9)
|
15
|
-
actionpack (3.0.3)
|
16
|
-
activemodel (= 3.0.3)
|
17
|
-
activesupport (= 3.0.3)
|
18
|
-
builder (~> 2.1.2)
|
19
|
-
erubis (~> 2.6.6)
|
20
|
-
i18n (~> 0.4)
|
21
|
-
rack (~> 1.2.1)
|
22
|
-
rack-mount (~> 0.6.13)
|
23
|
-
rack-test (~> 0.5.6)
|
24
|
-
tzinfo (~> 0.3.23)
|
25
|
-
activemodel (3.0.3)
|
26
|
-
activesupport (= 3.0.3)
|
27
|
-
builder (~> 2.1.2)
|
28
|
-
i18n (~> 0.4)
|
29
|
-
activerecord (3.0.3)
|
30
|
-
activemodel (= 3.0.3)
|
31
|
-
activesupport (= 3.0.3)
|
32
|
-
arel (~> 2.0.2)
|
33
|
-
tzinfo (~> 0.3.23)
|
34
|
-
activeresource (3.0.3)
|
35
|
-
activemodel (= 3.0.3)
|
36
|
-
activesupport (= 3.0.3)
|
37
|
-
activesupport (3.0.3)
|
38
|
-
arel (2.0.7)
|
39
|
-
builder (2.1.2)
|
40
|
-
enumeration (1.1.0)
|
41
|
-
erubis (2.6.6)
|
42
|
-
abstract (>= 1.0.0)
|
43
|
-
i18n (0.5.0)
|
44
|
-
mail (2.2.15)
|
45
|
-
activesupport (>= 2.3.6)
|
46
|
-
i18n (>= 0.4.0)
|
47
|
-
mime-types (~> 1.16)
|
48
|
-
treetop (~> 1.4.8)
|
49
|
-
mime-types (1.16)
|
50
|
-
nokogiri (1.4.4)
|
51
|
-
polyglot (0.3.1)
|
52
|
-
rack (1.2.2)
|
53
|
-
rack-mount (0.6.14)
|
54
|
-
rack (>= 1.0.0)
|
55
|
-
rack-test (0.5.7)
|
56
|
-
rack (>= 1.0)
|
57
|
-
rails (3.0.3)
|
58
|
-
actionmailer (= 3.0.3)
|
59
|
-
actionpack (= 3.0.3)
|
60
|
-
activerecord (= 3.0.3)
|
61
|
-
activeresource (= 3.0.3)
|
62
|
-
activesupport (= 3.0.3)
|
63
|
-
bundler (~> 1.0)
|
64
|
-
railties (= 3.0.3)
|
65
|
-
railties (3.0.3)
|
66
|
-
actionpack (= 3.0.3)
|
67
|
-
activesupport (= 3.0.3)
|
68
|
-
rake (>= 0.8.7)
|
69
|
-
thor (~> 0.14.4)
|
70
|
-
rake (0.8.7)
|
71
|
-
sqlite3 (1.3.3)
|
72
|
-
sqlite3-ruby (1.3.3)
|
73
|
-
sqlite3 (>= 1.3.3)
|
74
|
-
thor (0.14.6)
|
75
|
-
treetop (1.4.9)
|
76
|
-
polyglot (>= 0.3.1)
|
77
|
-
tzinfo (0.3.25)
|
78
|
-
xmlss (0.2.0)
|
79
|
-
enumeration (~> 1.1.0)
|
80
|
-
nokogiri (~> 1.4.0)
|
81
|
-
|
82
|
-
PLATFORMS
|
83
|
-
ruby
|
84
|
-
|
85
|
-
DEPENDENCIES
|
86
|
-
osheet!
|
87
|
-
rails (= 3.0.3)
|
88
|
-
sqlite3-ruby
|
@@ -1,42 +0,0 @@
|
|
1
|
-
require File.expand_path('../boot', __FILE__)
|
2
|
-
|
3
|
-
require 'rails/all'
|
4
|
-
|
5
|
-
# If you have a Gemfile, require the gems listed there, including any gems
|
6
|
-
# you've limited to :test, :development, or :production.
|
7
|
-
Bundler.require(:default, Rails.env) if defined?(Bundler)
|
8
|
-
|
9
|
-
module Three
|
10
|
-
class Application < Rails::Application
|
11
|
-
# Settings in config/environments/* take precedence over those specified here.
|
12
|
-
# Application configuration should go into files in config/initializers
|
13
|
-
# -- all .rb files in that directory are automatically loaded.
|
14
|
-
|
15
|
-
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
-
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
-
|
18
|
-
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
-
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
-
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
-
|
22
|
-
# Activate observers that should always be running.
|
23
|
-
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
-
|
25
|
-
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
-
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
-
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
-
|
29
|
-
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
-
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
-
# config.i18n.default_locale = :de
|
32
|
-
|
33
|
-
# JavaScript files you want as :defaults (application.js is always included).
|
34
|
-
# config.action_view.javascript_expansions[:defaults] = %w(jquery rails)
|
35
|
-
|
36
|
-
# Configure the default encoding used in templates for Ruby 1.9.
|
37
|
-
config.encoding = "utf-8"
|
38
|
-
|
39
|
-
# Configure sensitive parameters which will be filtered from the log file.
|
40
|
-
config.filter_parameters += [:password]
|
41
|
-
end
|
42
|
-
end
|
@@ -1,13 +0,0 @@
|
|
1
|
-
require 'rubygems'
|
2
|
-
|
3
|
-
# Set up gems listed in the Gemfile.
|
4
|
-
gemfile = File.expand_path('../../Gemfile', __FILE__)
|
5
|
-
begin
|
6
|
-
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
-
require 'bundler'
|
8
|
-
Bundler.setup
|
9
|
-
rescue Bundler::GemNotFound => e
|
10
|
-
STDERR.puts e.message
|
11
|
-
STDERR.puts "Try running `bundle install`."
|
12
|
-
exit!
|
13
|
-
end if File.exist?(gemfile)
|