to_spreadsheet 1.0.6 → 1.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: b8caf02160bc192777511420e81ac8df803f8f6d
4
- data.tar.gz: 393535d43b6e6563ed1e7831532bd607ad485fda
2
+ SHA256:
3
+ metadata.gz: 7bc03e5c897fae15afdda71d0d98a405032b495459c82f0944b3e2266875679b
4
+ data.tar.gz: f330f6898c87f33cc6651533bfcfb2daaabfa9f5f6691f8df8f3c7cc7cbb71e9
5
5
  SHA512:
6
- metadata.gz: c0c0ef72af612b307b511e3235c8f91656d56a976855672a8883072b9a0932276192ca68ee4a038fd8640c18414cbb0301bf53f16032fb18bfa9fd16c19bdc11
7
- data.tar.gz: 430257b549ee502de4860ea92404e8b97e7182af9fa955a9e19a693311422d10003e432463aa8ad501eb55c197a7877342842a247ff4b33cd6d2da49f5a111a5
6
+ metadata.gz: 4668c0f720945b9e123ed8b153c997f32ab831c726a04d1648ba47e85df77d2f3bc4024459a3507c6c3b66e65930aabd540ab4befd662cb5ddeade3de52207d4
7
+ data.tar.gz: 4e1ead53e8ad461797d8c8126a3e5afb51e7db55186f4ccba23ea574e13ccc31cb2e681f8b341f84830d7fa0ee636f9ce74767063d73f37efebaca7bc12ba40d
data/README.md CHANGED
@@ -17,7 +17,7 @@ In the controller:
17
17
  ```ruby
18
18
  # my_thingies_controller.rb
19
19
  class MyThingiesController < ApplicationController
20
- respond_to :xls, :html
20
+ respond_to :xlsx, :html
21
21
  def index
22
22
  @my_items = MyItem.all
23
23
  respond_to do |format|
@@ -49,7 +49,7 @@ In the view partial:
49
49
 
50
50
  In the XLSX view:
51
51
  ```haml
52
- # index.xls.haml
52
+ # index.xlsx.haml
53
53
  = render 'my_items', my_items: @my_items
54
54
  ```
55
55
 
@@ -17,7 +17,7 @@ end
17
17
  ActionController::Renderers.add ToSpreadsheet.renderer do |template, options|
18
18
  filename = options[:filename] || options[:template] || 'data'
19
19
  data = ToSpreadsheet::Context.with_context ToSpreadsheet::Context.global.merge(ToSpreadsheet::Context.new) do |context|
20
- html = render_to_string(template, options.merge(template: template.to_s, formats: ['xlsx', 'html']))
20
+ html = render_to_string(template, options.merge(template: template.to_s, formats: [:xlsx, :html]))
21
21
  ToSpreadsheet::Renderer.to_data(html, context)
22
22
  end
23
23
  send_data data, type: ToSpreadsheet.renderer, disposition: %(attachment; filename="#{filename}.xlsx")
@@ -18,7 +18,7 @@ module ToSpreadsheet
18
18
  sheet.col_style selector_query, inline_styles if inline_styles.present?
19
19
  apply_col_info sheet.column_info[selector_query]
20
20
  when :range
21
- add_and_apply_style wb, range_match(selector_type, sheet), context
21
+ add_and_apply_style wb, range_match(selector_query, sheet), context
22
22
  end
23
23
  end
24
24
 
@@ -1,3 +1,5 @@
1
+ require 'chronic'
2
+
1
3
  module ToSpreadsheet::Themes
2
4
  module Default
3
5
  ::ToSpreadsheet.theme :default do
@@ -35,4 +37,4 @@ module ToSpreadsheet::Themes
35
37
  }
36
38
  end
37
39
  end
38
- end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module ToSpreadsheet
2
- VERSION = '1.0.6'
2
+ VERSION = '1.0.7'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: to_spreadsheet
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.6
4
+ version: 1.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Gleb Mazovetskiy
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-03 00:00:00.000000000 Z
11
+ date: 2019-08-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -174,8 +174,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
174
174
  - !ruby/object:Gem::Version
175
175
  version: '0'
176
176
  requirements: []
177
- rubyforge_project:
178
- rubygems_version: 2.4.8
177
+ rubygems_version: 3.0.6
179
178
  signing_key:
180
179
  specification_version: 4
181
180
  summary: Render existing views as Excel documents with style!