axlsx_styler 0.1.7 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/.travis.yml +7 -0
- data/Appraisals +7 -0
- data/README.md +5 -1
- data/axlsx_styler.gemspec +2 -1
- data/gemfiles/axlsx_2.gemfile +7 -0
- data/gemfiles/axlsx_3.gemfile +7 -0
- data/lib/axlsx_styler/version.rb +1 -1
- data/test/integration_test.rb +5 -5
- data/test/workbook_test.rb +1 -1
- metadata +29 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 57172ec25d3c09d1fc97016dfa3c2e4671fcf0fa
|
4
|
+
data.tar.gz: 06bcc42c0cac9e19f91e72d4e439feedd71a9ed9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cd15fa7bf1787b17c3f3d1e3fd70b9652ebedc7d347fb7026e05d451ff777bb3e64b1fd2818c726c467746f243c11e2d31f3484c7a73f81987547af2becfc468
|
7
|
+
data.tar.gz: 717fe82874512efb01d0d9832e01706ad63203b6705d1170bd4f4b9e7b75a9bbf4e6acf9bb77df9204bbe771d6395a1c3745aecc7e799f88ca5f49ffada97e0d
|
data/.gitignore
CHANGED
data/.travis.yml
ADDED
data/Appraisals
ADDED
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/axlsx_styler.svg)](https://rubygems.org/gems/axlsx_styler)
|
2
|
+
[![Build Status](https://travis-ci.org/sakovias/axlsx_styler.svg?branch=master)](https://travis-ci.org/sakovias/axlsx_styler)
|
3
|
+
|
1
4
|
# axlsx_styler
|
2
5
|
|
3
6
|
[axlsx](https://github.com/randym/axlsx) gem is an excellent tool to
|
@@ -86,7 +89,8 @@ Producing the same spreadsheet with vanilla `axlsx` turns out [a bit trickier](.
|
|
86
89
|
|
87
90
|
Version | Change
|
88
91
|
--------|-------
|
92
|
+
0.2.0 | Add support for `axlsx` major version `3.0.0`. Update test suite to run against v2 and v3 of `axlsx`
|
89
93
|
0.1.7 | Allow mixing vanilla `axlsx` styles and those from `add_style` and `add_border` (see [this example](./examples/mixing_styles.rb))
|
90
94
|
0.1.5 | Hide `Workbook#apply_styles` method to make it easier to use.
|
91
|
-
0.1.3 | Make border styles
|
95
|
+
0.1.3 | Make border styles customizable.
|
92
96
|
0.1.2 | Allow applying multiple style hashes.
|
data/axlsx_styler.gemspec
CHANGED
@@ -26,11 +26,12 @@ Gem::Specification.new do |spec|
|
|
26
26
|
spec.require_paths = ['lib']
|
27
27
|
spec.required_ruby_version = '>= 1.9.3'
|
28
28
|
|
29
|
-
spec.add_dependency 'axlsx', '
|
29
|
+
spec.add_dependency 'axlsx', ['>= 2.0', '< 4']
|
30
30
|
spec.add_dependency 'activesupport', '>= 3.1'
|
31
31
|
|
32
32
|
spec.add_development_dependency 'bundler', '~> 1.6'
|
33
33
|
spec.add_development_dependency 'rake', '~> 0.9'
|
34
34
|
spec.add_development_dependency 'minitest', '~> 5.0'
|
35
35
|
spec.add_development_dependency 'awesome_print', '~> 1.6'
|
36
|
+
spec.add_development_dependency 'appraisal'
|
36
37
|
end
|
data/lib/axlsx_styler/version.rb
CHANGED
data/test/integration_test.rb
CHANGED
@@ -22,7 +22,7 @@ class IntegrationTest < MiniTest::Test
|
|
22
22
|
# New functionality as of 0.1.5 (serialize)
|
23
23
|
def test_works_without_apply_styles_serialize
|
24
24
|
filename = 'without_apply_styles_serialize'
|
25
|
-
|
25
|
+
assert_nil @workbook.styles_applied
|
26
26
|
@workbook.add_worksheet do |sheet|
|
27
27
|
sheet.add_row ['A1', 'B1']
|
28
28
|
sheet.add_style 'A1:B1', b: true
|
@@ -34,7 +34,7 @@ class IntegrationTest < MiniTest::Test
|
|
34
34
|
# New functionality as of 0.1.5 (to_stream)
|
35
35
|
def test_works_without_apply_styles_to_stream
|
36
36
|
filename = 'without_apply_styles_to_stream'
|
37
|
-
|
37
|
+
assert_nil @workbook.styles_applied
|
38
38
|
@workbook.add_worksheet do |sheet|
|
39
39
|
sheet.add_row ['A1', 'B1']
|
40
40
|
sheet.add_style 'A1:B1', b: true
|
@@ -46,7 +46,7 @@ class IntegrationTest < MiniTest::Test
|
|
46
46
|
# Backwards compatibility with pre 0.1.5 (serialize)
|
47
47
|
def test_works_with_apply_styles_serialize
|
48
48
|
filename = 'with_apply_styles_serialize'
|
49
|
-
|
49
|
+
assert_nil @workbook.styles_applied
|
50
50
|
@workbook.add_worksheet do |sheet|
|
51
51
|
sheet.add_row ['A1', 'B1']
|
52
52
|
sheet.add_style 'A1:B1', b: true
|
@@ -59,7 +59,7 @@ class IntegrationTest < MiniTest::Test
|
|
59
59
|
# Backwards compatibility with pre 0.1.5 (to_stream)
|
60
60
|
def test_works_with_apply_styles_to_stream
|
61
61
|
filename = 'with_apply_styles_to_stream'
|
62
|
-
|
62
|
+
assert_nil @workbook.styles_applied
|
63
63
|
@workbook.add_worksheet do |sheet|
|
64
64
|
sheet.add_row ['A1', 'B1']
|
65
65
|
sheet.add_style 'A1:B1', b: true
|
@@ -271,7 +271,7 @@ class IntegrationTest < MiniTest::Test
|
|
271
271
|
assert_equal 3, @workbook.styles.style_index.count
|
272
272
|
serialize(filename)
|
273
273
|
end
|
274
|
-
|
274
|
+
|
275
275
|
def test_merge_styles_3
|
276
276
|
filename = 'merge_styles_3'
|
277
277
|
bold = @workbook.styles.add_style b: true
|
data/test/workbook_test.rb
CHANGED
metadata
CHANGED
@@ -1,29 +1,35 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: axlsx_styler
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Sakovich
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-03-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: axlsx
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
|
-
- - "
|
17
|
+
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
19
|
version: '2.0'
|
20
|
+
- - "<"
|
21
|
+
- !ruby/object:Gem::Version
|
22
|
+
version: '4'
|
20
23
|
type: :runtime
|
21
24
|
prerelease: false
|
22
25
|
version_requirements: !ruby/object:Gem::Requirement
|
23
26
|
requirements:
|
24
|
-
- - "
|
27
|
+
- - ">="
|
25
28
|
- !ruby/object:Gem::Version
|
26
29
|
version: '2.0'
|
30
|
+
- - "<"
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '4'
|
27
33
|
- !ruby/object:Gem::Dependency
|
28
34
|
name: activesupport
|
29
35
|
requirement: !ruby/object:Gem::Requirement
|
@@ -94,6 +100,20 @@ dependencies:
|
|
94
100
|
- - "~>"
|
95
101
|
- !ruby/object:Gem::Version
|
96
102
|
version: '1.6'
|
103
|
+
- !ruby/object:Gem::Dependency
|
104
|
+
name: appraisal
|
105
|
+
requirement: !ruby/object:Gem::Requirement
|
106
|
+
requirements:
|
107
|
+
- - ">="
|
108
|
+
- !ruby/object:Gem::Version
|
109
|
+
version: '0'
|
110
|
+
type: :development
|
111
|
+
prerelease: false
|
112
|
+
version_requirements: !ruby/object:Gem::Requirement
|
113
|
+
requirements:
|
114
|
+
- - ">="
|
115
|
+
- !ruby/object:Gem::Version
|
116
|
+
version: '0'
|
97
117
|
description: "\n Axlsx gem is an excellent tool to build Excel worksheets. The
|
98
118
|
sheets are\n created row-by-row and styles are immediately added to each cell
|
99
119
|
when a\n row is created. This gem allows to follow an alternative route: fill
|
@@ -107,6 +127,8 @@ extensions: []
|
|
107
127
|
extra_rdoc_files: []
|
108
128
|
files:
|
109
129
|
- ".gitignore"
|
130
|
+
- ".travis.yml"
|
131
|
+
- Appraisals
|
110
132
|
- Gemfile
|
111
133
|
- LICENSE.txt
|
112
134
|
- README.md
|
@@ -115,6 +137,8 @@ files:
|
|
115
137
|
- examples/colors_and_borders.rb
|
116
138
|
- examples/mixing_styles.rb
|
117
139
|
- examples/vanilla_axlsx.md
|
140
|
+
- gemfiles/axlsx_2.gemfile
|
141
|
+
- gemfiles/axlsx_3.gemfile
|
118
142
|
- lib/axlsx_styler.rb
|
119
143
|
- lib/axlsx_styler/axlsx_cell.rb
|
120
144
|
- lib/axlsx_styler/axlsx_workbook.rb
|
@@ -146,7 +170,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
146
170
|
version: '0'
|
147
171
|
requirements: []
|
148
172
|
rubyforge_project:
|
149
|
-
rubygems_version: 2.
|
173
|
+
rubygems_version: 2.6.8
|
150
174
|
signing_key:
|
151
175
|
specification_version: 4
|
152
176
|
summary: This gem allows to separate data from styles when using Axlsx gem.
|