csv_pirate 3.1.0 → 3.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.
- data/CHANGELOG +10 -3
- data/README.rdoc +4 -18
- data/VERSION.yml +1 -1
- data/csv_pirate.gemspec +1 -1
- data/lib/ninth_bit/pirate_ship.rb +7 -6
- metadata +1 -1
data/CHANGELOG
CHANGED
@@ -1,10 +1,17 @@
|
|
1
|
-
Version
|
1
|
+
Version 3.1.1 2009-10-01
|
2
|
+
- Readme Cleanup
|
3
|
+
- Removing broken say_your_last_words method
|
4
|
+
|
5
|
+
Version 3.1.0 2009-10-01
|
2
6
|
- Fixed bug with handling of Rails.root & RAILS_ROOT
|
3
7
|
|
4
|
-
Version
|
8
|
+
Version 3.0.1 2009-10-01
|
9
|
+
- Updated readme with new :chart api
|
10
|
+
|
11
|
+
Version 3.0.0 2009-10-01
|
5
12
|
- Added northwest_passage to create all the directories in :chart
|
6
13
|
|
7
|
-
Version 2.4.1 2009-10-01
|
14
|
+
Version 2.4.1-4 2009-10-01
|
8
15
|
- Fixed critical typo
|
9
16
|
|
10
17
|
Version 2.4.0 2009-10-01
|
data/README.rdoc
CHANGED
@@ -203,26 +203,12 @@ OR
|
|
203
203
|
You have the same Make class as above, and you have a MakeController:
|
204
204
|
|
205
205
|
class MakeController < ApplicationController
|
206
|
-
|
207
|
-
def download_csv
|
208
|
-
send_data Make.say_your_last_words # "utf-8" is default, and uses options from has_csv_pirate_ship
|
209
|
-
end
|
210
|
-
|
211
|
-
# OR you can customize it just like walk_the_plank
|
212
|
-
|
213
206
|
def download_csv
|
214
|
-
|
207
|
+
csv_pirate = Make.blindfold
|
208
|
+
send_data csv_pirate.maroon,
|
209
|
+
:type => 'text/csv; charset=iso-8859-1; header=present',
|
210
|
+
:disposition => "attachment; filename=#{csv_pirate.nocturnal}"
|
215
211
|
end
|
216
|
-
|
217
|
-
end
|
218
|
-
|
219
|
-
Too easy? I wrote this for two reasons... pirate jokes and to make my life easier. If you need more flexibility then:
|
220
|
-
|
221
|
-
def download_csv
|
222
|
-
csv_pirate = Make.blindfold
|
223
|
-
send_data csv_pirate.maroon,
|
224
|
-
:type => 'text/csv; charset=iso-8859-1; header=present',
|
225
|
-
:disposition => "attachment; filename=#{csv_pirate.nocturnal}"
|
226
212
|
end
|
227
213
|
|
228
214
|
|
data/VERSION.yml
CHANGED
data/csv_pirate.gemspec
CHANGED
@@ -48,12 +48,13 @@ module NinthBit
|
|
48
48
|
|
49
49
|
# intended for use with send_data for downloading the text of the csv:
|
50
50
|
# send_data Make.say_your_last_words
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
51
|
+
# TODO: Fix say_yourr_last_words so it works! Use send_data args
|
52
|
+
#def say_your_last_words(charset = 'utf-8', args = {})
|
53
|
+
# csv_pirate = self.blindfold(args)
|
54
|
+
# return [ csv_pirate.maroon,
|
55
|
+
# {:type => "text/csv; charset=#{charset}; header=present"},
|
56
|
+
# {:disposition => "attachment; filename=#{csv_pirate.nocturnal}"} ]
|
57
|
+
#end
|
57
58
|
|
58
59
|
#returns the text of the csv export (not the file - this is important if you are appending)
|
59
60
|
# warning if using from console: if you are exporting a large csv this will all print in your console.
|