Skip to content

Commit

Permalink
travis support
Browse files Browse the repository at this point in the history
  • Loading branch information
rauhryan committed Apr 6, 2012
1 parent 54089be commit 28ae411
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 4 deletions.
16 changes: 16 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@

env:
- username=gheeci repo=ghee_test org=ghee-org token=b41f292120668e926bda0f58609b9993c260d5b0

language: ruby

notifications:
email:
- rauh.ryan@gmail.com

rvm:
- 1.8.7
- 1.9.2
- 1.9.3

script: rake spec
12 changes: 8 additions & 4 deletions spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@
c.stub_with :webmock
c.default_cassette_options = {:record => :once}
end

settings = YAML.load_file(File.expand_path('../settings.yml', __FILE__))
GH_AUTH = settings['access_token'] ? {:access_token => settings['access_token']} : {:basic_auth => {:user_name => settings['username'], :password => settings['password']}}
GH_USER, GH_REPO, GH_ORG = settings['username'], settings['repo'], settings['org']
if File.exists? "../settings.yml"
settings = YAML.load_file(File.expand_path('../settings.yml', __FILE__))
GH_AUTH = settings['access_token'] ? {:access_token => settings['access_token']} : {:basic_auth => {:user_name => settings['username'], :password => settings['password']}}
GH_USER, GH_REPO, GH_ORG = settings['username'], settings['repo'], settings['org']
else
GH_AUTH = ENV["token"]
GH_USER, GH_REPO, GH_ORG = ENV['username'], ENV['repo'], ENV['org']
end

0 comments on commit 28ae411

Please sign in to comment.