axlsx_styler 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: c39cb63343b8e6febf1d49849f79bedec5a7411f
4
- data.tar.gz: 25548e35f4641c7ac07dba8c006d90e530ae0eb9
3
+ metadata.gz: 06e2917f628413da559ab046714cfdd1af2a6460
4
+ data.tar.gz: 15051010630397515b81fbd084cf449537b3dfa9
5
5
  SHA512:
6
- metadata.gz: 32d496b6251695a0fe9e05ce72fa5a930039f5df6bcb307bf9d0116c87e06f82b73195e6a631dd7cbe89e6cf1230e2aa3a125470d833704872b80f323d4d4ce4
7
- data.tar.gz: 37898e7b43cbaab2fccaf06c2586c2205b7382bff89144eebfc0599837a3f4cb55251b1968e3532472b127877837de48a7444545765766433527beb72ab1b965
6
+ metadata.gz: b5941ab8c1a7b83ed6a537dcf553907df587a07e06488f1701a42736a790c5e256e1182dfc51305db3d03e53af7300c3967db3525ad8e0f5ede6d1a1c6e2bdb3
7
+ data.tar.gz: 5b6b5e6531a9a0298744ae25bde5009167211319ff79762f2df44c7cb4caad9b55960351bb184997f5356554a1bf7a48a768b479d76fe54ad0888ef4c413b36a
data/README.md CHANGED
@@ -1,17 +1,19 @@
1
- # AxlsxStyler
1
+ # axlsx_styler
2
2
 
3
- [Axlsx](https://github.com/randym/axlsx) gem is an excellent tool to
3
+ [axlsx](https://github.com/randym/axlsx) gem is an excellent tool to
4
4
  build Excel spreadsheets. The sheets are
5
5
  created row-by-row and styles are immediately added to each cell when a
6
- row is created. This gem allows to follow an alternative route: fill out
7
- a spreadsheet with data and apply styles later. Styles can be added
8
- to individual cells as well as to ranges of cells. As a bonus, this gem
9
- also simplifies drawing borders around groups of cells.
6
+ row is created.
7
+
8
+ `axlsx_styler` allows to separate styles from content: you can fill out
9
+ a spreadsheet with data and apply styles later. Paired with
10
+ [axlsx_rails](https://github.com/straydogstudio/axlsx_rails) this gem
11
+ allows to build clean and maintainable Excel views in a Rails app. It can also
12
+ be used outside of any specific ruby framework as shown in example below.
10
13
 
11
14
  ## Usage
12
15
 
13
- This gem extend `Array` class in a way that allows you to apply
14
- styles to ranges of cells, e.g.
16
+ This gem provides a DSL that allows you to apply styles to ranges of cells, e.g.
15
17
 
16
18
  ```ruby
17
19
  sheet.add_style 'A1:D10', b: true
@@ -38,13 +40,14 @@ workbook.apply_styles
38
40
  ```
39
41
 
40
42
  Here's an example that compares styling a simple table with and without
41
- AxlsxStyler. Suppose we wand to create the following spreadsheet:
43
+ `axlsx_styler`. Suppose we wand to create the following spreadsheet:
42
44
 
43
45
  ![alt text](./spreadsheet.png "Sample Spreadsheet")
44
46
 
45
- ### With `AxlsxStyler`
47
+ ### `axlsx` paired with `axlsx_styler`
46
48
 
47
- Just follow the step outlined above:
49
+ You can apply styles after all data is entered, similar to how you'd create
50
+ an Excel document by hand:
48
51
 
49
52
  ```ruby
50
53
  require 'axlsx_styler'
@@ -72,10 +75,10 @@ workbook.apply_styles
72
75
  axlsx.serialize 'grocery.xlsx'
73
76
  ```
74
77
 
75
- ### With plain `Axlsx` gem
78
+ ### `axlsx` gem without `axlsx_styler`
76
79
 
77
- This example can be DRYied up, but it gives you a rough idea of what you
78
- need to go through. You need to compile all the styles before you apply them.
80
+ Whith plain `axlsx` you need to know which styles you're going to use beforehand.
81
+ The code for our example is a bit more envolved:
79
82
 
80
83
  ```ruby
81
84
  require 'axlsx'
@@ -27,7 +27,7 @@ Gem::Specification.new do |spec|
27
27
  spec.required_ruby_version = '>= 1.9.3'
28
28
 
29
29
  spec.add_dependency 'axlsx', '~> 2.0'
30
- spec.add_dependency 'activesupport', '~> 3.1'
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'
@@ -1,3 +1,3 @@
1
1
  module AxlsxStyler
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: axlsx_styler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Anton Sakovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-06 00:00:00.000000000 Z
11
+ date: 2015-03-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: axlsx
@@ -28,14 +28,14 @@ dependencies:
28
28
  name: activesupport
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - "~>"
31
+ - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '3.1'
34
34
  type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - "~>"
38
+ - - ">="
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.1'
41
41
  - !ruby/object:Gem::Dependency