cocoapods-trunk 1.4.1 → 1.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: 7f0a2309c1281858012a7c4267a7e51238805a5ccd6c28682d51338d10e54c72
4
- data.tar.gz: 4f28e72b7d0aa56b709ece149ab1b2f156311bd85627a8bcece288d1c197e759
3
+ metadata.gz: 43e91d5573ade7674c9ede81699454a44188687418caf843239ad9cd0b1a0e63
4
+ data.tar.gz: 9a978262bd54a83cbb69b3810df05950be3044a7deb04834ead9f2ef276d29fc
5
5
  SHA512:
6
- metadata.gz: d04bc5f939b2bde1fefeae748077aa1871b4d500d36946ad4820830f9ead8102b5d195907f10da465c480e051077a34b961301b5ea3faf4719b575ed7ba2291c
7
- data.tar.gz: 0756a6dd8f578984fe6813a501eeb327d904e6fb0f3fba2bcd99ca054f01c6b76b7fbe6232942f47615ba8563e65b5d995785298eab5567f1f8a6617ab288688
6
+ metadata.gz: 023642a2121bdb3e345d5aaa27012c42c262b464e5fbaaa0f0d6d693544aff401212f6845bc61a586689804af778bd57748033b47707eba509f1dedab8ce7f84
7
+ data.tar.gz: 25dd04be50dc69d3a5ca138b48a51b40e2577c446ab16e22e5b0390b4566919ff2360704201ffcac8b230c69d7033f6126e84be8250b7b9b5ac573c5a3343dab
@@ -1,3 +1,17 @@
1
+ ## 1.5.0 (2020-05-01)
2
+
3
+ ##### Enhancements
4
+
5
+ * Add --synchronous option to `pod trunk push`.
6
+ [Paul Beusterien](https://github.com/paulb777)
7
+ [#147](https://github.com/CocoaPods/cocoapods-trunk/pull/147)
8
+ [CocoaPods#9497](https://github.com/CocoaPods/CocoaPods/issues/9497)
9
+
10
+ ##### Bug Fixes
11
+
12
+ * None.
13
+
14
+
1
15
  ## 1.4.1 (2019-09-26)
2
16
 
3
17
  ##### Enhancements
@@ -7,19 +7,19 @@ GIT
7
7
 
8
8
  GIT
9
9
  remote: https://github.com/CocoaPods/CocoaPods.git
10
- revision: af83e4713771bc98dd7f903cc81c4fbc8866812c
10
+ revision: ae4d9804450c9f83a3fea29eadc3c6e2affe24c7
11
11
  branch: master
12
12
  specs:
13
- cocoapods (1.8.0.beta.1)
13
+ cocoapods (1.8.0)
14
14
  activesupport (>= 4.0.2, < 5)
15
15
  claide (>= 1.0.2, < 2.0)
16
- cocoapods-core (= 1.8.0.beta.1)
16
+ cocoapods-core (= 1.8.0)
17
17
  cocoapods-deintegrate (>= 1.0.3, < 2.0)
18
18
  cocoapods-downloader (>= 1.2.2, < 2.0)
19
19
  cocoapods-plugins (>= 1.0.0, < 2.0)
20
20
  cocoapods-search (>= 1.0.0, < 2.0)
21
21
  cocoapods-stats (>= 1.0.0, < 2.0)
22
- cocoapods-trunk (= 1.4.1)
22
+ cocoapods-trunk (= 1.5.0)
23
23
  cocoapods-try (>= 1.1.0, < 2.0)
24
24
  colored2 (~> 3.1)
25
25
  escape (~> 0.0.4)
@@ -32,10 +32,10 @@ GIT
32
32
 
33
33
  GIT
34
34
  remote: https://github.com/CocoaPods/Core.git
35
- revision: 0a6dea961da236995dfde3c7927e4daaf2045820
35
+ revision: dbc9b76820d546b4d655aa26141fad0412c3c849
36
36
  branch: master
37
37
  specs:
38
- cocoapods-core (1.8.0.beta.1)
38
+ cocoapods-core (1.8.0)
39
39
  activesupport (>= 4.0.2, < 6)
40
40
  algoliasearch (~> 1.0)
41
41
  concurrent-ruby (~> 1.0)
@@ -52,14 +52,14 @@ GIT
52
52
  PATH
53
53
  remote: .
54
54
  specs:
55
- cocoapods-trunk (1.4.1)
55
+ cocoapods-trunk (1.5.0)
56
56
  nap (>= 0.8, < 2.0)
57
57
  netrc (~> 0.11)
58
58
 
59
59
  GEM
60
60
  remote: https://rubygems.org/
61
61
  specs:
62
- CFPropertyList (3.0.0)
62
+ CFPropertyList (3.0.1)
63
63
  activesupport (4.2.11.1)
64
64
  i18n (~> 0.7)
65
65
  minitest (~> 5.1)
@@ -67,7 +67,7 @@ GEM
67
67
  tzinfo (~> 1.1)
68
68
  addressable (2.5.1)
69
69
  public_suffix (~> 2.0, >= 2.0.2)
70
- algoliasearch (1.26.1)
70
+ algoliasearch (1.27.0)
71
71
  httpclient (~> 2.8, >= 2.8.3)
72
72
  json (>= 1.5.1)
73
73
  ast (2.2.0)
@@ -104,7 +104,7 @@ GEM
104
104
  rb-inotify (>= 0.9)
105
105
  rb-kqueue (>= 0.2)
106
106
  metaclass (0.0.4)
107
- minitest (5.11.3)
107
+ minitest (5.12.0)
108
108
  mocha (1.1.0)
109
109
  metaclass (~> 0.0.1)
110
110
  mocha-on-bacon (0.2.2)
@@ -1,3 +1,3 @@
1
1
  module CocoaPodsTrunk
2
- VERSION = '1.4.1'.freeze
2
+ VERSION = '1.5.0'.freeze
3
3
  end
@@ -36,6 +36,7 @@ module Pod
36
36
  'This takes precedence over a .swift-version file.'],
37
37
  ['--skip-import-validation', 'Lint skips validating that the pod can be imported'],
38
38
  ['--skip-tests', 'Lint skips building and running tests during validation'],
39
+ ['--synchronous', 'If validation depends on other recently pushed pods, synchronize'],
39
40
  ].concat(super)
40
41
  end
41
42
 
@@ -47,6 +48,7 @@ module Pod
47
48
  @skip_import_validation = argv.flag?('skip-import-validation', false)
48
49
  @skip_tests = argv.flag?('skip-tests', false)
49
50
  @path = argv.shift_argument || '.'
51
+ @synchronous = argv.flag?('synchronous', false)
50
52
  find_podspec_file if File.directory?(@path)
51
53
  super
52
54
  end
@@ -80,6 +82,8 @@ module Pod
80
82
 
81
83
  private
82
84
 
85
+ MASTER_GIT_REPO_URL = 'https://github.com/CocoaPods/Specs.git'.freeze
86
+
83
87
  def push_to_trunk
84
88
  spec.attributes_hash[:pushed_with_swift_version] = @swift_version if @swift_version
85
89
  response = request_path(:post, "pods?allow_warnings=#{@allow_warnings}",
@@ -118,7 +122,7 @@ module Pod
118
122
  def validate_podspec
119
123
  UI.puts 'Validating podspec'.yellow
120
124
 
121
- validator = Validator.new(spec, [master_repo_url])
125
+ validator = Validator.new(spec, [repo_url])
122
126
  validator.allow_warnings = @allow_warnings
123
127
  validator.use_frameworks = @use_frameworks
124
128
  if validator.respond_to?(:use_modular_headers=)
@@ -139,21 +143,17 @@ module Pod
139
143
  @swift_version = validator.respond_to?(:used_swift_version) && validator.used_swift_version
140
144
  end
141
145
 
146
+ def repo_url
147
+ @synchronous ? MASTER_GIT_REPO_URL : Pod::TrunkSource::TRUNK_REPO_URL
148
+ end
149
+
142
150
  def update_master_repo
143
151
  # more robust Trunk setup logic:
144
152
  # - if Trunk exists, updates it
145
153
  # - if Trunk doesn't exist, add it and update it
146
154
  #
147
- trunk = sources_manager.find_or_create_source_with_url(Pod::TrunkSource::TRUNK_REPO_URL)
148
- sources_manager.update(trunk.name)
149
- end
150
-
151
- def master_repo_name
152
- sources_manager.master.first.name
153
- end
154
-
155
- def master_repo_url
156
- sources_manager.master.first.url
155
+ repo = sources_manager.find_or_create_source_with_url(repo_url)
156
+ sources_manager.update(repo.name)
157
157
  end
158
158
 
159
159
  def sources_manager
@@ -241,7 +241,6 @@ module Pod
241
241
  it 'updates the master repo when it exists' do
242
242
  Config.instance.sources_manager.stubs(:source_with_url).
243
243
  at_most(2).
244
- returns(Pod::TrunkSource.new(Pod::TrunkSource::TRUNK_REPO_NAME)).
245
244
  returns(Pod::TrunkSource.new(Pod::TrunkSource::TRUNK_REPO_NAME))
246
245
 
247
246
  Config.instance.sources_manager.expects(:update).with(Pod::TrunkSource::TRUNK_REPO_NAME).twice
@@ -262,6 +261,40 @@ module Pod
262
261
  end
263
262
  end
264
263
 
264
+ describe 'synchronous updating the git repo' do
265
+ before do
266
+ @cmd = Command.parse(%w(trunk push spec/fixtures/BananaLib.podspec --synchronous))
267
+ @cmd.stubs(:validate_podspec)
268
+ @cmd.stubs(:push_to_trunk).returns([200, success_json])
269
+ Command::Trunk::Push.any_instance.unstub(:update_master_repo)
270
+ Command::Trunk::Push.any_instance.stubs(:master_repo_name).returns('master')
271
+ end
272
+
273
+ it 'updates the git repo when it exists' do
274
+ Config.instance.sources_manager.stubs(:source_with_url).
275
+ at_most(2).
276
+ returns(Pod::TrunkSource.new('master'))
277
+
278
+ Config.instance.sources_manager.expects(:update).with('master').twice
279
+ Command::Repo::AddCDN.any_instance.expects(:run).never
280
+
281
+ @cmd.run
282
+ end
283
+
284
+ it 'sets up the git repo when it does not exist' do
285
+ Config.instance.sources_manager.stubs(:source_with_url).
286
+ at_most(3).
287
+ returns(nil).
288
+ returns(Pod::TrunkSource.new('master'))
289
+ Config.instance.sources_manager.stubs(:cdn_url?).returns(false)
290
+ Config.instance.sources_manager.stubs(:create_source_with_url).once.
291
+ returns(Pod::TrunkSource.new('master'))
292
+ Config.instance.sources_manager.expects(:update).with('master').twice
293
+
294
+ @cmd.run
295
+ end
296
+ end
297
+
265
298
  describe 'Presenting Responses to the user' do
266
299
  before do
267
300
  Command::Trunk::Push.any_instance.stubs(:update_master_repo)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-trunk
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.1
4
+ version: 1.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Eloy Durán
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2019-09-26 00:00:00.000000000 Z
11
+ date: 2020-05-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: nap