route_translator 5.3.0 → 5.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/lib/route_translator/extensions/action_controller.rb +1 -1
- data/lib/route_translator/extensions/mapper.rb +1 -0
- data/lib/route_translator/extensions/route_set.rb +1 -0
- data/lib/route_translator/extensions.rb +1 -0
- data/lib/route_translator/host.rb +1 -0
- data/lib/route_translator/route.rb +3 -2
- data/lib/route_translator/translator/path/segment.rb +1 -0
- data/lib/route_translator/translator/path.rb +1 -0
- data/lib/route_translator/translator/route_helpers.rb +3 -2
- data/lib/route_translator/translator.rb +1 -0
- data/lib/route_translator/version.rb +2 -1
- data/lib/route_translator.rb +1 -0
- metadata +9 -9
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 555daa99bbe02f9e4e62e29d846d6501c0847110
|
4
|
+
data.tar.gz: c790232a51267e660946162ea08271321078f33b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 735d11f391cf806fbad86924e74ada850d01373f5d5fce5e659662785da56222706433338e76a3c17878499c7ff70ac40a175008fba45033798c06558534175e
|
7
|
+
data.tar.gz: 47e9bd6222ead1da1e05aa12ebb5ea326556d34c6e9335c3ad931e63390b4268078371a97fc1031b597ce0da930d4ae80b4c23d6440245e7c6de53337f7f827d
|
data/CHANGELOG.md
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module RouteTranslator
|
3
4
|
class Route
|
4
5
|
attr_reader :route_set, :path, :name, :options_constraints, :options, :mapping
|
@@ -15,9 +16,9 @@ module RouteTranslator
|
|
15
16
|
def scope
|
16
17
|
@scope ||=
|
17
18
|
if mapping.defaults[:controller]
|
18
|
-
[
|
19
|
+
%i[routes controllers].concat mapping.defaults[:controller].split('/').map(&:to_sym)
|
19
20
|
else
|
20
|
-
[
|
21
|
+
%i[routes controllers]
|
21
22
|
end
|
22
23
|
end
|
23
24
|
end
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
|
+
|
2
3
|
module RouteTranslator
|
3
4
|
module Translator
|
4
5
|
module RouteHelpers
|
@@ -6,7 +7,7 @@ module RouteTranslator
|
|
6
7
|
private
|
7
8
|
|
8
9
|
def add_helpers_to_test_cases(helper_container)
|
9
|
-
%w
|
10
|
+
%w[ActionController ActionMailer ActionView].each do |klass_name|
|
10
11
|
next unless Module.const_defined?(klass_name)
|
11
12
|
klass_name.constantize::TestCase.__send__(:include, helper_container)
|
12
13
|
end
|
@@ -23,7 +24,7 @@ module RouteTranslator
|
|
23
24
|
def add(old_name, named_route_collection)
|
24
25
|
helper_list = named_route_collection.helper_names
|
25
26
|
|
26
|
-
%w
|
27
|
+
%w[path url].each do |suffix|
|
27
28
|
helper_container = named_route_collection.send(:"#{suffix}_helpers_module")
|
28
29
|
new_helper_name = "#{old_name}_#{suffix}"
|
29
30
|
|
data/lib/route_translator.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: route_translator
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.3.
|
4
|
+
version: 5.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Geremia Taglialatela
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-04-19 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activesupport
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: 0.8.
|
89
|
+
version: 0.8.20
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: 0.8.
|
96
|
+
version: 0.8.20
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: minitest
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,28 +148,28 @@ dependencies:
|
|
148
148
|
requirements:
|
149
149
|
- - "~>"
|
150
150
|
- !ruby/object:Gem::Version
|
151
|
-
version: 0.
|
151
|
+
version: 0.48.1
|
152
152
|
type: :development
|
153
153
|
prerelease: false
|
154
154
|
version_requirements: !ruby/object:Gem::Requirement
|
155
155
|
requirements:
|
156
156
|
- - "~>"
|
157
157
|
- !ruby/object:Gem::Version
|
158
|
-
version: 0.
|
158
|
+
version: 0.48.1
|
159
159
|
- !ruby/object:Gem::Dependency
|
160
160
|
name: simplecov
|
161
161
|
requirement: !ruby/object:Gem::Requirement
|
162
162
|
requirements:
|
163
163
|
- - "~>"
|
164
164
|
- !ruby/object:Gem::Version
|
165
|
-
version: 0.
|
165
|
+
version: 0.14.1
|
166
166
|
type: :development
|
167
167
|
prerelease: false
|
168
168
|
version_requirements: !ruby/object:Gem::Requirement
|
169
169
|
requirements:
|
170
170
|
- - "~>"
|
171
171
|
- !ruby/object:Gem::Version
|
172
|
-
version: 0.
|
172
|
+
version: 0.14.1
|
173
173
|
description: Translates the Rails routes of your application into the languages defined
|
174
174
|
in your locale files
|
175
175
|
email:
|
@@ -214,7 +214,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
216
|
rubyforge_project:
|
217
|
-
rubygems_version: 2.6.
|
217
|
+
rubygems_version: 2.6.11
|
218
218
|
signing_key:
|
219
219
|
specification_version: 4
|
220
220
|
summary: Translate your Rails routes in a simple manner
|