lib/jekyll_push/travis.rb in jekyll_push-0.1.1 vs lib/jekyll_push/travis.rb in jekyll_push-0.1.2
- old
+ new
@@ -10,13 +10,13 @@
"Updated via JekyllPush Travis \"#{ENV['TRAVIS_COMMIT']}\" at #{@time}."
end
#
# @return [String]
- def origin
+ def origin(opts)
@repo_slug = ENV['TRAVIS_REPO_SLUG']
- @user = @repo_slug.split('/').first
- @token = ENV['ACCESS_TOKEN']
+ @user = opts.fetch :user, @repo_slug.split('/').first
+ @token = opts.fetch :pw, ENV['ACCESS_TOKEN']
"https://#{@user}:#{@token}@github.com/#{@repo_slug}.git"
end
#