Permalink
Browse files

Make gem working with Rails 3.1

  • Loading branch information...
1 parent 07fc23d commit 6971418dec8d5fed5672273198c1409460b78f7c @kuroda kuroda committed Jul 18, 2011
Showing with 14 additions and 6 deletions.
  1. +1 −4 lib/rails-i18n.rb
  2. +1 −0 lib/rails_i18n.rb
  3. +10 −0 lib/rails_i18n/railtie.rb
  4. +2 −2 rails-i18n.gemspec
View
@@ -1,4 +1 @@
-ActiveSupport.on_load(:i18n) do
- I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../rails/locale'), '*.{rb,yml}')]
- I18n.load_path.flatten!
-end
+require 'rails_i18n'
View
@@ -0,0 +1 @@
+require 'rails_i18n/railtie'
View
@@ -0,0 +1,10 @@
+require 'rails'
+
+module RailsI18n
+ class Railtie < ::Rails::Railtie #:nodoc:
+ initializer 'rails-i18n' do |app|
+ I18n.load_path << Dir[File.join(File.expand_path(File.dirname(__FILE__) + '/../../rails/locale'), '*.{rb,yml}')]
+ I18n.load_path.flatten!
+ end
+ end
+end
View
@@ -2,14 +2,14 @@
Gem::Specification.new do |s|
s.name = "rails-i18n"
- s.version = '0.1.0'
+ s.version = '0.1.1'
s.authors = ["Rails I18n Group"]
s.email = "rails-i18n@googlegroups.com"
s.homepage = "http://github.com/svenfuchs/rails-i18n"
s.summary = "Common locale data and translations for Rails i18n."
s.description = "A set of common locale data and translations to internationalize and/or localize your Rails applications."
- s.files = Dir.glob("rails/locale/*") + %w(README.md MIT-LICENSE.txt lib/rails-i18n.rb)
+ s.files = Dir.glob("lib/**/*") + Dir.glob("rails/locale/*") + %w(README.md MIT-LICENSE.txt)
s.platform = Gem::Platform::RUBY
s.require_path = 'lib'
s.rubyforge_project = '[none]'

0 comments on commit 6971418

Please sign in to comment.