axlsx_styler 0.2.0 → 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (63) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +20 -0
  3. data/README.md +39 -32
  4. data/Rakefile +18 -4
  5. data/lib/axlsx_styler.rb +4 -57
  6. data/lib/axlsx_styler/axlsx_cell.rb +30 -30
  7. data/lib/axlsx_styler/axlsx_package.rb +17 -0
  8. data/lib/axlsx_styler/axlsx_styles.rb +36 -0
  9. data/lib/axlsx_styler/axlsx_workbook.rb +27 -27
  10. data/lib/axlsx_styler/axlsx_worksheet.rb +26 -26
  11. data/lib/axlsx_styler/version.rb +1 -1
  12. data/test/custom_assertions.rb +21 -0
  13. data/test/dummy_app/Rakefile +7 -0
  14. data/test/dummy_app/app/assets/javascripts/application.js +0 -0
  15. data/test/dummy_app/app/assets/stylesheets/application.css +3 -0
  16. data/test/dummy_app/app/controllers/application_controller.rb +3 -0
  17. data/test/dummy_app/app/controllers/spreadsheets_controller.rb +7 -0
  18. data/test/dummy_app/app/models/application_record.rb +3 -0
  19. data/test/dummy_app/app/views/layouts/application.html.erb +14 -0
  20. data/{examples/colors_and_borders.rb → test/dummy_app/app/views/spreadsheets/test.xlsx.axlsx} +2 -7
  21. data/test/dummy_app/config.ru +4 -0
  22. data/test/dummy_app/config/application.rb +63 -0
  23. data/test/dummy_app/config/boot.rb +10 -0
  24. data/test/dummy_app/config/database.yml +25 -0
  25. data/test/dummy_app/config/environment.rb +5 -0
  26. data/test/dummy_app/config/environments/development.rb +30 -0
  27. data/test/dummy_app/config/environments/production.rb +60 -0
  28. data/test/dummy_app/config/environments/test.rb +41 -0
  29. data/test/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
  30. data/test/dummy_app/config/initializers/inflections.rb +10 -0
  31. data/test/dummy_app/config/initializers/mime_types.rb +5 -0
  32. data/test/dummy_app/config/initializers/secret_token.rb +11 -0
  33. data/test/dummy_app/config/initializers/session_store.rb +8 -0
  34. data/test/dummy_app/config/initializers/wrap_parameters.rb +14 -0
  35. data/test/dummy_app/config/locales/en.yml +5 -0
  36. data/test/dummy_app/config/routes.rb +3 -0
  37. data/test/dummy_app/config/secrets.yml +22 -0
  38. data/test/dummy_app/db/schema.rb +15 -0
  39. data/test/dummy_app/db/test.sqlite3 +0 -0
  40. data/test/dummy_app/log/test.log +730 -0
  41. data/test/helper_methods.rb +12 -0
  42. data/test/integration/application_test.rb +18 -0
  43. data/test/test_helper.rb +29 -5
  44. data/test/unit/borders_test.rb +127 -0
  45. data/test/unit/examples_test.rb +20 -0
  46. data/test/unit/general_test.rb +84 -0
  47. data/test/unit/merge_styles_test.rb +56 -0
  48. data/test/unit/serialize_test.rb +34 -0
  49. data/test/unit/to_stream_test.rb +34 -0
  50. metadata +136 -56
  51. data/.gitignore +0 -26
  52. data/.travis.yml +0 -7
  53. data/Appraisals +0 -7
  54. data/Gemfile +0 -4
  55. data/axlsx_styler.gemspec +0 -37
  56. data/examples/mixing_styles.rb +0 -22
  57. data/examples/vanilla_axlsx.md +0 -70
  58. data/gemfiles/axlsx_2.gemfile +0 -7
  59. data/gemfiles/axlsx_3.gemfile +0 -7
  60. data/spreadsheet.png +0 -0
  61. data/test/cell_test.rb +0 -14
  62. data/test/integration_test.rb +0 -288
  63. data/test/workbook_test.rb +0 -10
@@ -0,0 +1,12 @@
1
+ # Save to a file using Axlsx::Package#serialize
2
+ def serialize(filename)
3
+ @axlsx.serialize File.expand_path("../../tmp/#{filename}.xlsx", __FILE__)
4
+ assert_equal true, @workbook.styles_applied
5
+ end
6
+
7
+ # Save to a file by getting contents from stream
8
+ def to_stream(filename)
9
+ File.open(File.expand_path("../../tmp/#{filename}.xlsx", __FILE__), 'w') do |f|
10
+ f.write @axlsx.to_stream.read
11
+ end
12
+ end
@@ -0,0 +1,18 @@
1
+ ### FOR RAILS TESTS
2
+
3
+ require 'test_helper'
4
+
5
+ class ApplicationTest < ActionDispatch::IntegrationTest
6
+
7
+ def test_xlsx
8
+ get '/spreadsheets/test.xlsx'
9
+ assert_response :success
10
+
11
+ path = File.expand_path("../../../tmp/axlsx_rails.xlsx", __FILE__)
12
+
13
+ File.open(path, 'w+b') do |f|
14
+ f.write @response.body
15
+ end
16
+ end
17
+
18
+ end
@@ -1,6 +1,30 @@
1
- require 'axlsx_styler'
2
- require 'minitest/autorun'
3
- require 'minitest/pride'
4
- require 'awesome_print'
1
+ ENV["RAILS_ENV"] = "test"
5
2
 
6
- mkdir_p(File.expand_path("../../tmp", __FILE__))
3
+ require File.expand_path("../dummy_app/config/environment.rb", __FILE__)
4
+
5
+ migration_path = Rails.root.join('db/migrate')
6
+ if ActiveRecord.gem_version >= ::Gem::Version.new("5.2.0")
7
+ ActiveRecord::MigrationContext.new(migration_path).migrate
8
+ else
9
+ ActiveRecord::Migrator.migrate(migration_path)
10
+ end
11
+
12
+ require "rails/test_help"
13
+
14
+ Rails.backtrace_cleaner.remove_silencers!
15
+
16
+ class ActiveSupport::TestCase
17
+ # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
18
+ fixtures :all
19
+ end
20
+
21
+ require 'minitest/reporters'
22
+ Minitest::Reporters.use!
23
+
24
+ require 'custom_assertions'
25
+ require 'helper_methods'
26
+
27
+ ### Cleanup old test spreadsheets
28
+ path = File.expand_path("../../tmp", __FILE__)
29
+ FileUtils.remove_dir(path, true)
30
+ FileUtils.mkdir(path)
@@ -0,0 +1,127 @@
1
+ require 'test_helper'
2
+
3
+ class BordersTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def test_table_with_borders
11
+ filename = 'borders_test'
12
+ @workbook.add_worksheet do |sheet|
13
+ sheet.add_row
14
+ sheet.add_row ['', 'Product', 'Category', 'Price']
15
+ sheet.add_row ['', 'Butter', 'Dairy', 4.99]
16
+ sheet.add_row ['', 'Bread', 'Baked Goods', 3.45]
17
+ sheet.add_row ['', 'Broccoli', 'Produce', 2.99]
18
+ sheet.add_row ['', 'Pizza', 'Frozen Foods', 4.99]
19
+ sheet.column_widths 5, 20, 20, 20
20
+
21
+ sheet.add_style 'B2:D2', b: true
22
+ sheet.add_style 'B2:B6', b: true
23
+ sheet.add_style 'B2:D2', bg_color: '95AFBA'
24
+ sheet.add_style 'B3:D6', bg_color: 'E2F89C'
25
+ sheet.add_style 'D3:D6', alignment: { horizontal: :left }
26
+ sheet.add_border 'B2:D6'
27
+ sheet.add_border 'B3:D3', [:top]
28
+ sheet.add_border 'B3:D3', edges: [:bottom], style: :medium
29
+ sheet.add_border 'B3:D3', edges: [:bottom], style: :medium, color: '32f332'
30
+ end
31
+ serialize(filename)
32
+ assert_equal 12, @workbook.styles.style_index.count
33
+ assert_equal 12 + 2, @workbook.styles.style_index.keys.max
34
+ end
35
+
36
+ def test_duplicate_borders
37
+ filename = 'duplicate_borders_test'
38
+ @workbook.add_worksheet do |sheet|
39
+ sheet.add_row
40
+ sheet.add_row ['', 'B2', 'C2', 'D2']
41
+ sheet.add_row ['', 'B3', 'C3', 'D3']
42
+ sheet.add_row ['', 'B4', 'C4', 'D4']
43
+
44
+ sheet.add_border 'B2:D4'
45
+ sheet.add_border 'B2:D4'
46
+ end
47
+ serialize(filename)
48
+ assert_equal 8, @workbook.styles.style_index.count
49
+ assert_equal 8, @workbook.styled_cells.count
50
+ end
51
+
52
+ def test_multiple_style_borders_on_same_cells
53
+ filename = 'multiple_style_borders'
54
+ @workbook.add_worksheet do |sheet|
55
+ sheet.add_row
56
+ sheet.add_row ['', 'B2', 'C2', 'D2']
57
+ sheet.add_row ['', 'B3', 'C3', 'D3']
58
+
59
+ sheet.add_border 'B2:D3', :all
60
+ sheet.add_border 'B2:D2', edges: [:bottom], style: :thick, color: 'ff0000'
61
+ end
62
+ serialize(filename)
63
+ assert_equal 6, @workbook.styles.style_index.count
64
+ assert_equal 6, @workbook.styled_cells.count
65
+
66
+ b2_cell_style = {
67
+ border: {
68
+ style: :thick,
69
+ color: 'ff0000',
70
+ edges: [:bottom, :left, :top]
71
+ },
72
+ type: :xf,
73
+ name: 'Arial',
74
+ sz: 11,
75
+ family: 1
76
+ }
77
+ assert_equal b2_cell_style, @workbook.styles.style_index.values.find{|x| x == b2_cell_style}
78
+
79
+ d3_cell_style = {
80
+ border: {
81
+ style: :thin,
82
+ color: '000000',
83
+ edges: [:bottom, :right]
84
+ },
85
+ type: :xf,
86
+ name: 'Arial',
87
+ sz: 11,
88
+ family: 1
89
+ }
90
+ assert_equal d3_cell_style, @workbook.styles.style_index.values.find{|x| x == d3_cell_style}
91
+ end
92
+
93
+ # Overriding borders (part 1)
94
+ def test_mixed_borders_1
95
+ filename = 'mixed_borders_1'
96
+ @workbook.add_worksheet do |sheet|
97
+ sheet.add_row
98
+ sheet.add_row ['', '1', '2', '3']
99
+ sheet.add_row ['', '4', '5', '6']
100
+ sheet.add_row ['', '7', '8', '9']
101
+ sheet.add_style 'B2:D4', border: { style: :thin, color: '000000' }
102
+ sheet.add_border 'C3:D4', style: :medium
103
+ end
104
+ @workbook.apply_styles
105
+ assert_equal 9, @workbook.styled_cells.count
106
+ assert_equal 2, @workbook.styles.style_index.count
107
+ serialize(filename)
108
+ end
109
+
110
+ # Overriding borders (part 2)
111
+ def test_mixed_borders
112
+ filename = 'mixed_borders_2'
113
+ @workbook.add_worksheet do |sheet|
114
+ sheet.add_row
115
+ sheet.add_row ['', '1', '2', '3']
116
+ sheet.add_row ['', '4', '5', '6']
117
+ sheet.add_row ['', '7', '8', '9']
118
+ sheet.add_border 'B2:D4', style: :medium
119
+ sheet.add_style 'D2:D4', border: { style: :thin, color: '000000' }
120
+ end
121
+ @workbook.apply_styles
122
+ assert_equal 8, @workbook.styled_cells.count
123
+ assert_equal 6, @workbook.styles.style_index.count
124
+ serialize(filename)
125
+ end
126
+
127
+ end
@@ -0,0 +1,20 @@
1
+ require 'test_helper'
2
+
3
+ class ExamplesTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def teardown
11
+ end
12
+
13
+ def test_examples
14
+ path = File.expand_path("../../../examples/**.rb", __FILE__)
15
+ Dir[path].each do |file|
16
+ require file
17
+ end
18
+ end
19
+
20
+ end
@@ -0,0 +1,84 @@
1
+ require 'test_helper'
2
+
3
+ class GeneralTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def test_adding_styled_cells
11
+ p = Axlsx::Package.new
12
+ wb = p.workbook
13
+ wb.add_styled_cell 'Cell 1'
14
+ wb.add_styled_cell 'Cell 2'
15
+ assert_equal ['Cell 1', 'Cell 2'].to_set, wb.styled_cells
16
+ assert_nil wb.styles_applied
17
+ end
18
+
19
+ def test_can_add_style
20
+ p = Axlsx::Package.new
21
+ wb = p.workbook
22
+ sheet = wb.add_worksheet
23
+ row = sheet.add_row ["x", "y"]
24
+ cell = row.cells.first
25
+
26
+ cell.add_style b: true
27
+ assert_equal({b: true}, cell.raw_style)
28
+ end
29
+
30
+ def test_table_with_num_fmt
31
+ filename = 'num_fmt_test'
32
+ t = Time.now
33
+ day = 24 * 60 * 60
34
+ @workbook.add_worksheet do |sheet|
35
+ sheet.add_row %w(Date Count Percent)
36
+ sheet.add_row [t - 2 * day, 2, 2.to_f.round(2) / 11]
37
+ sheet.add_row [t - 1 * day, 3, 3.to_f.round(2) / 11]
38
+ sheet.add_row [t, 6, 6.to_f.round(2) / 11]
39
+
40
+ sheet.add_style 'A1:B1', b: true
41
+ sheet.add_style 'A2:A4', format_code: 'YYYY-MM-DD hh:mm:ss'
42
+ end
43
+ serialize(filename)
44
+ assert_equal 2, @workbook.styles.style_index.count
45
+ assert_equal 2 + 2, @workbook.styles.style_index.keys.max
46
+ assert_equal 5, @workbook.styled_cells.count
47
+ end
48
+
49
+ def test_duplicate_styles
50
+ filename = 'duplicate_styles'
51
+ @workbook.add_worksheet do |sheet|
52
+ sheet.add_row %w(Index City)
53
+ sheet.add_row [1, 'Ottawa']
54
+ sheet.add_row [2, 'Boston']
55
+
56
+ sheet.add_border 'A1:B1', [:bottom]
57
+ sheet.add_border 'A1:B1', [:bottom]
58
+ sheet.add_style 'A1:A3', b: true
59
+ sheet.add_style 'A1:A3', b: true
60
+ end
61
+ serialize(filename)
62
+ assert_equal 4, @workbook.styled_cells.count
63
+ assert_equal 3, @workbook.styles.style_index.count
64
+ end
65
+
66
+ def test_multiple_named_styles
67
+ filename = 'multiple_named_styles'
68
+ bold_blue = { b: true, fg_color: '0000FF' }
69
+ large = { sz: 16 }
70
+ red = { fg_color: 'FF0000' }
71
+ @workbook.add_worksheet do |sheet|
72
+ sheet.add_row %w(Index City)
73
+ sheet.add_row [1, 'Ottawa']
74
+ sheet.add_row [2, 'Boston']
75
+
76
+ sheet.add_style 'A1:B1', bold_blue, large
77
+ sheet.add_style 'A1:A3', red
78
+ end
79
+ serialize(filename)
80
+ assert_equal 4, @workbook.styled_cells.count
81
+ assert_equal 3, @workbook.styles.style_index.count
82
+ end
83
+
84
+ end
@@ -0,0 +1,56 @@
1
+ require 'test_helper'
2
+
3
+ class MergeStylesTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def test_merge_styles_1
11
+ filename = 'merge_styles_1'
12
+ bold = @workbook.styles.add_style b: true
13
+
14
+ @workbook.add_worksheet do |sheet|
15
+ sheet.add_row
16
+ sheet.add_row ['', '1', '2', '3'], style: [nil, bold]
17
+ sheet.add_row ['', '4', '5', '6'], style: bold
18
+ sheet.add_row ['', '7', '8', '9']
19
+ sheet.add_style 'B2:D4', b: true
20
+ sheet.add_border 'B2:D4', { style: :thin, color: '000000' }
21
+ end
22
+ @workbook.apply_styles
23
+ assert_equal 9, @workbook.styles.style_index.count
24
+ serialize(filename)
25
+ end
26
+
27
+ def test_merge_styles_2
28
+ filename = 'merge_styles_2'
29
+ bold = @workbook.styles.add_style b: true
30
+
31
+ @workbook.add_worksheet do |sheet|
32
+ sheet.add_row ['A1', 'B1'], style: [nil, bold]
33
+ sheet.add_row ['A2', 'B2'], style: bold
34
+ sheet.add_row ['A3', 'B3']
35
+ sheet.add_style 'A1:A2', i: true
36
+ end
37
+ @workbook.apply_styles
38
+ assert_equal 3, @workbook.styles.style_index.count
39
+ serialize(filename)
40
+ end
41
+
42
+ def test_merge_styles_3
43
+ filename = 'merge_styles_3'
44
+ bold = @workbook.styles.add_style b: true
45
+
46
+ @workbook.add_worksheet do |sheet|
47
+ sheet.add_row ['A1', 'B1'], style: [nil, bold]
48
+ sheet.add_row ['A2', 'B2']
49
+ sheet.add_style 'B1:B2', bg_color: 'FF0000'
50
+ end
51
+ @workbook.apply_styles
52
+ assert_equal 3, @workbook.styles.style_index.count
53
+ serialize(filename)
54
+ end
55
+
56
+ end
@@ -0,0 +1,34 @@
1
+ require 'test_helper'
2
+
3
+ class SerializeTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def test_works_without_apply_styles_serialize
11
+ filename = 'without_apply_styles_serialize'
12
+ assert_nil @workbook.styles_applied
13
+ @workbook.add_worksheet do |sheet|
14
+ sheet.add_row ['A1', 'B1']
15
+ sheet.add_style 'A1:B1', b: true
16
+ end
17
+ serialize(filename)
18
+ assert_equal 1, @workbook.styles.style_index.count
19
+ end
20
+
21
+ # Backwards compatibility with pre 0.1.5 (serialize)
22
+ def test_works_with_apply_styles_serialize
23
+ filename = 'with_apply_styles_serialize'
24
+ assert_nil @workbook.styles_applied
25
+ @workbook.add_worksheet do |sheet|
26
+ sheet.add_row ['A1', 'B1']
27
+ sheet.add_style 'A1:B1', b: true
28
+ end
29
+ @workbook.apply_styles # important for backwards compatibility
30
+ assert_equal 1, @workbook.styles.style_index.count
31
+ serialize(filename)
32
+ end
33
+
34
+ end
@@ -0,0 +1,34 @@
1
+ require 'test_helper'
2
+
3
+ class ToStreamTest < MiniTest::Test
4
+
5
+ def setup
6
+ @axlsx = Axlsx::Package.new
7
+ @workbook = @axlsx.workbook
8
+ end
9
+
10
+ def test_works_without_apply_styles_to_stream
11
+ filename = 'without_apply_styles_to_stream'
12
+ assert_nil @workbook.styles_applied
13
+ @workbook.add_worksheet do |sheet|
14
+ sheet.add_row ['A1', 'B1']
15
+ sheet.add_style 'A1:B1', b: true
16
+ end
17
+ to_stream(filename)
18
+ assert_equal 1, @workbook.styles.style_index.count
19
+ end
20
+
21
+ # Backwards compatibility with pre 0.1.5 (to_stream)
22
+ def test_works_with_apply_styles_to_stream
23
+ filename = 'with_apply_styles_to_stream'
24
+ assert_nil @workbook.styles_applied
25
+ @workbook.add_worksheet do |sheet|
26
+ sheet.add_row ['A1', 'B1']
27
+ sheet.add_style 'A1:B1', b: true
28
+ end
29
+ @workbook.apply_styles # important for backwards compatibility
30
+ assert_equal 1, @workbook.styles.style_index.count
31
+ to_stream(filename)
32
+ end
33
+
34
+ end
metadata CHANGED
@@ -1,35 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axlsx_styler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
+ - Weston Ganger
7
8
  - Anton Sakovich
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
- date: 2018-03-05 00:00:00.000000000 Z
12
+ date: 2020-01-25 00:00:00.000000000 Z
12
13
  dependencies:
13
14
  - !ruby/object:Gem::Dependency
14
- name: axlsx
15
+ name: caxlsx
15
16
  requirement: !ruby/object:Gem::Requirement
16
17
  requirements:
17
18
  - - ">="
18
19
  - !ruby/object:Gem::Version
19
- version: '2.0'
20
- - - "<"
21
- - !ruby/object:Gem::Version
22
- version: '4'
20
+ version: 2.0.2
23
21
  type: :runtime
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
24
  requirements:
27
25
  - - ">="
28
26
  - !ruby/object:Gem::Version
29
- version: '2.0'
30
- - - "<"
31
- - !ruby/object:Gem::Version
32
- version: '4'
27
+ version: 2.0.2
33
28
  - !ruby/object:Gem::Dependency
34
29
  name: activesupport
35
30
  requirement: !ruby/object:Gem::Requirement
@@ -48,58 +43,58 @@ dependencies:
48
43
  name: bundler
49
44
  requirement: !ruby/object:Gem::Requirement
50
45
  requirements:
51
- - - "~>"
46
+ - - ">="
52
47
  - !ruby/object:Gem::Version
53
- version: '1.6'
48
+ version: '0'
54
49
  type: :development
55
50
  prerelease: false
56
51
  version_requirements: !ruby/object:Gem::Requirement
57
52
  requirements:
58
- - - "~>"
53
+ - - ">="
59
54
  - !ruby/object:Gem::Version
60
- version: '1.6'
55
+ version: '0'
61
56
  - !ruby/object:Gem::Dependency
62
57
  name: rake
63
58
  requirement: !ruby/object:Gem::Requirement
64
59
  requirements:
65
- - - "~>"
60
+ - - ">="
66
61
  - !ruby/object:Gem::Version
67
- version: '0.9'
62
+ version: '0'
68
63
  type: :development
69
64
  prerelease: false
70
65
  version_requirements: !ruby/object:Gem::Requirement
71
66
  requirements:
72
- - - "~>"
67
+ - - ">="
73
68
  - !ruby/object:Gem::Version
74
- version: '0.9'
69
+ version: '0'
75
70
  - !ruby/object:Gem::Dependency
76
71
  name: minitest
77
72
  requirement: !ruby/object:Gem::Requirement
78
73
  requirements:
79
- - - "~>"
74
+ - - ">="
80
75
  - !ruby/object:Gem::Version
81
- version: '5.0'
76
+ version: '0'
82
77
  type: :development
83
78
  prerelease: false
84
79
  version_requirements: !ruby/object:Gem::Requirement
85
80
  requirements:
86
- - - "~>"
81
+ - - ">="
87
82
  - !ruby/object:Gem::Version
88
- version: '5.0'
83
+ version: '0'
89
84
  - !ruby/object:Gem::Dependency
90
- name: awesome_print
85
+ name: minitest-reporters
91
86
  requirement: !ruby/object:Gem::Requirement
92
87
  requirements:
93
- - - "~>"
88
+ - - ">="
94
89
  - !ruby/object:Gem::Version
95
- version: '1.6'
90
+ version: '0'
96
91
  type: :development
97
92
  prerelease: false
98
93
  version_requirements: !ruby/object:Gem::Requirement
99
94
  requirements:
100
- - - "~>"
95
+ - - ">="
101
96
  - !ruby/object:Gem::Version
102
- version: '1.6'
97
+ version: '0'
103
98
  - !ruby/object:Gem::Dependency
104
99
  name: appraisal
105
100
  requirement: !ruby/object:Gem::Requirement
@@ -114,43 +109,94 @@ dependencies:
114
109
  - - ">="
115
110
  - !ruby/object:Gem::Version
116
111
  version: '0'
117
- description: "\n Axlsx gem is an excellent tool to build Excel worksheets. The
118
- sheets are\n created row-by-row and styles are immediately added to each cell
119
- when a\n row is created. This gem allows to follow an alternative route: fill
120
- out\n a spreadsheet with data and apply styles later. Styles can be added\n to
121
- individual cells as well as to ranges of cells. As a bonus, this gem\n also simplifies
122
- drawing borders around groups of cells.\n "
112
+ - !ruby/object:Gem::Dependency
113
+ name: rails
114
+ requirement: !ruby/object:Gem::Requirement
115
+ requirements:
116
+ - - ">="
117
+ - !ruby/object:Gem::Version
118
+ version: '0'
119
+ type: :development
120
+ prerelease: false
121
+ version_requirements: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ - !ruby/object:Gem::Dependency
127
+ name: sqlite3
128
+ requirement: !ruby/object:Gem::Requirement
129
+ requirements:
130
+ - - ">="
131
+ - !ruby/object:Gem::Version
132
+ version: '0'
133
+ type: :development
134
+ prerelease: false
135
+ version_requirements: !ruby/object:Gem::Requirement
136
+ requirements:
137
+ - - ">="
138
+ - !ruby/object:Gem::Version
139
+ version: '0'
140
+ description: Build clean and maintainable styles for your axlsx spreadsheets. Build
141
+ your spreadsheeet with data and then apply styles later.
123
142
  email:
143
+ - weston@westonganger.com
124
144
  - sakovias@gmail.com
125
145
  executables: []
126
146
  extensions: []
127
147
  extra_rdoc_files: []
128
148
  files:
129
- - ".gitignore"
130
- - ".travis.yml"
131
- - Appraisals
132
- - Gemfile
149
+ - CHANGELOG.md
133
150
  - LICENSE.txt
134
151
  - README.md
135
152
  - Rakefile
136
- - axlsx_styler.gemspec
137
- - examples/colors_and_borders.rb
138
- - examples/mixing_styles.rb
139
- - examples/vanilla_axlsx.md
140
- - gemfiles/axlsx_2.gemfile
141
- - gemfiles/axlsx_3.gemfile
142
153
  - lib/axlsx_styler.rb
143
154
  - lib/axlsx_styler/axlsx_cell.rb
155
+ - lib/axlsx_styler/axlsx_package.rb
156
+ - lib/axlsx_styler/axlsx_styles.rb
144
157
  - lib/axlsx_styler/axlsx_workbook.rb
145
158
  - lib/axlsx_styler/axlsx_worksheet.rb
146
159
  - lib/axlsx_styler/border_creator.rb
147
160
  - lib/axlsx_styler/version.rb
148
- - spreadsheet.png
149
- - test/cell_test.rb
150
- - test/integration_test.rb
161
+ - test/custom_assertions.rb
162
+ - test/dummy_app/Rakefile
163
+ - test/dummy_app/app/assets/javascripts/application.js
164
+ - test/dummy_app/app/assets/stylesheets/application.css
165
+ - test/dummy_app/app/controllers/application_controller.rb
166
+ - test/dummy_app/app/controllers/spreadsheets_controller.rb
167
+ - test/dummy_app/app/models/application_record.rb
168
+ - test/dummy_app/app/views/layouts/application.html.erb
169
+ - test/dummy_app/app/views/spreadsheets/test.xlsx.axlsx
170
+ - test/dummy_app/config.ru
171
+ - test/dummy_app/config/application.rb
172
+ - test/dummy_app/config/boot.rb
173
+ - test/dummy_app/config/database.yml
174
+ - test/dummy_app/config/environment.rb
175
+ - test/dummy_app/config/environments/development.rb
176
+ - test/dummy_app/config/environments/production.rb
177
+ - test/dummy_app/config/environments/test.rb
178
+ - test/dummy_app/config/initializers/backtrace_silencers.rb
179
+ - test/dummy_app/config/initializers/inflections.rb
180
+ - test/dummy_app/config/initializers/mime_types.rb
181
+ - test/dummy_app/config/initializers/secret_token.rb
182
+ - test/dummy_app/config/initializers/session_store.rb
183
+ - test/dummy_app/config/initializers/wrap_parameters.rb
184
+ - test/dummy_app/config/locales/en.yml
185
+ - test/dummy_app/config/routes.rb
186
+ - test/dummy_app/config/secrets.yml
187
+ - test/dummy_app/db/schema.rb
188
+ - test/dummy_app/db/test.sqlite3
189
+ - test/dummy_app/log/test.log
190
+ - test/helper_methods.rb
191
+ - test/integration/application_test.rb
151
192
  - test/test_helper.rb
152
- - test/workbook_test.rb
153
- homepage: https://github.com/sakovias/axlsx_styler
193
+ - test/unit/borders_test.rb
194
+ - test/unit/examples_test.rb
195
+ - test/unit/general_test.rb
196
+ - test/unit/merge_styles_test.rb
197
+ - test/unit/serialize_test.rb
198
+ - test/unit/to_stream_test.rb
199
+ homepage: https://github.com/axlsx-styler-gem/axlsx_styler
154
200
  licenses:
155
201
  - MIT
156
202
  metadata: {}
@@ -162,20 +208,54 @@ required_ruby_version: !ruby/object:Gem::Requirement
162
208
  requirements:
163
209
  - - ">="
164
210
  - !ruby/object:Gem::Version
165
- version: 1.9.3
211
+ version: 2.3.0
166
212
  required_rubygems_version: !ruby/object:Gem::Requirement
167
213
  requirements:
168
214
  - - ">="
169
215
  - !ruby/object:Gem::Version
170
216
  version: '0'
171
217
  requirements: []
172
- rubyforge_project:
173
- rubygems_version: 2.6.8
218
+ rubygems_version: 3.0.3
174
219
  signing_key:
175
220
  specification_version: 4
176
- summary: This gem allows to separate data from styles when using Axlsx gem.
221
+ summary: Build clean and maintainable styles for your axlsx spreadsheets. Build your
222
+ spreadsheeet with data and then apply styles later.
177
223
  test_files:
178
- - test/cell_test.rb
179
- - test/integration_test.rb
224
+ - test/custom_assertions.rb
225
+ - test/dummy_app/app/assets/javascripts/application.js
226
+ - test/dummy_app/app/assets/stylesheets/application.css
227
+ - test/dummy_app/app/controllers/application_controller.rb
228
+ - test/dummy_app/app/controllers/spreadsheets_controller.rb
229
+ - test/dummy_app/app/models/application_record.rb
230
+ - test/dummy_app/app/views/layouts/application.html.erb
231
+ - test/dummy_app/app/views/spreadsheets/test.xlsx.axlsx
232
+ - test/dummy_app/config/application.rb
233
+ - test/dummy_app/config/boot.rb
234
+ - test/dummy_app/config/database.yml
235
+ - test/dummy_app/config/environment.rb
236
+ - test/dummy_app/config/environments/development.rb
237
+ - test/dummy_app/config/environments/production.rb
238
+ - test/dummy_app/config/environments/test.rb
239
+ - test/dummy_app/config/initializers/backtrace_silencers.rb
240
+ - test/dummy_app/config/initializers/inflections.rb
241
+ - test/dummy_app/config/initializers/mime_types.rb
242
+ - test/dummy_app/config/initializers/secret_token.rb
243
+ - test/dummy_app/config/initializers/session_store.rb
244
+ - test/dummy_app/config/initializers/wrap_parameters.rb
245
+ - test/dummy_app/config/locales/en.yml
246
+ - test/dummy_app/config/routes.rb
247
+ - test/dummy_app/config/secrets.yml
248
+ - test/dummy_app/config.ru
249
+ - test/dummy_app/db/schema.rb
250
+ - test/dummy_app/db/test.sqlite3
251
+ - test/dummy_app/log/test.log
252
+ - test/dummy_app/Rakefile
253
+ - test/helper_methods.rb
254
+ - test/integration/application_test.rb
180
255
  - test/test_helper.rb
181
- - test/workbook_test.rb
256
+ - test/unit/borders_test.rb
257
+ - test/unit/examples_test.rb
258
+ - test/unit/general_test.rb
259
+ - test/unit/merge_styles_test.rb
260
+ - test/unit/serialize_test.rb
261
+ - test/unit/to_stream_test.rb