route_translator 5.0.3 → 5.0.4

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
2
  SHA1:
3
- metadata.gz: 1efbf1d634e0b0aa98996696597062602c489b2e
4
- data.tar.gz: ca508082b5119005ac74c7a879e19689025344b2
3
+ metadata.gz: 082c2e8186923d0e715cc9540942a23fc09a9f85
4
+ data.tar.gz: 41803873b2329a079d55cc1cc3251402f7c0dfc1
5
5
  SHA512:
6
- metadata.gz: a08241603bfe03def737174d6f4c77a25829b9ea29df6c074837303a1eaf318fbf702297d6d7d77bd1275c2cf9de4f11e0fb820be425a5406d58669cafa32fa8
7
- data.tar.gz: 3ed3281dd701719866e52db7749513672919103bf6caf8e1dc5ed04e767ed2a38fc9c608f6826f86203fc53d8b595eeb1f14ee8ce029bc88516984d1d76d66f9
6
+ metadata.gz: 7b78458687cdaba7cd60f658f5973319f1cb05240db25be435446bdcba0a198d0555fc44f1da5bbe334c97ca8c5a9050a690339ddcad88c7a44c03778e02c3d1
7
+ data.tar.gz: 5d0a9e7baec151c0bcfe7cd26b3ef166d8e5bb18c22e63d931f13f5adb0ebc7c433551cbddd7b9965821de58970c92b7922e9834b4fdb540e5036dc727ad72a9
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.0.4 (2016-11-11)
4
+
5
+ * Retain value of options_constraints if callable
6
+
3
7
  ## 5.0.3 (2016-11-01)
4
8
 
5
9
  * Fix issue with callable constraints
@@ -46,11 +46,14 @@ module RouteTranslator
46
46
  next
47
47
  end
48
48
 
49
- translated_options_constraints = options_constraints.respond_to?(:call) ? {} : options_constraints.dup
49
+ translated_options_constraints = options_constraints.dup
50
50
  translated_options = options.dup
51
51
 
52
- translated_options_constraints[RouteTranslator.locale_param_key] = locale.to_s
53
- translated_options[RouteTranslator.locale_param_key] = locale.to_s.gsub('native_', '') unless translated_options.include?(RouteTranslator.locale_param_key)
52
+ if translated_options_constraints.respond_to?(:[]=)
53
+ translated_options_constraints[RouteTranslator.locale_param_key] = locale.to_s
54
+ end
55
+
56
+ translated_options[RouteTranslator.locale_param_key] = locale.to_s.gsub('native_', '') unless translated_options.include?(RouteTranslator.locale_param_key)
54
57
 
55
58
  translated_name = translate_name(name, locale, route_set.named_routes.names)
56
59
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module RouteTranslator
3
- VERSION = '5.0.3'.freeze
3
+ VERSION = '5.0.4'.freeze
4
4
  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: 5.0.3
4
+ version: 5.0.4
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: 2016-11-01 00:00:00.000000000 Z
13
+ date: 2016-11-11 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: activesupport