Skip to content
Browse files

Clean up the load path madness

  • Loading branch information...
1 parent 7ebeee9 commit 695eb22d11546f64a68e17ab929103aaf7ea4a2d @jeffkreeftmeijer committed
View
6 lib/navvy.rb
@@ -1,6 +1,6 @@
-require File.expand_path(File.dirname(__FILE__) + '/navvy/worker')
-require File.expand_path(File.dirname(__FILE__) + '/navvy/logger')
-require File.expand_path(File.dirname(__FILE__) + '/navvy/configuration')
+require 'navvy/worker'
+require 'navvy/logger'
+require 'navvy/configuration'
module Navvy
class << self
View
2 lib/navvy/job/active_record.rb
@@ -133,4 +133,4 @@ def times_failed
end
end
-require File.expand_path(File.dirname(__FILE__) + '/../job')
+require 'navvy/job'
View
2 lib/navvy/job/data_mapper.rb
@@ -151,4 +151,4 @@ def times_failed
end
end
-require File.expand_path(File.dirname(__FILE__) + '/../job')
+require 'navvy/job'
View
2 lib/navvy/job/mongo_mapper.rb
@@ -147,4 +147,4 @@ def times_failed
end
end
-require File.expand_path(File.dirname(__FILE__) + '/../job')
+require 'navvy/job'
View
2 lib/navvy/job/mongoid.rb
@@ -136,4 +136,4 @@ def times_failed
end
end
-require File.expand_path(File.dirname(__FILE__) + '/../job')
+require 'navvy/job'
View
2 lib/navvy/job/sequel.rb
@@ -134,4 +134,4 @@ def times_failed
end
end
-require File.expand_path(File.dirname(__FILE__) + '/../job')
+require 'navvy/job'
View
2 spec/configuration_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe Navvy::Configuration do
after do
View
2 spec/job_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe 'Navvy::Job' do
before do
View
2 spec/logger_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe Navvy::Logger do
describe '#colorized_info' do
View
2 spec/setup/active_record.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../lib/navvy/job/active_record')
+require 'navvy/job/active_record'
ActiveRecord::Base.establish_connection(:adapter => 'sqlite3', :database => '/tmp/navvy_test.sqlite')
View
2 spec/setup/data_mapper.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../lib/navvy/job/data_mapper')
+require 'navvy/job/data_mapper'
DataMapper.setup(:default, "sqlite3:///tmp/navvy_test.sqlite")
DataMapper.finalize
Navvy::Job.auto_migrate!
View
2 spec/setup/mongo_mapper.rb
@@ -1,2 +1,2 @@
-require File.expand_path(File.dirname(__FILE__) + '/../../lib/navvy/job/mongo_mapper')
+require 'navvy/job/mongo_mapper'
MongoMapper.database = 'navvy_test'
View
2 spec/setup/mongoid.rb
@@ -6,4 +6,4 @@
config.master = Mongo::Connection.new.db(name)
end
-require File.expand_path(File.dirname(__FILE__) + '/../../lib/navvy/job/mongoid')
+require 'navvy/job/mongoid'
View
2 spec/setup/sequel.rb
@@ -18,4 +18,4 @@
DateTime :failed_at
end
-require File.expand_path(File.dirname(__FILE__) + '/../../lib/navvy/job/sequel')
+require 'navvy/job/sequel'
View
2 spec/worker_spec.rb
@@ -1,4 +1,4 @@
-require File.expand_path(File.dirname(__FILE__) + '/spec_helper')
+require 'spec_helper'
describe Navvy::Worker do
describe '.fetch_and_run_jobs' do

0 comments on commit 695eb22

Please sign in to comment.
Something went wrong with that request. Please try again.