Skip to content

Commit fdd5ef2

Browse files
committed
Reorganize code, fix rake
1 parent 841a8e6 commit fdd5ef2

File tree

11 files changed

+11
-11
lines changed

11 files changed

+11
-11
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ services:
77
- postgresql
88

99
before_script:
10-
- cp app/config/database.yml.travis app/config/database.yml
10+
- cp config/database.yml.travis config/database.yml
1111
- bundle exec rake db:create db:migrate
1212

1313
before_install:

Procfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web: bundle exec puma -e $RACK_ENV -b unix:///tmp/web_server.sock --pidfile /tmp/web_server.pid -d -C config/puma.rb
1+
web: bundle exec puma -e production -d

Rakefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
require 'bundler/setup'
22

3-
require_relative 'app/config/application'
3+
require_relative 'config/application'
44
load 'tasks/otr-activerecord.rake'
55

66
desc 'Default: run specs.'

config.ru

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
$LOAD_PATH.unshift(File.dirname(__FILE__))
22

3-
require 'app/config/application'
3+
require 'config/application'
44

55
use OTR::ActiveRecord::ConnectionManagement
66
run GrapeOAuth2Sample::API

app/config/application.rb renamed to config/application.rb

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,20 +18,20 @@
1818
load File.expand_path('../database.rb', __FILE__)
1919

2020
# Models
21-
require_relative '../models/application_record'
21+
require_relative '../app/models/application_record'
2222

2323
%w(access_token access_code application post user).each do |model|
24-
require_relative "../models/#{model}"
24+
require_relative "../app/models/#{model}"
2525
end
2626

2727
# Entities
28-
Dir[File.expand_path('../../entities/*.rb', __FILE__)].each do |entity|
28+
Dir[File.expand_path('../../app/entities/*.rb', __FILE__)].each do |entity|
2929
require_relative entity
3030
end
3131

3232
# Endpoints
33-
Dir[File.expand_path('../../endpoints/*.rb', __FILE__)].each do |endpoint|
33+
Dir[File.expand_path('../../app/endpoints/*.rb', __FILE__)].each do |endpoint|
3434
require_relative endpoint
3535
end
3636

37-
require_relative '../../app/api'
37+
require_relative '../app/api'

app/config/database.rb renamed to config/database.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@
44
env = ENV['RACK_ENV'] || ENV['RAILS_ENV'] || 'development'
55

66
::ActiveRecord::Base.default_timezone = :utc
7-
::ActiveRecord::Base.logger = Logger.new(File.expand_path("../../../log/#{env}.log", __FILE__), File::WRONLY | File::APPEND)
7+
::ActiveRecord::Base.logger = Logger.new(File.expand_path("../../log/#{env}.log", __FILE__), File::WRONLY | File::APPEND)
88

99
::ActiveRecord::Migration.verbose = false
File renamed without changes.
File renamed without changes.
File renamed without changes.

spec/spec_helper.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
require 'rack/test'
1616
require 'database_cleaner'
1717

18-
require_relative '../app/config/application'
18+
require_relative '../config/application'
1919

2020
require 'support/api_helper'
2121

0 commit comments

Comments
 (0)