localized 0.0.7 → 0.0.8
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile.lock +1 -1
- data/lib/localized/helper.rb +4 -0
- data/localized.gemspec +1 -1
- data/spec/lib/localized/helper_spec.rb +7 -0
- data/spec/views/widget_helpers_test.erb +1 -0
- data/spec/views/widget_views_spec.rb +8 -0
- metadata +2 -1
data/Gemfile.lock
CHANGED
data/lib/localized/helper.rb
CHANGED
data/localized.gemspec
CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
|
|
2
2
|
s.name = 'localized'
|
3
3
|
s.author = 'Paul Hepworth'
|
4
4
|
s.email = 'paul<dot>hepworth<at>peppyheppy<dot>com'
|
5
|
-
s.version = '0.0.
|
5
|
+
s.version = '0.0.8'
|
6
6
|
s.homepage = 'https://github.com/peppyheppy/localized'
|
7
7
|
s.date = '2011-07-09'
|
8
8
|
s.summary = "A ruby on rails gem that provides locale setting support through the subdomain (in a box)"
|
@@ -51,6 +51,13 @@ describe FoobarController , "locale specific routes", :type => :controller do
|
|
51
51
|
end
|
52
52
|
end
|
53
53
|
|
54
|
+
describe "additional helpers" do
|
55
|
+
it "should have localized_site helper" do
|
56
|
+
get :test
|
57
|
+
controller.localized_site.should == :us
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
54
61
|
describe "subdomain locale" do
|
55
62
|
|
56
63
|
it "should set the current locale to that of the subdomain" do
|
@@ -0,0 +1 @@
|
|
1
|
+
<%= localized_site %>
|
@@ -10,6 +10,14 @@ describe "widget_default.erb" do
|
|
10
10
|
end
|
11
11
|
end
|
12
12
|
|
13
|
+
describe "widget_helpers_test.erb" do
|
14
|
+
it "renders the widget partial for localized_site helper" do
|
15
|
+
I18n.locale = :'it-IT'
|
16
|
+
render
|
17
|
+
rendered.should =~ /it/
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
13
21
|
describe "widget.erb" do
|
14
22
|
it "renders the widget partial for it" do
|
15
23
|
I18n.locale = :'it-IT'
|
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: localized
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.8
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Paul Hepworth
|
@@ -115,6 +115,7 @@ files:
|
|
115
115
|
- spec/spec_helper.rb
|
116
116
|
- spec/views/widget.erb
|
117
117
|
- spec/views/widget_default.erb
|
118
|
+
- spec/views/widget_helpers_test.erb
|
118
119
|
- spec/views/widget_invalid.erb
|
119
120
|
- spec/views/widget_views_spec.rb
|
120
121
|
has_rdoc: true
|