route_translator 6.0.0.alpha1 → 6.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: c4171b2df923521e8166337add614fba7f3a38a7
4
- data.tar.gz: c4f3b540804c81c9095f6dd51591f155fd94e0bd
2
+ SHA256:
3
+ metadata.gz: 453269553066b53ab821eb7c4aa8bce1d9ad4aca1d34d1bc212dc7ca9d70e76a
4
+ data.tar.gz: '087901c13e29e93f71dc374755afb08f4376d6a4e0c43ccf06bc4a1640325dcf'
5
5
  SHA512:
6
- metadata.gz: 3fdbdb4ebd133bec7ce149bfba1fffdf2260be4c8b16c2fbe2d3578966d19db1ad57e11e34dc79ba26c78edd87ed9c7148a0ed4b84621c3dd06588716a939551
7
- data.tar.gz: 9b7276425620c712608a4c249566271a81f1796c1cfe04b4a0d706e09de215d9f9d23b94ac7c2461b065103b26630214b6813dbc73e01bd58b86022f29918805
6
+ metadata.gz: 6c43b4217c536688e249f2669c4c814514f5d753caca7fd4185a4b83b8695be73aded8ae39864b59fcc2dfee60007c731bb38df7e52a1c71105d2a6388b1b5b0
7
+ data.tar.gz: 96cb347e03fcd211d9ba41ee90e2b6d36db6f7b1881d65a609787bc73c17cb1cdddd017cd413c5230f58c9a02f23eebafe7f09de79a996ca65757057f9f5e57b
@@ -1,10 +1,74 @@
1
1
  # Changelog
2
2
 
3
- ## 6.0.0.alpha1 / 2017-07-23
3
+ ## 6.0.0 / 2019-05-16
4
4
 
5
- * [BUGFIX] Verify host path consistency by default (#91)
6
- * [FEATURE] Remove the option to verify host path consistency
7
- * [ENHANCEMENT] Avoid duplicate routes when using host_locales (#87)
5
+ * [FEATURE] Drop Ruby 2.2 support
6
+ * [ENHANCEMENT] Update development dependencies
7
+
8
+ ## 5.10.0 / 2019-04-25
9
+
10
+ * [FEATURE] Add Rails 6.0 compatibility
11
+ * [ENHANCEMENT] Test against latest Ruby versions
12
+
13
+ ## 5.9.0 / 2019-03-14
14
+
15
+ * [FEATURE] Add Rails 6.0.0.beta3 compatibility
16
+ * [ENHANCEMENT] Test against latest Ruby versions
17
+
18
+ ## 5.8.0 / 2019-03-02
19
+
20
+ * [FEATURE] Add Rails 6.0.0.beta2 compatibility
21
+ * [ENHANCEMENT] Update development dependencies
22
+
23
+ ## 5.7.1 / 2019-02-03
24
+
25
+ * [ENHANCEMENT] Test against Ruby 2.6.1
26
+ * [ENHANCEMENT] Update development dependencies
27
+
28
+ ## 5.7.0 / 2019-01-19
29
+
30
+ * [FEATURE] Add Rails 6.0.0.beta1 compatibility
31
+ * [ENHANCEMENT] Test against latest Ruby versions
32
+ * [ENHANCEMENT] Update development dependencies
33
+
34
+ ## 5.6.4 / 2018-10-03
35
+
36
+ * [ENHANCEMENT] Update development dependencies
37
+
38
+ ## 5.6.3 / 2018-06-07
39
+
40
+ * [ENHANCEMENT] Update development dependencies
41
+
42
+ ## 5.6.2 / 2018-04-10
43
+
44
+ * [ENHANCEMENT] Test against Rails 5.2
45
+
46
+ ## 5.6.1 / 2018-04-09
47
+
48
+ * [BUGFIX] Fix overriding ActionController::Live ([#183](https://github.com/enriclluelles/route_translator/pull/183))
49
+ * [ENHANCEMENT] Update development dependencies
50
+ * [ENHANCEMENT] Test against latest Ruby versions
51
+
52
+ ## 5.6.0 / 2018-02-05
53
+
54
+ * [FEATURE] Add Rails 5.2 compatibility
55
+ * [ENHANCEMENT] Test against latest Ruby versions
56
+ * [ENHANCEMENT] Update development dependencies
57
+
58
+ ## 5.5.3 / 2018-01-12
59
+
60
+ * [BUGFIX] Fix regression with translations containing spaces ([#181](https://github.com/enriclluelles/route_translator/issues/181))
61
+ * [ENHANCEMENT] Update development dependencies
62
+
63
+ ## 5.5.2 / 2017-12-27
64
+
65
+ * [BUGFIX] Fix regression with translations containing slashes ([#179](https://github.com/enriclluelles/route_translator/pull/179))
66
+ * [ENHANCEMENT] Test against latest Ruby versions
67
+ * [ENHANCEMENT] Update development dependencies
68
+
69
+ ## 5.5.1 / 2017-11-14
70
+
71
+ * [BUGFIX] Change spec to reflect Rails 5.1.3 change in url generation ([#172](https://github.com/enriclluelles/route_translator/issues/172))
8
72
  * [ENHANCEMENT] Update development dependencies
9
73
 
10
74
  ## 5.5.0 / 2017-06-29
data/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2007 Raul Murciano [http://raul.murciano.net], Domestika INTERNET S.L. [http://domestika.org], 2015 Enric Lluelles [http://enric.lluell.es], 2017 Geremia Taglialatela
3
+ Copyright (c) 2007 Raul Murciano [http://raul.murciano.net], Domestika INTERNET S.L. [http://domestika.org], 2015 Enric Lluelles [http://enric.lluell.es], 2019 Geremia Taglialatela
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,16 +1,15 @@
1
1
  # RouteTranslator
2
2
 
3
- [![Gem Version](https://badge.fury.io/rb/route_translator.svg)](http://badge.fury.io/rb/route_translator)
3
+ [![Gem Version](https://badge.fury.io/rb/route_translator.svg)](https://badge.fury.io/rb/route_translator)
4
4
  [![Build Status](https://travis-ci.org/enriclluelles/route_translator.svg?branch=master)](https://travis-ci.org/enriclluelles/route_translator)
5
- [![Dependency Status](https://gemnasium.com/badges/github.com/enriclluelles/route_translator.svg)](https://gemnasium.com/github.com/enriclluelles/route_translator)
6
- [![Code Climate](https://codeclimate.com/github/enriclluelles/route_translator/badges/gpa.svg)](https://codeclimate.com/github/enriclluelles/route_translator)
5
+ [![Maintainability](https://api.codeclimate.com/v1/badges/1c369ce6147724b353fc/maintainability)](https://codeclimate.com/github/enriclluelles/route_translator/maintainability)
7
6
  [![Coverage Status](https://coveralls.io/repos/github/enriclluelles/route_translator/badge.svg?branch=master)](https://coveralls.io/github/enriclluelles/route_translator?branch=master)
8
7
 
9
8
  RouteTranslator is a gem to allow you to manage the translations of your app routes with a simple dictionary format.
10
9
 
11
10
  It started as a fork of the awesome [translate_routes](https://github.com/raul/translate_routes) plugin by [Raúl Murciano](https://github.com/raul).
12
11
 
13
- Right now it works with Rails 5.0/5.1
12
+ Right now it works with Rails 5.x and Rails 6.0
14
13
 
15
14
 
16
15
 
@@ -284,6 +283,10 @@ end
284
283
  * **locale_segment_proc**
285
284
  The locale segment of the url will by default be `locale.to_s.downcase`
286
285
  You can supply your own mechanism via a Proc that takes `locale` as an argument, e.g. `config.locale_segment_proc = ->(locale) { locale.to_s.upcase }`
286
+ * **verify_host_path_consistency**
287
+ By default, if you use different hosts to translate your application, all translated paths will work on all hosts. Set this option to `true` to force
288
+ a matching of the host associated locale with the translated path locale as part of the route definition.
289
+ Defaults to `false`.
287
290
 
288
291
  ### Host-based Locale
289
292
 
@@ -314,13 +317,13 @@ RouteTranslator.config.host_locales = { 'russia.*' => :ru, '*.com' => :en } #
314
317
  RouteTranslator.config.host_locales = { '*.com' => :en, 'russia.*' => :ru } # 'russia.com' will have locale :en
315
318
  ```
316
319
 
317
- If `host_locales` option is set, the following options will be forced:
320
+ If `host_locales` option is set, the following options will be forced (even if you set to true):
318
321
 
319
322
  ```ruby
320
- @config.hide_locale = true
321
- @config.force_locale = false
322
323
  @config.generate_unlocalized_routes = false
323
324
  @config.generate_unnamed_unlocalized_routes = false
325
+ @config.force_locale = false
326
+ @config.hide_locale = false
324
327
  ```
325
328
 
326
329
  This is to avoid odd behaviour brought about by route conflicts and because `host_locales` forces and hides the host-locale dynamically.
@@ -358,6 +361,19 @@ people_products_favourites_es GET /people/products/fans(.:format) people/
358
361
  The gem will lookup translations under `controllers` scope first and then lookup translations under `routes` scope.
359
362
 
360
363
 
364
+ ### Change locale parameter position in the path
365
+
366
+ If you need complex routing as `/:country/:locale/path/to/some/pages`, you can specify the position of your locale parameter in the following way:
367
+
368
+ ```rb
369
+ scope ':country/:locale' do
370
+ localized do
371
+ root to: 'content#homepage'
372
+ end
373
+ end
374
+ ```
375
+
376
+
361
377
 
362
378
  ## Testing
363
379
  Testing your controllers with routes-translator is easy, just add a locale parameter for your localized routes. Otherwise, an ActionController::UrlGenerationError will raise.
@@ -5,23 +5,25 @@ require 'active_support'
5
5
  require 'route_translator/extensions'
6
6
  require 'route_translator/translator'
7
7
  require 'route_translator/host'
8
+ require 'route_translator/host_path_consistency_lambdas'
9
+ require 'route_translator/locale_sanitizer'
8
10
 
9
11
  module RouteTranslator
10
12
  extend RouteTranslator::Host
11
13
 
12
- TRANSLATABLE_SEGMENT = /^([-_a-zA-Z0-9]+)(\()?/
14
+ TRANSLATABLE_SEGMENT = /^([-_a-zA-Z0-9]+)(\()?/.freeze
13
15
 
14
16
  Configuration = Struct.new(:available_locales, :disable_fallback, :force_locale,
15
17
  :hide_locale, :host_locales, :generate_unlocalized_routes,
16
18
  :generate_unnamed_unlocalized_routes, :locale_param_key,
17
- :locale_segment_proc)
19
+ :locale_segment_proc, :verify_host_path_consistency)
18
20
 
19
21
  class << self
20
22
  private
21
23
 
22
24
  def resolve_host_locale_config_conflicts
23
25
  @config.force_locale = false
24
- @config.hide_locale = true
26
+ @config.hide_locale = false
25
27
  @config.generate_unlocalized_routes = false
26
28
  @config.generate_unnamed_unlocalized_routes = false
27
29
  end
@@ -40,10 +42,11 @@ module RouteTranslator
40
42
  @config.generate_unnamed_unlocalized_routes ||= false
41
43
  @config.locale_param_key ||= :locale
42
44
  @config.locale_segment_proc ||= nil
45
+ @config.verify_host_path_consistency ||= false
43
46
 
44
47
  yield @config if block
45
48
 
46
- resolve_host_locale_config_conflicts if @config.host_locales.present?
49
+ resolve_host_locale_config_conflicts unless @config.host_locales.empty?
47
50
 
48
51
  @config
49
52
  end
@@ -42,5 +42,5 @@ end
42
42
 
43
43
  ActiveSupport.on_load(:action_controller) do
44
44
  ActionController::Base.send :include, RouteTranslator::Controller
45
- ActionController::TestCase.send :include, RouteTranslator::TestCase
45
+ ActionController::TestCase.send :include, RouteTranslator::TestCase if ENV['RAILS_ENV'] == 'test'
46
46
  end
@@ -32,8 +32,8 @@ module ActionDispatch
32
32
 
33
33
  blocks = scope[:blocks] ? scope[:blocks].dup : []
34
34
 
35
- if RouteTranslator.config.host_locales.present?
36
- blocks.push RouteTranslator::Host.lambdas_for_locale(locale)
35
+ if RouteTranslator.config.verify_host_path_consistency
36
+ blocks.push RouteTranslator::HostPathConsistencyLambdas.for_locale(locale)
37
37
  end
38
38
 
39
39
  ::ActionDispatch::Routing::Mapper::Mapping.new(route_set, translated_path_ast, defaults, controller, default_action, scope[:module], to, formatted, scope_constraints, blocks, via, translated_options_constraints, anchor, options)
@@ -5,16 +5,20 @@ module RouteTranslator
5
5
  class << self
6
6
  private
7
7
 
8
- def lambdas
9
- @lambdas ||= {}
10
- end
11
-
12
8
  def regex_for(host_string)
13
9
  escaped = Regexp.escape(host_string).gsub('\*', '.*?').gsub('\.', '\.?')
14
10
  Regexp.new("^#{escaped}$", Regexp::IGNORECASE)
15
11
  end
16
12
  end
17
13
 
14
+ def native_locale?(locale)
15
+ locale.to_s.match(/native_/).present?
16
+ end
17
+
18
+ def native_locales
19
+ config.host_locales.values.map { |locale| :"native_#{locale}" }
20
+ end
21
+
18
22
  module_function
19
23
 
20
24
  def locale_from_host(host)
@@ -24,9 +28,5 @@ module RouteTranslator
24
28
  locales &= I18n.available_locales
25
29
  (locales.first || I18n.default_locale).to_sym
26
30
  end
27
-
28
- def lambdas_for_locale(locale)
29
- lambdas[locale] ||= ->(req) { locale == RouteTranslator::Host.locale_from_host(req.host) }
30
- end
31
31
  end
32
32
  end
@@ -0,0 +1,21 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RouteTranslator
4
+ module HostPathConsistencyLambdas
5
+ class << self
6
+ private
7
+
8
+ def lambdas
9
+ @lambdas ||= {}
10
+ end
11
+ end
12
+
13
+ module_function
14
+
15
+ def for_locale(locale)
16
+ sanitized_locale = RouteTranslator::LocaleSanitizer.sanitize(locale)
17
+
18
+ lambdas[sanitized_locale] ||= ->(req) { sanitized_locale == RouteTranslator::Host.locale_from_host(req.host).to_s }
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,11 @@
1
+ # frozen_string_literal: true
2
+
3
+ module RouteTranslator
4
+ module LocaleSanitizer
5
+ module_function
6
+
7
+ def sanitize(locale)
8
+ locale.to_s.gsub('native_', '')
9
+ end
10
+ end
11
+ end
@@ -16,6 +16,7 @@ module RouteTranslator
16
16
 
17
17
  def translate_name(name, locale, named_routes_names)
18
18
  return if name.blank?
19
+
19
20
  translated_name = "#{name}_#{locale.to_s.underscore}"
20
21
 
21
22
  translated_name if named_routes_names.exclude?(translated_name.to_sym)
@@ -25,7 +26,7 @@ module RouteTranslator
25
26
  translated_options = options.dup
26
27
 
27
28
  if translated_options.exclude?(RouteTranslator.locale_param_key)
28
- translated_options[RouteTranslator.locale_param_key] = locale.to_s
29
+ translated_options[RouteTranslator.locale_param_key] = RouteTranslator::LocaleSanitizer.sanitize(locale)
29
30
  end
30
31
 
31
32
  translated_options
@@ -52,6 +53,7 @@ module RouteTranslator
52
53
 
53
54
  def available_locales
54
55
  locales = RouteTranslator.available_locales
56
+ locales.concat(RouteTranslator.native_locales) if RouteTranslator.native_locales.present?
55
57
  # Make sure the default locale is translated in last place to avoid
56
58
  # problems with wildcards when default locale is omitted in paths. The
57
59
  # default routes will catch all paths like wildcard if it is translated first.
@@ -80,6 +82,8 @@ module RouteTranslator
80
82
 
81
83
  locale = if args_locale
82
84
  args_locale.to_s.underscore
85
+ elsif kaller.respond_to?("#{old_name}_native_#{current_locale_name}_#{suffix}")
86
+ "native_#{current_locale_name}"
83
87
  elsif kaller.respond_to?("#{old_name}_#{current_locale_name}_#{suffix}")
84
88
  current_locale_name
85
89
  else
@@ -9,7 +9,8 @@ module RouteTranslator
9
9
  private
10
10
 
11
11
  def display_locale?(locale)
12
- !RouteTranslator.config.hide_locale && (!default_locale?(locale) || config_requires_locale?)
12
+ !RouteTranslator.config.hide_locale && !RouteTranslator.native_locale?(locale) &&
13
+ (!default_locale?(locale) || config_requires_locale?)
13
14
  end
14
15
 
15
16
  def config_requires_locale?
@@ -32,7 +32,8 @@ module RouteTranslator
32
32
  end
33
33
 
34
34
  def translate_string(str, locale, scope)
35
- translated_resource = translate_resource(str, locale.to_s, scope)
35
+ sanitized_locale = RouteTranslator::LocaleSanitizer.sanitize(locale)
36
+ translated_resource = translate_resource(str, sanitized_locale, scope)
36
37
 
37
38
  URI.escape translated_resource
38
39
  end
@@ -50,12 +51,12 @@ module RouteTranslator
50
51
  def translate(segment, locale, scope)
51
52
  return segment if segment.empty?
52
53
 
53
- if segment.starts_with?(':'.freeze)
54
- named_param, hyphenized = segment.split('-'.freeze, 2)
54
+ if segment.starts_with?(':')
55
+ named_param, hyphenized = segment.split('-', 2)
55
56
  return "#{named_param}-#{translate(hyphenized, locale, scope)}" if hyphenized
56
57
  end
57
58
 
58
- return segment if segment.starts_with?('('.freeze) || segment.starts_with?('*'.freeze) || segment.include?(':'.freeze)
59
+ return segment if segment.starts_with?('(') || segment.starts_with?('*') || segment.include?(':')
59
60
 
60
61
  appended_part = segment.slice!(/(\()$/)
61
62
  str = translatable_segment(segment)
@@ -9,6 +9,7 @@ module RouteTranslator
9
9
  def add_helpers_to_test_cases(helper_container)
10
10
  %w[ActionController ActionMailer ActionView].each do |klass_name|
11
11
  next unless Module.const_defined?(klass_name)
12
+
12
13
  klass_name.constantize::TestCase.__send__(:include, helper_container)
13
14
  end
14
15
  end
@@ -34,7 +35,7 @@ module RouteTranslator
34
35
  __send__(Translator.route_name_for(args, old_name, suffix, self), *args)
35
36
  end
36
37
 
37
- add_helpers_to_test_cases(helper_container)
38
+ add_helpers_to_test_cases(helper_container) if ENV['RAILS_ENV'] == 'test'
38
39
  end
39
40
  end
40
41
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RouteTranslator
4
- VERSION = '6.0.0.alpha1'.freeze
4
+ VERSION = '6.0.0'
5
5
  end
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: 6.0.0.alpha1
4
+ version: 6.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela
@@ -10,10 +10,10 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2017-07-23 00:00:00.000000000 Z
13
+ date: 2019-05-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: activesupport
16
+ name: actionpack
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - ">="
@@ -21,7 +21,7 @@ dependencies:
21
21
  version: 5.0.0.1
22
22
  - - "<"
23
23
  - !ruby/object:Gem::Version
24
- version: '5.2'
24
+ version: '6.1'
25
25
  type: :runtime
26
26
  prerelease: false
27
27
  version_requirements: !ruby/object:Gem::Requirement
@@ -31,9 +31,9 @@ dependencies:
31
31
  version: 5.0.0.1
32
32
  - - "<"
33
33
  - !ruby/object:Gem::Version
34
- version: '5.2'
34
+ version: '6.1'
35
35
  - !ruby/object:Gem::Dependency
36
- name: actionpack
36
+ name: activesupport
37
37
  requirement: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - ">="
@@ -41,7 +41,7 @@ dependencies:
41
41
  version: 5.0.0.1
42
42
  - - "<"
43
43
  - !ruby/object:Gem::Version
44
- version: '5.2'
44
+ version: '6.1'
45
45
  type: :runtime
46
46
  prerelease: false
47
47
  version_requirements: !ruby/object:Gem::Requirement
@@ -51,7 +51,7 @@ dependencies:
51
51
  version: 5.0.0.1
52
52
  - - "<"
53
53
  - !ruby/object:Gem::Version
54
- version: '5.2'
54
+ version: '6.1'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: appraisal
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -70,44 +70,50 @@ dependencies:
70
70
  name: byebug
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - "~>"
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '10.0'
76
+ - - "<"
74
77
  - !ruby/object:Gem::Version
75
- version: '9.0'
78
+ version: '12'
76
79
  type: :development
77
80
  prerelease: false
78
81
  version_requirements: !ruby/object:Gem::Requirement
79
82
  requirements:
80
- - - "~>"
83
+ - - ">="
81
84
  - !ruby/object:Gem::Version
82
- version: '9.0'
85
+ version: '10.0'
86
+ - - "<"
87
+ - !ruby/object:Gem::Version
88
+ version: '12'
83
89
  - !ruby/object:Gem::Dependency
84
- name: coveralls
90
+ name: coveralls_reborn
85
91
  requirement: !ruby/object:Gem::Requirement
86
92
  requirements:
87
93
  - - "~>"
88
94
  - !ruby/object:Gem::Version
89
- version: 0.8.21
95
+ version: 0.12.0
90
96
  type: :development
91
97
  prerelease: false
92
98
  version_requirements: !ruby/object:Gem::Requirement
93
99
  requirements:
94
100
  - - "~>"
95
101
  - !ruby/object:Gem::Version
96
- version: 0.8.21
102
+ version: 0.12.0
97
103
  - !ruby/object:Gem::Dependency
98
104
  name: minitest
99
105
  requirement: !ruby/object:Gem::Requirement
100
106
  requirements:
101
107
  - - "~>"
102
108
  - !ruby/object:Gem::Version
103
- version: '5.10'
109
+ version: '5.11'
104
110
  type: :development
105
111
  prerelease: false
106
112
  version_requirements: !ruby/object:Gem::Requirement
107
113
  requirements:
108
114
  - - "~>"
109
115
  - !ruby/object:Gem::Version
110
- version: '5.10'
116
+ version: '5.11'
111
117
  - !ruby/object:Gem::Dependency
112
118
  name: rails
113
119
  requirement: !ruby/object:Gem::Requirement
@@ -117,7 +123,7 @@ dependencies:
117
123
  version: 5.0.0.1
118
124
  - - "<"
119
125
  - !ruby/object:Gem::Version
120
- version: '5.2'
126
+ version: '6.1'
121
127
  type: :development
122
128
  prerelease: false
123
129
  version_requirements: !ruby/object:Gem::Requirement
@@ -127,49 +133,63 @@ dependencies:
127
133
  version: 5.0.0.1
128
134
  - - "<"
129
135
  - !ruby/object:Gem::Version
130
- version: '5.2'
136
+ version: '6.1'
131
137
  - !ruby/object:Gem::Dependency
132
138
  name: rake
133
139
  requirement: !ruby/object:Gem::Requirement
134
140
  requirements:
135
141
  - - "~>"
136
142
  - !ruby/object:Gem::Version
137
- version: '12.0'
143
+ version: '12.3'
138
144
  type: :development
139
145
  prerelease: false
140
146
  version_requirements: !ruby/object:Gem::Requirement
141
147
  requirements:
142
148
  - - "~>"
143
149
  - !ruby/object:Gem::Version
144
- version: '12.0'
150
+ version: '12.3'
145
151
  - !ruby/object:Gem::Dependency
146
152
  name: rubocop
147
153
  requirement: !ruby/object:Gem::Requirement
148
154
  requirements:
149
155
  - - "~>"
150
156
  - !ruby/object:Gem::Version
151
- version: 0.49.1
157
+ version: 0.69.0
152
158
  type: :development
153
159
  prerelease: false
154
160
  version_requirements: !ruby/object:Gem::Requirement
155
161
  requirements:
156
162
  - - "~>"
157
163
  - !ruby/object:Gem::Version
158
- version: 0.49.1
164
+ version: 0.69.0
165
+ - !ruby/object:Gem::Dependency
166
+ name: rubocop-performance
167
+ requirement: !ruby/object:Gem::Requirement
168
+ requirements:
169
+ - - "~>"
170
+ - !ruby/object:Gem::Version
171
+ version: '1.3'
172
+ type: :development
173
+ prerelease: false
174
+ version_requirements: !ruby/object:Gem::Requirement
175
+ requirements:
176
+ - - "~>"
177
+ - !ruby/object:Gem::Version
178
+ version: '1.3'
159
179
  - !ruby/object:Gem::Dependency
160
180
  name: simplecov
161
181
  requirement: !ruby/object:Gem::Requirement
162
182
  requirements:
163
183
  - - "~>"
164
184
  - !ruby/object:Gem::Version
165
- version: 0.14.1
185
+ version: 0.16.1
166
186
  type: :development
167
187
  prerelease: false
168
188
  version_requirements: !ruby/object:Gem::Requirement
169
189
  requirements:
170
190
  - - "~>"
171
191
  - !ruby/object:Gem::Version
172
- version: 0.14.1
192
+ version: 0.16.1
173
193
  description: Translates the Rails routes of your application into the languages defined
174
194
  in your locale files
175
195
  email:
@@ -188,13 +208,15 @@ files:
188
208
  - lib/route_translator/extensions/mapper.rb
189
209
  - lib/route_translator/extensions/route_set.rb
190
210
  - lib/route_translator/host.rb
211
+ - lib/route_translator/host_path_consistency_lambdas.rb
212
+ - lib/route_translator/locale_sanitizer.rb
191
213
  - lib/route_translator/route.rb
192
214
  - lib/route_translator/translator.rb
193
215
  - lib/route_translator/translator/path.rb
194
216
  - lib/route_translator/translator/path/segment.rb
195
217
  - lib/route_translator/translator/route_helpers.rb
196
218
  - lib/route_translator/version.rb
197
- homepage: http://github.com/enriclluelles/route_translator
219
+ homepage: https://github.com/enriclluelles/route_translator
198
220
  licenses:
199
221
  - MIT
200
222
  metadata: {}
@@ -204,17 +226,16 @@ require_paths:
204
226
  - lib
205
227
  required_ruby_version: !ruby/object:Gem::Requirement
206
228
  requirements:
207
- - - ">="
229
+ - - "~>"
208
230
  - !ruby/object:Gem::Version
209
- version: '0'
231
+ version: '2.3'
210
232
  required_rubygems_version: !ruby/object:Gem::Requirement
211
233
  requirements:
212
- - - ">"
234
+ - - ">="
213
235
  - !ruby/object:Gem::Version
214
- version: 1.3.1
236
+ version: '0'
215
237
  requirements: []
216
- rubyforge_project:
217
- rubygems_version: 2.6.12
238
+ rubygems_version: 3.0.3
218
239
  signing_key:
219
240
  specification_version: 4
220
241
  summary: Translate your Rails routes in a simple manner