spreadsheet_architect 1.4.5 → 1.4.6
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 +4 -4
- data/README.md +1 -1
- data/lib/spreadsheet_architect.rb +9 -9
- data/lib/spreadsheet_architect/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 56ace91b8151e5b4403653910af4e26c0d12c3ab
|
4
|
+
data.tar.gz: d9e8963b098ed74329d5e8febfd8c8fb2dcd7fe8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4ad9d7496c5651b864147fa80d790e7055fb1e1113b17ecfdb1e24b97ea00b59bec917ef4d9d4e19e7c03fe208f205a3cb7b53e69d389ce02c21159b156456fe
|
7
|
+
data.tar.gz: 53a1b4b6ee5c9db67d195236b3cfff25240fc9a10cf9ef6466b723883d7b47b00d22bb86a8f6b38eef67e3a0d8a5ec2d0022e092261a650a0b9a10765fafe3ac
|
data/README.md
CHANGED
@@ -262,7 +262,7 @@ Product.to_xlsx(headers: headers, data: data, number_format_code: "$#,##0.00")
|
|
262
262
|
Would love for any help with new features for this projects. Some desired features are:
|
263
263
|
|
264
264
|
- More ODS style options
|
265
|
-
- Apply format codes to only certain columns (xlsx)
|
265
|
+
- Apply format codes to only certain columns (xlsx) - this is supposed to be possible with axlsx_styler
|
266
266
|
- Add Columns styles (xlsx & ods)
|
267
267
|
- Create multiple sheets (xlsx & ods)
|
268
268
|
|
@@ -75,7 +75,7 @@ module SpreadsheetArchitect
|
|
75
75
|
has_custom_columns = options[:spreadsheet_columns] || klass.instance_methods.include?(:spreadsheet_columns)
|
76
76
|
|
77
77
|
if !options[:instances] && defined?(ActiveRecord) && klass.ancestors.include?(ActiveRecord::Base)
|
78
|
-
options[:instances] = klass.where(
|
78
|
+
options[:instances] = klass.where(nil).to_a # triggers the relation call, not sure how this works but it does
|
79
79
|
end
|
80
80
|
|
81
81
|
if !options[:instances] || options[:instances].empty?
|
@@ -212,32 +212,32 @@ module SpreadsheetArchitect
|
|
212
212
|
spreadsheet.office_style :header_style, family: :cell do
|
213
213
|
if options[:header_style]
|
214
214
|
unless opts[:header_style] && opts[:header_style][:bold] == false #uses opts, temporary
|
215
|
-
property :text, 'font-weight'
|
215
|
+
property :text, 'font-weight' => :bold
|
216
216
|
end
|
217
217
|
if options[:header_style][:align]
|
218
|
-
property :text,
|
218
|
+
property :text, align: options[:header_style][:align]
|
219
219
|
end
|
220
220
|
if options[:header_style][:size]
|
221
|
-
property :text, 'font-size'
|
221
|
+
property :text, 'font-size' => options[:header_style][:size]
|
222
222
|
end
|
223
223
|
if options[:header_style][:color] && opts[:header_style] && opts[:header_style][:color] #temporary
|
224
|
-
property :text,
|
224
|
+
property :text, color: "##{options[:header_style][:color]}"
|
225
225
|
end
|
226
226
|
end
|
227
227
|
end
|
228
228
|
spreadsheet.office_style :row_style, family: :cell do
|
229
229
|
if options[:row_style]
|
230
230
|
if options[:row_style][:bold]
|
231
|
-
property :text, 'font-weight'
|
231
|
+
property :text, 'font-weight' => :bold
|
232
232
|
end
|
233
233
|
if options[:row_style][:align]
|
234
|
-
property :text,
|
234
|
+
property :text, align: options[:row_style][:align]
|
235
235
|
end
|
236
236
|
if options[:row_style][:size]
|
237
|
-
property :text, 'font-size'
|
237
|
+
property :text, 'font-size' => options[:row_style][:size]
|
238
238
|
end
|
239
239
|
if opts[:row_style] && opts[:row_style][:color] #uses opts, temporary
|
240
|
-
property :text,
|
240
|
+
property :text, color: "##{options[:row_style][:color]}"
|
241
241
|
end
|
242
242
|
end
|
243
243
|
end
|
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: 1.4.
|
4
|
+
version: 1.4.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Weston Ganger
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-05-
|
11
|
+
date: 2016-05-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: axlsx
|