Moved lib/ to app/
This commit is contained in:
parent
f361e47e75
commit
39ce636c0a
@ -2,5 +2,5 @@ guard 'rack' do
|
||||
watch('Gemfile.lock')
|
||||
watch('config.ru')
|
||||
watch('server.rb')
|
||||
watch(%r{^(lib)/.*})
|
||||
watch(%r{^(app)/.*})
|
||||
end
|
10
server.rb
10
server.rb
@ -3,7 +3,7 @@ require 'sequel'
|
||||
require 'sqlite3'
|
||||
require 'sinatra/base'
|
||||
|
||||
require_relative 'lib/config.rb'
|
||||
require_relative 'app/config.rb'
|
||||
|
||||
# Load configuration file
|
||||
$conf = Config.new(File.join(__dir__, 'data/config.yaml'))
|
||||
@ -13,8 +13,8 @@ Sequel::Model.plugin :timestamps
|
||||
# Initialize Sequel gem for database actions
|
||||
DB = Sequel.connect(adapter: $conf.get('database.adapter'), database: $conf.get('database.database'))
|
||||
# Load models
|
||||
require_relative 'lib/models/channel.rb'
|
||||
require_relative 'lib/models/video.rb'
|
||||
require_relative 'app/models/channel.rb'
|
||||
require_relative 'app/models/video.rb'
|
||||
|
||||
class StageManager < Sinatra::Base
|
||||
@@my_app = {}
|
||||
@ -33,7 +33,7 @@ class StageManager < Sinatra::Base
|
||||
logger.level = Logger::INFO
|
||||
|
||||
# Load helper functions
|
||||
require_relative 'lib/helpers.rb'
|
||||
require_relative 'app/helpers.rb'
|
||||
helpers Helpers
|
||||
|
||||
# Map controllers
|
||||
@ -48,4 +48,4 @@ class StageManager < Sinatra::Base
|
||||
end
|
||||
end
|
||||
|
||||
Dir.glob('./lib/routes/*.rb').each { |f| require f }
|
||||
Dir.glob('./app/routes/*.rb').each { |f| require f }
|
||||
|
Loading…
Reference in New Issue
Block a user