ObjCLocalizableConst 1.0.2 → 1.0.4

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: 391c372852c7170bf9e0df99a0681a38646ff237
4
- data.tar.gz: ace9757711d96cf213beb052ed265dc09ca164ee
3
+ metadata.gz: 7ba6da5f867ac3038f48da56e4818de9dc6a6a0f
4
+ data.tar.gz: 83899797a584fe6153f4d5d7fa06b0b153351399
5
5
  SHA512:
6
- metadata.gz: 85e22707aa27fdc098fe3bec90c9c494bf1cebc7f93566d5c20d687120075667ad4b2219969254d278c8f2ddf49d3fa14f4bc82be77c51d2329b2474ce491540
7
- data.tar.gz: 124fa5263e3764f956bf097ba5d6b00c5e186b74f94a55ab3df3b7655d8d725ae1788011b2d03ab58e2c948f375ea082b64db120d07baea1d12e81339fa07164
6
+ metadata.gz: 76f2153390f1797f92094149949ecb96abff649ad4b478bd084ae59dd1c54cf1c30af25ee6e1921a55d7310a178a54fa39ff2e31a8c56d525847e3a8057389c4
7
+ data.tar.gz: 22293a7956dcf3f6221e0d4fd50277e18dbd5a506d901652d6690a6ed3649d4ebf01f0e975667a1423e7814b8a2eca9d1c1e8eab6715fa34740faa2d468237e3
@@ -22,7 +22,7 @@ command :generate do |c|
22
22
  end
23
23
 
24
24
  command :replace do |c|
25
- c.syntax = 'replace <LocalizeFile> <Folder or File> [options]'
25
+ c.syntax = 'replace <ConstantFile> <Folder or File> [options]'
26
26
  c.summary = 'Replace Strings in Folder using ConstFile.h'
27
27
  c.example 'description', 'replace {PATH} {DIR or FILE}'
28
28
 
@@ -4,10 +4,10 @@ class ObjCLocalizableConstGenerate
4
4
  fail 'É necessário informar onde deseja salvar o arquivo' if path.nil?
5
5
 
6
6
  @contentConst = File.read(constantFile)
7
- regx = /"(.+)"\s*=\s*"(.+)"\s*;/
7
+ regx = /"(.*)"\s*=\s*"(.*)"\s*;/
8
8
  @contentConst.gsub!(regx) do
9
9
  key = $1
10
- "static NSString * const kLocalizable#{key.gsub(".","_").camelcase} = @\"#{key}\";"
10
+ "static NSString * const kLocalized#{key.gsub(".","_").camelcase} = @\"#{key}\";"
11
11
  end
12
12
 
13
13
  File.open(path, "w") {|file| file.puts @contentConst }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ObjCLocalizableConst
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rodrigo Dias