gonative-cli 1.3.5 → 1.3.7

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
  SHA256:
3
- metadata.gz: f42b092dc883417d5ef7e77808a421ec5ab97e8d25a7b8e7fff947920a28272a
4
- data.tar.gz: d740e585b5cafaa70f1b65510e9672f8e250b5753c15f6b357ee7c54b22b943a
3
+ metadata.gz: bfed650a535963881f1c80a19d717bb18f60571461a99874052795df20cecd45
4
+ data.tar.gz: b7e5e2913f54a4e2c293075a7ffe3e8748e9ce19043d60d0f7ce267c0fa1e986
5
5
  SHA512:
6
- metadata.gz: a689ff2f8f58ac5f6f0f660d7a01f7774fa4cb5db19ab893acf4860aef006afabcfdb1bdbbcd1792a77d8057cabd725904c580fe3de28aea8527473598652179
7
- data.tar.gz: 1f0d62246fc9823a3dfd987c203b0d7a479c8de9efbb2f47863b01eee7a9aef55ae6bd20e15e800d3cf37289de9fe6defcd038ac072f5067b9fac90ab0bbaf30
6
+ metadata.gz: bcef9d47fd4e11337851590bd57d6b508b59890038bbc65117ac01a1daf39250dcecdb24806908da51c98da4266e97a04df715ff9dffb41d68b45ecc98115b9f
7
+ data.tar.gz: 77259fd98da73589ea5783abb851e2c9a3b99b374bb2b5a3923364483de29bb49d7aef9ca2c7e80e2e4038df856edbd6fbaa7c9e454785c0837dbe7c11567443
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (1.3.5)
4
+ gonative-cli (1.3.7)
5
5
  activesupport (~> 6.0)
6
6
  cocoapods (~> 1.10)
7
7
  colorize (~> 0.8.0)
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module IOS
6
+ class AddLanguage < Base
7
+ desc 'Add language to the project'
8
+
9
+ argument :language, required: true, desc: 'Language code you want to add to the project.'
10
+ def call(language:, **)
11
+ Plugins::IOS::AddLanguage.call(language)
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
@@ -13,6 +13,7 @@ module GoNative
13
13
  register 'ios set-bundle-id', IOS::SetBundleId
14
14
  register 'ios rename', IOS::Rename
15
15
  register 'ios version', IOS::Version
16
+ register 'ios add-language', IOS::AddLanguage
16
17
 
17
18
  register 'android create', Android::Create
18
19
  register 'android publish', Android::Publish
@@ -0,0 +1,38 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'xcodeproj'
4
+
5
+ module GoNative
6
+ module Plugins
7
+ module IOS
8
+ class AddLanguage
9
+ extend DSL::Serviceable
10
+
11
+ attr_reader :language
12
+
13
+ def initialize(language)
14
+ @language = language
15
+ end
16
+
17
+ def call
18
+ proj = Xcodeproj::Project.open('MedianIOS.xcodeproj')
19
+ file = proj.new_file("#{language}.lproj/Localizable.strings")
20
+ file.move(localizable_group(proj))
21
+ file.name = language
22
+
23
+ proj.save
24
+ end
25
+
26
+ def localizable_group(proj)
27
+ proj.objects.each do |o|
28
+ if o.is_a?(Xcodeproj::Project::Object::PBXGroup) && (o.hierarchy_path == '/LeanIOS/Localizable.strings')
29
+ return o
30
+ end
31
+ end
32
+
33
+ nil
34
+ end
35
+ end
36
+ end
37
+ end
38
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = '1.3.5'
4
+ VERSION = '1.3.7'
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.5
4
+ version: 1.3.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-11-29 00:00:00.000000000 Z
11
+ date: 2023-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -190,6 +190,7 @@ files:
190
190
  - lib/gonative/commands/android/create.rb
191
191
  - lib/gonative/commands/android/publish.rb
192
192
  - lib/gonative/commands/base.rb
193
+ - lib/gonative/commands/ios/add_language.rb
193
194
  - lib/gonative/commands/ios/create.rb
194
195
  - lib/gonative/commands/ios/embed_extensions.rb
195
196
  - lib/gonative/commands/ios/embed_scripts.rb
@@ -202,6 +203,7 @@ files:
202
203
  - lib/gonative/dsl/error_catchable.rb
203
204
  - lib/gonative/dsl/serviceable.rb
204
205
  - lib/gonative/plugins/android/create.rb
206
+ - lib/gonative/plugins/ios/add_language.rb
205
207
  - lib/gonative/plugins/ios/build_framework.rb
206
208
  - lib/gonative/plugins/ios/create.rb
207
209
  - lib/gonative/plugins/ios/embed_extensions.rb