bin/jekyll-timeago in jekyll-timeago-0.10.0 vs bin/jekyll-timeago in jekyll-timeago-0.10.1

- old
+ new

@@ -1,10 +1,9 @@ #!/usr/bin/env ruby -require "bundler/setup" +require "mini_i18n" require_relative "../lib/jekyll-timeago" -include Jekyll::Timeago help_message = <<END Usage: jekyll-timeago <from_date> [to_date] @@ -23,10 +22,12 @@ puts help_message elsif ARGV.include?("--version") || ARGV.include?("-v") puts "v#{Jekyll::Timeago::VERSION}" elsif ARGV.include?("--console") || ARGV.include?("-c") require "irb" + include Jekyll::Timeago + ARGV.clear IRB.start else custom_locale = "--locale" if ARGV.include?("--locale") custom_locale = "-l" if ARGV.include?("-l") @@ -39,10 +40,10 @@ options = { locale: locale } ARGV << options end begin - puts timeago *ARGV + puts Jekyll::Timeago.timeago *ARGV rescue ArgumentError => e - puts "ERROR! #{e}" + puts "Error! #{e}" end end \ No newline at end of file