gonative-cli 0.3.1 → 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 690305498ca8ab6181d0e80242d605e1b0e5973baa6a3fca46fe50b397dc1198
4
- data.tar.gz: dc5ed22127d3202d50fe568b566de50a18437b8824c69e89ccb97de6088b06e0
3
+ metadata.gz: 409f92d9c03c97da1340ab786447a40e3af3a51676a11e2f1005c3552bdad1c1
4
+ data.tar.gz: e42bd2f0bf847b47ca705096d571fefc16541e511b9fe7663423b601037e660a
5
5
  SHA512:
6
- metadata.gz: d925ca5a5452a8e8f2ccbbf7d59afd6a69d098cfe3a64cceb03b497176c30725530ccb767b7d283efdbbff9542e3db894854c96232f765f6487aad0ffcf22211
7
- data.tar.gz: 71d61a4112ad9a67545f846071952b27f353b5d019b89c59ae08b73015f031ea8e27ae1ae6bd41df9df35a91ea11d25dcff27ab52b70d9d0c432c1ab9d6ee038
6
+ metadata.gz: a068137b15c168995c30c26bb59853c1032e162da06c5d7c804dfde181621e76c88d11ed91d285037202b4935c264f1e6feffdfd7bda0e886add8c0c1667e7e3
7
+ data.tar.gz: a35cd033721b764e4883089db018ab6b4e61bb8cda0bec8d757fff3e17723d1c7b3262ed494247080ca6c8e18f0d481457cea7c6a684b8f1829fb4cdfbf304d7
@@ -0,0 +1,29 @@
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
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- gonative-cli (0.3.0)
5
- cocoapods-release
4
+ gonative-cli (0.3.1)
5
+ cocoapods (~> 1.10)
6
6
  colorize
7
7
  dry-cli (~> 0.7)
8
8
  xcodeproj (~> 1.20)
@@ -12,18 +12,80 @@ GEM
12
12
  remote: https://rubygems.org/
13
13
  specs:
14
14
  CFPropertyList (3.0.3)
15
+ activesupport (5.2.6)
16
+ concurrent-ruby (~> 1.0, >= 1.0.2)
17
+ i18n (>= 0.7, < 2)
18
+ minitest (~> 5.1)
19
+ tzinfo (~> 1.1)
20
+ addressable (2.8.0)
21
+ public_suffix (>= 2.0.2, < 5.0)
22
+ algoliasearch (1.27.5)
23
+ httpclient (~> 2.8, >= 2.8.3)
24
+ json (>= 1.5.1)
15
25
  ast (2.4.2)
16
26
  atomos (0.1.3)
17
27
  byebug (11.1.3)
18
28
  claide (1.0.3)
19
- cocoapods-release (0.3.1)
29
+ cocoapods (1.10.2)
30
+ addressable (~> 2.6)
31
+ claide (>= 1.0.2, < 2.0)
32
+ cocoapods-core (= 1.10.2)
33
+ cocoapods-deintegrate (>= 1.0.3, < 2.0)
34
+ cocoapods-downloader (>= 1.4.0, < 2.0)
35
+ cocoapods-plugins (>= 1.0.0, < 2.0)
36
+ cocoapods-search (>= 1.0.0, < 2.0)
37
+ cocoapods-trunk (>= 1.4.0, < 2.0)
38
+ cocoapods-try (>= 1.1.0, < 2.0)
39
+ colored2 (~> 3.1)
40
+ escape (~> 0.0.4)
41
+ fourflusher (>= 2.3.0, < 3.0)
42
+ gh_inspector (~> 1.0)
43
+ molinillo (~> 0.6.6)
44
+ 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)
50
+ algoliasearch (~> 1.0)
51
+ concurrent-ruby (~> 1.1)
52
+ fuzzy_match (~> 2.0.4)
53
+ nap (~> 1.0)
54
+ netrc (~> 0.11)
55
+ public_suffix
56
+ typhoeus (~> 1.0)
57
+ cocoapods-deintegrate (1.0.4)
58
+ cocoapods-downloader (1.4.0)
59
+ cocoapods-plugins (1.0.0)
60
+ nap
61
+ cocoapods-search (1.0.0)
62
+ cocoapods-trunk (1.5.0)
63
+ nap (>= 0.8, < 2.0)
64
+ netrc (~> 0.11)
65
+ cocoapods-try (1.2.0)
20
66
  coderay (1.1.3)
21
67
  colored2 (3.1.2)
22
68
  colorize (0.8.1)
69
+ concurrent-ruby (1.1.9)
23
70
  diff-lcs (1.4.4)
24
71
  dry-cli (0.7.0)
72
+ escape (0.0.4)
73
+ ethon (0.14.0)
74
+ ffi (>= 1.15.0)
75
+ ffi (1.15.3)
76
+ fourflusher (2.3.1)
77
+ fuzzy_match (2.0.4)
78
+ gh_inspector (1.1.3)
79
+ httpclient (2.8.3)
80
+ i18n (1.8.10)
81
+ concurrent-ruby (~> 1.0)
82
+ json (2.5.1)
25
83
  method_source (1.0.0)
84
+ minitest (5.14.4)
85
+ molinillo (0.6.6)
26
86
  nanaimo (0.3.0)
87
+ nap (1.1.0)
88
+ netrc (0.11.0)
27
89
  parallel (1.20.1)
28
90
  parser (3.0.2.0)
29
91
  ast (~> 2.4.1)
@@ -33,6 +95,7 @@ GEM
33
95
  pry-byebug (3.9.0)
34
96
  byebug (~> 11.0)
35
97
  pry (~> 0.13.0)
98
+ public_suffix (4.0.6)
36
99
  rainbow (3.0.0)
37
100
  rake (13.0.6)
38
101
  regexp_parser (2.1.1)
@@ -64,7 +127,13 @@ GEM
64
127
  rubocop-performance (1.11.4)
65
128
  rubocop (>= 1.7.0, < 2.0)
66
129
  rubocop-ast (>= 0.4.0)
130
+ ruby-macho (1.4.0)
67
131
  ruby-progressbar (1.11.0)
132
+ thread_safe (0.3.6)
133
+ typhoeus (1.4.0)
134
+ ethon (>= 0.9.0)
135
+ tzinfo (1.2.9)
136
+ thread_safe (~> 0.1)
68
137
  unicode-display_width (2.0.0)
69
138
  xcodeproj (1.20.0)
70
139
  CFPropertyList (>= 2.3.3, < 4.0)
data/gonative-cli.gemspec CHANGED
@@ -29,8 +29,8 @@ Gem::Specification.new do |spec|
29
29
 
30
30
  spec.add_dependency 'dry-cli', '~> 0.7'
31
31
  spec.add_dependency 'zeitwerk', '~> 2.4'
32
+ spec.add_dependency 'cocoapods', '~> 1.10'
32
33
  spec.add_dependency 'xcodeproj', '~> 1.20'
33
- spec.add_dependency 'cocoapods-release'
34
34
  spec.add_dependency 'colorize'
35
35
 
36
36
  spec.add_development_dependency 'rspec', '~> 3.10'
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+
2
3
  require 'xcodeproj'
3
4
 
4
5
  module GoNative
@@ -4,11 +4,9 @@ module GoNative
4
4
  module Plugins
5
5
  module IOS
6
6
  class Publish
7
- autoload :FileUtils, 'fileutils'
8
-
9
7
  extend DSL::Serviceable
10
-
11
-
8
+ include Release
9
+
12
10
  def call
13
11
  assert_valid_plugin!
14
12
  build_framework!
@@ -27,13 +25,6 @@ module GoNative
27
25
 
28
26
  raise Error, "Error building framework. Please run the create-framework file manually to fix any errors"
29
27
  end
30
-
31
- def release_pod!
32
- Utils::UI.info 'Linting and releasing pod'
33
- return if system('pod release')
34
-
35
- raise Error, "Failed to release pod"
36
- end
37
28
  end
38
29
  end
39
30
  end
@@ -0,0 +1,73 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'cocoapods'
4
+
5
+ module GoNative
6
+ module Plugins
7
+ module IOS
8
+ class Publish
9
+ module Release
10
+ GONATIVE_SOURCE_NAME = 'gonative-specs'.freeze
11
+
12
+ def release_pod!
13
+ Utils::UI.info 'Linting and releasing pod'
14
+ assert_spec_exists!
15
+ sources_manager.update(GONATIVE_SOURCE_NAME)
16
+ assert_not_pushed!
17
+ verify_lib!
18
+ create_and_push_tag!
19
+ push_to_pod_repo!
20
+ end
21
+
22
+ private
23
+
24
+ def assert_spec_exists!
25
+ return if spec_name
26
+
27
+ raise Error, "No podspec file exists"
28
+ end
29
+
30
+ def assert_not_pushed!
31
+ version = spec.version
32
+ name = spec.name
33
+
34
+ pushed_versions = source.versions(name).collect(&:to_s)
35
+
36
+ raise Error, "#{name} (#{version}) has already been pushed to #{source.name}" if pushed_versions.include? version.to_s
37
+ end
38
+
39
+ def verify_lib!
40
+ raise Error, "pod lib lint failed" unless system("pod lib lint #{spec_name} --private")
41
+ end
42
+
43
+ def create_and_push_tag!
44
+ unless system("git tag | grep #{spec.version} > /dev/null")
45
+ system "git tag #{spec.version}"
46
+ system "git push && git push --tags"
47
+ end
48
+ end
49
+
50
+ def push_to_pod_repo!
51
+ system "pod repo push #{GONATIVE_SOURCE_NAME} #{spec_name} --private"
52
+ end
53
+
54
+ def spec_name
55
+ @spec_name ||= Dir.entries(".").select { |s| s.end_with? ".podspec" }.first
56
+ end
57
+
58
+ def spec
59
+ @spec ||= Pod::Specification.from_file(spec_name)
60
+ end
61
+
62
+ def source
63
+ @source ||= sources_manager.source_with_name_or_url(GONATIVE_SOURCE_NAME)
64
+ end
65
+
66
+ def sources_manager
67
+ Pod::Config.instance.sources_manager
68
+ end
69
+ end
70
+ end
71
+ end
72
+ end
73
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module GoNative
4
- VERSION = "0.3.1"
4
+ VERSION = "0.4.0"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: gonative-cli
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Hunaid Hassan
@@ -39,33 +39,33 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '2.4'
41
41
  - !ruby/object:Gem::Dependency
42
- name: xcodeproj
42
+ name: cocoapods
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '1.20'
47
+ version: '1.10'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '1.20'
54
+ version: '1.10'
55
55
  - !ruby/object:Gem::Dependency
56
- name: cocoapods-release
56
+ name: xcodeproj
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
- - - ">="
59
+ - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '0'
61
+ version: '1.20'
62
62
  type: :runtime
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
- - - ">="
66
+ - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '0'
68
+ version: '1.20'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: colorize
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -162,6 +162,7 @@ files:
162
162
  - ".rspec"
163
163
  - ".rubocop.yml"
164
164
  - CODE_OF_CONDUCT.md
165
+ - FacebookPlugin.podspec
165
166
  - Gemfile
166
167
  - Gemfile.lock
167
168
  - LICENSE.txt
@@ -182,6 +183,7 @@ files:
182
183
  - lib/gonative/plugins.rb
183
184
  - lib/gonative/plugins/ios/create.rb
184
185
  - lib/gonative/plugins/ios/publish.rb
186
+ - lib/gonative/plugins/ios/publish/release.rb
185
187
  - lib/gonative/utils/template_inflator.rb
186
188
  - lib/gonative/utils/ui.rb
187
189
  - lib/gonative/version.rb