Skip to content

Commit

Permalink
Merge pull request #12 from travis-ci/sf-extract-travis-config
Browse files Browse the repository at this point in the history
extract Travis::Config to a gem
  • Loading branch information
svenfuchs committed Oct 19, 2014
2 parents 29f6d52 + 7ad5256 commit 7aafd52
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 56 deletions.
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ source 'https://rubygems.org'
ruby '2.1.2'

gem 'travis-support', github: 'travis-ci/travis-support'
gem 'travis-config', '~> 0.1.0'
gem 'travis-sidekiqs', github: 'travis-ci/travis-sidekiqs', require: nil

gem 'sinatra', '~> 1.4.2'
Expand All @@ -13,7 +14,6 @@ gem 'multi_json'
gem 'sentry-raven', github: 'getsentry/raven-ruby'

gem 'activesupport', '~> 3.2.13'
gem 'hashr', '~> 0.0.19'

gem 'metriks'
gem 'metriks-librato_metrics'
Expand Down
4 changes: 3 additions & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,8 @@ GEM
thor (0.19.1)
tilt (1.4.1)
timers (1.1.0)
travis-config (0.1.0)
hashr (~> 0.0)
unicorn (4.6.3)
kgio (~> 2.6)
rack
Expand All @@ -101,7 +103,6 @@ DEPENDENCIES
activesupport (~> 3.2.13)
backports (= 2.4.0)
foreman (~> 0.41.0)
hashr (~> 0.0.19)
metriks
metriks-librato_metrics
multi_json
Expand All @@ -111,6 +112,7 @@ DEPENDENCIES
rspec (~> 2.9)
sentry-raven!
sinatra (~> 1.4.2)
travis-config (~> 0.1.0)
travis-sidekiqs!
travis-support!
unicorn (~> 4.6.2)
Expand Down
10 changes: 8 additions & 2 deletions lib/travis/listener.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
require 'travis/config'
require 'travis/support'
require 'travis/listener/config'
require 'travis/listener/app'
require 'logger'
require 'sidekiq'
Expand All @@ -9,11 +9,17 @@
module Travis
class << self
def config
@config ||= Config.new
@config ||= Listener::Config.load
end
end

module Listener
class Config < Travis::Config
define :redis => { :url => 'redis://localhost:6379' },
:sentry => { },
:metrics => { :reporter => 'librato' }
end

class << self
def setup
::Sidekiq.configure_client do |config|
Expand Down
51 changes: 0 additions & 51 deletions lib/travis/listener/config.rb

This file was deleted.

2 changes: 1 addition & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
c.include Rack::Test::Methods

c.alias_example_to :fit, :focused => true
c.filter_run :focused => true
c.filter_run :focus => true
c.run_all_when_everything_filtered = true

c.before :all do
Expand Down

0 comments on commit 7aafd52

Please sign in to comment.