xloc 0.2.3 → 0.2.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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/xloc.rb +4 -7
  3. data/lib/xloc/version.rb +1 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: dbb44f02943ff4ee9f19fd653d3e11ecf18d658c
4
- data.tar.gz: cdb68b9e1455e8e46852b5c5addaaeb3c5c58dae
3
+ metadata.gz: 22507eda6e36b368f9e68d3d20aec1f1c8b428b9
4
+ data.tar.gz: a13b4faba16488af2c099d9f1372cdb8e463d5a5
5
5
  SHA512:
6
- metadata.gz: 34ac02d9408cac4f144c6ac1e4597ba4d8e44ad5df630bed685313f9db2853506ea345cdc7b63bd72120af4d5212bb45678f78102401592f81a3ad06f69fb5e4
7
- data.tar.gz: 617e86b19d4d1f68b9b4c96bc36527238a45033be85fb4a1ee9757240ddef6672cb48414833c1f2d270d4c15576a9297836b1dfa46657c383b0f72c344ab839c
6
+ metadata.gz: 8321d0a9a3178114da87dbfa465b37d44b35497ad5218d8b2a0b8833ed816cc2869a6c62a552221d41b55b896149d252fa47e8cb560427883d48b8b09d845e07
7
+ data.tar.gz: fb801758fb9869f756a4490da86340bd2020f11bc9efdd61f34e77087705b7721b154194a3490c6016798baaffa4e177621cf9a9916dfde33b951fd4aa379b86
@@ -21,7 +21,7 @@ module Xloc
21
21
 
22
22
  Dir[folder.gsub(/\/$/, '') + '/**/*.{m,swift}'].each do |f|
23
23
  file = File.open(f)
24
- candidates = file.read.scan(/(?<=NSLocalizedString\().*?(?=\".?\,)/)
24
+ candidates = file.read.scan(/(?<=NSLocalizedString\().*?(?=\"\s?\,)/)
25
25
 
26
26
  next if candidates.count == 0
27
27
 
@@ -29,12 +29,9 @@ module Xloc
29
29
 
30
30
  candidates.each do |str|
31
31
  str = str.to_s
32
-
33
- first_index = str.index(/\"/)
34
- last_index = str.rindex(/\"/)
35
-
36
- next unless first_index || last_index
37
- found << str[(first_index + 1)..(last_index - 1)]
32
+ str[0] = ''
33
+ next if str.empty?
34
+ found << str
38
35
  end
39
36
 
40
37
 
@@ -1,3 +1,3 @@
1
1
  module Xloc
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: xloc
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Ask