csv_pirate 5.0.1 → 5.0.2
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.txt +5 -1
- data/Gemfile +2 -2
- data/VERSION.yml +1 -1
- data/csv_pirate.gemspec +2 -2
- data/lib/csv_pirate/version.rb +1 -1
- data/lib/csv_pirate.rb +42 -2
- metadata +3 -3
data/CHANGELOG.txt
CHANGED
@@ -1,5 +1,9 @@
|
|
1
|
+
Version 5.0.2 2011-06-16
|
2
|
+
- Fixed Compatability with Rails
|
3
|
+
- Added support, with deprecation warning, for pre-5.0.0 API.
|
4
|
+
|
1
5
|
Version 5.0.0 2011-06-14
|
2
|
-
- Added .txt extension to CHANGELOG and
|
6
|
+
- Added .txt extension to CHANGELOG and LICENSE
|
3
7
|
- Improved dependency declarations in Gemfile (removed from Rakefile/gemspec)
|
4
8
|
|
5
9
|
Version 5.0.0 2011-06-13
|
data/Gemfile
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
source :rubygems
|
2
2
|
|
3
3
|
#FasterCSV became the built-in CSV library in Ruby 1.9, so is only required if using Ruby 1.8
|
4
|
-
if RUBY_VERSION =~ /^1\.8\.\d
|
5
|
-
gem 'fastercsv', '
|
4
|
+
if RUBY_VERSION =~ /^1\.8\.\d*/
|
5
|
+
gem 'fastercsv', '>= 1.4.0'
|
6
6
|
end
|
7
7
|
|
8
8
|
group :development do
|
data/VERSION.yml
CHANGED
data/csv_pirate.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{csv_pirate}
|
8
|
-
s.version = "5.0.
|
8
|
+
s.version = "5.0.2"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Peter Boling"]
|
12
|
-
s.date = %q{2011-06-
|
12
|
+
s.date = %q{2011-06-16}
|
13
13
|
s.description = %q{CsvPirate is the easy way to create a CSV of essentially anything in Ruby, in full pirate regalia.
|
14
14
|
It works better if you are wearing a tricorne!}
|
15
15
|
s.email = %q{peter.boling@gmail.com}
|
data/lib/csv_pirate/version.rb
CHANGED
data/lib/csv_pirate.rb
CHANGED
@@ -15,10 +15,50 @@ else
|
|
15
15
|
require 'faster_csv'
|
16
16
|
end
|
17
17
|
|
18
|
+
module CsvPirate
|
19
|
+
if defined?(Rails::Railtie)
|
20
|
+
# namespace our plugin and inherit from Rails::Railtie
|
21
|
+
# to get our plugin into the initialization process
|
22
|
+
class Railtie < Rails::Railtie
|
23
|
+
|
24
|
+
# configure our plugin on boot. other extension points such
|
25
|
+
# as configuration, rake tasks, etc, are also available
|
26
|
+
#initializer "csv_pirate.initialize" do |app|
|
27
|
+
#end
|
28
|
+
|
29
|
+
# Add a to_prepare block which is executed once in production
|
30
|
+
# and before each request in development
|
31
|
+
config.to_prepare do
|
32
|
+
# If you are using this on a vanilla Ruby class (no rails or active record) then extend your class like this:
|
33
|
+
# MyClass.send(:extend, CsvPirate::PirateShip::ActMethods) if defined?(MyClass)
|
34
|
+
# Alternatively you can do this inside your class definition:
|
35
|
+
# class MyClass
|
36
|
+
# extend CsvPirate::PirateShip::ActMethods
|
37
|
+
# end
|
38
|
+
# If you are using ActiveRecord then it is done for you :)
|
39
|
+
ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods) if defined?(ActiveRecord)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
end
|
43
|
+
end
|
44
|
+
|
18
45
|
require 'csv_pirate/version.rb'
|
19
46
|
require 'csv_pirate/the_capn.rb'
|
20
47
|
require 'csv_pirate/pirate_ship.rb'
|
21
48
|
|
22
|
-
|
23
|
-
|
49
|
+
# Support the old (< v5.0.0) API
|
50
|
+
module NinthBit
|
51
|
+
module PirateShip
|
52
|
+
module ActMethods
|
53
|
+
include CsvPirate::PirateShip::ActMethods
|
54
|
+
|
55
|
+
has_csv_pirate = ActMethods.instance_method(:has_csv_pirate_ship)
|
56
|
+
|
57
|
+
define_method(:has_csv_pirate_ship) do |args|
|
58
|
+
warn "[DEPRECATION] \"NinthBit::PirateShip::ActMethods\" module is deprecated. Use \"include CsvPirate::PirateShip::ActMethods\" instead. Called from: #{Kernel.caller.first}"
|
59
|
+
has_csv_pirate.bind(self).call(args)
|
60
|
+
end
|
61
|
+
|
62
|
+
end
|
63
|
+
end
|
24
64
|
end
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: csv_pirate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 5.0.
|
5
|
+
version: 5.0.2
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Peter Boling
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-06-
|
13
|
+
date: 2011-06-16 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rspec
|
@@ -112,7 +112,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
112
112
|
requirements:
|
113
113
|
- - ">="
|
114
114
|
- !ruby/object:Gem::Version
|
115
|
-
hash:
|
115
|
+
hash: -214996772817946572
|
116
116
|
segments:
|
117
117
|
- 0
|
118
118
|
version: "0"
|