diff --git a/Gemfile b/Gemfile index 913a8e6..d49bed3 100644 --- a/Gemfile +++ b/Gemfile @@ -3,21 +3,23 @@ git_source(:github) { |repo| "https://github.com/#{repo}.git" } ruby '2.6.0' +gem 'devise' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' gem 'rails', '~> 5.2.3' # Use sqlite3 as the database for Active Record -gem 'sqlite3' +# gem 'sqlite3' +gem 'mysql2', '>= 0.4.4', '< 0.6.0' # Use Puma as the app server gem 'puma', '~> 3.11' # Use SCSS for stylesheets -gem 'sass-rails', '~> 5.0' +# gem 'sass-rails', '~> 5.0' # Use Uglifier as compressor for JavaScript assets gem 'uglifier', '>= 1.3.0' # See https://github.com/rails/execjs#readme for more supported runtimes # gem 'mini_racer', platforms: :ruby # Use CoffeeScript for .coffee assets and views -gem 'coffee-rails', '~> 4.2' +# gem 'coffee-rails', '~> 4.2' # Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks gem 'turbolinks', '~> 5' # Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder diff --git a/Gemfile.lock b/Gemfile.lock index 1b2c5b7..d1183e6 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -47,6 +47,7 @@ GEM archive-zip (0.12.0) io-like (~> 0.3.0) arel (9.0.0) + bcrypt (3.1.12) bindex (0.7.0) bootsnap (1.4.3) msgpack (~> 1.0) @@ -65,15 +66,14 @@ GEM chromedriver-helper (2.1.1) archive-zip (~> 0.10) nokogiri (~> 1.8) - coffee-rails (4.2.2) - coffee-script (>= 2.2.0) - railties (>= 4.0.0) - coffee-script (2.4.1) - coffee-script-source - execjs - coffee-script-source (1.12.2) concurrent-ruby (1.1.5) crass (1.0.4) + devise (4.6.2) + bcrypt (~> 3.0) + orm_adapter (~> 0.1) + railties (>= 4.1.0, < 6.0) + responders + warden (~> 1.2.3) erubi (1.8.0) execjs (2.7.0) ffi (1.10.0) @@ -103,9 +103,11 @@ GEM minitest (5.11.3) msgpack (1.2.9) multi_json (1.13.1) + mysql2 (0.5.2) nio4r (2.3.1) nokogiri (1.10.2) mini_portile2 (~> 2.4.0) + orm_adapter (0.5.0) public_suffix (3.0.3) puma (3.12.1) rack (2.0.7) @@ -140,19 +142,11 @@ GEM rb-inotify (0.10.0) ffi (~> 1.0) regexp_parser (1.4.0) + responders (2.4.1) + actionpack (>= 4.2.0, < 6.0) + railties (>= 4.2.0, < 6.0) ruby_dep (1.5.0) rubyzip (1.2.2) - sass (3.7.4) - sass-listen (~> 4.0.0) - sass-listen (4.0.0) - rb-fsevent (~> 0.9, >= 0.9.4) - rb-inotify (~> 0.9, >= 0.9.7) - sass-rails (5.0.7) - railties (>= 4.0.0, < 6) - sass (~> 3.1) - sprockets (>= 2.8, < 4.0) - sprockets-rails (>= 2.0, < 4.0) - tilt (>= 1.1, < 3) selenium-webdriver (3.141.0) childprocess (~> 0.5) rubyzip (~> 1.2, >= 1.2.2) @@ -168,10 +162,8 @@ GEM actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) - sqlite3 (1.4.0) thor (0.20.3) thread_safe (0.3.6) - tilt (2.0.9) turbolinks (5.2.0) turbolinks-source (~> 5.2) turbolinks-source (5.2.0) @@ -179,6 +171,8 @@ GEM thread_safe (~> 0.1) uglifier (4.1.20) execjs (>= 0.3.0, < 3) + warden (1.2.8) + rack (>= 2.0.6) web-console (3.7.0) actionview (>= 5.0) activemodel (>= 5.0) @@ -198,16 +192,15 @@ DEPENDENCIES byebug capybara (>= 2.15) chromedriver-helper - coffee-rails (~> 4.2) + devise jbuilder (~> 2.5) listen (>= 3.0.5, < 3.2) + mysql2 (>= 0.4.4, < 0.6.0) puma (~> 3.11) rails (~> 5.2.3) - sass-rails (~> 5.0) selenium-webdriver spring spring-watcher-listen (~> 2.0.0) - sqlite3 turbolinks (~> 5) tzinfo-data uglifier (>= 1.3.0) diff --git a/config/database.yml b/config/database.yml index 0d02f24..07f87ad 100644 --- a/config/database.yml +++ b/config/database.yml @@ -1,25 +1,56 @@ -# SQLite version 3.x -# gem install sqlite3 +# MySQL. Versions 5.1.10 and up are supported. # -# Ensure the SQLite 3 gem is defined in your Gemfile -# gem 'sqlite3' +# Install the MySQL driver +# gem install mysql2 +# +# Ensure the MySQL gem is defined in your Gemfile +# gem 'mysql2' +# +# And be sure to use new-style password hashing: +# https://dev.mysql.com/doc/refman/5.7/en/password-hashing.html # default: &default - adapter: sqlite3 + adapter: mysql2 + encoding: utf8 pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> - timeout: 5000 + host: 51.254.143.84 development: <<: *default - database: db/development.sqlite3 + database: coursep_dev + username: coursep_dev_usr + password: qXoR1chJAFZ0MYot # Warning: The database defined as "test" will be erased and # re-generated from your development database when you run "rake". # Do not set this db to the same as development or production. test: <<: *default - database: db/test.sqlite3 + database: coursep_test + username: coursep_test_us + password: nJDHosqTJz5o0QJ9 +# As with config/secrets.yml, you never want to store sensitive information, +# like your database password, in your source code. If your source code is +# ever seen by anyone, they now have access to your database. +# +# Instead, provide the password as a unix environment variable when you boot +# the app. Read http://guides.rubyonrails.org/configuring.html#configuring-a-database +# for a full rundown on how to provide these environment variables in a +# production deployment. +# +# On Heroku and other platform providers, you may have a full connection URL +# available as an environment variable. For example: +# +# DATABASE_URL="mysql2://myuser:mypass@localhost/somedatabase" +# +# You can use this database configuration with: +# +# production: +# url: <%= ENV['DATABASE_URL'] %> +# production: <<: *default - database: db/production.sqlite3 + database: coursep_prod + username: coursep_usr + password: 8YXPoZDwdhSySa99PoZDwdhSy