changes_since 0.0.8 → 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
  SHA1:
3
- metadata.gz: 7905ff2ff3853d73c2af20d6437613cf816f87e6
4
- data.tar.gz: 5d568661ae3872052038b0b138e1a9c4359bafc9
3
+ metadata.gz: 4c78aad0cef349b49a033fbac67befbfc3873dcd
4
+ data.tar.gz: 5bddf7ea4b376b3327907823e59a2da6532f7583
5
5
  SHA512:
6
- metadata.gz: 6fd0894a4e7f79ca610c344c68f4848d9e5c8df3be18a9973f610de3f8284c61872bc32d88b26be4876379a0c487bdbed545c2c84e8261269fef899afd382b18
7
- data.tar.gz: 6efd92684c8ef27822425a18ad91d2c333057c3dfa46a1a72e064472d84e1b5e0eaa82ee06fa0aeb3e2339f140c8922d78f0df54cee50bf26f0effa3721adc84
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 << "Risks||" if options[:risks]
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[:risks]
92
+ text << "|" if options[:risk]
93
93
  else
94
94
  text = "* #{title} (#{branch_author})"
95
95
  end
@@ -1,3 +1,3 @@
1
1
  module ChangesSince
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  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, :risks => true }, stub)
142
- printer.expects(:puts).with("||*abc*||Author||PR||Risks||")
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.8
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-16 00:00:00.000000000 Z
11
+ date: 2014-04-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler