spreadsheet_architect 2.0.0 → 2.0.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/LICENSE +4 -671
- data/README.md +10 -1
- data/lib/spreadsheet_architect/class_methods/xlsx.rb +25 -3
- data/lib/spreadsheet_architect/exceptions.rb +12 -6
- data/lib/spreadsheet_architect/utils.rb +8 -4
- data/lib/spreadsheet_architect/utils/xlsx.rb +6 -6
- data/lib/spreadsheet_architect/version.rb +1 -1
- data/test/rails_app/Gemfile.lock +1 -1
- data/test/rails_app/app/models/custom_post.rb +12 -0
- data/test/rails_app/log/test.log +2573 -0
- data/test/rails_app/test/models/custom_post_test.rb +7 -0
- data/test/rails_app/test/models/spreadsheet_architect_utils_test.rb +6 -0
- data/test/rails_app/tmp/active_model_object/csv.csv +20 -20
- data/test/rails_app/tmp/active_model_object/ods.ods +0 -0
- data/test/rails_app/tmp/active_model_object/xlsx.xlsx +0 -0
- data/test/rails_app/tmp/controller_tests/alt_xlsx.xlsx +0 -0
- data/test/rails_app/tmp/controller_tests/ods.ods +0 -0
- data/test/rails_app/tmp/controller_tests/xlsx.xlsx +0 -0
- data/test/rails_app/tmp/custom_posts/empty.xlsx +0 -0
- data/test/rails_app/tmp/custom_posts/ods.ods +0 -0
- data/test/rails_app/tmp/custom_posts/xlsx.xlsx +0 -0
- data/test/rails_app/tmp/empty_model.xlsx +0 -0
- data/test/rails_app/tmp/empty_sa.xlsx +0 -0
- data/test/rails_app/tmp/extreme.xlsx +0 -0
- data/test/rails_app/tmp/model.xlsx +0 -0
- data/test/rails_app/tmp/ods/empty_model.ods +0 -0
- data/test/rails_app/tmp/ods/empty_sa.ods +0 -0
- data/test/rails_app/tmp/ods/model.ods +0 -0
- data/test/rails_app/tmp/ods/model_options.ods +0 -0
- data/test/rails_app/tmp/ods/sa.ods +0 -0
- data/test/rails_app/tmp/plain_ruby_object/csv.csv +3 -3
- data/test/rails_app/tmp/plain_ruby_object/ods.ods +0 -0
- data/test/rails_app/tmp/plain_ruby_object/xlsx.xlsx +0 -0
- data/test/rails_app/tmp/posts/empty.xlsx +0 -0
- data/test/rails_app/tmp/posts/ods.ods +0 -0
- data/test/rails_app/tmp/posts/xlsx.xlsx +0 -0
- data/test/rails_app/tmp/sa.xlsx +0 -0
- metadata +2 -2
@@ -41,6 +41,13 @@ class CustomPostTest < ActiveSupport::TestCase
|
|
41
41
|
end
|
42
42
|
end
|
43
43
|
|
44
|
+
def test_constants_dont_change
|
45
|
+
x = CustomPost::SPREADSHEET_OPTIONS.to_s
|
46
|
+
SpreadsheetArchitect.to_xlsx(headers: [[1]], data: [[1]], header_style: {b: false}, row_style: {background_color: '000000'})
|
47
|
+
assert_equal(x, CustomPost::SPREADSHEET_OPTIONS.to_s)
|
48
|
+
end
|
49
|
+
|
50
|
+
|
44
51
|
def teardown
|
45
52
|
DatabaseCleaner.clean
|
46
53
|
end
|
@@ -23,6 +23,12 @@ class SpreadsheetArchitectUtilsTest < ActiveSupport::TestCase
|
|
23
23
|
}
|
24
24
|
end
|
25
25
|
|
26
|
+
def test_constants_dont_change
|
27
|
+
x = SpreadsheetArchitect.default_options.to_s
|
28
|
+
SpreadsheetArchitect.to_xlsx(headers: [[1]], data: [[1]], header_style: {b: false}, row_style: {background_color: '000000'})
|
29
|
+
assert_equal(x, SpreadsheetArchitect.default_options.to_s)
|
30
|
+
end
|
31
|
+
|
26
32
|
def test_str_humanize
|
27
33
|
assert_equal(SpreadsheetArchitect::Utils.str_humanize('my_project_export'), 'My Project Export')
|
28
34
|
assert_equal(SpreadsheetArchitect::Utils.str_humanize('My Project Export'), 'My Project Export')
|
@@ -1,21 +1,21 @@
|
|
1
1
|
Name,Content,Created At
|
2
|
-
asd,asd,2017-
|
3
|
-
asd,asd,2017-
|
4
|
-
asd,asd,2017-
|
5
|
-
asd,asd,2017-
|
6
|
-
asd,asd,2017-
|
7
|
-
asd,asd,2017-
|
8
|
-
asd,asd,2017-
|
9
|
-
asd,asd,2017-
|
10
|
-
asd,asd,2017-
|
11
|
-
asd,asd,2017-
|
12
|
-
asd,asd,2017-
|
13
|
-
asd,asd,2017-
|
14
|
-
asd,asd,2017-
|
15
|
-
asd,asd,2017-
|
16
|
-
asd,asd,2017-
|
17
|
-
asd,asd,2017-
|
18
|
-
asd,asd,2017-
|
19
|
-
asd,asd,2017-
|
20
|
-
asd,asd,2017-
|
21
|
-
asd,asd,2017-
|
2
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
3
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
4
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
5
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
6
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
7
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
8
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
9
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
10
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
11
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
12
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
13
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
14
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
15
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
16
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
17
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
18
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
19
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
20
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
21
|
+
asd,asd,2017-02-16 10:29:03 -0800
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
@@ -1,4 +1,4 @@
|
|
1
1
|
Title,Content,Object ID
|
2
|
-
My Title,The content...,
|
3
|
-
My Title,The content...,
|
4
|
-
My Title,The content...,
|
2
|
+
My Title,The content...,47190197641760
|
3
|
+
My Title,The content...,47190197641740
|
4
|
+
My Title,The content...,47190197641720
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/test/rails_app/tmp/sa.xlsx
CHANGED
Binary file
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: spreadsheet_architect
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.0.
|
4
|
+
version: 2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weston Ganger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-
|
11
|
+
date: 2017-02-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: axlsx
|