Class: Gitpt
- Inherits:
-
Object
- Object
- Gitpt
- Includes:
- Geordi::Interaction
- Defined in:
- lib/geordi/gitpt.rb
Constant Summary collapse
- SETTINGS_FILE_NAME =
'.gitpt'.freeze
- PROJECT_IDS_FILE_NAME =
'.pt_project_id'.freeze
Instance Method Summary collapse
-
#initialize ⇒ Gitpt
constructor
A new instance of Gitpt.
- #run(git_args) ⇒ Object
Methods included from Geordi::Interaction
#announce, #fail, #note, #note_cmd, #prompt, #strip_heredoc, #success, #warn
Constructor Details
#initialize ⇒ Gitpt
Returns a new instance of Gitpt.
10 11 12 13 |
# File 'lib/geordi/gitpt.rb', line 10 def initialize self.highline = HighLine.new self.client = build_client(read_settings) end |
Instance Method Details
#run(git_args) ⇒ Object
15 16 17 18 19 20 21 22 23 24 |
# File 'lib/geordi/gitpt.rb', line 15 def run(git_args) warn <<-WARNING unless Geordi::Util.staged_changes? No staged changes. Will create an empty commit. WARNING story = choose_story if story create_commit "[##{story.id}] #{story.name}", *git_args end end |