route_translator 7.1.0 → 7.1.1

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
  SHA256:
3
- metadata.gz: ccd0d757f83bdef655cbbd42b82a1e4c819298a2e6fde735f8082b197fcc9e5a
4
- data.tar.gz: 438c1495fa784da92180d44616e0c568d302cf67cc487c1867ad9a01759ff87f
3
+ metadata.gz: 570472c4c19fb73c69f7d010b705b8fbd3a1c426944b87b528e9436342e18faf
4
+ data.tar.gz: 7367796df62fabe93cabd32b5ee6966180776f811b24185277ef1e92266ddf9e
5
5
  SHA512:
6
- metadata.gz: a722c1b6ee1a5c51ba8d5bf038304a54d727c2126e2e3386261577fb554d8886aea76e66704dbe9eb84d17a493261df3389991ffd011ee30023392374f3be2c7
7
- data.tar.gz: ba31fe5c99c9c6999def680b75814357355a7538735048019d2ca982c699cb3bb67234675cfd56ea536d6584bfb46c223b1402fc7610690ea7d882b33831a524
6
+ metadata.gz: b95c8a800676cb8e9c52982fe762b89aa1b236fee84eae8eae70acc35fe176f6307d1c295ef4b47216851be10aded8476775f2d52f43da854ee418601da56abf
7
+ data.tar.gz: f561ec0d27cc21881faa818c0dfb093bf01017684ea58850607a7978476fd443b8c5b356f86665e20265474b41daaedc54b7d449a5d00440bf520fd4b1580415
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 7.1.1 / 2019-12-26
4
+
5
+ * [ENHANCEMENT] Minor improvements to configuration and tests
6
+
3
7
  ## 7.1.0 / 2019-12-26
4
8
 
5
9
  * [ENHANCEMENT] Use Addressable gem for URI parsing
@@ -42,20 +42,26 @@ module RouteTranslator
42
42
 
43
43
  module_function
44
44
 
45
- def config(&block)
45
+ def config
46
46
  @config ||= Configuration.new
47
47
 
48
48
  DEFAULT_CONFIGURATION.each do |option, value|
49
49
  @config[option] ||= value
50
50
  end
51
51
 
52
- yield @config if block
52
+ yield @config if block_given?
53
53
 
54
- resolve_host_locale_config_conflicts unless @config.host_locales.empty?
54
+ resolve_host_locale_config_conflicts if @config.host_locales.present?
55
55
 
56
56
  @config
57
57
  end
58
58
 
59
+ def reset_config
60
+ @config = nil
61
+
62
+ config
63
+ end
64
+
59
65
  def available_locales
60
66
  locales = config.available_locales
61
67
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module RouteTranslator
4
- VERSION = '7.1.0'
4
+ VERSION = '7.1.1'
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: 7.1.0
4
+ version: 7.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Geremia Taglialatela