changes_since 0.0.8 → 0.0.9
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4c78aad0cef349b49a033fbac67befbfc3873dcd
|
4
|
+
data.tar.gz: 5bddf7ea4b376b3327907823e59a2da6532f7583
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: a7793e8e337adb87c14fb818fee5ea33950dc87e55a3389e6e543965e6cd40cb02f7a3d3c555d96a29ebe1c1f1ceeb963e249f8abcc7dbb96d6520648433def2
|
7
|
+
data.tar.gz: f95feb503627ec25150581f4267d9927e78d091c092a695560781abe75a61eb98f46e5ff166c2c0b2f3d1ac7f13fd6dc76e2aaf3aac4973fe12571c2dbce770d
|
@@ -47,7 +47,7 @@ module ChangesSince
|
|
47
47
|
if options[:markdown]
|
48
48
|
row = "||*#{name}*||Author||PR||"
|
49
49
|
row << "Commit||" if options[:sha]
|
50
|
-
row << "
|
50
|
+
row << "Risk||" if options[:risk]
|
51
51
|
puts row
|
52
52
|
else
|
53
53
|
puts "\n*#{name}*\n"
|
@@ -89,7 +89,7 @@ module ChangesSince
|
|
89
89
|
text << "#{branch_author}|"
|
90
90
|
text << "[##{pr}|#{@repo}/pull/#{pr}]|" if @repo && pr
|
91
91
|
text << "[#{sha}|#{@repo}/commit/#{sha}]|" if sha
|
92
|
-
text << "|" if options[:
|
92
|
+
text << "|" if options[:risk]
|
93
93
|
else
|
94
94
|
text = "* #{title} (#{branch_author})"
|
95
95
|
end
|
@@ -138,13 +138,42 @@ class ChangelogPrinterTest < Test::Unit::TestCase
|
|
138
138
|
end
|
139
139
|
|
140
140
|
should "print the team name with markdown and risks" do
|
141
|
-
printer = ChangesSince::ChangelogPrinter.new(stub, stub, { :markdown => true, :
|
142
|
-
printer.expects(:puts).with("||*abc*||Author||PR||
|
141
|
+
printer = ChangesSince::ChangelogPrinter.new(stub, stub, { :markdown => true, :risk => true }, stub)
|
142
|
+
printer.expects(:puts).with("||*abc*||Author||PR||Risk||")
|
143
143
|
printer.print_team_name("abc")
|
144
144
|
end
|
145
145
|
end
|
146
146
|
|
147
147
|
context "print_message" do
|
148
|
+
should "print out the title and branch author" do
|
149
|
+
printer = ChangesSince::ChangelogPrinter.new(stub, stub, {}, stub)
|
150
|
+
commit = stub(:author => stub(:name => "NAME"), :message => "MESSAGE")
|
151
|
+
printer.expects(:puts).with("* MESSAGE (NAME)")
|
152
|
+
printer.print_message(commit)
|
153
|
+
end
|
154
|
+
|
155
|
+
context "with markdown" do
|
156
|
+
should "print out the title, branch author and PR" do
|
157
|
+
printer = ChangesSince::ChangelogPrinter.new(stub, stub, { :markdown => true }, "repo")
|
158
|
+
commit = stub(:author => stub(:name => "NAME"), :message => "MESSAGE")
|
159
|
+
printer.expects(:puts).with('|MESSAGE|NAME|[|repo/commit/]|')
|
160
|
+
printer.print_message(commit)
|
161
|
+
end
|
162
|
+
|
163
|
+
should "print out the title, branch author PR and sha" do
|
164
|
+
printer = ChangesSince::ChangelogPrinter.new(stub, stub, { :markdown => true, :sha => true }, "repo")
|
165
|
+
commit = stub(:author => stub(:name => "NAME"), :message => "MESSAGE", :sha => "123")
|
166
|
+
printer.expects(:puts).with('|MESSAGE|NAME|[123|repo/commit/123]|')
|
167
|
+
printer.print_message(commit)
|
168
|
+
end
|
169
|
+
|
170
|
+
should "allow a column for risk" do
|
171
|
+
printer = ChangesSince::ChangelogPrinter.new(stub, stub, { :markdown => true, :risk => true }, "repo")
|
172
|
+
commit = stub(:author => stub(:name => "NAME"), :message => "MESSAGE", :sha => "123")
|
173
|
+
printer.expects(:puts).with('|MESSAGE|NAME|[|repo/commit/]||')
|
174
|
+
printer.print_message(commit)
|
175
|
+
end
|
176
|
+
end
|
148
177
|
end
|
149
178
|
end
|
150
179
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: changes_since
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ashwin Hegde
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-04-
|
11
|
+
date: 2014-04-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|