danger 8.4.2 → 8.4.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
  SHA256:
3
- metadata.gz: 423862c4ae06fbd90dbc52ae126b171c3af53da1867f6051db5e1e00cd1cb09e
4
- data.tar.gz: 45d13ff59705d33a756f8a221ef597f8c29f534511a9cd310241d2730b118e59
3
+ metadata.gz: bcdadafd7f8d81e366907b31b4c0530258864a6f18aa22e801d4467bc1ab35b0
4
+ data.tar.gz: 1b4e340420a10006b36a55bdbc30570f664c6c88fc2b8ad253f299e1aae30bd5
5
5
  SHA512:
6
- metadata.gz: 3a1e23473e3012edb47a6860ca50a4e0e12512ade5c2796b79720c71ba049c034060893505a5264df3ee36439ae702dffe1cc9472da4e6357d2cef7ba81e24b8
7
- data.tar.gz: 4e186a0412277f4d3add84821f39529900c9faec5439ccd62329bc24e6a753c19feafe68208f9ff3b7fe8b12e64ba8b31379b7af5273f24dfa230ec804f12648
6
+ metadata.gz: 8e5f2b3a004f5f205a672ddcef8bc6fc565e3b8d2ef20a14d4f3b9aca06a8d9f069e16e1369a63b14ad226c9f8f1b89b46fe7aa43b02be34d7da574245c7db55
7
+ data.tar.gz: 2e5d5bdf35c5425e2c4012002f191df212d2cbc00a73e63eaa5012ab32340a60b3b39df7c9b1527ef70641c739232a4620545e9c478548f6a628ad993366aebd
data/README.md CHANGED
@@ -76,7 +76,7 @@ I'd strongly recommend using `bundle exec guard` to run your tests as you work.
76
76
 
77
77
  #### Debugging
78
78
 
79
- Ruby is super dynamic. One of the best ways to debug Ruby code is by using [pry](http://pryrepl.org/). We include pry for developers: when you have a problem, copy these two lines just before your problem and follow the instructions from "[I Want To Be A Danger Wizard](https://danger.systems/guides/troubleshooting.html#i-want-to-be-a-danger-wizard)."
79
+ Ruby is super dynamic. One of the best ways to debug Ruby code is by using [pry](https://pry.github.io/). We include pry for developers: when you have a problem, copy these two lines just before your problem and follow the instructions from "[I Want To Be A Danger Wizard](https://danger.systems/guides/troubleshooting.html#i-want-to-be-a-danger-wizard)."
80
80
 
81
81
  ```ruby
82
82
  require 'pry'
@@ -66,9 +66,17 @@ module Danger
66
66
  merge_request.nil? ? 0 : merge_request.iid
67
67
  end
68
68
 
69
+ def self.slug_from(env)
70
+ if env["DANGER_PROJECT_REPO_URL"]
71
+ env["DANGER_PROJECT_REPO_URL"].split('/').last(2).join('/')
72
+ else
73
+ env["CI_MERGE_REQUEST_PROJECT_PATH"] || env["CI_PROJECT_PATH"]
74
+ end
75
+ end
76
+
69
77
  def initialize(env)
70
- @env = env
71
- @repo_slug = slug_from(env)
78
+ self.repo_slug = self.class.slug_from(env)
79
+ self.pull_request_id = self.class.determine_pull_or_merge_request_id(env)
72
80
  end
73
81
 
74
82
  def supported_request_sources
@@ -77,19 +85,5 @@ module Danger
77
85
  Danger::RequestSources::GitLab
78
86
  ]
79
87
  end
80
-
81
- def pull_request_id
82
- @pull_request_id ||= self.class.determine_pull_or_merge_request_id(@env)
83
- end
84
-
85
- private
86
-
87
- def slug_from(env)
88
- if env["DANGER_PROJECT_REPO_URL"]
89
- env["DANGER_PROJECT_REPO_URL"].split('/').last(2).join('/')
90
- else
91
- env["CI_MERGE_REQUEST_PROJECT_PATH"] || env["CI_PROJECT_PATH"]
92
- end
93
- end
94
88
  end
95
89
  end
@@ -148,7 +148,7 @@ module Danger
148
148
  # @return [Boolean]
149
149
  #
150
150
  def pr_draft?
151
- pr_json["mergeable_state"] == "draft"
151
+ pr_json["draft"] == true
152
152
  end
153
153
 
154
154
  # @!group PR Commit Metadata
@@ -19,8 +19,8 @@ module Danger
19
19
  respond_to_method(name, *args, &block)
20
20
  end
21
21
 
22
- def respond_to_missing?(name)
23
- __array__.respond_to?(name) || super
22
+ def respond_to_missing?(name, include_all)
23
+ __array__.respond_to?(name, include_all) || super
24
24
  end
25
25
 
26
26
  def to_a
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "8.4.2".freeze
2
+ VERSION = "8.4.3".freeze
3
3
  DESCRIPTION = "Like Unit Tests, but for your Team Culture.".freeze
4
4
  end
metadata CHANGED
@@ -1,15 +1,15 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger
3
3
  version: !ruby/object:Gem::Version
4
- version: 8.4.2
4
+ version: 8.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
8
8
  - Juanito Fatas
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-11-10 00:00:00.000000000 Z
12
+ date: 2022-02-25 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: claide
@@ -327,7 +327,7 @@ homepage: https://github.com/danger/danger
327
327
  licenses:
328
328
  - MIT
329
329
  metadata: {}
330
- post_install_message:
330
+ post_install_message:
331
331
  rdoc_options: []
332
332
  require_paths:
333
333
  - lib
@@ -342,8 +342,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
342
342
  - !ruby/object:Gem::Version
343
343
  version: '0'
344
344
  requirements: []
345
- rubygems_version: 3.1.2
346
- signing_key:
345
+ rubygems_version: 3.1.4
346
+ signing_key:
347
347
  specification_version: 4
348
348
  summary: Like Unit Tests, but for your Team Culture.
349
349
  test_files: []