danger 4.0.2 → 4.0.3

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: f983a96eaf1ae2a10009156c9b9be097912057a4
4
- data.tar.gz: 13651a9f71c8abfc8b38cd0bf068d935d3c963c3
3
+ metadata.gz: df8c1995d113ffee76f38ee1a0d6decbc98cc274
4
+ data.tar.gz: f4cdebe97e60d72775f9d2a843ca0aabdeffdd78
5
5
  SHA512:
6
- metadata.gz: 7e7234f33564197cb0b0d92f528b64e0ce66a4c328c6298ace6d33a3f2a1474c7e8e5766ae862f61e529f490f3a54867b7c81b17ddfc346909bef1f99ae086c9
7
- data.tar.gz: 5b4f0190b920e7c1033f9226ea92cf98ce47b64676ad1bcf2566e528ba24094e128c56d65ca8fdd50a88fcf4cd3eea7ebb0cab05613289ef7663555472005eda
6
+ metadata.gz: 1f0df2202227ada072997c7a8606969c39a106d0df00f2e7c602e60c943e8f6a89cb4268cf09cb1d7ad26881a5926d7ddafa86e5d2b5fe610c3e939eceeadd88
7
+ data.tar.gz: f48dfe0b356f6291ae22f6e475874c1edb826a6c08923c57b2584abdcb813469b629a19bc13d83a4974d829be492d5d7dfe161ae6a40ef8f36650c4f9dd9e02f
@@ -248,7 +248,7 @@ module Danger
248
248
 
249
249
  def unsure_token
250
250
  ui.say "You need to expose a token called " + "DANGER_GITHUB_API_TOKEN".yellow + " and the value is the GitHub Personal Acess Token."
251
- ui.say "Depending on the CI system, this may need to be done on the machine ( in the " + "~/.bashprofile".yellow + ") or in a web UI somewhere."
251
+ ui.say "Depending on the CI system, this may need to be done on the machine (in the " + "~/.bashprofile".yellow + ") or in a web UI somewhere."
252
252
  ui.say "We have a guide for all supported CI systems on danger.systems:"
253
253
  ui.link "http://danger.systems/guides/getting_started.html#setting-up-danger-to-run-on-your-ci"
254
254
  end
@@ -63,9 +63,17 @@ module Danger
63
63
  req = Net::HTTP::Post.new(uri.request_uri, { "Content-Type" => "application/json" })
64
64
  req.basic_auth @username, @password
65
65
  req.body = body
66
- Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
66
+
67
+ res = Net::HTTP.start(uri.hostname, uri.port, use_ssl: true) do |http|
67
68
  http.request(req)
68
69
  end
70
+
71
+ # show error to the user when BitBucket Server returned an error
72
+ case res
73
+ when Net::HTTPClientError, Net::HTTPServerError
74
+ # HTTP 4xx - 5xx
75
+ abort "\nError posting comment to BitBucket Server: #{res.code} (#{res.message})\n\n"
76
+ end
69
77
  end
70
78
 
71
79
  def delete(uri)
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "4.0.2".freeze
2
+ VERSION = "4.0.3".freeze
3
3
  DESCRIPTION = "Like Unit Tests, but for your Team Culture.".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 4.0.2
4
+ version: 4.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-12-05 00:00:00.000000000 Z
12
+ date: 2016-12-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide