spreadsheet_architect 2.0.0 → 2.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (40) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +4 -0
  3. data/LICENSE +4 -671
  4. data/README.md +10 -1
  5. data/lib/spreadsheet_architect/class_methods/xlsx.rb +25 -3
  6. data/lib/spreadsheet_architect/exceptions.rb +12 -6
  7. data/lib/spreadsheet_architect/utils.rb +8 -4
  8. data/lib/spreadsheet_architect/utils/xlsx.rb +6 -6
  9. data/lib/spreadsheet_architect/version.rb +1 -1
  10. data/test/rails_app/Gemfile.lock +1 -1
  11. data/test/rails_app/app/models/custom_post.rb +12 -0
  12. data/test/rails_app/log/test.log +2573 -0
  13. data/test/rails_app/test/models/custom_post_test.rb +7 -0
  14. data/test/rails_app/test/models/spreadsheet_architect_utils_test.rb +6 -0
  15. data/test/rails_app/tmp/active_model_object/csv.csv +20 -20
  16. data/test/rails_app/tmp/active_model_object/ods.ods +0 -0
  17. data/test/rails_app/tmp/active_model_object/xlsx.xlsx +0 -0
  18. data/test/rails_app/tmp/controller_tests/alt_xlsx.xlsx +0 -0
  19. data/test/rails_app/tmp/controller_tests/ods.ods +0 -0
  20. data/test/rails_app/tmp/controller_tests/xlsx.xlsx +0 -0
  21. data/test/rails_app/tmp/custom_posts/empty.xlsx +0 -0
  22. data/test/rails_app/tmp/custom_posts/ods.ods +0 -0
  23. data/test/rails_app/tmp/custom_posts/xlsx.xlsx +0 -0
  24. data/test/rails_app/tmp/empty_model.xlsx +0 -0
  25. data/test/rails_app/tmp/empty_sa.xlsx +0 -0
  26. data/test/rails_app/tmp/extreme.xlsx +0 -0
  27. data/test/rails_app/tmp/model.xlsx +0 -0
  28. data/test/rails_app/tmp/ods/empty_model.ods +0 -0
  29. data/test/rails_app/tmp/ods/empty_sa.ods +0 -0
  30. data/test/rails_app/tmp/ods/model.ods +0 -0
  31. data/test/rails_app/tmp/ods/model_options.ods +0 -0
  32. data/test/rails_app/tmp/ods/sa.ods +0 -0
  33. data/test/rails_app/tmp/plain_ruby_object/csv.csv +3 -3
  34. data/test/rails_app/tmp/plain_ruby_object/ods.ods +0 -0
  35. data/test/rails_app/tmp/plain_ruby_object/xlsx.xlsx +0 -0
  36. data/test/rails_app/tmp/posts/empty.xlsx +0 -0
  37. data/test/rails_app/tmp/posts/ods.ods +0 -0
  38. data/test/rails_app/tmp/posts/xlsx.xlsx +0 -0
  39. data/test/rails_app/tmp/sa.xlsx +0 -0
  40. 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-01-28 14:29:58 -0800
3
- asd,asd,2017-01-28 14:29:58 -0800
4
- asd,asd,2017-01-28 14:29:58 -0800
5
- asd,asd,2017-01-28 14:29:58 -0800
6
- asd,asd,2017-01-28 14:29:58 -0800
7
- asd,asd,2017-01-28 14:29:58 -0800
8
- asd,asd,2017-01-28 14:29:58 -0800
9
- asd,asd,2017-01-28 14:29:58 -0800
10
- asd,asd,2017-01-28 14:29:58 -0800
11
- asd,asd,2017-01-28 14:29:58 -0800
12
- asd,asd,2017-01-28 14:29:58 -0800
13
- asd,asd,2017-01-28 14:29:58 -0800
14
- asd,asd,2017-01-28 14:29:58 -0800
15
- asd,asd,2017-01-28 14:29:58 -0800
16
- asd,asd,2017-01-28 14:29:58 -0800
17
- asd,asd,2017-01-28 14:29:58 -0800
18
- asd,asd,2017-01-28 14:29:58 -0800
19
- asd,asd,2017-01-28 14:29:58 -0800
20
- asd,asd,2017-01-28 14:29:58 -0800
21
- asd,asd,2017-01-28 14:29:58 -0800
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
@@ -1,4 +1,4 @@
1
1
  Title,Content,Object ID
2
- My Title,The content...,46986951432100
3
- My Title,The content...,46986951432080
4
- My Title,The content...,46986951432060
2
+ My Title,The content...,47190197641760
3
+ My Title,The content...,47190197641740
4
+ My Title,The content...,47190197641720
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.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-01-28 00:00:00.000000000 Z
11
+ date: 2017-02-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: axlsx