axlsx_styler 0.1.5 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +23 -0
- data/README.md +50 -26
- data/Rakefile +18 -4
- data/lib/axlsx_styler.rb +4 -23
- data/lib/axlsx_styler/axlsx_cell.rb +32 -30
- data/lib/axlsx_styler/axlsx_package.rb +17 -0
- data/lib/axlsx_styler/axlsx_styles.rb +36 -0
- data/lib/axlsx_styler/axlsx_workbook.rb +26 -43
- data/lib/axlsx_styler/axlsx_worksheet.rb +34 -17
- data/lib/axlsx_styler/version.rb +1 -1
- data/test/dummy_app/Rakefile +7 -0
- data/test/dummy_app/app/assets/config/manifest.js +3 -0
- data/test/dummy_app/app/assets/javascripts/application.js +0 -0
- data/test/dummy_app/app/assets/stylesheets/application.css +3 -0
- data/test/dummy_app/app/controllers/application_controller.rb +3 -0
- data/test/dummy_app/app/controllers/spreadsheets_controller.rb +7 -0
- data/test/dummy_app/app/models/application_record.rb +3 -0
- data/test/dummy_app/app/views/layouts/application.html.erb +14 -0
- data/{examples/colors_and_borders.rb → test/dummy_app/app/views/spreadsheets/test.xlsx.axlsx} +2 -7
- data/test/dummy_app/config.ru +4 -0
- data/test/dummy_app/config/application.rb +56 -0
- data/test/dummy_app/config/boot.rb +10 -0
- data/test/dummy_app/config/database.yml +25 -0
- data/test/dummy_app/config/environment.rb +5 -0
- data/test/dummy_app/config/environments/development.rb +30 -0
- data/test/dummy_app/config/environments/production.rb +60 -0
- data/test/dummy_app/config/environments/test.rb +41 -0
- data/test/dummy_app/config/initializers/backtrace_silencers.rb +7 -0
- data/test/dummy_app/config/initializers/inflections.rb +10 -0
- data/test/dummy_app/config/initializers/mime_types.rb +5 -0
- data/test/dummy_app/config/initializers/secret_token.rb +11 -0
- data/test/dummy_app/config/initializers/session_store.rb +8 -0
- data/test/dummy_app/config/initializers/wrap_parameters.rb +14 -0
- data/test/dummy_app/config/locales/en.yml +5 -0
- data/test/dummy_app/config/routes.rb +3 -0
- data/test/dummy_app/config/secrets.yml +22 -0
- data/test/dummy_app/db/schema.rb +15 -0
- data/test/dummy_app/db/test.sqlite3 +0 -0
- data/test/dummy_app/log/test.log +1004 -0
- data/test/helper_methods.rb +12 -0
- data/test/integration/application_test.rb +18 -0
- data/test/test_helper.rb +31 -4
- data/test/unit/borders_test.rb +127 -0
- data/test/unit/examples_test.rb +20 -0
- data/test/unit/merge_styles_test.rb +56 -0
- data/test/unit/regresssions_test.rb +44 -0
- data/test/unit/serialize_test.rb +34 -0
- data/test/unit/to_stream_test.rb +34 -0
- metadata +152 -47
- data/.gitignore +0 -24
- data/Gemfile +0 -4
- data/axlsx_styler.gemspec +0 -36
- data/examples/vanilla_axlsx.md +0 -70
- data/spreadsheet.png +0 -0
- data/test/cell_test.rb +0 -14
- data/test/integration_test.rb +0 -234
- 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
|
data/test/test_helper.rb
CHANGED
@@ -1,4 +1,31 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
require
|
4
|
-
|
1
|
+
ENV["RAILS_ENV"] = "test"
|
2
|
+
|
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("6.0.0")
|
7
|
+
ActiveRecord::MigrationContext.new(migration_path, ActiveRecord::SchemaMigration).migrate
|
8
|
+
elsif ActiveRecord.gem_version >= ::Gem::Version.new("5.2.0")
|
9
|
+
ActiveRecord::MigrationContext.new(migration_path).migrate
|
10
|
+
else
|
11
|
+
ActiveRecord::Migrator.migrate(migration_path)
|
12
|
+
end
|
13
|
+
|
14
|
+
require "rails/test_help"
|
15
|
+
|
16
|
+
Rails.backtrace_cleaner.remove_silencers!
|
17
|
+
|
18
|
+
class ActiveSupport::TestCase
|
19
|
+
# Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order.
|
20
|
+
fixtures :all
|
21
|
+
end
|
22
|
+
|
23
|
+
require 'minitest/reporters'
|
24
|
+
Minitest::Reporters.use!
|
25
|
+
|
26
|
+
require 'helper_methods'
|
27
|
+
|
28
|
+
### Cleanup old test spreadsheets
|
29
|
+
path = File.expand_path("../../tmp", __FILE__)
|
30
|
+
FileUtils.remove_dir(path, true)
|
31
|
+
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,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,44 @@
|
|
1
|
+
require 'test_helper'
|
2
|
+
|
3
|
+
class RegressionsTest < MiniTest::Test
|
4
|
+
|
5
|
+
def setup
|
6
|
+
@axlsx = Axlsx::Package.new
|
7
|
+
@workbook = @axlsx.workbook
|
8
|
+
end
|
9
|
+
|
10
|
+
def test_dxf_cell
|
11
|
+
@workbook.add_worksheet do |sheet|
|
12
|
+
sheet.add_row (1..2).to_a
|
13
|
+
sheet.add_style "A1:A1", { bg_color: "AA0000" }
|
14
|
+
|
15
|
+
sheet.add_row (1..2).to_a
|
16
|
+
sheet.add_style "B1:B1", { bg_color: "CC0000" }
|
17
|
+
|
18
|
+
sheet.add_row (1..2).to_a
|
19
|
+
sheet.add_style "A3:B3", { bg_color: "00FF00" }
|
20
|
+
|
21
|
+
highlight = @workbook.styles.add_style(bg_color: "0000FF", type: :dxf)
|
22
|
+
|
23
|
+
sheet.add_conditional_formatting(
|
24
|
+
"A2:B2",
|
25
|
+
{
|
26
|
+
type: :cellIs,
|
27
|
+
operator: :greaterThan,
|
28
|
+
formula: "1",
|
29
|
+
dxfId: highlight,
|
30
|
+
priority: 1
|
31
|
+
}
|
32
|
+
)
|
33
|
+
end
|
34
|
+
|
35
|
+
serialize("test_dxf_cell")
|
36
|
+
|
37
|
+
#puts @workbook.styles.dxfs.map{|x| x.to_xml_string}
|
38
|
+
assert_equal @workbook.styles.dxfs.count, 1
|
39
|
+
|
40
|
+
#puts @workbook.styles.cellXfs.map{|x| x.to_xml_string}
|
41
|
+
assert_equal @workbook.styles.cellXfs.count, 6
|
42
|
+
end
|
43
|
+
|
44
|
+
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,29 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axlsx_styler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 1.1.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:
|
12
|
+
date: 2020-08-26 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
|
-
name:
|
15
|
+
name: caxlsx
|
15
16
|
requirement: !ruby/object:Gem::Requirement
|
16
17
|
requirements:
|
17
|
-
- - "
|
18
|
+
- - ">="
|
18
19
|
- !ruby/object:Gem::Version
|
19
|
-
version:
|
20
|
+
version: 2.0.2
|
20
21
|
type: :runtime
|
21
22
|
prerelease: false
|
22
23
|
version_requirements: !ruby/object:Gem::Requirement
|
23
24
|
requirements:
|
24
|
-
- - "
|
25
|
+
- - ">="
|
25
26
|
- !ruby/object:Gem::Version
|
26
|
-
version:
|
27
|
+
version: 2.0.2
|
27
28
|
- !ruby/object:Gem::Dependency
|
28
29
|
name: activesupport
|
29
30
|
requirement: !ruby/object:Gem::Requirement
|
@@ -42,90 +43,160 @@ dependencies:
|
|
42
43
|
name: bundler
|
43
44
|
requirement: !ruby/object:Gem::Requirement
|
44
45
|
requirements:
|
45
|
-
- - "
|
46
|
+
- - ">="
|
46
47
|
- !ruby/object:Gem::Version
|
47
|
-
version: '
|
48
|
+
version: '0'
|
48
49
|
type: :development
|
49
50
|
prerelease: false
|
50
51
|
version_requirements: !ruby/object:Gem::Requirement
|
51
52
|
requirements:
|
52
|
-
- - "
|
53
|
+
- - ">="
|
53
54
|
- !ruby/object:Gem::Version
|
54
|
-
version: '
|
55
|
+
version: '0'
|
55
56
|
- !ruby/object:Gem::Dependency
|
56
57
|
name: rake
|
57
58
|
requirement: !ruby/object:Gem::Requirement
|
58
59
|
requirements:
|
59
|
-
- - "
|
60
|
+
- - ">="
|
60
61
|
- !ruby/object:Gem::Version
|
61
|
-
version: '0
|
62
|
+
version: '0'
|
62
63
|
type: :development
|
63
64
|
prerelease: false
|
64
65
|
version_requirements: !ruby/object:Gem::Requirement
|
65
66
|
requirements:
|
66
|
-
- - "
|
67
|
+
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
|
-
version: '0
|
69
|
+
version: '0'
|
69
70
|
- !ruby/object:Gem::Dependency
|
70
71
|
name: minitest
|
71
72
|
requirement: !ruby/object:Gem::Requirement
|
72
73
|
requirements:
|
73
|
-
- - "
|
74
|
+
- - ">="
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
77
|
+
type: :development
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: !ruby/object:Gem::Requirement
|
80
|
+
requirements:
|
81
|
+
- - ">="
|
82
|
+
- !ruby/object:Gem::Version
|
83
|
+
version: '0'
|
84
|
+
- !ruby/object:Gem::Dependency
|
85
|
+
name: minitest-reporters
|
86
|
+
requirement: !ruby/object:Gem::Requirement
|
87
|
+
requirements:
|
88
|
+
- - ">="
|
74
89
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
90
|
+
version: '0'
|
76
91
|
type: :development
|
77
92
|
prerelease: false
|
78
93
|
version_requirements: !ruby/object:Gem::Requirement
|
79
94
|
requirements:
|
80
|
-
- - "
|
95
|
+
- - ">="
|
81
96
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
97
|
+
version: '0'
|
83
98
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
99
|
+
name: appraisal
|
85
100
|
requirement: !ruby/object:Gem::Requirement
|
86
101
|
requirements:
|
87
|
-
- - "
|
102
|
+
- - ">="
|
88
103
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
104
|
+
version: '0'
|
90
105
|
type: :development
|
91
106
|
prerelease: false
|
92
107
|
version_requirements: !ruby/object:Gem::Requirement
|
93
108
|
requirements:
|
94
|
-
- - "
|
109
|
+
- - ">="
|
110
|
+
- !ruby/object:Gem::Version
|
111
|
+
version: '0'
|
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
|
+
- - ">="
|
95
138
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
97
|
-
description:
|
98
|
-
|
99
|
-
when a\n row is created. This gem allows to follow an alternative route: fill
|
100
|
-
out\n a spreadsheet with data and apply styles later. Styles can be added\n to
|
101
|
-
individual cells as well as to ranges of cells. As a bonus, this gem\n also simplifies
|
102
|
-
drawing borders around groups of cells.\n "
|
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.
|
103
142
|
email:
|
143
|
+
- weston@westonganger.com
|
104
144
|
- sakovias@gmail.com
|
105
145
|
executables: []
|
106
146
|
extensions: []
|
107
147
|
extra_rdoc_files: []
|
108
148
|
files:
|
109
|
-
-
|
110
|
-
- Gemfile
|
149
|
+
- CHANGELOG.md
|
111
150
|
- LICENSE.txt
|
112
151
|
- README.md
|
113
152
|
- Rakefile
|
114
|
-
- axlsx_styler.gemspec
|
115
|
-
- examples/colors_and_borders.rb
|
116
|
-
- examples/vanilla_axlsx.md
|
117
153
|
- lib/axlsx_styler.rb
|
118
154
|
- lib/axlsx_styler/axlsx_cell.rb
|
155
|
+
- lib/axlsx_styler/axlsx_package.rb
|
156
|
+
- lib/axlsx_styler/axlsx_styles.rb
|
119
157
|
- lib/axlsx_styler/axlsx_workbook.rb
|
120
158
|
- lib/axlsx_styler/axlsx_worksheet.rb
|
121
159
|
- lib/axlsx_styler/border_creator.rb
|
122
160
|
- lib/axlsx_styler/version.rb
|
123
|
-
-
|
124
|
-
- test/
|
125
|
-
- test/
|
161
|
+
- test/dummy_app/Rakefile
|
162
|
+
- test/dummy_app/app/assets/config/manifest.js
|
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
|
126
192
|
- test/test_helper.rb
|
127
|
-
- test/
|
128
|
-
|
193
|
+
- test/unit/borders_test.rb
|
194
|
+
- test/unit/examples_test.rb
|
195
|
+
- test/unit/merge_styles_test.rb
|
196
|
+
- test/unit/regresssions_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
|
129
200
|
licenses:
|
130
201
|
- MIT
|
131
202
|
metadata: {}
|
@@ -137,20 +208,54 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
137
208
|
requirements:
|
138
209
|
- - ">="
|
139
210
|
- !ruby/object:Gem::Version
|
140
|
-
version:
|
211
|
+
version: 2.3.0
|
141
212
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
142
213
|
requirements:
|
143
214
|
- - ">="
|
144
215
|
- !ruby/object:Gem::Version
|
145
216
|
version: '0'
|
146
217
|
requirements: []
|
147
|
-
|
148
|
-
rubygems_version: 2.2.2
|
218
|
+
rubygems_version: 3.1.2
|
149
219
|
signing_key:
|
150
220
|
specification_version: 4
|
151
|
-
summary:
|
221
|
+
summary: Build clean and maintainable styles for your axlsx spreadsheets. Build your
|
222
|
+
spreadsheeet with data and then apply styles later.
|
152
223
|
test_files:
|
153
|
-
- test/
|
154
|
-
- test/integration_test.rb
|
224
|
+
- test/integration/application_test.rb
|
155
225
|
- test/test_helper.rb
|
156
|
-
- test/
|
226
|
+
- test/unit/examples_test.rb
|
227
|
+
- test/unit/borders_test.rb
|
228
|
+
- test/unit/merge_styles_test.rb
|
229
|
+
- test/unit/regresssions_test.rb
|
230
|
+
- test/unit/serialize_test.rb
|
231
|
+
- test/unit/to_stream_test.rb
|
232
|
+
- test/dummy_app/app/models/application_record.rb
|
233
|
+
- test/dummy_app/app/views/spreadsheets/test.xlsx.axlsx
|
234
|
+
- test/dummy_app/app/views/layouts/application.html.erb
|
235
|
+
- test/dummy_app/app/assets/stylesheets/application.css
|
236
|
+
- test/dummy_app/app/assets/config/manifest.js
|
237
|
+
- test/dummy_app/app/assets/javascripts/application.js
|
238
|
+
- test/dummy_app/app/controllers/spreadsheets_controller.rb
|
239
|
+
- test/dummy_app/app/controllers/application_controller.rb
|
240
|
+
- test/dummy_app/config.ru
|
241
|
+
- test/dummy_app/log/test.log
|
242
|
+
- test/dummy_app/config/database.yml
|
243
|
+
- test/dummy_app/config/environments/production.rb
|
244
|
+
- test/dummy_app/config/environments/test.rb
|
245
|
+
- test/dummy_app/config/environments/development.rb
|
246
|
+
- test/dummy_app/config/routes.rb
|
247
|
+
- test/dummy_app/config/environment.rb
|
248
|
+
- test/dummy_app/config/locales/en.yml
|
249
|
+
- test/dummy_app/config/boot.rb
|
250
|
+
- test/dummy_app/config/initializers/secret_token.rb
|
251
|
+
- test/dummy_app/config/initializers/inflections.rb
|
252
|
+
- test/dummy_app/config/initializers/mime_types.rb
|
253
|
+
- test/dummy_app/config/initializers/session_store.rb
|
254
|
+
- test/dummy_app/config/initializers/wrap_parameters.rb
|
255
|
+
- test/dummy_app/config/initializers/backtrace_silencers.rb
|
256
|
+
- test/dummy_app/config/secrets.yml
|
257
|
+
- test/dummy_app/config/application.rb
|
258
|
+
- test/dummy_app/Rakefile
|
259
|
+
- test/dummy_app/db/schema.rb
|
260
|
+
- test/dummy_app/db/test.sqlite3
|
261
|
+
- test/helper_methods.rb
|