localizable_routes 2.0.0 → 2.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a671fd3ab32ff2e3e0baef6b610fea00cd60d20f
|
4
|
+
data.tar.gz: 5606c6396b2f247857c71db72ff6f4b19ca4c2b9
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a8af9bf615323a27e1f5d36a20bb4e624dca7f59e90d25a0b19c3692d7a39e593fdf15942cfd07362414dea174e16035e0f5ab247b2919b2d877d5019f8aefa8
|
7
|
+
data.tar.gz: fa3be04b1f2491fbad0eeb8917a6e1807d72afb9db0bafb6bd44b6a73394c37429480ebe1aa7b9298af814d3b6eb16bb38d222578f982ad48782305630108756
|
@@ -7,13 +7,7 @@ module LocalizableRoutes
|
|
7
7
|
def define_localized_url_helper(name, localization)
|
8
8
|
%w(path url).each do |type|
|
9
9
|
helper = :"#{name}_#{type}"
|
10
|
-
|
11
|
-
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
|
12
|
-
target = instance_variable_get("@#{type}_helpers_module")
|
13
|
-
else
|
14
|
-
target = @module
|
15
|
-
end
|
16
|
-
|
10
|
+
target = instance_variable_get("@#{type}_helpers_module")
|
17
11
|
target.remove_possible_method helper
|
18
12
|
target.module_eval do
|
19
13
|
define_method helper do |*args|
|
@@ -28,12 +22,7 @@ module LocalizableRoutes
|
|
28
22
|
send "#{name}_#{locale}_#{type}", *(args << options)
|
29
23
|
end
|
30
24
|
end
|
31
|
-
|
32
|
-
if Rails::VERSION::MAJOR == 4 && Rails::VERSION::MINOR >= 2
|
33
|
-
instance_variable_get("@#{type}_helpers") << helper
|
34
|
-
else
|
35
|
-
helpers << helper
|
36
|
-
end
|
25
|
+
instance_variable_get("@#{type}_helpers") << helper
|
37
26
|
end
|
38
27
|
end
|
39
28
|
|
data/test/dummy/log/test.log
CHANGED
@@ -379,3 +379,9 @@ HelpersTest: test_methods
|
|
379
379
|
-----------------------
|
380
380
|
RoutesTest: test_params
|
381
381
|
-----------------------
|
382
|
+
-----------------------
|
383
|
+
RoutesTest: test_params
|
384
|
+
-----------------------
|
385
|
+
-------------------------
|
386
|
+
HelpersTest: test_methods
|
387
|
+
-------------------------
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: localizable_routes
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- mmontossi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-10-
|
11
|
+
date: 2016-10-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -16,7 +16,7 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - ">="
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 4.
|
19
|
+
version: 4.2.0
|
20
20
|
- - "<"
|
21
21
|
- !ruby/object:Gem::Version
|
22
22
|
version: 4.3.0
|
@@ -26,7 +26,7 @@ dependencies:
|
|
26
26
|
requirements:
|
27
27
|
- - ">="
|
28
28
|
- !ruby/object:Gem::Version
|
29
|
-
version: 4.
|
29
|
+
version: 4.2.0
|
30
30
|
- - "<"
|
31
31
|
- !ruby/object:Gem::Version
|
32
32
|
version: 4.3.0
|
@@ -73,7 +73,6 @@ files:
|
|
73
73
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
74
74
|
- test/dummy/config/initializers/inflections.rb
|
75
75
|
- test/dummy/config/initializers/mime_types.rb
|
76
|
-
- test/dummy/config/initializers/secret_token.rb
|
77
76
|
- test/dummy/config/initializers/session_store.rb
|
78
77
|
- test/dummy/config/initializers/wrap_parameters.rb
|
79
78
|
- test/dummy/config/locales/en.yml
|
@@ -141,7 +140,6 @@ test_files:
|
|
141
140
|
- test/dummy/config/initializers/filter_parameter_logging.rb
|
142
141
|
- test/dummy/config/initializers/inflections.rb
|
143
142
|
- test/dummy/config/initializers/mime_types.rb
|
144
|
-
- test/dummy/config/initializers/secret_token.rb
|
145
143
|
- test/dummy/config/initializers/session_store.rb
|
146
144
|
- test/dummy/config/initializers/wrap_parameters.rb
|
147
145
|
- test/dummy/config/locales/en.yml
|