Skip to content
Browse files

Merge pull requests, bump version to 0.5.0, handle test for rails 2.3.x

  • Loading branch information...
1 parent df7457d commit 5697d0dc5cd8afa1ccdcd8db55aa0c7a34556bf2 guillaume committed
Showing with 44 additions and 28 deletions.
  1. +5 −0 CHANGELOG.rdoc
  2. +9 −11 Gemfile.lock
  3. +5 −4 README.rdoc
  4. +1 −1 i18n_routing.gemspec
  5. +24 −12 spec/i18n_routing/i18n_spec.rb
View
5 CHANGELOG.rdoc
@@ -1,3 +1,8 @@
+0.5.0 (September 13, 2011)
+
+* Fixed a bug where i18n_routing was not restoring the default locale at boot (fishman)
+* Handling of the rails3 alternative match syntax (toXXlc)
+
0.4.7 (February 14, 2011)
* Fix bug in empty translation handling
View
20 Gemfile.lock
@@ -31,10 +31,9 @@ GEM
activesupport (3.1.0)
multi_json (~> 1.0)
arel (2.2.1)
- bcrypt-ruby (3.0.0)
- bcrypt-ruby (3.0.0-x86-mingw32)
+ bcrypt-ruby (3.0.1)
builder (3.0.0)
- diff-lcs (1.1.2)
+ diff-lcs (1.1.3)
erubis (2.7.0)
hike (1.2.1)
i18n (0.6.0)
@@ -71,14 +70,14 @@ GEM
thor (~> 0.14.6)
rake (0.9.2)
rdoc (3.9.4)
- rspec (2.5.0)
- rspec-core (~> 2.5.0)
- rspec-expectations (~> 2.5.0)
- rspec-mocks (~> 2.5.0)
- rspec-core (2.5.1)
- rspec-expectations (2.5.0)
+ rspec (2.6.0)
+ rspec-core (~> 2.6.0)
+ rspec-expectations (~> 2.6.0)
+ rspec-mocks (~> 2.6.0)
+ rspec-core (2.6.4)
+ rspec-expectations (2.6.0)
diff-lcs (~> 1.1.2)
- rspec-mocks (2.5.0)
+ rspec-mocks (2.6.0)
sprockets (2.0.0)
hike (~> 1.2)
rack (~> 1.0)
@@ -92,7 +91,6 @@ GEM
PLATFORMS
ruby
- x86-mingw32
DEPENDENCIES
rails (= 3.1.0)
View
9 README.rdoc
@@ -6,10 +6,9 @@ All necessary informations are available on the wiki: http://wiki.github.com/kwi
For any question, use the i18_routing google group: http://groups.google.com/group/i18n-routing
-Works with Rails 2.3 and Rails 3.0
-=> Rails3 beta and RC versions are no longer supported !
+Works with Rails 2.3, 3.0 and 3.1
-== TODO for next releases (written the 9th of June)
+== TODO for next releases (written the 9th of June 2010)
* Handle multiple translations for same resources name (Example: nested and not nested resources)
* Handle namespace translation (and path_prefix on Rails3)
@@ -28,5 +27,7 @@ Furthermore, if the i18n gem is present on your system, Rails will load it and s
* fwalch
* doubledrones: h13ronim (Marcin Michałowski)
* rudionrails (Rudolf Schmidt)
+* fishman (Reza Jelveh)
+* toXXIc
-Copyright (c) 2010 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license
+Copyright (c) 2010-2011 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license
View
2 i18n_routing.gemspec
@@ -1,6 +1,6 @@
Gem::Specification.new do |s|
s.name = "i18n_routing"
- s.version = "0.4.8"
+ s.version = "0.5.0"
s.author = "Guillaume Luccisano"
s.email = "guillaume.luccisano@gmail.com"
s.homepage = "http://github.com/kwi/i18n_routing"
View
36 spec/i18n_routing/i18n_spec.rb
@@ -149,8 +149,10 @@ def url_for(opts)
routes.send(:not_about_path).should == "/not_about"
end
- it "of named_routes (another format)" do
- routes.send(:not_about2_path).should == "/not_about2"
+ if rails3?
+ it "of named_routes (another format)" do
+ routes.send(:not_about2_path).should == "/not_about2"
+ end
end
it "of a singular resource" do
@@ -171,8 +173,10 @@ def url_for(opts)
it "named_route uses default values" do
routes.send(:about_path).should == "/about"
- routes.send(:about2_path).should == "/about2"
- routes.send(:main_path).should == "/home"
+ if rails3?
+ routes.send(:about2_path).should == "/about2"
+ routes.send(:main_path).should == "/home"
+ end
routes.send(:welcome_path).should == '/welcome/to/our/page'
end
@@ -230,8 +234,10 @@ def url_for(opts)
it "named_route generates route using localized values" do
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
- routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
- routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ if rails3?
+ routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
+ routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ end
end
@@ -258,8 +264,10 @@ def url_for(opts)
o = I18n.locale
I18n.locale = "fr"
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
- routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
- routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ if rails3?
+ routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
+ routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ end
I18n.locale = o
end
@@ -275,8 +283,10 @@ def url_for(opts)
it "url_for generates routes using localized values" do
url_for(:controller => :users).should == "/#{I18n.t :as, :scope => :'routes.users'}"
url_for(:controller => :about, :action => :show).should == "/#{I18n.t :about, :scope => :named_routes_path}"
- url_for(:controller => :about2, :action => :show).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
- url_for(:controller => :pages, :action => :home).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ if rails3?
+ url_for(:controller => :about2, :action => :show).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
+ url_for(:controller => :pages, :action => :home).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ end
end
if !rails3?
@@ -430,8 +440,10 @@ def url_for(opts)
it "named_route generates route using localized values" do
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
- routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
- routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ if rails3?
+ routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
+ routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
+ end
end
it "custom translated path names" do

0 comments on commit 5697d0d

Please sign in to comment.
Something went wrong with that request. Please try again.