danger 6.0.1 → 6.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: df3df4ffaefafa6d1345b6dcd7b02ffad8001548e74a70eaa1226dae5efd173d
4
- data.tar.gz: 6d739d7c9f007eaee64f019b83026596aa64204c7df94cd005fdf4aa52ffc013
3
+ metadata.gz: 6d812582b1d50574cecbc874f8e746a7e070f97decce7470b1616abd8871dd3d
4
+ data.tar.gz: 44a6746b63eef45617e9ba0057b1319539bfcdaabd3a359b561f3dd2ff4d3c65
5
5
  SHA512:
6
- metadata.gz: 62305cb2f4c3a49a8e9e46a769c89229b124dde8d14946ec5b32899553acc154f9ac7112d26cefd5f9ae82b2bffc90ef61dd70ad88752721e1bb95e84a76ce06
7
- data.tar.gz: 45b7199bb54b2fa90622539f79206b186d8aabf1e55821ad56a9dbb746b3891f894b4bbdf5ea75911d983bb81211a32b6032cc5123757c85774429d106b90a80
6
+ metadata.gz: 54479ef3587f4486a282323894e32778e5dcc4c21d41410fddc25f2d02e581c692dfe488755828aff27e04115076031d032261f1e45ab60ff41df6ba429dd12a
7
+ data.tar.gz: 28b3b370371b9426168e57ebbce738bc5e7771b8dc7f223f49aa19d5de4bc62047c845720316074b677ca1e1ee387d65b24406077d0d532b764edc0c84f07ad8
@@ -0,0 +1,33 @@
1
+ require "danger/request_sources/github/github"
2
+
3
+ module Danger
4
+ # ### CI Setup
5
+ # You need to edit your `.cirrus.yml` to include `bundle exec danger`.
6
+ #
7
+ # Adding this to your `.cirrus.yml` allows Danger to fail your build, both on the Cirrus CI website and within your Pull Request.
8
+ # With that set up, you can edit your job to add `bundle exec danger` at the build action.
9
+ #
10
+ # ### Token Setup
11
+ class Cirrus < CI
12
+ def self.validates_as_ci?(env)
13
+ env.key? "CIRRUS_CI"
14
+ end
15
+
16
+ def self.validates_as_pr?(env)
17
+ exists = ["CIRRUS_PR", "CIRRUS_REPO_FULL_NAME"].all? { |x| env[x] && !env[x].empty? }
18
+ exists && env["CIRRUS_PR"].to_i > 0
19
+ end
20
+
21
+ def supported_request_sources
22
+ @supported_request_sources ||= [Danger::RequestSources::GitHub]
23
+ end
24
+
25
+ def initialize(env)
26
+ self.repo_slug = env["CIRRUS_REPO_FULL_NAME"]
27
+ if env["CIRRUS_PR"].to_i > 0
28
+ self.pull_request_id = env["CIRRUS_BUILD_ID"]
29
+ end
30
+ self.repo_url = env["CIRRUS_GIT_CLONE_URL"]
31
+ end
32
+ end
33
+ end
@@ -6,7 +6,7 @@ module Danger
6
6
  # ### CI Setup
7
7
  #
8
8
  # Install dependencies and add a danger step to your .gitlab-ci.yml:
9
- # ``` yml
9
+ # ```yml
10
10
  # before_script:
11
11
  # - bundle install
12
12
  # danger:
@@ -47,6 +47,7 @@ module Danger
47
47
  # As you own the machine, it's up to you to add the environment variable for the `DANGER_GITLAB_API_TOKEN`.
48
48
  #
49
49
  class Jenkins < CI
50
+ attr_accessor :project_url
50
51
  class EnvNotFound < StandardError
51
52
  def initialize
52
53
  super("ENV not found, please check your Jenkins. Related: https://stackoverflow.com/search?q=jenkins+env+null")
@@ -79,6 +80,7 @@ module Danger
79
80
  self.repo_url = self.class.repo_url(env)
80
81
  self.pull_request_id = self.class.pull_request_id(env)
81
82
  self.repo_slug = self.class.repo_slug(self.repo_url)
83
+ self.project_url = env["CI_MERGE_REQUEST_PROJECT_URL"] || env["CI_PROJECT_URL"]
82
84
  end
83
85
 
84
86
  def self.repo_slug(repo_url)
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "6.0.1".freeze
2
+ VERSION = "6.0.2".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: 6.0.1
4
+ version: 6.0.2
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: 2019-03-14 00:00:00.000000000 Z
12
+ date: 2019-03-30 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -202,6 +202,7 @@ files:
202
202
  - lib/danger/ci_source/ci_source.rb
203
203
  - lib/danger/ci_source/circle.rb
204
204
  - lib/danger/ci_source/circle_api.rb
205
+ - lib/danger/ci_source/cirrus.rb
205
206
  - lib/danger/ci_source/code_build.rb
206
207
  - lib/danger/ci_source/codeship.rb
207
208
  - lib/danger/ci_source/dotci.rb