fastlane-plugin-bugsnag 1.2.0 → 1.2.1

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
  SHA1:
3
- metadata.gz: 624e98774c63f32ddf2857f3367aa6dba7af23e9
4
- data.tar.gz: 763cac39d2c3adca9932f82c36560bd43780b5ca
3
+ metadata.gz: d54ad579cd0a281435a4f43689f426a9a911ca1e
4
+ data.tar.gz: 588f1effd56cb664c7e0106c54022296c51be9e6
5
5
  SHA512:
6
- metadata.gz: bd3209ca6bfd1d2490d381f3826a0fd8b9887a35a77c7898db4e97657e6c470d6fb59dfb51616369fc8d1a16835cde124146f5fd5adc7496b1d9a0e2eed647e4
7
- data.tar.gz: 39983da8947d6edf0cc60abd71bd1b1394afe9d41bed80e24b15f58b5ad772bcb5301109b9ceed6637d9147fad570659fc2771d3289a995beb058030a29f7c0f
6
+ metadata.gz: 861014d528c7e88bbbaebe096ebe1f96782e50ac1f08645f40ef4a315fbbf3695e5d778aabb14dd8e33b38bc603b1bce7838ebe5b12f7401e704d3c606fb7d4d
7
+ data.tar.gz: f0ad580b698cb1478f2b76d4a0448d6856ad2a7d11a8cdfd38cc3aba6e3368e4cfed76f015661dfab9d828541dc1ef73f7530ecf05740909179f457c922fb8e8
@@ -26,6 +26,7 @@ module Fastlane
26
26
 
27
27
  payload[:sourceControl][:revision] = params[:revision] if params[:revision]
28
28
  payload[:sourceControl][:repository] = params[:repository] if params[:repository]
29
+ payload[:sourceControl][:provider] = params[:provider] if params[:provider]
29
30
 
30
31
  payload.reject! {|k,v| v == nil || (v.is_a?(Hash) && v.empty?)}
31
32
 
@@ -141,6 +142,16 @@ module Fastlane
141
142
  description: "The source control revision id",
142
143
  optional: true,
143
144
  default_value: options[:revision]),
145
+ FastlaneCore::ConfigItem.new(key: :provider,
146
+ description: "The source control provider, one of 'github-enterprise', 'gitlab-onpremise', or 'bitbucket-server', if any",
147
+ optional: true,
148
+ default_value: nil,
149
+ verify_block: proc do |value|
150
+ valid = ['github-enterprise', 'gitlab-onpremise', 'bitbucket-server'].include? value
151
+ unless valid
152
+ UI.user_error!("Provider must be one of 'github-enterprise', 'gitlab-onpremise', 'bitbucket-server', or unspecified")
153
+ end
154
+ end),
144
155
  FastlaneCore::ConfigItem.new(key: :endpoint,
145
156
  description: "Bugsnag deployment endpoint",
146
157
  optional: true,
@@ -263,8 +274,8 @@ module Fastlane
263
274
  def self.parse_response_body(response)
264
275
  begin
265
276
  JSON.load(response.body)
266
- rescue => e
267
- UI.user_error! "Failed to notify Bugsnag of a new build: #{e}"
277
+ rescue
278
+ nil
268
279
  end
269
280
  end
270
281
 
@@ -285,14 +296,17 @@ module Fastlane
285
296
  rescue => e
286
297
  UI.user_error! "Failed to notify Bugsnag of a new build: #{e}"
287
298
  end
288
- if response.code != "200"
289
- body = parse_response_body(response)
290
- if body and body.has_key? "errors"
299
+ if body = parse_response_body(response)
300
+ if body.has_key? "errors"
291
301
  errors = body["errors"].map {|error| "\n * #{error}"}.join
292
302
  UI.user_error! "The following errors occurred while notifying Bugsnag:#{errors}.\n\nPlease update your lane config and retry."
293
- else
303
+ elsif response.code != "200"
294
304
  UI.user_error! "Failed to notify Bugsnag of a new build. Please retry. HTTP status code: #{response.code}"
295
305
  end
306
+ if body.has_key? "warnings"
307
+ warnings = body["warnings"].map {|warn| "\n * #{warn}"}.join
308
+ UI.important "Sending the build to Bugsnag succeeded with the following warnings:#{warnings}\n\nPlease update your lane config."
309
+ end
296
310
  end
297
311
  end
298
312
  end
@@ -1,5 +1,5 @@
1
1
  module Fastlane
2
2
  module Bugsnag
3
- VERSION = "1.2.0"
3
+ VERSION = "1.2.1"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fastlane-plugin-bugsnag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.0
4
+ version: 1.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Delisa Mason
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-01-11 00:00:00.000000000 Z
11
+ date: 2018-01-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: xml-simple