gonative-cli 0.1.0 → 0.3.0

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: d2663848bf1f2a69d93a5c24fced1c78012e8f406607bc7066f7193ac0f5af91
4
- data.tar.gz: 6e443dcbfbfcc891dbf52d38d149c701494ae05f9a8c83fe0b93c87275e66e9e
3
+ metadata.gz: 3083872f1c9594eb4960a669de5d2374e4911f6cba3cfa27d26e30edc3b1fa47
4
+ data.tar.gz: 76ba3d5dc2220a237170f85ddffde6bce4c2d77499fca35d9b741e0d2c2bfa21
5
5
  SHA512:
6
- metadata.gz: 4cf523cb8f7071f1a92c742e0df7bc0b7bd786e478f38c99a6f8def717e96b50a67cbd6d3d7bc9e538ac450f2b381c61ffdd847543224fe1698a2013742ea182
7
- data.tar.gz: 77dfb8932b1e9ff5cd63963d16279162e67601650af3cf140a28be597185b9e357e264940b0530a7e4ebe142780625db4fd618bfb0ead4582711b217787923cb
6
+ metadata.gz: fc86e31ccd7ec5f2dab9faad2b30aaf59bf405fd5a0dedaf05af5b50e2a53f0a93fa38d0a084df204c637b6a542ba6f11de34b70a07d54d0cc0927d28fd8cbc1
7
+ data.tar.gz: d747a8dd31c174fc62c4ef1140d4a071389496e17844d3137a3409257eb14941cb23d32b729fbe0add4958ad5968457fc71e58d7bb75bed7f19b5ad6d481b371
data/Gemfile.lock CHANGED
@@ -1,7 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.1.0)
4
+ gonative-cli (0.2.0)
5
+ cocoapods-release
6
+ colorize
5
7
  dry-cli (~> 0.7)
6
8
  xcodeproj (~> 1.20)
7
9
  zeitwerk (~> 2.4)
@@ -14,8 +16,10 @@ GEM
14
16
  atomos (0.1.3)
15
17
  byebug (11.1.3)
16
18
  claide (1.0.3)
19
+ cocoapods-release (0.3.1)
17
20
  coderay (1.1.3)
18
21
  colored2 (3.1.2)
22
+ colorize (0.8.1)
19
23
  diff-lcs (1.4.4)
20
24
  dry-cli (0.7.0)
21
25
  method_source (1.0.0)
data/gonative-cli.gemspec CHANGED
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.description = "Create and manage gonative plugin projects using cli."
13
13
  spec.homepage = "https://www.github.com/gonativeio/gonative-cli"
14
14
  spec.license = "MIT"
15
- spec.required_ruby_version = Gem::Requirement.new(">= 2.6.0")
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
16
16
 
17
17
  spec.metadata["homepage_uri"] = spec.homepage
18
18
  spec.metadata["source_code_uri"] = "https://www.github.com/gonativeio/gonative-cli"
@@ -30,6 +30,8 @@ Gem::Specification.new do |spec|
30
30
  spec.add_dependency 'dry-cli', '~> 0.7'
31
31
  spec.add_dependency 'zeitwerk', '~> 2.4'
32
32
  spec.add_dependency 'xcodeproj', '~> 1.20'
33
+ spec.add_dependency 'cocoapods-release'
34
+ spec.add_dependency 'colorize'
33
35
 
34
36
  spec.add_development_dependency 'rspec', '~> 3.10'
35
37
  spec.add_development_dependency 'pry-byebug', '~> 3.9'
@@ -5,6 +5,7 @@ module GoNative
5
5
  extend Dry::CLI::Registry
6
6
 
7
7
  register 'version', Version, aliases: %w[--version -v]
8
- register 'plugin ios', Plugin::IOS
8
+ register 'ios create', IOS::Create
9
+ register 'ios publish', IOS::Publish
9
10
  end
10
11
  end
@@ -2,16 +2,16 @@
2
2
 
3
3
  module GoNative
4
4
  module Commands
5
- module Plugin
6
- class IOS < Base
7
- desc 'Create a new app'
8
-
5
+ module IOS
6
+ class Create < Base
7
+ desc 'Create a new plugin'
8
+
9
9
  argument :name, required: true, desc: 'Name of the plugin'
10
-
10
+
11
11
  def call(name:, **)
12
12
  Plugins::IOS::Create.call(name)
13
13
  end
14
14
  end
15
15
  end
16
16
  end
17
- end
17
+ end
@@ -0,0 +1,15 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Commands
5
+ module IOS
6
+ class Publish < Base
7
+ desc 'Publish a new version'
8
+
9
+ def call
10
+ Plugins::IOS::Publish.call
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
@@ -1,6 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  require 'xcodeproj'
3
- require 'pry'
4
3
 
5
4
  module GoNative
6
5
  module Plugins
@@ -23,7 +22,9 @@ module GoNative
23
22
  set_working_dir!
24
23
  cp_template_files!
25
24
  inflate_templates!
25
+ chmod_frameworks_script!
26
26
  create_framework_proj!
27
+ run_pod_install!
27
28
  end
28
29
 
29
30
  def assert_not_exists!
@@ -53,6 +54,10 @@ module GoNative
53
54
  inflate_files
54
55
  end
55
56
 
57
+ def chmod_frameworks_script!
58
+ FileUtils.chmod 0755, 'create-framework.sh'
59
+ end
60
+
56
61
  def create_framework_proj!
57
62
  proj = Xcodeproj::Project.new(FileUtils.pwd)
58
63
  target = proj.new_target(:framework, "#{plugin_name}Framework", :ios, '10.0')
@@ -0,0 +1,35 @@
1
+ # frozen_string_literal: true
2
+
3
+ module GoNative
4
+ module Plugins
5
+ module IOS
6
+ class Publish
7
+ autoload :FileUtils, 'fileutils'
8
+
9
+ extend DSL::Serviceable
10
+
11
+
12
+ def call
13
+ assert_valid_plugin!
14
+ release_pod!
15
+ end
16
+
17
+ def assert_valid_plugin!
18
+ return if File.file?('create-framework.sh')
19
+
20
+ raise Error, "File 'create-framework.sh' does not exist. Please make sure this is a valid GoNative plugin directory"
21
+ end
22
+
23
+ def build_framework!
24
+ puts 'Building framework'.colorize(:green)
25
+ system('sh create-framework.sh')
26
+ end
27
+
28
+ def release_pod!
29
+ puts 'Linting and releasing pod'.colorize(:green)
30
+ system('pod release')
31
+ end
32
+ end
33
+ end
34
+ end
35
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.1.0"
4
+ VERSION = "0.3.0"
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: 0.1.0
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2021-08-10 00:00:00.000000000 Z
11
+ date: 2021-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -52,6 +52,34 @@ dependencies:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
54
  version: '1.20'
55
+ - !ruby/object:Gem::Dependency
56
+ name: cocoapods-release
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: colorize
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
55
83
  - !ruby/object:Gem::Dependency
56
84
  name: rspec
57
85
  requirement: !ruby/object:Gem::Requirement
@@ -146,12 +174,14 @@ files:
146
174
  - lib/gonative.rb
147
175
  - lib/gonative/commands.rb
148
176
  - lib/gonative/commands/base.rb
149
- - lib/gonative/commands/plugin/ios.rb
177
+ - lib/gonative/commands/ios/create.rb
178
+ - lib/gonative/commands/ios/publish.rb
150
179
  - lib/gonative/commands/version.rb
151
180
  - lib/gonative/dsl/error_catchable.rb
152
181
  - lib/gonative/dsl/serviceable.rb
153
182
  - lib/gonative/plugins.rb
154
183
  - lib/gonative/plugins/ios/create.rb
184
+ - lib/gonative/plugins/ios/publish.rb
155
185
  - lib/gonative/utils/template_inflator.rb
156
186
  - lib/gonative/version.rb
157
187
  - templates/plugins/ios/.gitignore
@@ -178,7 +208,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
178
208
  requirements:
179
209
  - - ">="
180
210
  - !ruby/object:Gem::Version
181
- version: 2.6.0
211
+ version: 2.7.0
182
212
  required_rubygems_version: !ruby/object:Gem::Requirement
183
213
  requirements:
184
214
  - - ">="