Permalink
Browse files

test the travis hooks

  • Loading branch information...
1 parent 619cb6b commit a9aca885139653c916f6f48e453cde8fd58b72d9 @ywen2 ywen2 committed Jun 24, 2011
Showing with 6 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +2 −0 .pivotal.yml.sample
  3. +1 −1 .travis.yml
  4. +2 −1 lib/pivotal_to_pdf/pivotal.rb
View
@@ -2,3 +2,4 @@
*.csv
*.pdf
pkg
+.pivotal.yml
View
@@ -0,0 +1,2 @@
+token: -pivotal-api-token
+project_id: project-id
View
@@ -1,3 +1,3 @@
-script: "bundle exec rake spec"
+script: "cp .pivotal.yml.sample .pivotal.yml; PIVOTAL_TO_PDF_CONFIG_DIR=. bundle exec rake spec"
rvm:
- ree
@@ -1,6 +1,7 @@
class Pivotal < ActiveResource::Base
def self.inherited(sub)
- info = YAML.load_file File.expand_path("~/.pivotal.yml")
+ base_dir = ENV["PIVOTAL_TO_PDF_CONFIG_DIR"] || "~"
+ info = YAML.load_file File.expand_path("#{base_dir}/.pivotal.yml")
sub.site = %Q|https://www.pivotaltracker.com/services/v3/projects/#{info['project_id']}|
sub.headers['X-TrackerToken'] = info["token"]
end

0 comments on commit a9aca88

Please sign in to comment.