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 =
[ 'Rubygemtrial' ]
Instance Attribute Summary collapse
-
#currentLesson ⇒ Object
readonly
Returns the value of attribute currentLesson.
-
#dummyUsername ⇒ Object
readonly
Returns the value of attribute dummyUsername.
-
#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.
Instance Method Summary collapse
- #commitAndPush ⇒ Object
-
#initialize ⇒ GitHelper
constructor
A new instance of GitHelper.
Constructor Details
#initialize ⇒ GitHelper
Returns a new instance of GitHelper.
15 16 17 18 19 20 |
# File 'lib/commit-live/lesson/git-helper.rb', line 15 def initialize() @git = setGit @dummyUsername = 'gitint' @netrc = CommitLive::NetrcInteractor.new() @currentLesson = CommitLive::Current.new end |
Instance Attribute Details
#currentLesson ⇒ Object (readonly)
Returns the value of attribute currentLesson.
8 9 10 |
# File 'lib/commit-live/lesson/git-helper.rb', line 8 def currentLesson @currentLesson end |
#dummyUsername ⇒ Object (readonly)
Returns the value of attribute dummyUsername.
8 9 10 |
# File 'lib/commit-live/lesson/git-helper.rb', line 8 def dummyUsername @dummyUsername end |
#git ⇒ Object (readonly)
Returns the value of attribute git.
8 9 10 |
# File 'lib/commit-live/lesson/git-helper.rb', line 8 def git @git end |
#netrc ⇒ Object (readonly)
Returns the value of attribute netrc.
8 9 10 |
# File 'lib/commit-live/lesson/git-helper.rb', line 8 def netrc @netrc end |
#remote_name ⇒ Object
Returns the value of attribute remote_name.
9 10 11 |
# File 'lib/commit-live/lesson/git-helper.rb', line 9 def remote_name @remote_name end |
Instance Method Details
#commitAndPush ⇒ Object
22 23 24 25 26 27 28 29 |
# File 'lib/commit-live/lesson/git-helper.rb', line 22 def commitAndPush checkRemote addChanges commitChanges push createPullRequest end |