Skip to content

Commit 8ee5158

Browse files
author
Ryan Jacobs
committed
Convert --year option to Numeric.
Should fix issue #8.
1 parent ad03368 commit 8ee5158

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

bin/github-copywriter

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,9 @@ Usage: #{executable_name} [repos...]
2929
end
3030

3131
opts.on("-y", "--year YEAR", "Update copyrights to a given year.") do |year|
32-
if year.to_i >= 1000 && year.to_i <= 9999 then
32+
year = year.to_i
33+
34+
if year >= 1000 && year <= 9999 then
3335
options[:year] = year
3436
else
3537
puts "error: year must be four digits".red

lib/github-copywriter/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,6 @@ class Copywriter
88

99
# Current version
1010
# @return [String]
11-
VERSION = "1.2.1".freeze
11+
VERSION = "1.2.2".freeze
1212

1313
end

0 commit comments

Comments
 (0)