get_link_list 0.0.8 → 0.0.9

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: 695addb5a241afaf4586f634deab2e7cc673dd2e
4
- data.tar.gz: 2e0ac91c886be471f0cbcbeafbd9954d3c4e8fcc
3
+ metadata.gz: cead90c1d3ca639554bcc86b096a323f8f78824d
4
+ data.tar.gz: d8f04b7f19a7e8c4295bbc541f895aa0ffd41827
5
5
  SHA512:
6
- metadata.gz: 4291ce91febee26e9af35bf6015ceae40214bc173570278e4cae3e82a71918e2958b757e5109d285ae41741c05dd83db3cf2970febbf341044a258e0a15cf869
7
- data.tar.gz: 8c6e6102117d3c14610a2bbc3c34fd58876eaa001dbb7e1e631e40583bfecf24994ecc0f448f6249b80832e20d18b6df059ceb4fa0a95cd9066e60fd976e25be
6
+ metadata.gz: 2d64f72a48344e10423435138f418a0f6e1a6750aaaa78141c8906f237e9930aaa96b9fb161e371bf9c2084c47e95c0b9ceca2ff2c767a97bb39a43f94e16a9e
7
+ data.tar.gz: 0c2ebad6706ba6957ff1486826a2b059059a736ba8961c9e6909c927b6c95705b15ac70af6d61e2f5c5a1bd093c7e6e10d76eea080106dba37c4e859bcb5a94a
@@ -6,4 +6,8 @@ GetLinkList.configure do |config|
6
6
  # config.ignore_controller = [:"rails/mailers" => "", :"users/omniauth_callbacks" => ""]
7
7
 
8
8
  # config.ignore_controller = []
9
+
10
+ # If contains a locale word in the url, to convert it into any language
11
+ # default is en
12
+ # config.default_lang = "en"
9
13
  end
@@ -1,9 +1,11 @@
1
1
  module GetLinkList
2
2
  class Config
3
3
  attr_accessor :ignore_controller
4
+ attr_accessor :default_lang
4
5
 
5
6
  def initialize
6
7
  @ignore_controller = ["controller_name1": ["action_name1","action_name2"],"controller_name2": ""]
8
+ @default_lang = "en"
7
9
  end
8
10
 
9
11
  end
@@ -21,7 +21,7 @@ module GetLinkList
21
21
  def match_initial_path_segment(path)
22
22
  path= path.sub(/\(.:format\)/, "")
23
23
  path.sub(/:(.*)id/, "1")
24
- path.sub(/:(.*)locale/, "en")
24
+ path.sub(/\(\/:locale\)/, "\/"+ GetLinkList.config.default_lang)
25
25
  end
26
26
 
27
27
  end
@@ -1,3 +1,3 @@
1
1
  module GetLinkList
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: get_link_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - candle