step-up 0.8.2 → 0.9.0

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.
data/GEM_VERSION CHANGED
@@ -1 +1 @@
1
- v0.8.2
1
+ v0.9.0
data/lib/step-up/cli.rb CHANGED
@@ -44,7 +44,7 @@ module StepUp
44
44
  end
45
45
  end
46
46
 
47
- desc "changelog --top=<num> --format={default|wiki|html}", "show changelog from each version tag"
47
+ desc "changelog --top=<num> --format={default|wiki|html|confluence}", "show changelog from each version tag"
48
48
  method_options %w[top -n] => :numeric
49
49
  method_options %w[format -f] => :string
50
50
  method_options %w(mask -M) => :string # stepup changelog --mask development_hudson_build_0
@@ -111,6 +111,20 @@ module StepUp
111
111
  log.join("\n")
112
112
  end
113
113
 
114
+ def changelog_format_confluence(tag, tag_info)
115
+ created_at = tag_info[:date].strftime("%b/%d %Y %H:%M")
116
+ log = []
117
+ log << "h2. #{tag} (#{created_at} by #{tag_info[:tagger]})\n"
118
+ formatted_message = tag_info[:message]
119
+ formatted_message.gsub!(/^(?:\t\t|\s\s\s\s)-\s/, "** ")
120
+ formatted_message.gsub!(/^(?:\t|\s\s)-\s/, "* ")
121
+ formatted_message.gsub!('(*)', '( * )')
122
+ formatted_message.gsub!('[', "\\[")
123
+ formatted_message.gsub!(']', "\\]")
124
+ log << formatted_message
125
+ log.join("\n")
126
+ end
127
+
114
128
  def notes_show
115
129
  if options[:since] && options[:after]
116
130
  puts "conflict of options: --since and --after cannot be used together\n"
@@ -93,7 +93,7 @@ check with the following bash command:
93
93
  end
94
94
 
95
95
  def version_tag_info(tag)
96
- full_message = `git show #{ tag }`
96
+ full_message = `git show #{ tag } --no-decorate`
97
97
  tag_pattern = tag.gsub(/\./, '\\.')
98
98
  tag_message = full_message[/^tag\s#{tag_pattern}.*?\n\n(.*?)\n\n(?:tag\s[^\s]+|commit\s\w{40})\n/m, 1] || ""
99
99
  tagger = full_message[/\A.*?\nTagger:\s(.*?)\s</m, 1]
metadata CHANGED
@@ -5,9 +5,9 @@ version: !ruby/object:Gem::Version
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
- - 8
9
- - 2
10
- version: 0.8.2
8
+ - 9
9
+ - 0
10
+ version: 0.9.0
11
11
  platform: ruby
12
12
  authors:
13
13
  - Marcelo Manzan
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2013-01-07 00:00:00 Z
19
+ date: 2013-02-07 00:00:00 Z
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: thor