send_csv 0.3.1 → 0.4

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.
Files changed (2) hide show
  1. data/lib/send_csv.rb +13 -10
  2. metadata +4 -5
data/lib/send_csv.rb CHANGED
@@ -1,14 +1,7 @@
1
1
  module SendCsv
2
- VERSION = '0.3.1'
3
- end
4
-
5
- # Based on http://stackoverflow.com/questions/3468858/rails-3-0-engine-execute-code-in-actioncontroller/3484141#3484141
6
-
7
- require 'action_controller' # Make sure ActionController::Base is defined
8
-
9
- ActionController::Base.class_eval do
10
- private
11
-
2
+ VERSION = '0.4'
3
+
4
+ module_function
12
5
  def generate_csv(lines, options = {})
13
6
  require 'csv'
14
7
 
@@ -35,3 +28,13 @@ ActionController::Base.class_eval do
35
28
  send_data csv, options
36
29
  end
37
30
  end
31
+
32
+ # Based on http://stackoverflow.com/questions/3468858/rails-3-0-engine-execute-code-in-actioncontroller/3484141#3484141
33
+
34
+ require 'action_controller' # Make sure ActionController::Base is defined
35
+
36
+ ActionController::Base.class_eval do
37
+ private
38
+
39
+ include SendCsv
40
+ end
metadata CHANGED
@@ -1,13 +1,12 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: send_csv
3
3
  version: !ruby/object:Gem::Version
4
- hash: 17
4
+ hash: 3
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 3
9
- - 1
10
- version: 0.3.1
8
+ - 4
9
+ version: "0.4"
11
10
  platform: ruby
12
11
  authors:
13
12
  - Ouvrages
@@ -15,7 +14,7 @@ autorequire:
15
14
  bindir: bin
16
15
  cert_chain: []
17
16
 
18
- date: 2011-06-24 00:00:00 +02:00
17
+ date: 2011-08-18 00:00:00 +02:00
19
18
  default_executable:
20
19
  dependencies:
21
20
  - !ruby/object:Gem::Dependency