cocoapods-xcremotecache 0.0.1 → 0.0.2

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: 9c8ea806c777060721ce8e440f64f46f99e14012aea29e4b5f096839e11d81ea
4
- data.tar.gz: 0a6ede5267ecdd314ac879a7bca8840f2d94b79a245f8b6002c9279c7a004862
3
+ metadata.gz: 359dfd9fb48e07a331b72fa8577d2405ef314f74da80e70a10ba1b215dce31ca
4
+ data.tar.gz: b6fe29ac1c506afdf58a6371f43f6f956b110ee1e5e55e2c489241032e349d8b
5
5
  SHA512:
6
- metadata.gz: c0949ce7b8617db61a2859cd787f3ab196a5f3048eed68b666ea69995ad491ea39e12fdf4b06b1c1a85a3c81eaec573c25ea996273203ae6691d5d24d6257e9c
7
- data.tar.gz: 162f1467dfcc90185b6a97509ccf09f250ff2f758d86832a538e1415c03a0a9654d3e1037dca29c5ddf734203d6f81e8d9cab23966e80af710550ba424caf3e8
6
+ metadata.gz: 1695e333fc0c7e93513271cd62297579acd0f5f3ced03ff610942969ce631186538b7265e4b29408219974b2ac53f4ca17c514522a9ee7315c6822dfb7d09a62
7
+ data.tar.gz: 480b2222e66937897e1a5e9157bde4985a9a9531301d76906553e3c7ac5856b04d417224d428ded3cc4b3cf9bc5a044f461471afaacb14f63ed4f214d73ff543
@@ -26,6 +26,7 @@ module CocoapodsXCRemoteCacheModifier
26
26
  FAKE_SRCROOT = "/#{'x' * 10 }"
27
27
  LLDB_INIT_COMMENT="#RemoteCacheCustomSourceMap"
28
28
  LLDB_INIT_PATH = "#{ENV['HOME']}/.lldbinit"
29
+ FAT_ARCHIVE_NAME_INFIX = 'arm64-x86_64'
29
30
 
30
31
  CUSTOM_CONFIGURATION_KEYS = [
31
32
  'enabled',
@@ -196,15 +197,18 @@ module CocoapodsXCRemoteCacheModifier
196
197
  release_url = 'https://api.github.com/repos/spotify/XCRemoteCache/releases/latest'
197
198
  asset_url = nil
198
199
 
199
- open(release_url, :http_basic_authentication => credentials) do |f|
200
- asset_url = JSON.parse(f.read)['assets'][0]['url']
200
+ URI.open(release_url) do |f|
201
+ assets_array = JSON.parse(f.read)['assets']
202
+ # Pick fat archive
203
+ asset_array = assets_array.detect{|arr| arr['name'].include?(FAT_ARCHIVE_NAME_INFIX)}
204
+ asset_url = asset_array['url']
201
205
  end
202
206
 
203
207
  if asset_url.nil?
204
208
  throw "Downloading XCRemoteCache failed"
205
209
  end
206
210
 
207
- open(asset_url, :http_basic_authentication => credentials, "accept" => 'application/octet-stream') do |f|
211
+ URI.open(asset_url, "accept" => 'application/octet-stream') do |f|
208
212
  File.open(local_package_location, "wb") do |file|
209
213
  file.puts f.read
210
214
  end
@@ -13,5 +13,5 @@
13
13
  # limitations under the License.
14
14
 
15
15
  module CocoapodsXcremotecache
16
- VERSION = "0.0.1"
16
+ VERSION = "0.0.2"
17
17
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cocoapods-xcremotecache
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Bartosz Polaczyk