Skip to content

Instantly share code, notes, and snippets.

@mauromorales
Last active December 21, 2015 21:48
Show Gist options
  • Save mauromorales/6370324 to your computer and use it in GitHub Desktop.
Save mauromorales/6370324 to your computer and use it in GitHub Desktop.
Commit: The Hacker Way to Build a Habit
commit checkin write
Scenario: List all commitments
Given a commitment named "compartmentalize" exists
When I run `commit list --path=test`
Then the stdout should contain "You have commited to do the following:"
gem install commit
commit show write
What will you commit to? (use a verb, ie: run)
I will: write
class Commitment < Thor
desc "start", "Creates a new commitment"
def start
puts "What will you commit to? (use a verb, ie: run)"
commitment = get_stdin("I will: ")
puts "Great! You have commited to #{commitment} daily"
generate get_path(options[:path]), commitment
end
end
Commitment.start
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment