fastlane-plugin-firebase_app_distribution 0.2.0 → 0.2.1

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: 5c1f9a3bb79927dc10b2ed68e66ad0c8b9593ef5a31a6cc50d91ed635eb6443a
4
- data.tar.gz: bfadb919bccb7bb7b1b7d943cd92b0709f3f8d432e8508efc2ac56bb8969c809
3
+ metadata.gz: 5069b6e632432b25f206acbd47973be4326f582b8e555c7783c26638a6da9c21
4
+ data.tar.gz: a8f5e1ff46a220466eaa79e2e1072532b8715c79297462ac064e41da330e4c6e
5
5
  SHA512:
6
- metadata.gz: 55f7b6245940db7d3141ac707d52646d5dc369d7a9d4a2add36e1e5efe11365e0ef3aaa13cbab59cb51f8696320d186570bd5c3e38f5856fc8a801246b3f93da
7
- data.tar.gz: dc02fa663afe0cfeba8b71f2de2bc91feed18cf2ca3b0134567d80729d529c9dab9573831e0c23100e96f00c2447b1af95dc688860b514ea6080fd3e303ed438
6
+ metadata.gz: 93749ffc7b47c65964da87b9db79925d71f1a0fc81bc0f33bd8710c8af34b934d19c7aad04f1e79bed2f90000190485ed07b86b1fb623cccbd1a81839d0ccdff
7
+ data.tar.gz: ebba43e6bc7de7d8742bab36a7a8139b176f1cbfdf2130bdddd2131e114448077f51b3458c308ede0a828335a58ad21cdcfa7fc9a5ca1955f479919868236505
@@ -89,7 +89,7 @@ module Fastlane
89
89
  if binary_path.nil? || !File.exist?(binary_path)
90
90
  UI.crash!("#{ErrorMessage.binary_not_found(@binary_type)}: #{binary_path}")
91
91
  end
92
- binary_hash = Digest::SHA256.hexdigest(File.open(binary_path).read)
92
+ binary_hash = Digest::SHA256.hexdigest(read_binary(binary_path))
93
93
 
94
94
  begin
95
95
  response = connection.get(v1_apps_url(app_id)) do |request|
@@ -114,7 +114,7 @@ module Fastlane
114
114
  #
115
115
  # Throws a user_error if an invalid app id is passed in, or if the binary file does not exist
116
116
  def upload_binary(app_id, binary_path, platform)
117
- connection.post(binary_upload_url(app_id), File.open(binary_path).read) do |request|
117
+ connection.post(binary_upload_url(app_id), read_binary(binary_path)) do |request|
118
118
  request.headers["Authorization"] = "Bearer " + @auth_token
119
119
  request.headers["X-APP-DISTRO-API-CLIENT-ID"] = "fastlane"
120
120
  request.headers["X-APP-DISTRO-API-CLIENT-TYPE"] = platform
@@ -223,6 +223,11 @@ module Fastlane
223
223
  conn.adapter(Faraday.default_adapter)
224
224
  end
225
225
  end
226
+
227
+ def read_binary(path)
228
+ # File must be read in binary mode to work on Windows
229
+ File.open(path, 'rb').read
230
+ end
226
231
  end
227
232
  end
228
233
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module FirebaseAppDistribution
3
- VERSION = "0.2.0"
3
+ VERSION = "0.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-firebase_app_distribution
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stefan Natchev
@@ -10,7 +10,7 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-09-02 00:00:00.000000000 Z
13
+ date: 2020-09-16 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: pry