ruby2xlsx 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: 942b600465ceeeabbccb6ccdd389bac0ed1ca994
4
+ data.tar.gz: ef51a146ad9b8f21978f63b75146cd9587391d90
5
+ SHA512:
6
+ metadata.gz: 917c1b47e0aeba4b86b10d52e24243197f5f2871fe63f0c7bcd1037c4c06aa8af36dc96f92c3050d0d2b5a1dd9cbfad93f7dabcc64dba4a82e2bce8a3ddba922
7
+ data.tar.gz: e30634d694cddcbde5e509f06f1f50d8a511393850c3bafbaccbd4be035f3e09476bcf14f69afe2ad83f68a71915598db0d030e350b8c3d59431a272c0de5fb3
@@ -39,6 +39,8 @@ In controller (app/controllers/articles_controller.rb):
39
39
 
40
40
  def index
41
41
  @articles = Article.order('id DESC')
42
+ @xlsx_filename = "some_file_name"
43
+
42
44
  respond_with(@articles)
43
45
  end
44
46
  end
@@ -1,3 +1,3 @@
1
1
  module Ruby2xlsx
2
- VERSION = "0.0.3".freeze
2
+ VERSION = "0.0.4".freeze
3
3
  end
@@ -6,7 +6,7 @@ module Ruby2xlsx
6
6
 
7
7
  def call(template)
8
8
  %{ controller.send_data ::Ruby2xlsx::Template.new(#{template.source.inspect}).render(self, assigns.merge(local_assigns)),
9
- :filename => [controller.action_name, ".xls"].join,
9
+ :filename => [controller.instance_variable_get(:@xlsx_filename) || controller.action_name, ".xls"].join,
10
10
  :type => "application/vnd.ms-excel",
11
11
  :disposition => "attachment" }
12
12
  end
metadata CHANGED
@@ -1,78 +1,69 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ruby2xlsx
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
5
- prerelease:
4
+ version: 0.0.4
6
5
  platform: ruby
7
6
  authors:
8
7
  - Igor Galeta
9
8
  autorequire:
10
9
  bindir: bin
11
10
  cert_chain: []
12
- date: 2013-04-11 00:00:00.000000000 Z
11
+ date: 2015-02-23 00:00:00.000000000 Z
13
12
  dependencies:
14
13
  - !ruby/object:Gem::Dependency
15
14
  name: writeexcel
16
15
  requirement: !ruby/object:Gem::Requirement
17
- none: false
18
16
  requirements:
19
- - - ~>
17
+ - - "~>"
20
18
  - !ruby/object:Gem::Version
21
19
  version: 0.6.12
22
20
  type: :runtime
23
21
  prerelease: false
24
22
  version_requirements: !ruby/object:Gem::Requirement
25
- none: false
26
23
  requirements:
27
- - - ~>
24
+ - - "~>"
28
25
  - !ruby/object:Gem::Version
29
26
  version: 0.6.12
30
27
  - !ruby/object:Gem::Dependency
31
28
  name: activemodel
32
29
  requirement: !ruby/object:Gem::Requirement
33
- none: false
34
30
  requirements:
35
- - - ! '>='
31
+ - - ">="
36
32
  - !ruby/object:Gem::Version
37
33
  version: '0'
38
34
  type: :runtime
39
35
  prerelease: false
40
36
  version_requirements: !ruby/object:Gem::Requirement
41
- none: false
42
37
  requirements:
43
- - - ! '>='
38
+ - - ">="
44
39
  - !ruby/object:Gem::Version
45
40
  version: '0'
46
41
  - !ruby/object:Gem::Dependency
47
42
  name: sqlite3
48
43
  requirement: !ruby/object:Gem::Requirement
49
- none: false
50
44
  requirements:
51
- - - ! '>='
45
+ - - ">="
52
46
  - !ruby/object:Gem::Version
53
47
  version: '0'
54
48
  type: :development
55
49
  prerelease: false
56
50
  version_requirements: !ruby/object:Gem::Requirement
57
- none: false
58
51
  requirements:
59
- - - ! '>='
52
+ - - ">="
60
53
  - !ruby/object:Gem::Version
61
54
  version: '0'
62
55
  - !ruby/object:Gem::Dependency
63
56
  name: capybara
64
57
  requirement: !ruby/object:Gem::Requirement
65
- none: false
66
58
  requirements:
67
- - - ~>
59
+ - - "~>"
68
60
  - !ruby/object:Gem::Version
69
61
  version: 1.1.2
70
62
  type: :development
71
63
  prerelease: false
72
64
  version_requirements: !ruby/object:Gem::Requirement
73
- none: false
74
65
  requirements:
75
- - - ~>
66
+ - - "~>"
76
67
  - !ruby/object:Gem::Version
77
68
  version: 1.1.2
78
69
  description: Another gem for exporting data to Excel
@@ -82,129 +73,128 @@ executables: []
82
73
  extensions: []
83
74
  extra_rdoc_files: []
84
75
  files:
85
- - lib/tasks/ruby2xlsx_tasks.rake
86
76
  - lib/ruby2xlsx/base.rb
87
- - lib/ruby2xlsx/template.rb
88
- - lib/ruby2xlsx/document.rb
89
77
  - lib/ruby2xlsx/default.rb
90
- - lib/ruby2xlsx/version.rb
78
+ - lib/ruby2xlsx/document.rb
91
79
  - lib/ruby2xlsx/engine.rb
80
+ - lib/ruby2xlsx/template.rb
81
+ - lib/ruby2xlsx/version.rb
92
82
  - lib/ruby2xlsx/xrb.rb
93
83
  - lib/ruby2xlsx.rb
84
+ - lib/tasks/ruby2xlsx_tasks.rake
94
85
  - MIT-LICENSE
95
86
  - Rakefile
96
87
  - README.rdoc
97
- - test/support/integration_case.rb
98
- - test/test_helper.rb
99
- - test/dummy/config.ru
100
- - test/dummy/Rakefile
101
- - test/dummy/public/500.html
102
- - test/dummy/public/favicon.ico
103
- - test/dummy/public/404.html
104
- - test/dummy/public/422.html
105
- - test/dummy/app/views/layouts/application.html.erb
106
- - test/dummy/app/views/articles/_form.html.erb
107
- - test/dummy/app/views/articles/index.html.erb
108
- - test/dummy/app/views/articles/another.xlsx.xrb
109
- - test/dummy/app/views/articles/new.html.erb
110
- - test/dummy/app/views/articles/edit.html.erb
111
- - test/dummy/app/views/articles/show.html.erb
112
- - test/dummy/app/models/article.rb
88
+ - test/dummy/app/assets/javascripts/application.js
89
+ - test/dummy/app/assets/javascripts/articles.js
90
+ - test/dummy/app/assets/stylesheets/application.css
113
91
  - test/dummy/app/assets/stylesheets/articles.css
114
92
  - test/dummy/app/assets/stylesheets/scaffold.css
115
- - test/dummy/app/assets/stylesheets/application.css
116
- - test/dummy/app/assets/javascripts/articles.js
117
- - test/dummy/app/assets/javascripts/application.js
93
+ - test/dummy/app/controllers/application_controller.rb
94
+ - test/dummy/app/controllers/articles_controller.rb
118
95
  - test/dummy/app/helpers/application_helper.rb
119
96
  - test/dummy/app/helpers/articles_helper.rb
120
- - test/dummy/app/controllers/articles_controller.rb
121
- - test/dummy/app/controllers/application_controller.rb
122
- - test/dummy/config/database.yml
123
- - test/dummy/config/routes.rb
97
+ - test/dummy/app/models/article.rb
98
+ - test/dummy/app/views/articles/_form.html.erb
99
+ - test/dummy/app/views/articles/another.xlsx.xrb
100
+ - test/dummy/app/views/articles/edit.html.erb
101
+ - test/dummy/app/views/articles/index.html.erb
102
+ - test/dummy/app/views/articles/new.html.erb
103
+ - test/dummy/app/views/articles/show.html.erb
104
+ - test/dummy/app/views/layouts/application.html.erb
124
105
  - test/dummy/config/application.rb
125
- - test/dummy/config/locales/en.yml
126
- - test/dummy/config/environment.rb
127
106
  - test/dummy/config/boot.rb
107
+ - test/dummy/config/database.yml
108
+ - test/dummy/config/environment.rb
109
+ - test/dummy/config/environments/development.rb
128
110
  - test/dummy/config/environments/production.rb
129
111
  - test/dummy/config/environments/test.rb
130
- - test/dummy/config/environments/development.rb
131
- - test/dummy/config/initializers/secret_token.rb
132
- - test/dummy/config/initializers/inflections.rb
133
112
  - test/dummy/config/initializers/backtrace_silencers.rb
134
- - test/dummy/config/initializers/wrap_parameters.rb
135
- - test/dummy/config/initializers/session_store.rb
113
+ - test/dummy/config/initializers/inflections.rb
136
114
  - test/dummy/config/initializers/mime_types.rb
115
+ - test/dummy/config/initializers/secret_token.rb
116
+ - test/dummy/config/initializers/session_store.rb
117
+ - test/dummy/config/initializers/wrap_parameters.rb
118
+ - test/dummy/config/locales/en.yml
119
+ - test/dummy/config/routes.rb
120
+ - test/dummy/config.ru
137
121
  - test/dummy/db/migrate/20120116125427_create_articles.rb
122
+ - test/dummy/public/404.html
123
+ - test/dummy/public/422.html
124
+ - test/dummy/public/500.html
125
+ - test/dummy/public/favicon.ico
126
+ - test/dummy/Rakefile
138
127
  - test/dummy/script/rails
139
- - test/ruby2xlsx_test.rb
140
128
  - test/integration/navigation_test.rb
129
+ - test/ruby2xlsx_test.rb
130
+ - test/support/integration_case.rb
131
+ - test/test_helper.rb
141
132
  homepage: https://github.com/galetahub/ruby2xlsx
142
133
  licenses: []
134
+ metadata: {}
143
135
  post_install_message:
144
136
  rdoc_options: []
145
137
  require_paths:
146
138
  - lib
147
139
  required_ruby_version: !ruby/object:Gem::Requirement
148
- none: false
149
140
  requirements:
150
- - - ! '>='
141
+ - - ">="
151
142
  - !ruby/object:Gem::Version
152
143
  version: '0'
153
144
  required_rubygems_version: !ruby/object:Gem::Requirement
154
- none: false
155
145
  requirements:
156
- - - ! '>='
146
+ - - ">="
157
147
  - !ruby/object:Gem::Version
158
148
  version: '0'
159
149
  requirements: []
160
150
  rubyforge_project:
161
- rubygems_version: 1.8.25
151
+ rubygems_version: 2.1.11
162
152
  signing_key:
163
- specification_version: 3
164
- summary: ! 'Export your data to Excel. Provide two ways for export data: template
165
- or renderer.'
153
+ specification_version: 4
154
+ summary: 'Export your data to Excel. Provide two ways for export data: template or
155
+ renderer.'
166
156
  test_files:
167
- - test/support/integration_case.rb
168
- - test/test_helper.rb
169
- - test/dummy/config.ru
170
- - test/dummy/Rakefile
171
- - test/dummy/public/500.html
172
- - test/dummy/public/favicon.ico
173
- - test/dummy/public/404.html
174
- - test/dummy/public/422.html
175
- - test/dummy/app/views/layouts/application.html.erb
176
- - test/dummy/app/views/articles/_form.html.erb
177
- - test/dummy/app/views/articles/index.html.erb
178
- - test/dummy/app/views/articles/another.xlsx.xrb
179
- - test/dummy/app/views/articles/new.html.erb
180
- - test/dummy/app/views/articles/edit.html.erb
181
- - test/dummy/app/views/articles/show.html.erb
182
- - test/dummy/app/models/article.rb
157
+ - test/dummy/app/assets/javascripts/application.js
158
+ - test/dummy/app/assets/javascripts/articles.js
159
+ - test/dummy/app/assets/stylesheets/application.css
183
160
  - test/dummy/app/assets/stylesheets/articles.css
184
161
  - test/dummy/app/assets/stylesheets/scaffold.css
185
- - test/dummy/app/assets/stylesheets/application.css
186
- - test/dummy/app/assets/javascripts/articles.js
187
- - test/dummy/app/assets/javascripts/application.js
162
+ - test/dummy/app/controllers/application_controller.rb
163
+ - test/dummy/app/controllers/articles_controller.rb
188
164
  - test/dummy/app/helpers/application_helper.rb
189
165
  - test/dummy/app/helpers/articles_helper.rb
190
- - test/dummy/app/controllers/articles_controller.rb
191
- - test/dummy/app/controllers/application_controller.rb
192
- - test/dummy/config/database.yml
193
- - test/dummy/config/routes.rb
166
+ - test/dummy/app/models/article.rb
167
+ - test/dummy/app/views/articles/_form.html.erb
168
+ - test/dummy/app/views/articles/another.xlsx.xrb
169
+ - test/dummy/app/views/articles/edit.html.erb
170
+ - test/dummy/app/views/articles/index.html.erb
171
+ - test/dummy/app/views/articles/new.html.erb
172
+ - test/dummy/app/views/articles/show.html.erb
173
+ - test/dummy/app/views/layouts/application.html.erb
194
174
  - test/dummy/config/application.rb
195
- - test/dummy/config/locales/en.yml
196
- - test/dummy/config/environment.rb
197
175
  - test/dummy/config/boot.rb
176
+ - test/dummy/config/database.yml
177
+ - test/dummy/config/environment.rb
178
+ - test/dummy/config/environments/development.rb
198
179
  - test/dummy/config/environments/production.rb
199
180
  - test/dummy/config/environments/test.rb
200
- - test/dummy/config/environments/development.rb
201
- - test/dummy/config/initializers/secret_token.rb
202
- - test/dummy/config/initializers/inflections.rb
203
181
  - test/dummy/config/initializers/backtrace_silencers.rb
204
- - test/dummy/config/initializers/wrap_parameters.rb
205
- - test/dummy/config/initializers/session_store.rb
182
+ - test/dummy/config/initializers/inflections.rb
206
183
  - test/dummy/config/initializers/mime_types.rb
184
+ - test/dummy/config/initializers/secret_token.rb
185
+ - test/dummy/config/initializers/session_store.rb
186
+ - test/dummy/config/initializers/wrap_parameters.rb
187
+ - test/dummy/config/locales/en.yml
188
+ - test/dummy/config/routes.rb
189
+ - test/dummy/config.ru
207
190
  - test/dummy/db/migrate/20120116125427_create_articles.rb
191
+ - test/dummy/public/404.html
192
+ - test/dummy/public/422.html
193
+ - test/dummy/public/500.html
194
+ - test/dummy/public/favicon.ico
195
+ - test/dummy/Rakefile
208
196
  - test/dummy/script/rails
209
- - test/ruby2xlsx_test.rb
210
197
  - test/integration/navigation_test.rb
198
+ - test/ruby2xlsx_test.rb
199
+ - test/support/integration_case.rb
200
+ - test/test_helper.rb