danger 9.6.0 → 9.6.1

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: 8695ca83367aaa0119944687047fa1152754ac290f7debc128393862c5fc6216
4
+ data.tar.gz: 399e2c3edca65026c4005c1bcfbcdec13752e85575719aa41210b361019b39d4
5
5
  SHA512:
6
- metadata.gz: bc94ca5d7d28214e3cf4166dce28369a1a22e7173eee2d5c1c0a34a826c32c97c7d58e37ba66a9e87a2ea3540ffe6674ea64be705e0ca920166df856b7bcd116
7
- data.tar.gz: 3929c665775cf4af212c36a9ea898b9850dc3358d79597707fdd4b166d4b605777d85c793b54eeb72ac8e3207be217b17be602a3d395c2a749962d076bc5aaf1
6
+ metadata.gz: ca5b8e75c5815de6bef1dde9891493c18dfe10360932d60ad76ca2940f2f6d591a2f02eac6ed8cd7bfc448b762c17d8d033b52a2f285504c0e5d3f34301c1ff2
7
+ data.tar.gz: 6ac6f84f5f77211f618054fc37b904e947b5f4387c624faa3c74189fb99581877d97e0d73fcacee6dbb2ad6826395816e2352d97b8b07a83f12f685ed087b3ca
@@ -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 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.1"
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox