From 39ce636c0a6ddcbe959e8ad03c90091fb9c4c42b Mon Sep 17 00:00:00 2001 From: Gregory Ballantine Date: Thu, 9 Mar 2023 22:48:09 -0500 Subject: [PATCH] Moved lib/ to app/ --- Guardfile | 2 +- {lib => app}/config.rb | 0 {lib => app}/helpers.rb | 0 {lib => app}/models/channel.rb | 0 {lib => app}/models/video.rb | 0 {lib => app}/routes.rb | 0 {lib => app}/routes/channel.rb | 0 {lib => app}/routes/index.rb | 0 {lib => app}/routes/video.rb | 0 server.rb | 10 +++++----- 10 files changed, 6 insertions(+), 6 deletions(-) rename {lib => app}/config.rb (100%) rename {lib => app}/helpers.rb (100%) rename {lib => app}/models/channel.rb (100%) rename {lib => app}/models/video.rb (100%) rename {lib => app}/routes.rb (100%) rename {lib => app}/routes/channel.rb (100%) rename {lib => app}/routes/index.rb (100%) rename {lib => app}/routes/video.rb (100%) diff --git a/Guardfile b/Guardfile index af5d78c..bda4e7f 100644 --- a/Guardfile +++ b/Guardfile @@ -2,5 +2,5 @@ guard 'rack' do watch('Gemfile.lock') watch('config.ru') watch('server.rb') - watch(%r{^(lib)/.*}) + watch(%r{^(app)/.*}) end \ No newline at end of file diff --git a/lib/config.rb b/app/config.rb similarity index 100% rename from lib/config.rb rename to app/config.rb diff --git a/lib/helpers.rb b/app/helpers.rb similarity index 100% rename from lib/helpers.rb rename to app/helpers.rb diff --git a/lib/models/channel.rb b/app/models/channel.rb similarity index 100% rename from lib/models/channel.rb rename to app/models/channel.rb diff --git a/lib/models/video.rb b/app/models/video.rb similarity index 100% rename from lib/models/video.rb rename to app/models/video.rb diff --git a/lib/routes.rb b/app/routes.rb similarity index 100% rename from lib/routes.rb rename to app/routes.rb diff --git a/lib/routes/channel.rb b/app/routes/channel.rb similarity index 100% rename from lib/routes/channel.rb rename to app/routes/channel.rb diff --git a/lib/routes/index.rb b/app/routes/index.rb similarity index 100% rename from lib/routes/index.rb rename to app/routes/index.rb diff --git a/lib/routes/video.rb b/app/routes/video.rb similarity index 100% rename from lib/routes/video.rb rename to app/routes/video.rb diff --git a/server.rb b/server.rb index 64c4371..a991308 100644 --- a/server.rb +++ b/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 }