gonative-cli 0.4.2 → 0.5.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: 0ed6fc209dcb54b6ff39fa6d292fdcc47e0ec08c163977b035453910921a15d3
4
- data.tar.gz: 94d5007ab0d24868898f0ab16c4b393efdfbb4b4baca121f924b422181ac0ee1
3
+ metadata.gz: cb6548942f64dc18c96d0468c4073592bb6e894c2fb0e76f564e6d5e8cb6b88e
4
+ data.tar.gz: 163fd2f3918cff7e0433beb1330abcc9bfa44f943a4574942b50a77178cd61db
5
5
  SHA512:
6
- metadata.gz: 6abf2f2e2dfaa049dbef91b2d1c84e5698b2ac93e161a9968f8c76643b376605c4b5187e60493ce56a9f833266d41765e4a9b4bb1d3410e073769627c9df7d67
7
- data.tar.gz: c2aca1855f62cd0f63f695fe4c95fb2421a88e5b303b50427f19248828fdf68105865e07d0d10a3ee0075593941ad74673a173a66d2ad86fe01160dca603aa3a
6
+ metadata.gz: bbcd4a57a19c23c90007da2687d45e1cd226f55f99aba8d6c8875dbf54431d5d919d5ed731cf6b8154f76cc8559bbdba7db957047611d3cf732c4c7824fc7cac
7
+ data.tar.gz: 360016fa4b68fc7672adc8e516ed102595c4ef272567b8b53b7df6ba50e72bfc72d835c0ca69689c96cc2d2b990cff96e12afbef136ed895ac759cab38d511c7
data/Gemfile.lock CHANGED
@@ -1,9 +1,9 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.4.1)
4
+ gonative-cli (0.4.5)
5
5
  cocoapods (~> 1.10)
6
- colorize
6
+ colorize (~> 0.8.0)
7
7
  dry-cli (~> 0.7)
8
8
  xcodeproj (~> 1.20)
9
9
  zeitwerk (~> 2.4)
@@ -12,11 +12,12 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  CFPropertyList (3.0.3)
15
- activesupport (5.2.6)
15
+ activesupport (6.1.3)
16
16
  concurrent-ruby (~> 1.0, >= 1.0.2)
17
- i18n (>= 0.7, < 2)
18
- minitest (~> 5.1)
19
- tzinfo (~> 1.1)
17
+ i18n (>= 1.6, < 2)
18
+ minitest (>= 5.1)
19
+ tzinfo (~> 2.0)
20
+ zeitwerk (~> 2.3)
20
21
  addressable (2.8.0)
21
22
  public_suffix (>= 2.0.2, < 5.0)
22
23
  algoliasearch (1.27.5)
@@ -26,10 +27,10 @@ GEM
26
27
  atomos (0.1.3)
27
28
  byebug (11.1.3)
28
29
  claide (1.0.3)
29
- cocoapods (1.10.2)
30
- addressable (~> 2.6)
30
+ cocoapods (1.11.2)
31
+ addressable (~> 2.8)
31
32
  claide (>= 1.0.2, < 2.0)
32
- cocoapods-core (= 1.10.2)
33
+ cocoapods-core (= 1.11.2)
33
34
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
34
35
  cocoapods-downloader (>= 1.4.0, < 2.0)
35
36
  cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -40,19 +41,19 @@ GEM
40
41
  escape (~> 0.0.4)
41
42
  fourflusher (>= 2.3.0, < 3.0)
42
43
  gh_inspector (~> 1.0)
43
- molinillo (~> 0.6.6)
44
+ molinillo (~> 0.8.0)
44
45
  nap (~> 1.0)
45
- ruby-macho (~> 1.4)
46
- xcodeproj (>= 1.19.0, < 2.0)
47
- cocoapods-core (1.10.2)
48
- activesupport (> 5.0, < 6)
49
- addressable (~> 2.6)
46
+ ruby-macho (>= 1.0, < 3.0)
47
+ xcodeproj (>= 1.21.0, < 2.0)
48
+ cocoapods-core (1.11.2)
49
+ activesupport (>= 5.0, < 7)
50
+ addressable (~> 2.8)
50
51
  algoliasearch (~> 1.0)
51
52
  concurrent-ruby (~> 1.1)
52
53
  fuzzy_match (~> 2.0.4)
53
54
  nap (~> 1.0)
54
55
  netrc (~> 0.11)
55
- public_suffix
56
+ public_suffix (~> 4.0)
56
57
  typhoeus (~> 1.0)
57
58
  cocoapods-deintegrate (1.0.4)
58
59
  cocoapods-downloader (1.4.0)
@@ -82,7 +83,7 @@ GEM
82
83
  json (2.5.1)
83
84
  method_source (1.0.0)
84
85
  minitest (5.14.4)
85
- molinillo (0.6.6)
86
+ molinillo (0.8.0)
86
87
  nanaimo (0.3.0)
87
88
  nap (1.1.0)
88
89
  netrc (0.11.0)
@@ -129,13 +130,12 @@ GEM
129
130
  rubocop-ast (>= 0.4.0)
130
131
  ruby-macho (1.4.0)
131
132
  ruby-progressbar (1.11.0)
132
- thread_safe (0.3.6)
133
133
  typhoeus (1.4.0)
134
134
  ethon (>= 0.9.0)
135
- tzinfo (1.2.9)
136
- thread_safe (~> 0.1)
135
+ tzinfo (2.0.4)
136
+ concurrent-ruby (~> 1.0)
137
137
  unicode-display_width (2.0.0)
138
- xcodeproj (1.20.0)
138
+ xcodeproj (1.21.0)
139
139
  CFPropertyList (>= 2.3.3, < 4.0)
140
140
  atomos (~> 0.1.3)
141
141
  claide (>= 1.0.2, < 2.0)
data/gonative-cli.gemspec CHANGED
@@ -31,7 +31,7 @@ Gem::Specification.new do |spec|
31
31
  spec.add_dependency 'zeitwerk', '~> 2.4'
32
32
  spec.add_dependency 'cocoapods', '~> 1.10'
33
33
  spec.add_dependency 'xcodeproj', '~> 1.20'
34
- spec.add_dependency 'colorize'
34
+ spec.add_dependency 'colorize', '~> 0.8.0'
35
35
 
36
36
  spec.add_development_dependency 'rspec', '~> 3.10'
37
37
  spec.add_development_dependency 'pry-byebug', '~> 3.9'
@@ -7,9 +7,10 @@ module GoNative
7
7
  desc 'Create a new plugin'
8
8
 
9
9
  argument :name, required: true, desc: 'Name of the plugin'
10
+ option :language, default: "objc", values: Plugins::IOS::Create::LANGUAGES, desc: "Plugin's language"
10
11
 
11
- def call(name:, **)
12
- Plugins::IOS::Create.call(name)
12
+ def call(name:, language:, **)
13
+ Plugins::IOS::Create.call(name, language)
13
14
  end
14
15
  end
15
16
  end
@@ -11,11 +11,15 @@ module GoNative
11
11
  extend DSL::Serviceable
12
12
 
13
13
  TEMPLATE_DIRECTORY_PATH = File.expand_path(File.join(__dir__, '../../../..', 'templates', 'plugins', 'ios'))
14
+ COMMON_TEMPLATES_PATH = File.join(TEMPLATE_DIRECTORY_PATH, 'common')
14
15
 
15
- attr_reader :plugin_name
16
+ LANGUAGES = %w[objc swift].freeze
16
17
 
17
- def initialize(plugin_name)
18
+ attr_reader :plugin_name, :language
19
+
20
+ def initialize(plugin_name, language)
18
21
  @plugin_name = plugin_name
22
+ @language = language
19
23
  end
20
24
 
21
25
  def call
@@ -40,7 +44,8 @@ module GoNative
40
44
  end
41
45
 
42
46
  def cp_template_files!
43
- FileUtils.cp_r("#{TEMPLATE_DIRECTORY_PATH}/.", '.')
47
+ FileUtils.cp_r("#{COMMON_TEMPLATES_PATH}/.", '.')
48
+ system('ditto', File.join(TEMPLATE_DIRECTORY_PATH, 'language-specific', language), '.')
44
49
  end
45
50
 
46
51
  def inflate_templates!
@@ -30,9 +30,9 @@ module GoNative
30
30
  version = spec.version
31
31
  name = spec.name
32
32
 
33
- pushed_versions = source.versions(name).collect(&:to_s)
33
+ pushed_versions = source.versions(name)&.collect(&:to_s)
34
34
 
35
- raise Error, "#{name} (#{version}) has already been pushed to #{source.name}" if pushed_versions.include? version.to_s
35
+ raise Error, "#{name} (#{version}) has already been pushed to #{source.name}" if pushed_versions&.include? version.to_s
36
36
  end
37
37
 
38
38
  def create_and_push_tag!
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.4.2"
4
+ VERSION = "0.5.0"
5
5
  end
File without changes
@@ -10,17 +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 => 'https://github.com/gonativeio/{{PLUGIN_NAME}}.git', :tag => s.version.to_s }
13
+ s.source = { :git => 'git@github.com:gonativeio/{{PLUGIN_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
- cs.source_files = '{{PLUGIN_NAME}}/Classes/**/*'
19
+ cs.source_files = '{{PLUGIN_NAME}}/Classes/**/*.{h,m,swift}'
20
+ cs.resource_bundle = { 'JS' => 'js/*.{js}' }
20
21
  end
21
22
 
22
23
  s.subspec 'Binary' do |cs|
23
24
  cs.ios.vendored_frameworks = 'XCFramework/{{PLUGIN_NAME}}.xcframework'
25
+ cs.resource_bundle = { 'JS' => 'js/*.{js}' }
24
26
  end
25
27
 
26
28
  s.default_subspec = 'Source'
@@ -1,7 +1,7 @@
1
1
  platform :ios, '10.0'
2
2
 
3
3
  source 'https://cdn.cocoapods.org/'
4
- source 'https://github.com/gonativeio/gonative-specs'
4
+ source 'git@github.com:gonativeio/gonative-specs.git'
5
5
 
6
6
 
7
7
  target '{{PLUGIN_NAME}}Framework' do
File without changes
@@ -2,7 +2,7 @@
2
2
  // GN{{PLUGIN_NAME}}.h
3
3
  // {{PLUGIN_NAME}}
4
4
  //
5
- // Created by Hunaid Hassan on 20.07.21.
5
+ // Created by Hunaid Hassan.
6
6
  //
7
7
 
8
8
  #import <Foundation/Foundation.h>
@@ -2,7 +2,7 @@
2
2
  // GN{{PLUGIN_NAME}}.m
3
3
  // {{PLUGIN_NAME}}
4
4
  //
5
- // Created by Hunaid Hassan on 20.07.21.
5
+ // Created by Hunaid Hassan.
6
6
  //
7
7
 
8
8
  #import "GN{{PLUGIN_NAME}}.h"
@@ -0,0 +1,12 @@
1
+ //
2
+ // GN{{PLUGIN_NAME}}.m
3
+ // {{PLUGIN_NAME}}
4
+ //
5
+ // Created by Hunaid Hassan.
6
+ //
7
+
8
+ #import <GoNativeCore/GNEventEmitter.h>
9
+
10
+ @interface GN_EXTERN_MODULE(GN{{PLUGIN_NAME}}, GNEventEmitter)
11
+
12
+ @end
@@ -0,0 +1,14 @@
1
+ //
2
+ // GN{{PLUGIN_NAME}}.swift
3
+ // {{PLUGIN_NAME}}
4
+ //
5
+ // Created by Hunaid Hassan on.
6
+ //
7
+
8
+ import Foundation
9
+ import GoNativeCore
10
+
11
+ @objc(GN{{PLUGIN_NAME}})
12
+ public class GN{{PLUGIN_NAME}}: GNEventEmitter {
13
+
14
+ }
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.4.2
4
+ version: 0.5.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-11 00:00:00.000000000 Z
11
+ date: 2021-09-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: dry-cli
@@ -70,16 +70,16 @@ dependencies:
70
70
  name: colorize
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
- - - ">="
73
+ - - "~>"
74
74
  - !ruby/object:Gem::Version
75
- version: '0'
75
+ version: 0.8.0
76
76
  type: :runtime
77
77
  prerelease: false
78
78
  version_requirements: !ruby/object:Gem::Requirement
79
79
  requirements:
80
- - - ">="
80
+ - - "~>"
81
81
  - !ruby/object:Gem::Version
82
- version: '0'
82
+ version: 0.8.0
83
83
  - !ruby/object:Gem::Dependency
84
84
  name: rspec
85
85
  requirement: !ruby/object:Gem::Requirement
@@ -162,7 +162,6 @@ files:
162
162
  - ".rspec"
163
163
  - ".rubocop.yml"
164
164
  - CODE_OF_CONDUCT.md
165
- - FacebookPlugin.podspec
166
165
  - Gemfile
167
166
  - Gemfile.lock
168
167
  - LICENSE.txt
@@ -187,14 +186,17 @@ files:
187
186
  - lib/gonative/utils/template_inflator.rb
188
187
  - lib/gonative/utils/ui.rb
189
188
  - lib/gonative/version.rb
190
- - templates/plugins/ios/.gitignore
191
- - templates/plugins/ios/LICENSE
192
- - templates/plugins/ios/PLUGIN_NAME.podspec.tpl
193
- - templates/plugins/ios/PLUGIN_NAME/Classes/GNPLUGIN_NAME.h.tpl
194
- - templates/plugins/ios/PLUGIN_NAME/Classes/GNPLUGIN_NAME.m.tpl
195
- - templates/plugins/ios/PLUGIN_NAME/Info.plist
196
- - templates/plugins/ios/Podfile.tpl
197
- - templates/plugins/ios/create-framework.sh.tpl
189
+ - templates/plugins/ios/common/.gitignore
190
+ - templates/plugins/ios/common/LICENSE
191
+ - templates/plugins/ios/common/PLUGIN_NAME.podspec.tpl
192
+ - templates/plugins/ios/common/PLUGIN_NAME/Info.plist
193
+ - templates/plugins/ios/common/Podfile.tpl
194
+ - templates/plugins/ios/common/create-framework.sh.tpl
195
+ - templates/plugins/ios/common/js/polyfill.js.tpl
196
+ - templates/plugins/ios/language-specific/objc/PLUGIN_NAME/Classes/GNPLUGIN_NAME.h.tpl
197
+ - templates/plugins/ios/language-specific/objc/PLUGIN_NAME/Classes/GNPLUGIN_NAME.m.tpl
198
+ - templates/plugins/ios/language-specific/swift/PLUGIN_NAME/Classes/GNSwiftModule.m.tpl
199
+ - templates/plugins/ios/language-specific/swift/PLUGIN_NAME/Classes/GNSwiftModule.swift.tpl
198
200
  homepage: https://www.github.com/gonativeio/gonative-cli
199
201
  licenses:
200
202
  - MIT
@@ -1,29 +0,0 @@
1
- Pod::Spec.new do |s|
2
- s.name = 'FacebookPlugin'
3
- s.version = '1.0.0'
4
- s.summary = 'Facebook plugin for GoNative.'
5
-
6
- s.description = <<-DESC
7
- TODO: Add long description of the pod here.
8
- DESC
9
-
10
- s.homepage = 'https://github.com/gonativeio/FacebookPlugin'
11
- s.license = { :type => 'MIT', :file => 'LICENSE' }
12
- s.author = { 'hhunaid' => 'hhunaid@gmail.com' }
13
- s.source = { :git => 'https://github.com/gonativeio/FacebookPlugin.git', :tag => s.version.to_s }
14
-
15
- s.ios.deployment_target = '10.0'
16
- s.swift_versions = '5.0'
17
-
18
- s.subspec 'Source' do |cs|
19
- cs.source_files = 'FacebookPlugin/Classes/**/*'
20
- end
21
-
22
- s.subspec 'Binary' do |cs|
23
- cs.ios.vendored_frameworks = 'XCFramework/FacebookPlugin.xcframework'
24
- end
25
-
26
- s.default_subspec = 'Source'
27
- s.dependency 'FBSDKCoreKit', '~> 9.1.0'
28
- s.dependency 'GoNativeCore'
29
- end