danger-additional-logging 0.0.7 → 0.0.9

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: 6f29e3f823e9fb3d9baba626fef6af0350e8f025175eb0e6fd57d5fddd8d73a5
4
- data.tar.gz: 9b73669723b7fc7d9d1b90d102b1432fdfb306ce1ade1eb340c3a2be4b8551be
3
+ metadata.gz: b0c41930ed9e622d1f3e47af8f684cdd1f43b420c2ea394e7852046aa3aefeef
4
+ data.tar.gz: 82e7382093ffce6ffa82a72749815e44f28c2f9093360a0cb2d55cf76c7282ed
5
5
  SHA512:
6
- metadata.gz: 1da3620ce9b9d1658710da83b755abc0d9122c1b9d273add50e3d77d6bd8f95449e453812252e8cb468581f7c9d01afd0911a7bf1298da7a8d173fc369ca967a
7
- data.tar.gz: 3c082a7840040829887721ba77069f138054e578b95a9198b3824287999f768d3758c9230af4be9a258bb446711ec3fef3a7540b4cd38313d497f3e759e5b840
6
+ metadata.gz: 1bd1f49eac4bacb4802c669a058ea78844c8855ae79de847f8937821c22cb2186fe9a52446e59c96168b00c3c6215d8cf46395513eb795999b4232dad6b81f2f
7
+ data.tar.gz: 35e6a9cc78cef1f4c26668bb9ddcf6735dcf43c2d94eeb9be68e886e35961a1baa627ac59d328ea82378c3313097ffce4be18273901b55b7d4eec8533ec70291
@@ -49,13 +49,16 @@ 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
58
  output = stdout.read.rstrip
58
- puts output # Print the captured output
59
+ if (prints)
60
+ puts output # Print the captured output
61
+ end
59
62
  output # Return the captured output
60
63
  end
61
64
  end
@@ -96,10 +99,11 @@ module Danger
96
99
  end
97
100
 
98
101
  puts "Is shallow repo:"
99
- exec("rev-parse --is-shallow-repository")
102
+ exec("rev-parse --is-shallow-repository", true)
100
103
 
101
- puts "Last 5 commits befor starting git_fetch_branch_to_depth:"
102
- exec("--no-pager log -n 5")
104
+ puts "Last 5 commits for #{branch}"
105
+ exec("branch -v", true)
106
+ exec("--no-pager log -n 5", true)
103
107
 
104
108
  depth = 0
105
109
  success =
@@ -112,6 +116,7 @@ module Danger
112
116
  commit_exists?(commitish)
113
117
  end
114
118
 
119
+ puts "success=#{success}"
115
120
  return if success
116
121
 
117
122
  git_in_depth_fetch
@@ -125,7 +130,6 @@ module Danger
125
130
  end
126
131
 
127
132
  def git_fetch_branch_to_depth(branch, depth)
128
- puts "fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}"
129
133
  exec("fetch --depth=#{depth} --prune origin +refs/heads/#{branch}:refs/remotes/origin/#{branch}")
130
134
  end
131
135
 
@@ -1,4 +1,4 @@
1
1
  module Danger
2
- VERSION = "0.0.7".freeze
2
+ VERSION = "0.0.9".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.7
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Orta Therox