danger 9.6.0 → 9.6.2

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: 3c20de89d82a1a32f926300a84b0a1313a7d3c1d5c35c91b4eed2667eec5788c
4
- data.tar.gz: 208508f00a6542efe5c5f7357a87f943e50384b7c999771e669c9c585df4e3a7
3
+ metadata.gz: 7a5bfbaf66471158ce892fa4c3bb62a2246bbfd18e59959bde58ed70d037dec1
4
+ data.tar.gz: 1c2d3f7a4d5b9018133941057e44b004d5068ca8a52e0f7ec4033290228399a3
5
5
  SHA512:
6
- metadata.gz: bc94ca5d7d28214e3cf4166dce28369a1a22e7173eee2d5c1c0a34a826c32c97c7d58e37ba66a9e87a2ea3540ffe6674ea64be705e0ca920166df856b7bcd116
7
- data.tar.gz: 3929c665775cf4af212c36a9ea898b9850dc3358d79597707fdd4b166d4b605777d85c793b54eeb72ac8e3207be217b17be602a3d395c2a749962d076bc5aaf1
6
+ metadata.gz: f9ed54db89a5ff27acd7988ff2e5bcdcf076b2b05dfa7dafda7ba58a70c2715615d1efaf5a53c8b23199f6ef4cd0952eba3778c63eafae434e4eeb9bcd6389a1
7
+ data.tar.gz: 5eb45a8cae70a997e3d9cd105320e234297a88db2d548205bfd96a15fd503be8e5f4afbacdfe1b79bd7fb8635f3093713f3f7d5afeee8c48466bded169d656ff
@@ -122,7 +122,9 @@ module Danger
122
122
  # @return [Git::Log] from the gem `git`
123
123
  #
124
124
  def commits
125
- @git.log.to_a
125
+ log = @git.log
126
+ # git 6 removed Enumerable from Git::Log; #execute returns the commits.
127
+ (log.respond_to?(:execute) ? log.execute : log).to_a
126
128
  end
127
129
 
128
130
  # @!group Git Metadata
@@ -192,12 +192,22 @@ module Danger
192
192
  end
193
193
  end
194
194
 
195
- module Git
196
- class Base
197
- # Use git-merge-base https://git-scm.com/docs/git-merge-base to
198
- # find as good common ancestors as possible for a merge
199
- def merge_base(commit1, commit2, *other_commits)
200
- Open3.popen2("git", "merge-base", commit1, commit2, *other_commits) { |_stdin, stdout, _wait_thr| stdout.read.rstrip }
195
+ module Danger
196
+ class GitRepo
197
+ module MergeBase
198
+ # Use git-merge-base https://git-scm.com/docs/git-merge-base to
199
+ # find as good common ancestors as possible for a merge
200
+ def merge_base(commit1, commit2, *other_commits)
201
+ Open3.popen2("git", "merge-base", commit1, commit2, *other_commits) { |_stdin, stdout, _wait_thr| stdout.read.rstrip }
202
+ end
201
203
  end
202
204
  end
203
205
  end
206
+
207
+ # Git::Base became a compatibility module included in Git::Repository in git 5.0.
208
+ # Prepend Danger's extension to the concrete repository class in either version.
209
+ if defined?(Git::Base) && Git::Base.kind_of?(Class)
210
+ Git::Base.prepend(Danger::GitRepo::MergeBase)
211
+ else
212
+ Git::Repository.prepend(Danger::GitRepo::MergeBase)
213
+ end
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Danger
4
- VERSION = "9.6.0"
4
+ VERSION = "9.6.2"
5
5
  DESCRIPTION = "Like Unit Tests, but for your Team Culture."
6
6
  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: 9.6.0
4
+ version: 9.6.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox
@@ -110,16 +110,22 @@ dependencies:
110
110
  name: faraday-http-cache
111
111
  requirement: !ruby/object:Gem::Requirement
112
112
  requirements:
113
- - - "~>"
113
+ - - ">="
114
114
  - !ruby/object:Gem::Version
115
115
  version: '2.0'
116
+ - - "<"
117
+ - !ruby/object:Gem::Version
118
+ version: '4.0'
116
119
  type: :runtime
117
120
  prerelease: false
118
121
  version_requirements: !ruby/object:Gem::Requirement
119
122
  requirements:
120
- - - "~>"
123
+ - - ">="
121
124
  - !ruby/object:Gem::Version
122
125
  version: '2.0'
126
+ - - "<"
127
+ - !ruby/object:Gem::Version
128
+ version: '4.0'
123
129
  - !ruby/object:Gem::Dependency
124
130
  name: git
125
131
  requirement: !ruby/object:Gem::Requirement