Skip to content

Commit

Permalink
added require all
Browse files Browse the repository at this point in the history
  • Loading branch information
Alwin Karabiowski committed Jul 24, 2013
1 parent e5550d7 commit 6364237
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 34 deletions.
5 changes: 0 additions & 5 deletions companies/company.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
require 'dm-core'
require 'dm-migrations'
require 'dm-validations'
require 'dm-serializer'

class Company
include DataMapper::Resource

Expand Down
5 changes: 0 additions & 5 deletions companies/company_creation_service.rb
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
require 'company.rb'
require 'credit_card_service'
require 'json'
require 'company_update_service'

class CompanyCreationService

def self.create(name, creditcard)
Expand Down
3 changes: 0 additions & 3 deletions companies/company_deletion_service.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,3 @@
require 'company'
require 'json'

class CompanyDeletionService
include TorqueBox::Injectors

Expand Down
2 changes: 0 additions & 2 deletions companies/company_finding_service.rb
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
require 'company'

class CompanyFindingService
include TorqueBox::Messaging::Backgroundable

Expand Down
4 changes: 0 additions & 4 deletions companies/company_replay_service.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
require 'json'
require 'company'
require 'company_update_service'

class CompanyReplayService

def self.replay companies
Expand Down
4 changes: 0 additions & 4 deletions companies/company_update_service.rb
Original file line number Diff line number Diff line change
@@ -1,7 +1,3 @@
require 'company'
require 'credit_card_service'
require 'json'

class CompanyUpdateService
include TorqueBox::Messaging::Backgroundable

Expand Down
10 changes: 7 additions & 3 deletions companies/config.ru
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
require 'rubygems'
require 'bundler'
require 'sinatra'
require 'server'

# Require all Gems automatically
require 'bundler/setup'
Bundler.require

# require everything in the app folder
require_all './*.rb'

run Server
7 changes: 0 additions & 7 deletions companies/server.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,3 @@
require "company.rb"
require "company_creation_service"
require "company_finding_service"
require "company_deletion_service"
require "company_replay_service"
require "json"

class Server < Sinatra::Base
use TorqueBox::Session::ServletStore

Expand Down
7 changes: 6 additions & 1 deletion spec/spec_helper.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
require 'rubygems'
require 'bundler/setup'
Bundler.require

require 'torquespec'
require 'torquebox-core'
require 'capybara'
Expand Down Expand Up @@ -58,4 +62,5 @@ def post_json(path, parameters)

ENV["RACK_ENV"] = "testing"

Dir["./spec/helper/**/*.rb"].sort.each {|f| require f}
require_all './spec/helper/**/*.rb'
require_all 'companies/*.rb'

0 comments on commit 6364237

Please sign in to comment.