danger-additional-logging 0.0.6 → 0.0.8

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: 390571d729973fa4be224c9de65d609ec7aaffd0a1c162bdcc5e70c4ebc07923
4
- data.tar.gz: 613cf532e130b40d62bd5732479d4695fc0fa6a337c89ab324b83357a4b716e5
3
+ metadata.gz: 780d58c41b5df107e61682b6f768a8c3f5b97e2474f452108fd6b82f3afa11f5
4
+ data.tar.gz: 3895e445e0bf0b24f39699542daceb793f60be902cda03e867e75ad1b71169e2
5
5
  SHA512:
6
- metadata.gz: 99dc62a3a802646511a3c519a8ed8ba9165641ff0011d4dbb0ee85dfcb760336e855c9932058718314463dc5ca2500663581fec90fb71bf55f4b1dee02481cf9
7
- data.tar.gz: 0da78c3ca6ee7ff9436c667165530ce1491b6d005823a8fcc65da4a5f20240a8e92f90f2a9e8b88e2b0454b3fa1d00736bec0274c61baf5d3df5b7b558eddd25
6
+ metadata.gz: c67dc03007d51034e19b9bf8839e5cc3376b61d056f6276e7eaa2c36a88aed6fa399f95cdf9a4b3c53381628165ab30f7d5ea28e780f420882f52cb7a7f9cb18
7
+ data.tar.gz: b8df98a1216ff4005f533b8c2a04b011b5e1ed20292e1619f1de9cbfd26d0c533fe30225bfaf7cf402338b5d945bc07c337e723314f3013fc061cdb3e7d22a05
@@ -49,12 +49,17 @@ module Danger
49
49
  end.compact
50
50
  end
51
51
 
52
- def exec(string)
52
+ def exec(string, prints=false)
53
+ puts "exec: git #{string}, prints output #{prints}"
53
54
  require "open3"
54
55
  Dir.chdir(self.folder || ".") do
55
56
  git_command = string.split(" ").dup.unshift("git")
56
57
  Open3.popen2(default_env, *git_command) do |_stdin, stdout, _wait_thr|
57
- stdout.read.rstrip
58
+ output = stdout.read.rstrip
59
+ if (prints)
60
+ puts output # Print the captured output
61
+ end
62
+ output # Return the captured output
58
63
  end
59
64
  end
60
65
  end
@@ -96,7 +101,8 @@ module Danger
96
101
  puts "Is shallow repo:"
97
102
  exec("rev-parse --is-shallow-repository")
98
103
 
99
- puts "Last 5 commits befor starting git_fetch_branch_to_depth:"
104
+ puts "Last 5 commits for #{branch}"
105
+ exec("branch -v")
100
106
  exec("--no-pager log -n 5")
101
107
 
102
108
  depth = 0
@@ -123,7 +129,6 @@ module Danger
123
129
  end
124
130
 
125
131
  def git_fetch_branch_to_depth(branch, depth)
126
- puts "fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}"
127
132
  exec("fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}")
128
133
  end
129
134
 
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "0.0.6".freeze
2
+ VERSION = "0.0.8".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-additional-logging
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox