gonative-cli 0.5.0 → 0.5.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -1
- data/README.md +11 -10
- data/gonative-cli.gemspec +1 -0
- data/lib/gonative/commands/ios/publish.rb +5 -3
- data/lib/gonative/plugins/ios/create.rb +6 -1
- data/lib/gonative/plugins/ios/{publish/release.rb → release.rb} +16 -16
- data/lib/gonative/plugins/ios/{publish.rb → verify.rb} +1 -3
- data/lib/gonative/version.rb +1 -1
- data/templates/plugins/ios/common/PLUGIN_NAME.podspec.tpl +3 -3
- data/templates/plugins/ios/common/Podfile.tpl +0 -1
- data/templates/plugins/ios/common/js/info.plist.json.tpl +1 -0
- metadata +19 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 78bc2e39f0e47add3dc19a36627177d195e16d6d7d26b3a43eb6113756177550
|
4
|
+
data.tar.gz: b7ab3025bc73a810bf3926028617235faf394916e65a7a9d005c3680d14f4637
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: edc83d42ec4523aa47f7eef8f69590b705cb9e6b549a65e8fc9506cef199861d84df26375897c5f37c616ded20f2e4d46b9c9173d7cf00b11dc81073b0b2a200
|
7
|
+
data.tar.gz: 98ea6a626bfae04fbf99a0a88466d47fdda946a55cccf0f10f60e2c44ac78246956789e9333b9fb786e5a132fde9a7fd5d765361497069e094190e1a4c0a4b73
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,22 +1,23 @@
|
|
1
1
|
# Gonative::Cli
|
2
2
|
|
3
|
-
|
4
|
-
|
5
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
This cli is a tool to create/publish new plugins for GoNative apps.
|
6
4
|
|
7
5
|
## Installation
|
8
6
|
|
9
|
-
|
7
|
+
This gem has a minimum Ruby version requirement which is 2.7.0+ macOS comes with Ruby 2.6 and so built-in Ruby cannot be used for this gem.
|
8
|
+
|
9
|
+
### Homebrew
|
10
10
|
|
11
|
-
|
12
|
-
|
13
|
-
|
11
|
+
You can install newer versions of Ruby using homebrew by using
|
12
|
+
|
13
|
+
$ brew install ruby
|
14
|
+
$ echo 'export PATH="/usr/local/opt/ruby/bin:$PATH"' >> ~/.zshrc
|
14
15
|
|
15
|
-
|
16
|
+
After that you will need to restart the terminal application for changes to take effect.
|
16
17
|
|
17
|
-
|
18
|
+
Confirm the installation by running `ruby -v`
|
18
19
|
|
19
|
-
|
20
|
+
Install the gem now using:
|
20
21
|
|
21
22
|
$ gem install gonative-cli
|
22
23
|
|
data/gonative-cli.gemspec
CHANGED
@@ -32,6 +32,7 @@ Gem::Specification.new do |spec|
|
|
32
32
|
spec.add_dependency 'cocoapods', '~> 1.10'
|
33
33
|
spec.add_dependency 'xcodeproj', '~> 1.20'
|
34
34
|
spec.add_dependency 'colorize', '~> 0.8.0'
|
35
|
+
spec.add_dependency 'activesupport', '~> 6.0'
|
35
36
|
|
36
37
|
spec.add_development_dependency 'rspec', '~> 3.10'
|
37
38
|
spec.add_development_dependency 'pry-byebug', '~> 3.9'
|
@@ -4,10 +4,12 @@ module GoNative
|
|
4
4
|
module Commands
|
5
5
|
module IOS
|
6
6
|
class Publish < Base
|
7
|
-
desc '
|
7
|
+
desc 'Verify, build and release a new version'
|
8
|
+
option :skip_build, type: :boolean, default: false
|
8
9
|
|
9
|
-
def call
|
10
|
-
Plugins::IOS::
|
10
|
+
def call(skip_build:, **)
|
11
|
+
Plugins::IOS::Verify.call unless skip_build
|
12
|
+
Plugins::IOS::Release.call
|
11
13
|
end
|
12
14
|
end
|
13
15
|
end
|
@@ -1,6 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require 'xcodeproj'
|
4
|
+
require 'active_support/core_ext/string/inflections'
|
4
5
|
|
5
6
|
module GoNative
|
6
7
|
module Plugins
|
@@ -94,7 +95,11 @@ module GoNative
|
|
94
95
|
end
|
95
96
|
|
96
97
|
def contents(file)
|
97
|
-
Utils::TemplateInflator.new(File.read(file)).call(PLUGIN_NAME: plugin_name)
|
98
|
+
Utils::TemplateInflator.new(File.read(file)).call(PLUGIN_NAME: plugin_name, REPO_NAME: repo_name)
|
99
|
+
end
|
100
|
+
|
101
|
+
def repo_name
|
102
|
+
plugin_name.underscore.dasherize.prepend 'ios-'
|
98
103
|
end
|
99
104
|
end
|
100
105
|
end
|
@@ -5,21 +5,22 @@ require 'cocoapods'
|
|
5
5
|
module GoNative
|
6
6
|
module Plugins
|
7
7
|
module IOS
|
8
|
-
class
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
8
|
+
class Release
|
9
|
+
extend DSL::Serviceable
|
10
|
+
|
11
|
+
GONATIVE_SOURCE_NAME = 'gonative-specs'.freeze
|
12
|
+
|
13
|
+
def call
|
14
|
+
Utils::UI.info 'Linting and releasing pod'
|
15
|
+
assert_spec_exists!
|
16
|
+
sources_manager.update(GONATIVE_SOURCE_NAME)
|
17
|
+
assert_not_pushed!
|
18
|
+
create_and_push_tag!
|
19
|
+
push_to_pod_repo!
|
20
|
+
end
|
21
|
+
|
22
|
+
private
|
23
|
+
|
23
24
|
def assert_spec_exists!
|
24
25
|
return if spec_name
|
25
26
|
|
@@ -62,7 +63,6 @@ module GoNative
|
|
62
63
|
def sources_manager
|
63
64
|
Pod::Config.instance.sources_manager
|
64
65
|
end
|
65
|
-
end
|
66
66
|
end
|
67
67
|
end
|
68
68
|
end
|
@@ -3,15 +3,13 @@
|
|
3
3
|
module GoNative
|
4
4
|
module Plugins
|
5
5
|
module IOS
|
6
|
-
class
|
6
|
+
class Verify
|
7
7
|
extend DSL::Serviceable
|
8
|
-
include Release
|
9
8
|
|
10
9
|
def call
|
11
10
|
assert_valid_plugin!
|
12
11
|
assert_staging_clear!
|
13
12
|
build_framework!
|
14
|
-
release_pod!
|
15
13
|
end
|
16
14
|
|
17
15
|
def assert_valid_plugin!
|
data/lib/gonative/version.rb
CHANGED
@@ -10,19 +10,19 @@ TODO: Add long description of the pod here.
|
|
10
10
|
s.homepage = 'https://github.com/gonativeio/{{PLUGIN_NAME}}'
|
11
11
|
s.license = { :type => 'MIT', :file => 'LICENSE' }
|
12
12
|
s.author = { 'hhunaid' => 'hhunaid@gmail.com' }
|
13
|
-
s.source = { :git => 'git@github.com:gonativeio/{{
|
13
|
+
s.source = { :git => 'git@github.com:gonativeio/{{REPO_NAME}}.git', :tag => s.version.to_s }
|
14
14
|
|
15
15
|
s.ios.deployment_target = '10.0'
|
16
16
|
s.swift_versions = '5.0'
|
17
17
|
|
18
18
|
s.subspec 'Source' do |cs|
|
19
19
|
cs.source_files = '{{PLUGIN_NAME}}/Classes/**/*.{h,m,swift}'
|
20
|
-
cs.resource_bundle = { 'JS' => 'js/*.{js}' }
|
20
|
+
cs.resource_bundle = { 'JS' => 'js/*.{js,json}' }
|
21
21
|
end
|
22
22
|
|
23
23
|
s.subspec 'Binary' do |cs|
|
24
24
|
cs.ios.vendored_frameworks = 'XCFramework/{{PLUGIN_NAME}}.xcframework'
|
25
|
-
cs.resource_bundle = { 'JS' => 'js/*.{js}' }
|
25
|
+
cs.resource_bundle = { 'JS' => 'js/*.{js,json}' }
|
26
26
|
end
|
27
27
|
|
28
28
|
s.default_subspec = 'Source'
|
@@ -0,0 +1 @@
|
|
1
|
+
{}
|
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.5.
|
4
|
+
version: 0.5.5
|
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-
|
11
|
+
date: 2021-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: dry-cli
|
@@ -80,6 +80,20 @@ dependencies:
|
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
82
|
version: 0.8.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: activesupport
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '6.0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '6.0'
|
83
97
|
- !ruby/object:Gem::Dependency
|
84
98
|
name: rspec
|
85
99
|
requirement: !ruby/object:Gem::Requirement
|
@@ -181,8 +195,8 @@ files:
|
|
181
195
|
- lib/gonative/dsl/serviceable.rb
|
182
196
|
- lib/gonative/plugins.rb
|
183
197
|
- lib/gonative/plugins/ios/create.rb
|
184
|
-
- lib/gonative/plugins/ios/
|
185
|
-
- lib/gonative/plugins/ios/
|
198
|
+
- lib/gonative/plugins/ios/release.rb
|
199
|
+
- lib/gonative/plugins/ios/verify.rb
|
186
200
|
- lib/gonative/utils/template_inflator.rb
|
187
201
|
- lib/gonative/utils/ui.rb
|
188
202
|
- lib/gonative/version.rb
|
@@ -192,6 +206,7 @@ files:
|
|
192
206
|
- templates/plugins/ios/common/PLUGIN_NAME/Info.plist
|
193
207
|
- templates/plugins/ios/common/Podfile.tpl
|
194
208
|
- templates/plugins/ios/common/create-framework.sh.tpl
|
209
|
+
- templates/plugins/ios/common/js/info.plist.json.tpl
|
195
210
|
- templates/plugins/ios/common/js/polyfill.js.tpl
|
196
211
|
- templates/plugins/ios/language-specific/objc/PLUGIN_NAME/Classes/GNPLUGIN_NAME.h.tpl
|
197
212
|
- templates/plugins/ios/language-specific/objc/PLUGIN_NAME/Classes/GNPLUGIN_NAME.m.tpl
|