Class: CommitLive::Submit::GitHelper
- Inherits:
-
Object
- Object
- CommitLive::Submit::GitHelper
- Defined in:
- lib/commit-live/lesson/git-helper.rb
Constant Summary collapse
- REPO_BELONGS_TO_US =
[ 'commit-live-students' ]
Instance Attribute Summary collapse
-
#currentLesson ⇒ Object
readonly
Returns the value of attribute currentLesson.
-
#git ⇒ Object
readonly
Returns the value of attribute git.
-
#netrc ⇒ Object
readonly
Returns the value of attribute netrc.
-
#remote_name ⇒ Object
Returns the value of attribute remote_name.
-
#status ⇒ Object
readonly
Returns the value of attribute status.
Instance Method Summary collapse
- #commitAndPush ⇒ Object
-
#initialize ⇒ GitHelper
constructor
A new instance of GitHelper.
Constructor Details
#initialize ⇒ GitHelper
Returns a new instance of GitHelper.
16 17 18 19 20 21 |
# File 'lib/commit-live/lesson/git-helper.rb', line 16 def initialize() @git = setGit @netrc = CommitLive::NetrcInteractor.new() @currentLesson = CommitLive::Current.new @status = CommitLive::Status.new end |
Instance Attribute Details
#currentLesson ⇒ Object (readonly)
Returns the value of attribute currentLesson.
9 10 11 |
# File 'lib/commit-live/lesson/git-helper.rb', line 9 def currentLesson @currentLesson end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
9 10 11 |
# File 'lib/commit-live/lesson/git-helper.rb', line 9 def git @git end |
#netrc ⇒ Object (readonly)
Returns the value of attribute netrc.
9 10 11 |
# File 'lib/commit-live/lesson/git-helper.rb', line 9 def netrc @netrc end |
#remote_name ⇒ Object
Returns the value of attribute remote_name.
10 11 12 |
# File 'lib/commit-live/lesson/git-helper.rb', line 10 def remote_name @remote_name end |
#status ⇒ Object (readonly)
Returns the value of attribute status.
9 10 11 |
# File 'lib/commit-live/lesson/git-helper.rb', line 9 def status @status end |
Instance Method Details
#commitAndPush ⇒ Object
23 24 25 26 27 28 29 30 31 |
# File 'lib/commit-live/lesson/git-helper.rb', line 23 def commitAndPush checkRemote addChanges commitChanges push createPullRequest update_lesson_status end |