diff --git a/bin/lolcommits b/bin/lolcommits index 9faa1546..5d524a0c 100755 --- a/bin/lolcommits +++ b/bin/lolcommits @@ -9,6 +9,13 @@ end require 'lolcommits/cli/commands/lolcommits' +# DEPRECATION HACK -- MANUALLY CHECK FOR AND MODIFY +if ARGV[0] == '--capture' + STDERR.puts "DEPRECATION WARNING: `lolcommits --capture` syntax is deprecated.\n" \ + "See `lolcommits capture --help` or disable & re-enable your hooks.\n\n" + ARGV[0] = 'capture' +end + Lolcommits::CLI::LolcommitsCommand.run # # diff --git a/features/capture.feature b/features/capture.feature index 6180fdbd..9e3f2cf9 100644 --- a/features/capture.feature +++ b/features/capture.feature @@ -19,9 +19,13 @@ Feature: Capture command When I successfully run `lolcommits capture --help` Then the output should not contain "--animate" - @wip Scenario: Legacy capture syntax should work with deprecation warning - Given a pending test + Given I am in a git repo named "myrepo" + And I do a git commit + When I run `lolcommits --capture` + Then the stderr should contain "DEPRECATION WARNING" + Then the output should contain "*** Preserving this moment in history." + And there should be exactly 1 jpg in "~/.lolcommits/myrepo" Scenario: Basic capture should function Given I am in a git repo named "myrepo"