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
@@ -1,21 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# These settings change the behavior of Rails 2 apps and will be defaults
|
4
|
-
# for Rails 3. You can remove this initializer when Rails 3 is released.
|
5
|
-
|
6
|
-
if defined?(ActiveRecord)
|
7
|
-
# Include Active Record class name as root for JSON serialized output.
|
8
|
-
ActiveRecord::Base.include_root_in_json = true
|
9
|
-
|
10
|
-
# Store the full class name (including module namespace) in STI type column.
|
11
|
-
ActiveRecord::Base.store_full_sti_class = true
|
12
|
-
end
|
13
|
-
|
14
|
-
ActionController::Routing.generate_best_match = false
|
15
|
-
|
16
|
-
# Use ISO 8601 format for JSON serialized times and dates.
|
17
|
-
ActiveSupport.use_standard_json_time_format = true
|
18
|
-
|
19
|
-
# Don't escape HTML entities in JSON, leave that for the #json_escape helper.
|
20
|
-
# if you're including raw json in an HTML page.
|
21
|
-
ActiveSupport.escape_html_entities_in_json = false
|
@@ -1,15 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key for verifying cookie session data integrity.
|
4
|
-
# If you change this key, all old sessions will become invalid!
|
5
|
-
# Make sure the secret is at least 30 characters and all random,
|
6
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
7
|
-
ActionController::Base.session = {
|
8
|
-
:key => '_two_session',
|
9
|
-
:secret => '4bd519bd5597758c71c72236b1a977acdf48b308fbcb21df409357967e902e9972809c4b8efaa3726758f3e8a9f2a0e7a90f69fb726f2e5e4d7c6bc524bec00a'
|
10
|
-
}
|
11
|
-
|
12
|
-
# Use the database for sessions instead of the cookie-based default,
|
13
|
-
# which shouldn't be used to store highly confidential information
|
14
|
-
# (create the session table with "rake db:sessions:create")
|
15
|
-
# ActionController::Base.session_store = :active_record_store
|
Binary file
|
data/test/rails/two/db/seeds.rb
DELETED
@@ -1,7 +0,0 @@
|
|
1
|
-
# This file should contain all the record creation needed to seed the database with its default values.
|
2
|
-
# The data can then be loaded with the rake db:seed (or created alongside the db with db:setup).
|
3
|
-
#
|
4
|
-
# Examples:
|
5
|
-
#
|
6
|
-
# cities = City.create([{ :name => 'Chicago' }, { :name => 'Copenhagen' }])
|
7
|
-
# Major.create(:name => 'Daley', :city => cities.first)
|
data/test/rails/two/script/about
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
23695
|
data/test/rails_test.rb
DELETED
@@ -1,38 +0,0 @@
|
|
1
|
-
require "test/helper"
|
2
|
-
require "test/app_helper"
|
3
|
-
require 'open4'
|
4
|
-
require 'rest_client'
|
5
|
-
|
6
|
-
module Osheet
|
7
|
-
class RailsTwoTest < Test::Unit::TestCase
|
8
|
-
include RailsTestHelpers
|
9
|
-
|
10
|
-
before_once do
|
11
|
-
test_rails_app :two, :start, 'localhost', 3002
|
12
|
-
end
|
13
|
-
after_once do
|
14
|
-
test_rails_app :two, :stop, 'localhost', 3002
|
15
|
-
end
|
16
|
-
|
17
|
-
should "respond with osheet data" do
|
18
|
-
assert_osheet_data 'rails two', RestClient.get("http://localhost:3002/things.xls")
|
19
|
-
end
|
20
|
-
|
21
|
-
end
|
22
|
-
|
23
|
-
class RailsThreeTest < Test::Unit::TestCase
|
24
|
-
include RailsTestHelpers
|
25
|
-
|
26
|
-
before_once do
|
27
|
-
test_rails_app :three, :start, 'localhost', 3003
|
28
|
-
end
|
29
|
-
after_once do
|
30
|
-
test_rails_app :three, :stop, 'localhost', 3003
|
31
|
-
end
|
32
|
-
|
33
|
-
should "respond with osheet data" do
|
34
|
-
assert_osheet_data 'rails three', RestClient.get("http://localhost:3003/things.xls")
|
35
|
-
end
|
36
|
-
|
37
|
-
end
|
38
|
-
end
|
data/test/sinatra/app.rb
DELETED
data/test/sinatra_test.rb
DELETED
@@ -1,19 +0,0 @@
|
|
1
|
-
require "test/helper"
|
2
|
-
require "test/app_helper"
|
3
|
-
require 'test/sinatra/app'
|
4
|
-
|
5
|
-
class SinatraTest < Test::Unit::TestCase
|
6
|
-
|
7
|
-
def app
|
8
|
-
@app ||= SinatraApp
|
9
|
-
end
|
10
|
-
|
11
|
-
context "Requesting xls from a Sinatra app" do
|
12
|
-
before { @response = visit "/index.xls" }
|
13
|
-
|
14
|
-
should "respond with osheet data" do
|
15
|
-
assert_osheet_response 'sinatra', @response
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
end
|