Class: WaxTasks::LocalBranch
Overview
Branch object for ‘$ wax:push` task when run on local machine using local credentials
Instance Attribute Summary collapse
-
#baseurl ⇒ String
the site baseurl to build with (if on gh-pages).
-
#commit_msg ⇒ String
the commit message to use on push.
-
#origin ⇒ String
the current repository remote.
-
#success_msg ⇒ String
informative message to be output to console.
Attributes inherited from Branch
Instance Method Summary collapse
-
#initialize(site, target) ⇒ LocalBranch
constructor
A new instance of LocalBranch.
Methods inherited from Branch
Constructor Details
#initialize(site, target) ⇒ LocalBranch
Returns a new instance of LocalBranch.
101 102 103 104 105 106 107 108 |
# File 'lib/wax_tasks/branch.rb', line 101 def initialize(site, target) super(site, target) @origin = `git config --get remote.origin.url`.strip @commit_msg = "Updated via local task at #{Time.now.utc}" @baseurl = @origin.split('/').last.gsub('.git', '') @success_msg = "Deploying to #{@target} branch from local task." end |
Instance Attribute Details
#baseurl ⇒ String
the site baseurl to build with (if on gh-pages)
100 101 102 |
# File 'lib/wax_tasks/branch.rb', line 100 def baseurl @baseurl end |
#commit_msg ⇒ String
the commit message to use on push
100 101 102 |
# File 'lib/wax_tasks/branch.rb', line 100 def commit_msg @commit_msg end |
#origin ⇒ String
the current repository remote
100 101 102 |
# File 'lib/wax_tasks/branch.rb', line 100 def origin @origin end |
#success_msg ⇒ String
informative message to be output to console
100 101 102 |
# File 'lib/wax_tasks/branch.rb', line 100 def success_msg @success_msg end |