tmsync 0.2.2 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tmsync/cli.rb +3 -0
- data/lib/tmsync/version.rb +1 -1
- data/lib/tmsync.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cebd6cabe522817b08e27a68674f876ac6230bf0
|
4
|
+
data.tar.gz: 05a305e4fa9e9f3fcc3ab1a778374a24cf66adb3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e2253480e605e1f27dfb92b1a284da70c3a43b0c5ccca9c8d3646ebed75a45ed7baa66b05959816545afecbbb49c0a65bc94980946150b358c390b292e0a880e
|
7
|
+
data.tar.gz: 0151f6219e93d24f8007f71ede107bfc8d321cb12e0c39ab29a7c50c5450389e68fcc9940d1786fd63a2f7fac897c256104a9f6d7f6f1d2f00060b36c5146144
|
data/lib/tmsync/cli.rb
CHANGED
@@ -49,6 +49,8 @@ module Tmsync
|
|
49
49
|
file_directory[0] = '' if file_directory[0] == '/'
|
50
50
|
file_extension = File.extname(file_path)
|
51
51
|
file_name = File.basename(file_path, file_extension)
|
52
|
+
android_module = ''
|
53
|
+
android_module = file_path.to_a.first if options[:platform] == 'android'
|
52
54
|
|
53
55
|
command = options[:command]
|
54
56
|
.gsub('<LANGUAGE>', language)
|
@@ -56,6 +58,7 @@ module Tmsync
|
|
56
58
|
.gsub('<FILE_DIR>', file_directory)
|
57
59
|
.gsub('<FILE_EXT>', file_extension)
|
58
60
|
.gsub('<FILE_NAME>', file_name)
|
61
|
+
.gsub('<ANDROID_MODULE>', android_module)
|
59
62
|
|
60
63
|
puts "Executing: '#{command}'"
|
61
64
|
output = %x(#{command})
|
data/lib/tmsync/version.rb
CHANGED
data/lib/tmsync.rb
CHANGED
@@ -5,7 +5,7 @@ module Tmsync
|
|
5
5
|
IOS_MATCHING_REGEX = '.*\/(\S+)\.lproj\/.*\.strings'
|
6
6
|
IOS_EXCLUDE_REGEX = '\/Carthage\/|\/Pods\/'
|
7
7
|
|
8
|
-
ANDROID_MATCHING_REGEX = '
|
8
|
+
ANDROID_MATCHING_REGEX = '[^\/]+\/src\/main\/res\/values-?(\S+)?\/strings.xml'
|
9
9
|
ANDROID_EXCLUDE_REGEX = '\A\z'
|
10
10
|
|
11
11
|
FALLBACK_LANGUAGE = 'en'
|
@@ -38,7 +38,7 @@ module Tmsync
|
|
38
38
|
found_files = found_files.select { |file_path|
|
39
39
|
file_path =~ @matching_regex
|
40
40
|
}.map { |file_path|
|
41
|
-
[file_path.match(@matching_regex).captures.
|
41
|
+
[file_path.match(@matching_regex).captures.last, file_path]
|
42
42
|
}
|
43
43
|
|
44
44
|
result = found_files.group_by(&:first).map { |k,v| [k, v.each(&:shift).flatten] }.to_h
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tmsync
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Cihat Gündüz
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-01-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|