phonelib 0.6.35 → 0.6.36

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 770eab6b0e50f91ca3f6ee754d39913dda65dccd
4
- data.tar.gz: 5f7cbc9b9a7c10fcb76210a70bc8af9772636761
3
+ metadata.gz: ebb5c4a03e76dff6c8aafae4aca658e6703542bf
4
+ data.tar.gz: 62e417bddb31c30731c9db39419840c7337558aa
5
5
  SHA512:
6
- metadata.gz: 6f2f4cf02a6733c9c156fc8d6a6c009bf89016962f181acfb6dd2c1b97249eb2b8ea5e8d9d52ddd7684264741c44e46dd80f80d2ef55a00fec046b3c140057ec
7
- data.tar.gz: a60fbde65be9395dfedb166776d2902b29352a9a0965d1bcab0ef1a5de0c5e73410a228ebd60cbb91c831e7feaef54a90afafde3c36d3bf7de5f9f4e9447c537
6
+ metadata.gz: 61fb6b7dee5132bf7c63cb5a604cd2fb2ab9782ba20bc6df8b4a0367cb497da9b596f475dc00031f93ee4580d2a98ae13ea5feb43bdc6a273f87b3a77941c969
7
+ data.tar.gz: 978d3dcb0236573a1b2425949e0a5716abe196d0052d59e30dd71fae5b794094dda948de9a243dfc91c2f900867ad73164504e101243eead4c9d6c98df10a983
Binary file
Binary file
@@ -149,7 +149,12 @@ module Phonelib
149
149
  rule.gsub!(/(\$NP|\$FG)/, '$NP' => prefix, '$FG' => '$1')
150
150
 
151
151
  # add space to format groups, change first group to rule,
152
- format_string = format[:format].gsub(/(\d)\$/, '\\1 $').gsub('$1', rule)
152
+ format_string = format[:format].gsub(/(\d)\$/, '\\1 $')
153
+ if format_string.include? '$1'
154
+ format_string.gsub! '$1', rule
155
+ else
156
+ format_string = rule.gsub('$1', '') + format_string
157
+ end
153
158
 
154
159
  @formatting_data =
155
160
  [@national_number.match(/#{format[Core::PATTERN]}/), format_string]
@@ -1,4 +1,4 @@
1
1
  module Phonelib
2
2
  # @private
3
- VERSION = '0.6.35'
3
+ VERSION = '0.6.36'
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: phonelib
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.35
4
+ version: 0.6.36
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vadim Senderovich
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-06-10 00:00:00.000000000 Z
11
+ date: 2019-06-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake