Browse code

now Github repo url can be specified inline setup_github_pages command

Brandon Mathis authored on 18/12/2011 at 21:38:11
Showing 1 changed files
... ...
@@ -295,8 +295,12 @@ task :set_root_dir, :dir do |t, args|
295 295
 end
296 296
 
297 297
 desc "Set up _deploy folder and deploy branch for Github Pages deployment"
298
-task :setup_github_pages do
299
-  repo_url = get_stdin("Enter the read/write url for your repository: ")
298
+task :setup_github_pages, :repo do |t, args|
299
+  if args.repo
300
+    repo_url = args.repo
301
+  else
302
+    repo_url = get_stdin("Enter the read/write url for your repository: ")
303
+  end
300 304
   user = repo_url.match(/:([^\/]+)/)[1]
301 305
   branch = (repo_url.match(/\/[\w-]+.github.com/).nil?) ? 'gh-pages' : 'master'
302 306
   project = (branch == 'gh-pages') ? repo_url.match(/\/([^\.]+)/)[1] : ''