lib/pivotal-github/story_commit.rb in pivotal-github-0.6.12 vs lib/pivotal-github/story_commit.rb in pivotal-github-0.6.14
- old
+ new
@@ -4,21 +4,21 @@
def parser
OptionParser.new do |opts|
opts.banner = "Usage: git story-commit [options]"
opts.on("-m", "--message MESSAGE",
- "add a commit message (including story #)") do |m|
- self.options.message = m
+ "add a commit message (including story #)") do |opt|
+ self.options.message = opt
end
- opts.on("-f", "--finish", "mark story as finished") do |f|
- self.options.finish = f
+ opts.on("-f", "--finish", "mark story as finished") do |opt|
+ self.options.finish = opt
end
- opts.on("-d", "--deliver", "mark story as delivered") do |d|
- self.options.deliver = d
+ opts.on("-d", "--deliver", "mark story as delivered") do |opt|
+ self.options.deliver = opt
end
- opts.on("-a", "--all", "commit all changed files") do |a|
- self.options.all = a
+ opts.on("-a", "--all", "commit all changed files") do |opt|
+ self.options.all = opt
end
opts.on_tail("-h", "--help", "this usage guide") do
puts opts.to_s; exit 0
end
end
@@ -38,10 +38,10 @@
end
"[#{label}] #{options.message}"
end
end
- # Returns a command appropriate for executing at the command line
+ # Returns a command appropriate for executing at the command line.
# We take care to insert the story number and, if necessary, an indication
# that the commit finishes the story.
def cmd
c = ['git commit']
c << '-a' if all?
\ No newline at end of file