Skip to content

Commit 5697d0d

Browse files
author
guillaume
committed
Merge pull requests, bump version to 0.5.0, handle test for rails 2.3.x
1 parent df7457d commit 5697d0d

File tree

5 files changed

+44
-28
lines changed

5 files changed

+44
-28
lines changed

CHANGELOG.rdoc

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
0.5.0 (September 13, 2011)
2+
3+
* Fixed a bug where i18n_routing was not restoring the default locale at boot (fishman)
4+
* Handling of the rails3 alternative match syntax (toXXlc)
5+
16
0.4.7 (February 14, 2011)
27

38
* Fix bug in empty translation handling

Gemfile.lock

+9-11
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ GEM
3131
activesupport (3.1.0)
3232
multi_json (~> 1.0)
3333
arel (2.2.1)
34-
bcrypt-ruby (3.0.0)
35-
bcrypt-ruby (3.0.0-x86-mingw32)
34+
bcrypt-ruby (3.0.1)
3635
builder (3.0.0)
37-
diff-lcs (1.1.2)
36+
diff-lcs (1.1.3)
3837
erubis (2.7.0)
3938
hike (1.2.1)
4039
i18n (0.6.0)
@@ -71,14 +70,14 @@ GEM
7170
thor (~> 0.14.6)
7271
rake (0.9.2)
7372
rdoc (3.9.4)
74-
rspec (2.5.0)
75-
rspec-core (~> 2.5.0)
76-
rspec-expectations (~> 2.5.0)
77-
rspec-mocks (~> 2.5.0)
78-
rspec-core (2.5.1)
79-
rspec-expectations (2.5.0)
73+
rspec (2.6.0)
74+
rspec-core (~> 2.6.0)
75+
rspec-expectations (~> 2.6.0)
76+
rspec-mocks (~> 2.6.0)
77+
rspec-core (2.6.4)
78+
rspec-expectations (2.6.0)
8079
diff-lcs (~> 1.1.2)
81-
rspec-mocks (2.5.0)
80+
rspec-mocks (2.6.0)
8281
sprockets (2.0.0)
8382
hike (~> 1.2)
8483
rack (~> 1.0)
@@ -92,7 +91,6 @@ GEM
9291

9392
PLATFORMS
9493
ruby
95-
x86-mingw32
9694

9795
DEPENDENCIES
9896
rails (= 3.1.0)

README.rdoc

+5-4
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@ All necessary informations are available on the wiki: http://wiki.github.com/kwi
66

77
For any question, use the i18_routing google group: http://groups.google.com/group/i18n-routing
88

9-
Works with Rails 2.3 and Rails 3.0
10-
=> Rails3 beta and RC versions are no longer supported !
9+
Works with Rails 2.3, 3.0 and 3.1
1110

12-
== TODO for next releases (written the 9th of June)
11+
== TODO for next releases (written the 9th of June 2010)
1312

1413
* Handle multiple translations for same resources name (Example: nested and not nested resources)
1514
* 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
2827
* fwalch
2928
* doubledrones: h13ronim (Marcin Michałowski)
3029
* rudionrails (Rudolf Schmidt)
30+
* fishman (Reza Jelveh)
31+
* toXXIc
3132

32-
Copyright (c) 2010 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license
33+
Copyright (c) 2010-2011 Guillaume Luccisano - g-mai|: guillaume.luccisano, released under the MIT license

i18n_routing.gemspec

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Gem::Specification.new do |s|
22
s.name = "i18n_routing"
3-
s.version = "0.4.8"
3+
s.version = "0.5.0"
44
s.author = "Guillaume Luccisano"
55
s.email = "[email protected]"
66
s.homepage = "http://github.com/kwi/i18n_routing"

spec/i18n_routing/i18n_spec.rb

+24-12
Original file line numberDiff line numberDiff line change
@@ -149,8 +149,10 @@ def url_for(opts)
149149
routes.send(:not_about_path).should == "/not_about"
150150
end
151151

152-
it "of named_routes (another format)" do
153-
routes.send(:not_about2_path).should == "/not_about2"
152+
if rails3?
153+
it "of named_routes (another format)" do
154+
routes.send(:not_about2_path).should == "/not_about2"
155+
end
154156
end
155157

156158
it "of a singular resource" do
@@ -171,8 +173,10 @@ def url_for(opts)
171173

172174
it "named_route uses default values" do
173175
routes.send(:about_path).should == "/about"
174-
routes.send(:about2_path).should == "/about2"
175-
routes.send(:main_path).should == "/home"
176+
if rails3?
177+
routes.send(:about2_path).should == "/about2"
178+
routes.send(:main_path).should == "/home"
179+
end
176180
routes.send(:welcome_path).should == '/welcome/to/our/page'
177181
end
178182

@@ -230,8 +234,10 @@ def url_for(opts)
230234

231235
it "named_route generates route using localized values" do
232236
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
233-
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
234-
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
237+
if rails3?
238+
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
239+
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
240+
end
235241
end
236242

237243

@@ -258,8 +264,10 @@ def url_for(opts)
258264
o = I18n.locale
259265
I18n.locale = "fr"
260266
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
261-
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
262-
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
267+
if rails3?
268+
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
269+
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
270+
end
263271
I18n.locale = o
264272
end
265273

@@ -275,8 +283,10 @@ def url_for(opts)
275283
it "url_for generates routes using localized values" do
276284
url_for(:controller => :users).should == "/#{I18n.t :as, :scope => :'routes.users'}"
277285
url_for(:controller => :about, :action => :show).should == "/#{I18n.t :about, :scope => :named_routes_path}"
278-
url_for(:controller => :about2, :action => :show).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
279-
url_for(:controller => :pages, :action => :home).should == "/#{I18n.t :home, :scope => :named_routes_path}"
286+
if rails3?
287+
url_for(:controller => :about2, :action => :show).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
288+
url_for(:controller => :pages, :action => :home).should == "/#{I18n.t :home, :scope => :named_routes_path}"
289+
end
280290
end
281291

282292
if !rails3?
@@ -430,8 +440,10 @@ def url_for(opts)
430440

431441
it "named_route generates route using localized values" do
432442
routes.send(:about_path).should == "/#{I18n.t :about, :scope => :named_routes_path}"
433-
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
434-
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
443+
if rails3?
444+
routes.send(:about2_path).should == "/#{I18n.t :about2, :scope => :named_routes_path}"
445+
routes.send(:main_path).should == "/#{I18n.t :home, :scope => :named_routes_path}"
446+
end
435447
end
436448

437449
it "custom translated path names" do

0 commit comments

Comments
 (0)