diff --git a/Gemfile b/Gemfile index bf57e532..2e970b32 100644 --- a/Gemfile +++ b/Gemfile @@ -18,8 +18,6 @@ gem 'rack-host-redirect' gem 'rackup' gem 'rake' gem 'roda' -gem 'sequel' -gem 'sequel_pg' gem 'tilt' gem 'unicode_utils' diff --git a/Gemfile.lock b/Gemfile.lock index 96344bf3..a479e649 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -28,7 +28,6 @@ GEM async async-pool (0.4.0) async (>= 1.25) - bigdecimal (3.1.6) build-environment (1.13.0) capybara (3.39.2) addressable @@ -115,7 +114,6 @@ GEM parser (3.3.0.5) ast (~> 2.4.1) racc - pg (1.5.4) process-metrics (0.2.1) console (~> 1.8) samovar (~> 2.1) @@ -177,11 +175,6 @@ GEM rexml (~> 3.2, >= 3.2.5) rubyzip (>= 1.2.2, < 3.0) websocket (~> 1.0) - sequel (5.76.0) - bigdecimal - sequel_pg (1.17.1) - pg (>= 0.18.0, != 1.2.0) - sequel (>= 4.38.0) snaky_hash (2.0.1) hashie version_gem (~> 1.1, >= 1.1.1) @@ -231,8 +224,6 @@ DEPENDENCIES rollbar rubocop rubocop-performance - sequel - sequel_pg tilt unicode_utils webdrivers diff --git a/app.rb b/app.rb index e57f9a29..a89a66d4 100644 --- a/app.rb +++ b/app.rb @@ -13,9 +13,7 @@ require_relative 'lib/auth' require_relative 'lib/bookmooch' require_relative 'lib/cache' -require_relative 'lib/db' require_relative 'lib/goodreads' -require_relative 'lib/models' require_relative 'lib/overdrive' class App < Roda diff --git a/lib/db.rb b/lib/db.rb deleted file mode 100644 index 527e9946..00000000 --- a/lib/db.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require_relative '../.env' -require 'sequel' - -# Delete DATABASE_URL from the environment, so it isn't accidently -# passed to subprocesses. DATABASE_URL may contain passwords. -# DB = Sequel.connect ENV.delete 'DATABASE_URL' diff --git a/lib/models.rb b/lib/models.rb deleted file mode 100644 index 500a79b0..00000000 --- a/lib/models.rb +++ /dev/null @@ -1,16 +0,0 @@ -# # frozen_string_literal: true - -# require_relative 'db' - -# Sequel::Model.plugin :auto_validations -# Sequel::Model.plugin :prepared_statements - -# if ENV['RACK_ENV'] == 'development' -# Sequel::Model.cache_associations = false -# Unreloader.require('models') { |f| Sequel::Model.send :camelize, File.basename(f).delete_suffix('.rb') } -# DB.loggers << Logger.new($stdout) -# else -# Sequel::Model.plugin :subclasses -# Sequel::Model.freeze_descendents -# DB.freeze -# end diff --git a/migrate/001_users.rb b/migrate/001_users.rb deleted file mode 100644 index 508fbb3f..00000000 --- a/migrate/001_users.rb +++ /dev/null @@ -1,11 +0,0 @@ -# frozen_string_literal: true - -require_relative '../lib/db' - -DB.create_table(:users) do - primary_key :id - Integer :goodreads_user_id, unique: true, null: false - String :first_name - String :last_name - String :email -end diff --git a/migrate/003_add_token_to_users.rb b/migrate/003_add_token_to_users.rb deleted file mode 100644 index 5f4a8833..00000000 --- a/migrate/003_add_token_to_users.rb +++ /dev/null @@ -1,8 +0,0 @@ -# frozen_string_literal: true - -require_relative '../lib/db' - -DB.alter_table(:users) do - add_column :access_token, String - add_column :access_token_secret, String -end