Permalink
Browse files

File Cleanup

  • Loading branch information...
pboling committed Jun 16, 2011
1 parent 7f2d376 commit 2e65a67b659554f9e912d651b87de8cb2d77e566
Showing with 10 additions and 34 deletions.
  1. +3 −0 CHANGELOG.txt
  2. +1 −1 README.rdoc
  3. +1 −1 VERSION.yml
  4. +1 −2 csv_pirate.gemspec
  5. +2 −2 doc/how_to_release.txt
  6. +0 −26 init.rb
  7. +2 −2 lib/csv_pirate.rb
View
@@ -1,3 +1,6 @@
+Version 5.0.4 2011-06-16
+- File Cleanup
+
Version 5.0.3 2011-06-16
- Fixed Compatability with Rails 2
View
@@ -65,7 +65,7 @@ Gem Using Git building from source:
git clone git://github.com/pboling/csv_pirate.git
cd csv_pirate
gem build csv_pirate.gemspec
- sudo gem install csv_pirate-5.0.3.gem # (Or whatever version gets built)
+ sudo gem install csv_pirate-5.0.4.gem # (Or whatever version gets built)
== Install as a Plugin
View
@@ -1,5 +1,5 @@
---
-:patch: 3
+:patch: 4
:build:
:major: 5
:minor: 0
View
@@ -5,7 +5,7 @@
Gem::Specification.new do |s|
s.name = %q{csv_pirate}
- s.version = "5.0.3"
+ s.version = "5.0.4"
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
s.authors = ["Peter Boling"]
@@ -25,7 +25,6 @@ It works better if you are wearing a tricorne!}
"Rakefile",
"VERSION.yml",
"csv_pirate.gemspec",
- "init.rb",
"install.rb",
"lib/csv_pirate.rb",
"lib/csv_pirate/pirate_ship.rb",
View
@@ -4,8 +4,8 @@ rake version:bump:patch
git commit -a -m ""
-rake release
+rspec spec
rake install
-rake gemcutter:release
+rake release
View
26 init.rb
@@ -1,26 +0,0 @@
-#We might have rails (pre version 3)...
-puts "init.rb is loading"
-if defined?(ActiveRecord) && !defined?(Rake) && !defined?(Rails::Railtie) && defined?(config) && config.respond_to?(:gems)
- puts "init.rb has Rails config!"
-
- require 'csv_pirate'
-
- config.to_prepare do
- # If you are using this on a vanilla Ruby class (no rails or active record) then extend your class like this:
- # MyClass.send(:extend, NinthBit::PirateShip::ActMethods) if defined?(MyClass)
- # Alternatively you can do this inside your class definition:
- # class MyClass
- # extend NinthBit::PirateShip::ActMethods
- # end
- # If you are using ActiveRecord then it is done for you :)
- ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods) if defined?(ActiveRecord)
- end
-
-#And we might not... (rake needs to come hear to load the gems properly)
-elsif defined?(ActiveRecord) && !defined?(Rails::Railtie)
- puts "init.rb probably in a rake task"
-
- require 'csv_pirate'
- ActiveRecord::Base.send(:extend, NinthBit::PirateShip::ActMethods) if defined?(ActiveRecord)
-
-end
View
@@ -37,12 +37,12 @@ class Railtie < Rails::Railtie
end
else
if !defined?(Rake) && defined?(config) && config.respond_to?(:gems)
- puts "has Rails config!"
+ #Not sure if this is ever executed...
config.to_prepare do
ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
end
else
- puts "probably in a rake task"
+ #This one cleans up that mess...
ActiveRecord::Base.send(:extend, CsvPirate::PirateShip::ActMethods)
end
end

0 comments on commit 2e65a67

Please sign in to comment.