From e88c70bc2e355cee2b87805d9541ee699e9c520b Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Mon, 2 Apr 2018 17:05:45 -0700 Subject: [PATCH 01/42] Forked and Cloned rideshare. Ran rails new. --- RideShare/.gitignore | 22 ++ RideShare/Gemfile | 70 ++++++ RideShare/Gemfile.lock | 225 ++++++++++++++++++ RideShare/README.md | 24 ++ RideShare/Rakefile | 6 + RideShare/app/assets/config/manifest.js | 3 + RideShare/app/assets/images/.keep | 0 .../app/assets/javascripts/application.js | 15 ++ RideShare/app/assets/javascripts/cable.js | 13 + .../app/assets/javascripts/channels/.keep | 0 .../app/assets/stylesheets/application.css | 15 ++ .../app/channels/application_cable/channel.rb | 4 + .../channels/application_cable/connection.rb | 4 + .../app/controllers/application_controller.rb | 3 + RideShare/app/controllers/concerns/.keep | 0 RideShare/app/helpers/application_helper.rb | 2 + RideShare/app/jobs/application_job.rb | 2 + RideShare/app/mailers/application_mailer.rb | 4 + RideShare/app/models/application_record.rb | 3 + RideShare/app/models/concerns/.keep | 0 .../app/views/layouts/application.html.erb | 14 ++ RideShare/app/views/layouts/mailer.html.erb | 13 + RideShare/app/views/layouts/mailer.text.erb | 1 + RideShare/bin/bundle | 3 + RideShare/bin/rails | 9 + RideShare/bin/rake | 9 + RideShare/bin/setup | 38 +++ RideShare/bin/spring | 17 ++ RideShare/bin/update | 29 +++ RideShare/bin/yarn | 11 + RideShare/config.ru | 5 + RideShare/config/application.rb | 25 ++ RideShare/config/boot.rb | 3 + RideShare/config/cable.yml | 10 + RideShare/config/database.yml | 85 +++++++ RideShare/config/environment.rb | 5 + RideShare/config/environments/development.rb | 54 +++++ RideShare/config/environments/production.rb | 91 +++++++ RideShare/config/environments/test.rb | 42 ++++ .../application_controller_renderer.rb | 8 + RideShare/config/initializers/assets.rb | 14 ++ .../initializers/backtrace_silencers.rb | 7 + .../config/initializers/cookies_serializer.rb | 5 + .../initializers/filter_parameter_logging.rb | 4 + RideShare/config/initializers/inflections.rb | 16 ++ RideShare/config/initializers/mime_types.rb | 4 + .../config/initializers/wrap_parameters.rb | 14 ++ RideShare/config/locales/en.yml | 33 +++ RideShare/config/puma.rb | 56 +++++ RideShare/config/routes.rb | 3 + RideShare/config/secrets.yml | 32 +++ RideShare/config/spring.rb | 6 + RideShare/db/seeds.rb | 7 + RideShare/lib/assets/.keep | 0 RideShare/lib/tasks/.keep | 0 RideShare/log/.keep | 0 RideShare/package.json | 5 + RideShare/public/404.html | 67 ++++++ RideShare/public/422.html | 67 ++++++ RideShare/public/500.html | 66 +++++ .../public/apple-touch-icon-precomposed.png | 0 RideShare/public/apple-touch-icon.png | 0 RideShare/public/favicon.ico | 0 RideShare/public/robots.txt | 1 + .../test/application_system_test_case.rb | 5 + RideShare/test/controllers/.keep | 0 RideShare/test/fixtures/.keep | 0 RideShare/test/fixtures/files/.keep | 0 RideShare/test/helpers/.keep | 0 RideShare/test/integration/.keep | 0 RideShare/test/mailers/.keep | 0 RideShare/test/models/.keep | 0 RideShare/test/system/.keep | 0 RideShare/test/test_helper.rb | 26 ++ RideShare/tmp/.keep | 0 RideShare/vendor/.keep | 0 76 files changed, 1325 insertions(+) create mode 100644 RideShare/.gitignore create mode 100644 RideShare/Gemfile create mode 100644 RideShare/Gemfile.lock create mode 100644 RideShare/README.md create mode 100644 RideShare/Rakefile create mode 100644 RideShare/app/assets/config/manifest.js create mode 100644 RideShare/app/assets/images/.keep create mode 100644 RideShare/app/assets/javascripts/application.js create mode 100644 RideShare/app/assets/javascripts/cable.js create mode 100644 RideShare/app/assets/javascripts/channels/.keep create mode 100644 RideShare/app/assets/stylesheets/application.css create mode 100644 RideShare/app/channels/application_cable/channel.rb create mode 100644 RideShare/app/channels/application_cable/connection.rb create mode 100644 RideShare/app/controllers/application_controller.rb create mode 100644 RideShare/app/controllers/concerns/.keep create mode 100644 RideShare/app/helpers/application_helper.rb create mode 100644 RideShare/app/jobs/application_job.rb create mode 100644 RideShare/app/mailers/application_mailer.rb create mode 100644 RideShare/app/models/application_record.rb create mode 100644 RideShare/app/models/concerns/.keep create mode 100644 RideShare/app/views/layouts/application.html.erb create mode 100644 RideShare/app/views/layouts/mailer.html.erb create mode 100644 RideShare/app/views/layouts/mailer.text.erb create mode 100755 RideShare/bin/bundle create mode 100755 RideShare/bin/rails create mode 100755 RideShare/bin/rake create mode 100755 RideShare/bin/setup create mode 100755 RideShare/bin/spring create mode 100755 RideShare/bin/update create mode 100755 RideShare/bin/yarn create mode 100644 RideShare/config.ru create mode 100644 RideShare/config/application.rb create mode 100644 RideShare/config/boot.rb create mode 100644 RideShare/config/cable.yml create mode 100644 RideShare/config/database.yml create mode 100644 RideShare/config/environment.rb create mode 100644 RideShare/config/environments/development.rb create mode 100644 RideShare/config/environments/production.rb create mode 100644 RideShare/config/environments/test.rb create mode 100644 RideShare/config/initializers/application_controller_renderer.rb create mode 100644 RideShare/config/initializers/assets.rb create mode 100644 RideShare/config/initializers/backtrace_silencers.rb create mode 100644 RideShare/config/initializers/cookies_serializer.rb create mode 100644 RideShare/config/initializers/filter_parameter_logging.rb create mode 100644 RideShare/config/initializers/inflections.rb create mode 100644 RideShare/config/initializers/mime_types.rb create mode 100644 RideShare/config/initializers/wrap_parameters.rb create mode 100644 RideShare/config/locales/en.yml create mode 100644 RideShare/config/puma.rb create mode 100644 RideShare/config/routes.rb create mode 100644 RideShare/config/secrets.yml create mode 100644 RideShare/config/spring.rb create mode 100644 RideShare/db/seeds.rb create mode 100644 RideShare/lib/assets/.keep create mode 100644 RideShare/lib/tasks/.keep create mode 100644 RideShare/log/.keep create mode 100644 RideShare/package.json create mode 100644 RideShare/public/404.html create mode 100644 RideShare/public/422.html create mode 100644 RideShare/public/500.html create mode 100644 RideShare/public/apple-touch-icon-precomposed.png create mode 100644 RideShare/public/apple-touch-icon.png create mode 100644 RideShare/public/favicon.ico create mode 100644 RideShare/public/robots.txt create mode 100644 RideShare/test/application_system_test_case.rb create mode 100644 RideShare/test/controllers/.keep create mode 100644 RideShare/test/fixtures/.keep create mode 100644 RideShare/test/fixtures/files/.keep create mode 100644 RideShare/test/helpers/.keep create mode 100644 RideShare/test/integration/.keep create mode 100644 RideShare/test/mailers/.keep create mode 100644 RideShare/test/models/.keep create mode 100644 RideShare/test/system/.keep create mode 100644 RideShare/test/test_helper.rb create mode 100644 RideShare/tmp/.keep create mode 100644 RideShare/vendor/.keep diff --git a/RideShare/.gitignore b/RideShare/.gitignore new file mode 100644 index 000000000..e74c03379 --- /dev/null +++ b/RideShare/.gitignore @@ -0,0 +1,22 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +/node_modules +/yarn-error.log + +.byebug_history +/coverage +.DS_Store + diff --git a/RideShare/Gemfile b/RideShare/Gemfile new file mode 100644 index 000000000..9f37ac349 --- /dev/null +++ b/RideShare/Gemfile @@ -0,0 +1,70 @@ +source 'https://rubygems.org' + +git_source(:github) do |repo_name| + repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/") + "https://github.com/#{repo_name}.git" +end + + +# Bundle edge Rails instead: gem 'rails', github: 'rails/rails' +gem 'rails', '~> 5.1.5' +# Use postgresql as the database for Active Record +gem 'pg', '>= 0.18', '< 2.0' +# Use Puma as the app server +gem 'puma', '~> 3.7' +# Use SCSS for stylesheets +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 'therubyracer', platforms: :ruby + +# Use CoffeeScript for .coffee assets and views +# 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 +gem 'jbuilder', '~> 2.5' +# Use Redis adapter to run Action Cable in production +# gem 'redis', '~> 4.0' +# Use ActiveModel has_secure_password +# gem 'bcrypt', '~> 3.1.7' + +# Use Capistrano for deployment +# gem 'capistrano-rails', group: :development + +group :development, :test do + # Call 'byebug' anywhere in the code to stop execution and get a debugger console + gem 'byebug', platforms: [:mri, :mingw, :x64_mingw] + # Adds support for Capybara system testing and selenium driver + gem 'capybara', '~> 2.13' + gem 'selenium-webdriver' +end + +group :development do + # Access an IRB console on exception pages or by using <%= console %> anywhere in the code. + gem 'web-console', '>= 3.3.0' + gem 'listen', '>= 3.0.5', '< 3.2' + # Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring + gem 'spring' + gem 'spring-watcher-listen', '~> 2.0.0' +end + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby] + +gem 'jquery-turbolinks' +gem 'jquery-rails' +group :development, :test do + gem 'pry-rails' +end + +group :development do + gem 'better_errors' + gem 'binding_of_caller' +end + +group :test do + gem 'minitest-rails' + gem 'minitest-reporters' +end diff --git a/RideShare/Gemfile.lock b/RideShare/Gemfile.lock new file mode 100644 index 000000000..8c4827325 --- /dev/null +++ b/RideShare/Gemfile.lock @@ -0,0 +1,225 @@ +GEM + remote: https://rubygems.org/ + specs: + actioncable (5.1.6) + actionpack (= 5.1.6) + nio4r (~> 2.0) + websocket-driver (~> 0.6.1) + actionmailer (5.1.6) + actionpack (= 5.1.6) + actionview (= 5.1.6) + activejob (= 5.1.6) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (5.1.6) + actionview (= 5.1.6) + activesupport (= 5.1.6) + rack (~> 2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.2) + actionview (5.1.6) + activesupport (= 5.1.6) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.0.3) + activejob (5.1.6) + activesupport (= 5.1.6) + globalid (>= 0.3.6) + activemodel (5.1.6) + activesupport (= 5.1.6) + activerecord (5.1.6) + activemodel (= 5.1.6) + activesupport (= 5.1.6) + arel (~> 8.0) + activesupport (5.1.6) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 0.7, < 2) + minitest (~> 5.1) + tzinfo (~> 1.1) + addressable (2.5.2) + public_suffix (>= 2.0.2, < 4.0) + ansi (1.5.0) + arel (8.0.0) + better_errors (2.4.0) + coderay (>= 1.0.0) + erubi (>= 1.0.0) + rack (>= 0.9.0) + bindex (0.5.0) + binding_of_caller (0.8.0) + debug_inspector (>= 0.0.1) + builder (3.2.3) + byebug (10.0.2) + capybara (2.18.0) + addressable + mini_mime (>= 0.1.3) + nokogiri (>= 1.3.3) + rack (>= 1.0.0) + rack-test (>= 0.5.4) + xpath (>= 2.0, < 4.0) + childprocess (0.9.0) + ffi (~> 1.0, >= 1.0.11) + coderay (1.1.2) + concurrent-ruby (1.0.5) + crass (1.0.3) + debug_inspector (0.0.3) + erubi (1.7.1) + execjs (2.7.0) + ffi (1.9.23) + globalid (0.4.1) + activesupport (>= 4.2.0) + i18n (1.0.0) + concurrent-ruby (~> 1.0) + jbuilder (2.7.0) + activesupport (>= 4.2.0) + multi_json (>= 1.2) + jquery-rails (4.3.1) + rails-dom-testing (>= 1, < 3) + railties (>= 4.2.0) + thor (>= 0.14, < 2.0) + jquery-turbolinks (2.1.0) + railties (>= 3.1.0) + turbolinks + listen (3.1.5) + rb-fsevent (~> 0.9, >= 0.9.4) + rb-inotify (~> 0.9, >= 0.9.7) + ruby_dep (~> 1.2) + loofah (2.2.2) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.7.0) + mini_mime (>= 0.1.1) + method_source (0.9.0) + mini_mime (1.0.0) + mini_portile2 (2.3.0) + minitest (5.11.3) + minitest-rails (3.0.0) + minitest (~> 5.8) + railties (~> 5.0) + minitest-reporters (1.2.0) + ansi + builder + minitest (>= 5.0) + ruby-progressbar + multi_json (1.13.1) + nio4r (2.3.0) + nokogiri (1.8.2) + mini_portile2 (~> 2.3.0) + pg (1.0.0) + pry (0.11.3) + coderay (~> 1.1.0) + method_source (~> 0.9.0) + pry-rails (0.3.6) + pry (>= 0.10.4) + public_suffix (3.0.2) + puma (3.11.3) + rack (2.0.4) + rack-test (1.0.0) + rack (>= 1.0, < 3) + rails (5.1.6) + actioncable (= 5.1.6) + actionmailer (= 5.1.6) + actionpack (= 5.1.6) + actionview (= 5.1.6) + activejob (= 5.1.6) + activemodel (= 5.1.6) + activerecord (= 5.1.6) + activesupport (= 5.1.6) + bundler (>= 1.3.0) + railties (= 5.1.6) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.0.4) + loofah (~> 2.2, >= 2.2.2) + railties (5.1.6) + actionpack (= 5.1.6) + activesupport (= 5.1.6) + method_source + rake (>= 0.8.7) + thor (>= 0.18.1, < 2.0) + rake (12.3.1) + rb-fsevent (0.10.3) + rb-inotify (0.9.10) + ffi (>= 0.5.0, < 2) + ruby-progressbar (1.9.0) + ruby_dep (1.5.0) + rubyzip (1.2.1) + sass (3.5.6) + 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.11.0) + childprocess (~> 0.5) + rubyzip (~> 1.2) + spring (2.0.2) + activesupport (>= 4.2) + spring-watcher-listen (2.0.1) + listen (>= 2.7, < 4.0) + spring (>= 1.2, < 3.0) + sprockets (3.7.1) + concurrent-ruby (~> 1.0) + rack (> 1, < 3) + sprockets-rails (3.2.1) + actionpack (>= 4.0) + activesupport (>= 4.0) + sprockets (>= 3.0.0) + thor (0.20.0) + thread_safe (0.3.6) + tilt (2.0.8) + turbolinks (5.1.0) + turbolinks-source (~> 5.1) + turbolinks-source (5.1.0) + tzinfo (1.2.5) + thread_safe (~> 0.1) + uglifier (4.1.8) + execjs (>= 0.3.0, < 3) + web-console (3.5.1) + actionview (>= 5.0) + activemodel (>= 5.0) + bindex (>= 0.4.0) + railties (>= 5.0) + websocket-driver (0.6.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.3) + xpath (3.0.0) + nokogiri (~> 1.8) + +PLATFORMS + ruby + +DEPENDENCIES + better_errors + binding_of_caller + byebug + capybara (~> 2.13) + jbuilder (~> 2.5) + jquery-rails + jquery-turbolinks + listen (>= 3.0.5, < 3.2) + minitest-rails + minitest-reporters + pg (>= 0.18, < 2.0) + pry-rails + puma (~> 3.7) + rails (~> 5.1.5) + sass-rails (~> 5.0) + selenium-webdriver + spring + spring-watcher-listen (~> 2.0.0) + turbolinks (~> 5) + tzinfo-data + uglifier (>= 1.3.0) + web-console (>= 3.3.0) + +BUNDLED WITH + 1.16.1 diff --git a/RideShare/README.md b/RideShare/README.md new file mode 100644 index 000000000..7db80e4ca --- /dev/null +++ b/RideShare/README.md @@ -0,0 +1,24 @@ +# README + +This README would normally document whatever steps are necessary to get the +application up and running. + +Things you may want to cover: + +* Ruby version + +* System dependencies + +* Configuration + +* Database creation + +* Database initialization + +* How to run the test suite + +* Services (job queues, cache servers, search engines, etc.) + +* Deployment instructions + +* ... diff --git a/RideShare/Rakefile b/RideShare/Rakefile new file mode 100644 index 000000000..e85f91391 --- /dev/null +++ b/RideShare/Rakefile @@ -0,0 +1,6 @@ +# Add your own tasks in files placed in lib/tasks ending in .rake, +# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. + +require_relative 'config/application' + +Rails.application.load_tasks diff --git a/RideShare/app/assets/config/manifest.js b/RideShare/app/assets/config/manifest.js new file mode 100644 index 000000000..b16e53d6d --- /dev/null +++ b/RideShare/app/assets/config/manifest.js @@ -0,0 +1,3 @@ +//= link_tree ../images +//= link_directory ../javascripts .js +//= link_directory ../stylesheets .css diff --git a/RideShare/app/assets/images/.keep b/RideShare/app/assets/images/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/app/assets/javascripts/application.js b/RideShare/app/assets/javascripts/application.js new file mode 100644 index 000000000..46b20359f --- /dev/null +++ b/RideShare/app/assets/javascripts/application.js @@ -0,0 +1,15 @@ +// This is a manifest file that'll be compiled into application.js, which will include all the files +// listed below. +// +// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's +// vendor/assets/javascripts directory can be referenced here using a relative path. +// +// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the +// compiled file. JavaScript code in this file should be added after the last require_* statement. +// +// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details +// about supported directives. +// +//= require rails-ujs +//= require turbolinks +//= require_tree . diff --git a/RideShare/app/assets/javascripts/cable.js b/RideShare/app/assets/javascripts/cable.js new file mode 100644 index 000000000..739aa5f02 --- /dev/null +++ b/RideShare/app/assets/javascripts/cable.js @@ -0,0 +1,13 @@ +// Action Cable provides the framework to deal with WebSockets in Rails. +// You can generate new channels where WebSocket features live using the `rails generate channel` command. +// +//= require action_cable +//= require_self +//= require_tree ./channels + +(function() { + this.App || (this.App = {}); + + App.cable = ActionCable.createConsumer(); + +}).call(this); diff --git a/RideShare/app/assets/javascripts/channels/.keep b/RideShare/app/assets/javascripts/channels/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/app/assets/stylesheets/application.css b/RideShare/app/assets/stylesheets/application.css new file mode 100644 index 000000000..d05ea0f51 --- /dev/null +++ b/RideShare/app/assets/stylesheets/application.css @@ -0,0 +1,15 @@ +/* + * This is a manifest file that'll be compiled into application.css, which will include all the files + * listed below. + * + * Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's + * vendor/assets/stylesheets directory can be referenced here using a relative path. + * + * You're free to add application-wide styles to this file and they'll appear at the bottom of the + * compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS + * files in this directory. Styles in this file should be added after the last require_* statement. + * It is generally better to create a new file per style scope. + * + *= require_tree . + *= require_self + */ diff --git a/RideShare/app/channels/application_cable/channel.rb b/RideShare/app/channels/application_cable/channel.rb new file mode 100644 index 000000000..d67269728 --- /dev/null +++ b/RideShare/app/channels/application_cable/channel.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Channel < ActionCable::Channel::Base + end +end diff --git a/RideShare/app/channels/application_cable/connection.rb b/RideShare/app/channels/application_cable/connection.rb new file mode 100644 index 000000000..0ff5442f4 --- /dev/null +++ b/RideShare/app/channels/application_cable/connection.rb @@ -0,0 +1,4 @@ +module ApplicationCable + class Connection < ActionCable::Connection::Base + end +end diff --git a/RideShare/app/controllers/application_controller.rb b/RideShare/app/controllers/application_controller.rb new file mode 100644 index 000000000..1c07694e9 --- /dev/null +++ b/RideShare/app/controllers/application_controller.rb @@ -0,0 +1,3 @@ +class ApplicationController < ActionController::Base + protect_from_forgery with: :exception +end diff --git a/RideShare/app/controllers/concerns/.keep b/RideShare/app/controllers/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/app/helpers/application_helper.rb b/RideShare/app/helpers/application_helper.rb new file mode 100644 index 000000000..de6be7945 --- /dev/null +++ b/RideShare/app/helpers/application_helper.rb @@ -0,0 +1,2 @@ +module ApplicationHelper +end diff --git a/RideShare/app/jobs/application_job.rb b/RideShare/app/jobs/application_job.rb new file mode 100644 index 000000000..a009ace51 --- /dev/null +++ b/RideShare/app/jobs/application_job.rb @@ -0,0 +1,2 @@ +class ApplicationJob < ActiveJob::Base +end diff --git a/RideShare/app/mailers/application_mailer.rb b/RideShare/app/mailers/application_mailer.rb new file mode 100644 index 000000000..286b2239d --- /dev/null +++ b/RideShare/app/mailers/application_mailer.rb @@ -0,0 +1,4 @@ +class ApplicationMailer < ActionMailer::Base + default from: 'from@example.com' + layout 'mailer' +end diff --git a/RideShare/app/models/application_record.rb b/RideShare/app/models/application_record.rb new file mode 100644 index 000000000..10a4cba84 --- /dev/null +++ b/RideShare/app/models/application_record.rb @@ -0,0 +1,3 @@ +class ApplicationRecord < ActiveRecord::Base + self.abstract_class = true +end diff --git a/RideShare/app/models/concerns/.keep b/RideShare/app/models/concerns/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/app/views/layouts/application.html.erb b/RideShare/app/views/layouts/application.html.erb new file mode 100644 index 000000000..d202d95d1 --- /dev/null +++ b/RideShare/app/views/layouts/application.html.erb @@ -0,0 +1,14 @@ + + + + RideShare + <%= csrf_meta_tags %> + + <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> + <%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %> + + + + <%= yield %> + + diff --git a/RideShare/app/views/layouts/mailer.html.erb b/RideShare/app/views/layouts/mailer.html.erb new file mode 100644 index 000000000..cbd34d2e9 --- /dev/null +++ b/RideShare/app/views/layouts/mailer.html.erb @@ -0,0 +1,13 @@ + + + + + + + + + <%= yield %> + + diff --git a/RideShare/app/views/layouts/mailer.text.erb b/RideShare/app/views/layouts/mailer.text.erb new file mode 100644 index 000000000..37f0bddbd --- /dev/null +++ b/RideShare/app/views/layouts/mailer.text.erb @@ -0,0 +1 @@ +<%= yield %> diff --git a/RideShare/bin/bundle b/RideShare/bin/bundle new file mode 100755 index 000000000..66e9889e8 --- /dev/null +++ b/RideShare/bin/bundle @@ -0,0 +1,3 @@ +#!/usr/bin/env ruby +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__) +load Gem.bin_path('bundler', 'bundle') diff --git a/RideShare/bin/rails b/RideShare/bin/rails new file mode 100755 index 000000000..5badb2fde --- /dev/null +++ b/RideShare/bin/rails @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +APP_PATH = File.expand_path('../config/application', __dir__) +require_relative '../config/boot' +require 'rails/commands' diff --git a/RideShare/bin/rake b/RideShare/bin/rake new file mode 100755 index 000000000..d87d5f578 --- /dev/null +++ b/RideShare/bin/rake @@ -0,0 +1,9 @@ +#!/usr/bin/env ruby +begin + load File.expand_path('../spring', __FILE__) +rescue LoadError => e + raise unless e.message.include?('spring') +end +require_relative '../config/boot' +require 'rake' +Rake.application.run diff --git a/RideShare/bin/setup b/RideShare/bin/setup new file mode 100755 index 000000000..78c4e861d --- /dev/null +++ b/RideShare/bin/setup @@ -0,0 +1,38 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a starting point to setup your application. + # Add necessary setup steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + # Install JavaScript dependencies if using Yarn + # system('bin/yarn') + + + # puts "\n== Copying sample files ==" + # unless File.exist?('config/database.yml') + # cp 'config/database.yml.sample', 'config/database.yml' + # end + + puts "\n== Preparing database ==" + system! 'bin/rails db:setup' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/RideShare/bin/spring b/RideShare/bin/spring new file mode 100755 index 000000000..fb2ec2ebb --- /dev/null +++ b/RideShare/bin/spring @@ -0,0 +1,17 @@ +#!/usr/bin/env ruby + +# This file loads spring without using Bundler, in order to be fast. +# It gets overwritten when you run the `spring binstub` command. + +unless defined?(Spring) + require 'rubygems' + require 'bundler' + + lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read) + spring = lockfile.specs.detect { |spec| spec.name == "spring" } + if spring + Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path + gem 'spring', spring.version + require 'spring/binstub' + end +end diff --git a/RideShare/bin/update b/RideShare/bin/update new file mode 100755 index 000000000..a8e4462f2 --- /dev/null +++ b/RideShare/bin/update @@ -0,0 +1,29 @@ +#!/usr/bin/env ruby +require 'pathname' +require 'fileutils' +include FileUtils + +# path to your application root. +APP_ROOT = Pathname.new File.expand_path('../../', __FILE__) + +def system!(*args) + system(*args) || abort("\n== Command #{args} failed ==") +end + +chdir APP_ROOT do + # This script is a way to update your development environment automatically. + # Add necessary update steps to this file. + + puts '== Installing dependencies ==' + system! 'gem install bundler --conservative' + system('bundle check') || system!('bundle install') + + puts "\n== Updating database ==" + system! 'bin/rails db:migrate' + + puts "\n== Removing old logs and tempfiles ==" + system! 'bin/rails log:clear tmp:clear' + + puts "\n== Restarting application server ==" + system! 'bin/rails restart' +end diff --git a/RideShare/bin/yarn b/RideShare/bin/yarn new file mode 100755 index 000000000..c2bacef83 --- /dev/null +++ b/RideShare/bin/yarn @@ -0,0 +1,11 @@ +#!/usr/bin/env ruby +VENDOR_PATH = File.expand_path('..', __dir__) +Dir.chdir(VENDOR_PATH) do + begin + exec "yarnpkg #{ARGV.join(" ")}" + rescue Errno::ENOENT + $stderr.puts "Yarn executable was not detected in the system." + $stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install" + exit 1 + end +end diff --git a/RideShare/config.ru b/RideShare/config.ru new file mode 100644 index 000000000..f7ba0b527 --- /dev/null +++ b/RideShare/config.ru @@ -0,0 +1,5 @@ +# This file is used by Rack-based servers to start the application. + +require_relative 'config/environment' + +run Rails.application diff --git a/RideShare/config/application.rb b/RideShare/config/application.rb new file mode 100644 index 000000000..f4e117aaf --- /dev/null +++ b/RideShare/config/application.rb @@ -0,0 +1,25 @@ +require_relative 'boot' + +require 'rails/all' + +# Require the gems listed in Gemfile, including any gems +# you've limited to :test, :development, or :production. +Bundler.require(*Rails.groups) + +module RideShare + class Application < Rails::Application + config.generators do |g| + # Force new test files to be generated in the minitest-spec style + g.test_framework :minitest, spec: true + + # Always use .js files, never .coffee + g.javascript_engine :js + end + # Initialize configuration defaults for originally generated Rails version. + config.load_defaults 5.1 + + # Settings in config/environments/* take precedence over those specified here. + # Application configuration should go into files in config/initializers + # -- all .rb files in that directory are automatically loaded. + end +end diff --git a/RideShare/config/boot.rb b/RideShare/config/boot.rb new file mode 100644 index 000000000..30f5120df --- /dev/null +++ b/RideShare/config/boot.rb @@ -0,0 +1,3 @@ +ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__) + +require 'bundler/setup' # Set up gems listed in the Gemfile. diff --git a/RideShare/config/cable.yml b/RideShare/config/cable.yml new file mode 100644 index 000000000..d86525669 --- /dev/null +++ b/RideShare/config/cable.yml @@ -0,0 +1,10 @@ +development: + adapter: async + +test: + adapter: async + +production: + adapter: redis + url: redis://localhost:6379/1 + channel_prefix: RideShare_production diff --git a/RideShare/config/database.yml b/RideShare/config/database.yml new file mode 100644 index 000000000..e1e7ad8a5 --- /dev/null +++ b/RideShare/config/database.yml @@ -0,0 +1,85 @@ +# PostgreSQL. Versions 9.1 and up are supported. +# +# Install the pg driver: +# gem install pg +# On OS X with Homebrew: +# gem install pg -- --with-pg-config=/usr/local/bin/pg_config +# On OS X with MacPorts: +# gem install pg -- --with-pg-config=/opt/local/lib/postgresql84/bin/pg_config +# On Windows: +# gem install pg +# Choose the win32 build. +# Install PostgreSQL and put its /bin directory on your path. +# +# Configure Using Gemfile +# gem 'pg' +# +default: &default + adapter: postgresql + encoding: unicode + # For details on connection pooling, see Rails configuration guide + # http://guides.rubyonrails.org/configuring.html#database-pooling + pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %> + +development: + <<: *default + database: RideShare_development + + # The specified database role being used to connect to postgres. + # To create additional roles in postgres see `$ createuser --help`. + # When left blank, postgres will use the default role. This is + # the same name as the operating system user that initialized the database. + #username: RideShare + + # The password associated with the postgres role (username). + #password: + + # Connect on a TCP socket. Omitted by default since the client uses a + # domain socket that doesn't need configuration. Windows does not have + # domain sockets, so uncomment these lines. + #host: localhost + + # The TCP port the server listens on. Defaults to 5432. + # If your server runs on a different port number, change accordingly. + #port: 5432 + + # Schema search path. The server defaults to $user,public + #schema_search_path: myapp,sharedapp,public + + # Minimum log levels, in increasing order: + # debug5, debug4, debug3, debug2, debug1, + # log, notice, warning, error, fatal, and panic + # Defaults to warning. + #min_messages: notice + +# 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: RideShare_test + +# 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="postgres://myuser:mypass@localhost/somedatabase" +# +# You can use this database configuration with: +# +# production: +# url: <%= ENV['DATABASE_URL'] %> +# +production: + <<: *default + database: RideShare_production + username: RideShare + password: <%= ENV['RIDESHARE_DATABASE_PASSWORD'] %> diff --git a/RideShare/config/environment.rb b/RideShare/config/environment.rb new file mode 100644 index 000000000..426333bb4 --- /dev/null +++ b/RideShare/config/environment.rb @@ -0,0 +1,5 @@ +# Load the Rails application. +require_relative 'application' + +# Initialize the Rails application. +Rails.application.initialize! diff --git a/RideShare/config/environments/development.rb b/RideShare/config/environments/development.rb new file mode 100644 index 000000000..5187e2218 --- /dev/null +++ b/RideShare/config/environments/development.rb @@ -0,0 +1,54 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # In the development environment your application's code is reloaded on + # every request. This slows down response time but is perfect for development + # since you don't have to restart the web server when you make code changes. + config.cache_classes = false + + # Do not eager load code on boot. + config.eager_load = false + + # Show full error reports. + config.consider_all_requests_local = true + + # Enable/disable caching. By default caching is disabled. + if Rails.root.join('tmp/caching-dev.txt').exist? + config.action_controller.perform_caching = true + + config.cache_store = :memory_store + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}" + } + else + config.action_controller.perform_caching = false + + config.cache_store = :null_store + end + + # Don't care if the mailer can't send. + config.action_mailer.raise_delivery_errors = false + + config.action_mailer.perform_caching = false + + # Print deprecation notices to the Rails logger. + config.active_support.deprecation = :log + + # Raise an error on page load if there are pending migrations. + config.active_record.migration_error = :page_load + + # Debug mode disables concatenation and preprocessing of assets. + # This option may cause significant delays in view rendering with a large + # number of complex assets. + config.assets.debug = true + + # Suppress logger output for asset requests. + config.assets.quiet = true + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true + + # Use an evented file watcher to asynchronously detect changes in source code, + # routes, locales, etc. This feature depends on the listen gem. + config.file_watcher = ActiveSupport::EventedFileUpdateChecker +end diff --git a/RideShare/config/environments/production.rb b/RideShare/config/environments/production.rb new file mode 100644 index 000000000..79696ff0c --- /dev/null +++ b/RideShare/config/environments/production.rb @@ -0,0 +1,91 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # Code is not reloaded between requests. + config.cache_classes = true + + # Eager load code on boot. This eager loads most of Rails and + # your application in memory, allowing both threaded web servers + # and those relying on copy on write to perform better. + # Rake tasks automatically ignore this option for performance. + config.eager_load = true + + # Full error reports are disabled and caching is turned on. + config.consider_all_requests_local = false + config.action_controller.perform_caching = true + + # Attempt to read encrypted secrets from `config/secrets.yml.enc`. + # Requires an encryption key in `ENV["RAILS_MASTER_KEY"]` or + # `config/secrets.yml.key`. + config.read_encrypted_secrets = true + + # Disable serving static files from the `/public` folder by default since + # Apache or NGINX already handles this. + config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present? + + # Compress JavaScripts and CSS. + config.assets.js_compressor = :uglifier + # config.assets.css_compressor = :sass + + # Do not fallback to assets pipeline if a precompiled asset is missed. + config.assets.compile = false + + # `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb + + # Enable serving of images, stylesheets, and JavaScripts from an asset server. + # config.action_controller.asset_host = 'http://assets.example.com' + + # Specifies the header that your server uses for sending files. + # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache + # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX + + # Mount Action Cable outside main process or domain + # config.action_cable.mount_path = nil + # config.action_cable.url = 'wss://example.com/cable' + # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ] + + # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies. + # config.force_ssl = true + + # Use the lowest log level to ensure availability of diagnostic information + # when problems arise. + config.log_level = :debug + + # Prepend all log lines with the following tags. + config.log_tags = [ :request_id ] + + # Use a different cache store in production. + # config.cache_store = :mem_cache_store + + # Use a real queuing backend for Active Job (and separate queues per environment) + # config.active_job.queue_adapter = :resque + # config.active_job.queue_name_prefix = "RideShare_#{Rails.env}" + config.action_mailer.perform_caching = false + + # Ignore bad email addresses and do not raise email delivery errors. + # Set this to true and configure the email server for immediate delivery to raise delivery errors. + # config.action_mailer.raise_delivery_errors = false + + # Enable locale fallbacks for I18n (makes lookups for any locale fall back to + # the I18n.default_locale when a translation cannot be found). + config.i18n.fallbacks = true + + # Send deprecation notices to registered listeners. + config.active_support.deprecation = :notify + + # Use default logging formatter so that PID and timestamp are not suppressed. + config.log_formatter = ::Logger::Formatter.new + + # Use a different logger for distributed setups. + # require 'syslog/logger' + # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name') + + if ENV["RAILS_LOG_TO_STDOUT"].present? + logger = ActiveSupport::Logger.new(STDOUT) + logger.formatter = config.log_formatter + config.logger = ActiveSupport::TaggedLogging.new(logger) + end + + # Do not dump schema after migrations. + config.active_record.dump_schema_after_migration = false +end diff --git a/RideShare/config/environments/test.rb b/RideShare/config/environments/test.rb new file mode 100644 index 000000000..8e5cbde53 --- /dev/null +++ b/RideShare/config/environments/test.rb @@ -0,0 +1,42 @@ +Rails.application.configure do + # Settings specified here will take precedence over those in config/application.rb. + + # The test environment is used exclusively to run your application's + # test suite. You never need to work with it otherwise. Remember that + # your test database is "scratch space" for the test suite and is wiped + # and recreated between test runs. Don't rely on the data there! + config.cache_classes = true + + # Do not eager load code on boot. This avoids loading your whole application + # just for the purpose of running a single test. If you are using a tool that + # preloads Rails for running tests, you may have to set it to true. + config.eager_load = false + + # Configure public file server for tests with Cache-Control for performance. + config.public_file_server.enabled = true + config.public_file_server.headers = { + 'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}" + } + + # Show full error reports and disable caching. + config.consider_all_requests_local = true + config.action_controller.perform_caching = false + + # Raise exceptions instead of rendering exception templates. + config.action_dispatch.show_exceptions = false + + # Disable request forgery protection in test environment. + config.action_controller.allow_forgery_protection = false + config.action_mailer.perform_caching = false + + # Tell Action Mailer not to deliver emails to the real world. + # The :test delivery method accumulates sent emails in the + # ActionMailer::Base.deliveries array. + config.action_mailer.delivery_method = :test + + # Print deprecation notices to the stderr. + config.active_support.deprecation = :stderr + + # Raises error for missing translations + # config.action_view.raise_on_missing_translations = true +end diff --git a/RideShare/config/initializers/application_controller_renderer.rb b/RideShare/config/initializers/application_controller_renderer.rb new file mode 100644 index 000000000..89d2efab2 --- /dev/null +++ b/RideShare/config/initializers/application_controller_renderer.rb @@ -0,0 +1,8 @@ +# Be sure to restart your server when you modify this file. + +# ActiveSupport::Reloader.to_prepare do +# ApplicationController.renderer.defaults.merge!( +# http_host: 'example.org', +# https: false +# ) +# end diff --git a/RideShare/config/initializers/assets.rb b/RideShare/config/initializers/assets.rb new file mode 100644 index 000000000..4b828e80c --- /dev/null +++ b/RideShare/config/initializers/assets.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# Version of your assets, change this if you want to expire all your assets. +Rails.application.config.assets.version = '1.0' + +# Add additional assets to the asset load path. +# Rails.application.config.assets.paths << Emoji.images_path +# Add Yarn node_modules folder to the asset load path. +Rails.application.config.assets.paths << Rails.root.join('node_modules') + +# Precompile additional assets. +# application.js, application.css, and all non-JS/CSS in the app/assets +# folder are already added. +# Rails.application.config.assets.precompile += %w( admin.js admin.css ) diff --git a/RideShare/config/initializers/backtrace_silencers.rb b/RideShare/config/initializers/backtrace_silencers.rb new file mode 100644 index 000000000..59385cdf3 --- /dev/null +++ b/RideShare/config/initializers/backtrace_silencers.rb @@ -0,0 +1,7 @@ +# Be sure to restart your server when you modify this file. + +# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces. +# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ } + +# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code. +# Rails.backtrace_cleaner.remove_silencers! diff --git a/RideShare/config/initializers/cookies_serializer.rb b/RideShare/config/initializers/cookies_serializer.rb new file mode 100644 index 000000000..5a6a32d37 --- /dev/null +++ b/RideShare/config/initializers/cookies_serializer.rb @@ -0,0 +1,5 @@ +# Be sure to restart your server when you modify this file. + +# Specify a serializer for the signed and encrypted cookie jars. +# Valid options are :json, :marshal, and :hybrid. +Rails.application.config.action_dispatch.cookies_serializer = :json diff --git a/RideShare/config/initializers/filter_parameter_logging.rb b/RideShare/config/initializers/filter_parameter_logging.rb new file mode 100644 index 000000000..4a994e1e7 --- /dev/null +++ b/RideShare/config/initializers/filter_parameter_logging.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Configure sensitive parameters which will be filtered from the log file. +Rails.application.config.filter_parameters += [:password] diff --git a/RideShare/config/initializers/inflections.rb b/RideShare/config/initializers/inflections.rb new file mode 100644 index 000000000..ac033bf9d --- /dev/null +++ b/RideShare/config/initializers/inflections.rb @@ -0,0 +1,16 @@ +# Be sure to restart your server when you modify this file. + +# Add new inflection rules using the following format. Inflections +# are locale specific, and you may define rules for as many different +# locales as you wish. All of these examples are active by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.plural /^(ox)$/i, '\1en' +# inflect.singular /^(ox)en/i, '\1' +# inflect.irregular 'person', 'people' +# inflect.uncountable %w( fish sheep ) +# end + +# These inflection rules are supported but not enabled by default: +# ActiveSupport::Inflector.inflections(:en) do |inflect| +# inflect.acronym 'RESTful' +# end diff --git a/RideShare/config/initializers/mime_types.rb b/RideShare/config/initializers/mime_types.rb new file mode 100644 index 000000000..dc1899682 --- /dev/null +++ b/RideShare/config/initializers/mime_types.rb @@ -0,0 +1,4 @@ +# Be sure to restart your server when you modify this file. + +# Add new mime types for use in respond_to blocks: +# Mime::Type.register "text/richtext", :rtf diff --git a/RideShare/config/initializers/wrap_parameters.rb b/RideShare/config/initializers/wrap_parameters.rb new file mode 100644 index 000000000..bbfc3961b --- /dev/null +++ b/RideShare/config/initializers/wrap_parameters.rb @@ -0,0 +1,14 @@ +# Be sure to restart your server when you modify this file. + +# This file contains settings for ActionController::ParamsWrapper which +# is enabled by default. + +# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array. +ActiveSupport.on_load(:action_controller) do + wrap_parameters format: [:json] +end + +# To enable root element in JSON for ActiveRecord objects. +# ActiveSupport.on_load(:active_record) do +# self.include_root_in_json = true +# end diff --git a/RideShare/config/locales/en.yml b/RideShare/config/locales/en.yml new file mode 100644 index 000000000..decc5a857 --- /dev/null +++ b/RideShare/config/locales/en.yml @@ -0,0 +1,33 @@ +# Files in the config/locales directory are used for internationalization +# and are automatically loaded by Rails. If you want to use locales other +# than English, add the necessary files in this directory. +# +# To use the locales, use `I18n.t`: +# +# I18n.t 'hello' +# +# In views, this is aliased to just `t`: +# +# <%= t('hello') %> +# +# To use a different locale, set it with `I18n.locale`: +# +# I18n.locale = :es +# +# This would use the information in config/locales/es.yml. +# +# The following keys must be escaped otherwise they will not be retrieved by +# the default I18n backend: +# +# true, false, on, off, yes, no +# +# Instead, surround them with single quotes. +# +# en: +# 'true': 'foo' +# +# To learn more, please read the Rails Internationalization guide +# available at http://guides.rubyonrails.org/i18n.html. + +en: + hello: "Hello world" diff --git a/RideShare/config/puma.rb b/RideShare/config/puma.rb new file mode 100644 index 000000000..1e19380dc --- /dev/null +++ b/RideShare/config/puma.rb @@ -0,0 +1,56 @@ +# Puma can serve each request in a thread from an internal thread pool. +# The `threads` method setting takes two numbers: a minimum and maximum. +# Any libraries that use thread pools should be configured to match +# the maximum value specified for Puma. Default is set to 5 threads for minimum +# and maximum; this matches the default thread size of Active Record. +# +threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 } +threads threads_count, threads_count + +# Specifies the `port` that Puma will listen on to receive requests; default is 3000. +# +port ENV.fetch("PORT") { 3000 } + +# Specifies the `environment` that Puma will run in. +# +environment ENV.fetch("RAILS_ENV") { "development" } + +# Specifies the number of `workers` to boot in clustered mode. +# Workers are forked webserver processes. If using threads and workers together +# the concurrency of the application would be max `threads` * `workers`. +# Workers do not work on JRuby or Windows (both of which do not support +# processes). +# +# workers ENV.fetch("WEB_CONCURRENCY") { 2 } + +# Use the `preload_app!` method when specifying a `workers` number. +# This directive tells Puma to first boot the application and load code +# before forking the application. This takes advantage of Copy On Write +# process behavior so workers use less memory. If you use this option +# you need to make sure to reconnect any threads in the `on_worker_boot` +# block. +# +# preload_app! + +# If you are preloading your application and using Active Record, it's +# recommended that you close any connections to the database before workers +# are forked to prevent connection leakage. +# +# before_fork do +# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord) +# end + +# The code in the `on_worker_boot` will be called if you are using +# clustered mode by specifying a number of `workers`. After each worker +# process is booted, this block will be run. If you are using the `preload_app!` +# option, you will want to use this block to reconnect to any threads +# or connections that may have been created at application boot, as Ruby +# cannot share connections between processes. +# +# on_worker_boot do +# ActiveRecord::Base.establish_connection if defined?(ActiveRecord) +# end +# + +# Allow puma to be restarted by `rails restart` command. +plugin :tmp_restart diff --git a/RideShare/config/routes.rb b/RideShare/config/routes.rb new file mode 100644 index 000000000..787824f88 --- /dev/null +++ b/RideShare/config/routes.rb @@ -0,0 +1,3 @@ +Rails.application.routes.draw do + # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html +end diff --git a/RideShare/config/secrets.yml b/RideShare/config/secrets.yml new file mode 100644 index 000000000..62361a6bb --- /dev/null +++ b/RideShare/config/secrets.yml @@ -0,0 +1,32 @@ +# Be sure to restart your server when you modify this file. + +# Your secret key is used for verifying the integrity of signed cookies. +# If you change this key, all old signed cookies will become invalid! + +# Make sure the secret is at least 30 characters and all random, +# no regular words or you'll be exposed to dictionary attacks. +# You can use `rails secret` to generate a secure secret key. + +# Make sure the secrets in this file are kept private +# if you're sharing your code publicly. + +# Shared secrets are available across all environments. + +# shared: +# api_key: a1B2c3D4e5F6 + +# Environmental secrets are only available for that specific environment. + +development: + secret_key_base: 495a4b129ed7dc18f4dc8cb2adca0babc8441150fbe841f8ee2a08a0f09c712e6f6b1c2a6fdabe00f12985702f71067da06541bc1ecaeaccd30779f6373fec44 + +test: + secret_key_base: b99c7e206e7effa8213db800edb25d6684f60fd895051c446638e40c0f259f940bf91a2864d14fe5916192b1ed53ae015f38e6b79c0eefb8d0eaf21461f51ec3 + +# Do not keep production secrets in the unencrypted secrets file. +# Instead, either read values from the environment. +# Or, use `bin/rails secrets:setup` to configure encrypted secrets +# and move the `production:` environment over there. + +production: + secret_key_base: <%= ENV["SECRET_KEY_BASE"] %> diff --git a/RideShare/config/spring.rb b/RideShare/config/spring.rb new file mode 100644 index 000000000..c9119b40c --- /dev/null +++ b/RideShare/config/spring.rb @@ -0,0 +1,6 @@ +%w( + .ruby-version + .rbenv-vars + tmp/restart.txt + tmp/caching-dev.txt +).each { |path| Spring.watch(path) } diff --git a/RideShare/db/seeds.rb b/RideShare/db/seeds.rb new file mode 100644 index 000000000..1beea2acc --- /dev/null +++ b/RideShare/db/seeds.rb @@ -0,0 +1,7 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) diff --git a/RideShare/lib/assets/.keep b/RideShare/lib/assets/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/lib/tasks/.keep b/RideShare/lib/tasks/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/log/.keep b/RideShare/log/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/package.json b/RideShare/package.json new file mode 100644 index 000000000..6354c69a7 --- /dev/null +++ b/RideShare/package.json @@ -0,0 +1,5 @@ +{ + "name": "RideShare", + "private": true, + "dependencies": {} +} diff --git a/RideShare/public/404.html b/RideShare/public/404.html new file mode 100644 index 000000000..2be3af26f --- /dev/null +++ b/RideShare/public/404.html @@ -0,0 +1,67 @@ + + + + The page you were looking for doesn't exist (404) + + + + + + +
+
+

The page you were looking for doesn't exist.

+

You may have mistyped the address or the page may have moved.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/RideShare/public/422.html b/RideShare/public/422.html new file mode 100644 index 000000000..c08eac0d1 --- /dev/null +++ b/RideShare/public/422.html @@ -0,0 +1,67 @@ + + + + The change you wanted was rejected (422) + + + + + + +
+
+

The change you wanted was rejected.

+

Maybe you tried to change something you didn't have access to.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/RideShare/public/500.html b/RideShare/public/500.html new file mode 100644 index 000000000..78a030af2 --- /dev/null +++ b/RideShare/public/500.html @@ -0,0 +1,66 @@ + + + + We're sorry, but something went wrong (500) + + + + + + +
+
+

We're sorry, but something went wrong.

+
+

If you are the application owner check the logs for more information.

+
+ + diff --git a/RideShare/public/apple-touch-icon-precomposed.png b/RideShare/public/apple-touch-icon-precomposed.png new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/public/apple-touch-icon.png b/RideShare/public/apple-touch-icon.png new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/public/favicon.ico b/RideShare/public/favicon.ico new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/public/robots.txt b/RideShare/public/robots.txt new file mode 100644 index 000000000..37b576a4a --- /dev/null +++ b/RideShare/public/robots.txt @@ -0,0 +1 @@ +# See http://www.robotstxt.org/robotstxt.html for documentation on how to use the robots.txt file diff --git a/RideShare/test/application_system_test_case.rb b/RideShare/test/application_system_test_case.rb new file mode 100644 index 000000000..d19212abd --- /dev/null +++ b/RideShare/test/application_system_test_case.rb @@ -0,0 +1,5 @@ +require "test_helper" + +class ApplicationSystemTestCase < ActionDispatch::SystemTestCase + driven_by :selenium, using: :chrome, screen_size: [1400, 1400] +end diff --git a/RideShare/test/controllers/.keep b/RideShare/test/controllers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/fixtures/.keep b/RideShare/test/fixtures/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/fixtures/files/.keep b/RideShare/test/fixtures/files/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/helpers/.keep b/RideShare/test/helpers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/integration/.keep b/RideShare/test/integration/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/mailers/.keep b/RideShare/test/mailers/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/models/.keep b/RideShare/test/models/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/system/.keep b/RideShare/test/system/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/test/test_helper.rb b/RideShare/test/test_helper.rb new file mode 100644 index 000000000..10594a324 --- /dev/null +++ b/RideShare/test/test_helper.rb @@ -0,0 +1,26 @@ +ENV["RAILS_ENV"] = "test" +require File.expand_path("../../config/environment", __FILE__) +require "rails/test_help" +require "minitest/rails" +require "minitest/reporters" # for Colorized output + +# For colorful output! +Minitest::Reporters.use!( + Minitest::Reporters::SpecReporter.new, + ENV, + Minitest.backtrace_filter +) + + +# To add Capybara feature tests add `gem "minitest-rails-capybara"` +# to the test group in the Gemfile and uncomment the following: +# require "minitest/rails/capybara" + +# Uncomment for awesome colorful output +# require "minitest/pride" + +class ActiveSupport::TestCase + # Setup all fixtures in test/fixtures/*.yml for all tests in alphabetical order. + fixtures :all + # Add more helper methods to be used by all tests here... +end diff --git a/RideShare/tmp/.keep b/RideShare/tmp/.keep new file mode 100644 index 000000000..e69de29bb diff --git a/RideShare/vendor/.keep b/RideShare/vendor/.keep new file mode 100644 index 000000000..e69de29bb From d8a42d8b069da8c74431c5ecb0c1ceb93c165a4f Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Tue, 3 Apr 2018 12:16:04 -0700 Subject: [PATCH 02/42] Generated and updated the trip controller and routes. Generated the trip model and database. --- RideShare/app/assets/javascripts/trips.js | 2 + RideShare/app/assets/stylesheets/trips.scss | 3 + RideShare/app/controllers/trips_controller.rb | 68 +++++++++++++++++++ RideShare/app/helpers/trips_helper.rb | 2 + RideShare/app/models/trip.rb | 2 + RideShare/config/routes.rb | 3 + .../db/migrate/20180403190625_create_trips.rb | 11 +++ RideShare/db/schema.rb | 26 +++++++ .../test/controllers/trips_controller_test.rb | 7 ++ RideShare/test/fixtures/trips.yml | 11 +++ RideShare/test/models/trip_test.rb | 9 +++ 11 files changed, 144 insertions(+) create mode 100644 RideShare/app/assets/javascripts/trips.js create mode 100644 RideShare/app/assets/stylesheets/trips.scss create mode 100644 RideShare/app/controllers/trips_controller.rb create mode 100644 RideShare/app/helpers/trips_helper.rb create mode 100644 RideShare/app/models/trip.rb create mode 100644 RideShare/db/migrate/20180403190625_create_trips.rb create mode 100644 RideShare/db/schema.rb create mode 100644 RideShare/test/controllers/trips_controller_test.rb create mode 100644 RideShare/test/fixtures/trips.yml create mode 100644 RideShare/test/models/trip_test.rb diff --git a/RideShare/app/assets/javascripts/trips.js b/RideShare/app/assets/javascripts/trips.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/RideShare/app/assets/javascripts/trips.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/RideShare/app/assets/stylesheets/trips.scss b/RideShare/app/assets/stylesheets/trips.scss new file mode 100644 index 000000000..473cbc303 --- /dev/null +++ b/RideShare/app/assets/stylesheets/trips.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the trips controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/RideShare/app/controllers/trips_controller.rb b/RideShare/app/controllers/trips_controller.rb new file mode 100644 index 000000000..ec5a77f94 --- /dev/null +++ b/RideShare/app/controllers/trips_controller.rb @@ -0,0 +1,68 @@ +class TripsController < ApplicationController + + def index + + @trips = Trip.all + + end + + def new + @trip = Trip.new + end + + def create + trip = Trip.new(trip_params) + + if trip.save + redirect_to trips_path + end + end + + def show + trip_id = params[:id] + + @trip = Trip.find(trip_id) + end + + def edit + @trip = Trip.find(params[:id]) + end + + def update + trip = Trip.find(params[:id]) + + trip.assign_attributes(trip_params) + + if trip.save + redirect_to trip_path(trip) + end + end + + def destroy + Trip.destroy(params[:id]) + + redirect_to trips_path + end + + # def complete + # trip = Task.find(params[:id]) + # trip.completion_date = DateTime.now.strftime("%a, %B %d, %Y") + # + # if trip.status == "complete" + # trip.assign_attributes(status: "not complete", completion_date: nil) + # else + # trip.assign_attributes(status: "complete") + # end + # + # if trip.save + # redirect_to trips_path + # end + # end + + private + + def trip_params + return params.require(:trip).permit(:date, :rating, :cost) + end + +end diff --git a/RideShare/app/helpers/trips_helper.rb b/RideShare/app/helpers/trips_helper.rb new file mode 100644 index 000000000..04f333d46 --- /dev/null +++ b/RideShare/app/helpers/trips_helper.rb @@ -0,0 +1,2 @@ +module TripsHelper +end diff --git a/RideShare/app/models/trip.rb b/RideShare/app/models/trip.rb new file mode 100644 index 000000000..a8c077a10 --- /dev/null +++ b/RideShare/app/models/trip.rb @@ -0,0 +1,2 @@ +class Trip < ApplicationRecord +end diff --git a/RideShare/config/routes.rb b/RideShare/config/routes.rb index 787824f88..f388b6328 100644 --- a/RideShare/config/routes.rb +++ b/RideShare/config/routes.rb @@ -1,3 +1,6 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + +resources :trips + end diff --git a/RideShare/db/migrate/20180403190625_create_trips.rb b/RideShare/db/migrate/20180403190625_create_trips.rb new file mode 100644 index 000000000..3b7b7e1e2 --- /dev/null +++ b/RideShare/db/migrate/20180403190625_create_trips.rb @@ -0,0 +1,11 @@ +class CreateTrips < ActiveRecord::Migration[5.1] + def change + create_table :trips do |t| + t.date :date + t.integer :rating + t.float :cost + + t.timestamps + end + end +end diff --git a/RideShare/db/schema.rb b/RideShare/db/schema.rb new file mode 100644 index 000000000..4a4af4e0f --- /dev/null +++ b/RideShare/db/schema.rb @@ -0,0 +1,26 @@ +# This file is auto-generated from the current state of the database. Instead +# of editing this file, please use the migrations feature of Active Record to +# incrementally modify your database, and then regenerate this schema definition. +# +# Note that this schema.rb definition is the authoritative source for your +# database schema. If you need to create the application database on another +# system, you should be using db:schema:load, not running all the migrations +# from scratch. The latter is a flawed and unsustainable approach (the more migrations +# you'll amass, the slower it'll run and the greater likelihood for issues). +# +# It's strongly recommended that you check this file into your version control system. + +ActiveRecord::Schema.define(version: 20180403190625) do + + # These are extensions that must be enabled in order to support this database + enable_extension "plpgsql" + + create_table "trips", force: :cascade do |t| + t.date "date" + t.integer "rating" + t.float "cost" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + +end diff --git a/RideShare/test/controllers/trips_controller_test.rb b/RideShare/test/controllers/trips_controller_test.rb new file mode 100644 index 000000000..8d4fa930b --- /dev/null +++ b/RideShare/test/controllers/trips_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe TripsController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/RideShare/test/fixtures/trips.yml b/RideShare/test/fixtures/trips.yml new file mode 100644 index 000000000..0be0e2c5d --- /dev/null +++ b/RideShare/test/fixtures/trips.yml @@ -0,0 +1,11 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + date: 2018-04-03 + rating: 1 + cost: 1.5 + +two: + date: 2018-04-03 + rating: 1 + cost: 1.5 diff --git a/RideShare/test/models/trip_test.rb b/RideShare/test/models/trip_test.rb new file mode 100644 index 000000000..6bbc51182 --- /dev/null +++ b/RideShare/test/models/trip_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Trip do + let(:trip) { Trip.new } + + it "must be valid" do + value(trip).must_be :valid? + end +end From a233dd0228c6e52841a45c9106f6e739f3a61979 Mon Sep 17 00:00:00 2001 From: Kiera Date: Tue, 3 Apr 2018 12:31:59 -0700 Subject: [PATCH 03/42] Generated passenger controller and model. Updated controller methods, and routes --- .../app/assets/javascripts/passengers.js | 2 + .../app/assets/stylesheets/passengers.scss | 3 + .../app/controllers/passengers_controller.rb | 66 +++++++++++++++++++ RideShare/app/helpers/passengers_helper.rb | 2 + RideShare/app/models/passenger.rb | 2 + RideShare/config/routes.rb | 2 + .../20180403192757_create_passengers.rb | 10 +++ .../controllers/passengers_controller_test.rb | 7 ++ RideShare/test/fixtures/passengers.yml | 9 +++ RideShare/test/models/passenger_test.rb | 9 +++ 10 files changed, 112 insertions(+) create mode 100644 RideShare/app/assets/javascripts/passengers.js create mode 100644 RideShare/app/assets/stylesheets/passengers.scss create mode 100644 RideShare/app/controllers/passengers_controller.rb create mode 100644 RideShare/app/helpers/passengers_helper.rb create mode 100644 RideShare/app/models/passenger.rb create mode 100644 RideShare/db/migrate/20180403192757_create_passengers.rb create mode 100644 RideShare/test/controllers/passengers_controller_test.rb create mode 100644 RideShare/test/fixtures/passengers.yml create mode 100644 RideShare/test/models/passenger_test.rb diff --git a/RideShare/app/assets/javascripts/passengers.js b/RideShare/app/assets/javascripts/passengers.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/RideShare/app/assets/javascripts/passengers.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/RideShare/app/assets/stylesheets/passengers.scss b/RideShare/app/assets/stylesheets/passengers.scss new file mode 100644 index 000000000..abb89851f --- /dev/null +++ b/RideShare/app/assets/stylesheets/passengers.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the passengers controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/RideShare/app/controllers/passengers_controller.rb b/RideShare/app/controllers/passengers_controller.rb new file mode 100644 index 000000000..51a474a5e --- /dev/null +++ b/RideShare/app/controllers/passengers_controller.rb @@ -0,0 +1,66 @@ +class PassengersController < ApplicationController + def index + + @passengers = Passenger.all + + end + + def new + @passenger = Passenger.new + end + + def create + passenger = Passenger.new(passenger_params) + + if passenger.save + redirect_to passengers_path + end + end + + def show + passenger_id = params[:id] + + @passenger = Passenger.find(passenger_id) + end + + def edit + @passenger = Passenger.find(params[:id]) + end + + def update + passenger = Passenger.find(params[:id]) + + passenger.assign_attributes(passenger_params) + + if passenger.save + redirect_to passenger_path(passenger) + end + end + + def destroy + Passenger.destroy(params[:id]) + + redirect_to passengers_path + end + + # def complete + # passenger = Task.find(params[:id]) + # passenger.completion_date = DateTime.now.strftime("%a, %B %d, %Y") + # + # if passenger.status == "complete" + # passenger.assign_attributes(status: "not complete", completion_date: nil) + # else + # passenger.assign_attributes(status: "complete") + # end + # + # if passenger.save + # redirect_to passengers_path + # end + # end + + private + + def passenger_params + return params.require(:passenger).permit(:name, :phone_num) + end +end diff --git a/RideShare/app/helpers/passengers_helper.rb b/RideShare/app/helpers/passengers_helper.rb new file mode 100644 index 000000000..1af9e68f1 --- /dev/null +++ b/RideShare/app/helpers/passengers_helper.rb @@ -0,0 +1,2 @@ +module PassengersHelper +end diff --git a/RideShare/app/models/passenger.rb b/RideShare/app/models/passenger.rb new file mode 100644 index 000000000..2c5748ac2 --- /dev/null +++ b/RideShare/app/models/passenger.rb @@ -0,0 +1,2 @@ +class Passenger < ApplicationRecord +end diff --git a/RideShare/config/routes.rb b/RideShare/config/routes.rb index f388b6328..65a39e782 100644 --- a/RideShare/config/routes.rb +++ b/RideShare/config/routes.rb @@ -3,4 +3,6 @@ resources :trips +resources :passengers + end diff --git a/RideShare/db/migrate/20180403192757_create_passengers.rb b/RideShare/db/migrate/20180403192757_create_passengers.rb new file mode 100644 index 000000000..a1009a0b3 --- /dev/null +++ b/RideShare/db/migrate/20180403192757_create_passengers.rb @@ -0,0 +1,10 @@ +class CreatePassengers < ActiveRecord::Migration[5.1] + def change + create_table :passengers do |t| + t.string :name + t.integer :phone_num + + t.timestamps + end + end +end diff --git a/RideShare/test/controllers/passengers_controller_test.rb b/RideShare/test/controllers/passengers_controller_test.rb new file mode 100644 index 000000000..d57028e30 --- /dev/null +++ b/RideShare/test/controllers/passengers_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe PassengersController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/RideShare/test/fixtures/passengers.yml b/RideShare/test/fixtures/passengers.yml new file mode 100644 index 000000000..46c7ddf23 --- /dev/null +++ b/RideShare/test/fixtures/passengers.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + phone_num: 1 + +two: + name: MyString + phone_num: 1 diff --git a/RideShare/test/models/passenger_test.rb b/RideShare/test/models/passenger_test.rb new file mode 100644 index 000000000..3f55ffd00 --- /dev/null +++ b/RideShare/test/models/passenger_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Passenger do + let(:passenger) { Passenger.new } + + it "must be valid" do + value(passenger).must_be :valid? + end +end From 9549ad7ea420b795283ed591cc3b0b6c0e9cb18f Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Tue, 3 Apr 2018 15:43:29 -0700 Subject: [PATCH 04/42] Generated and updated the driver route, model, and controller --- RideShare/app/assets/javascripts/drivers.js | 2 + RideShare/app/assets/stylesheets/drivers.scss | 3 + .../app/controllers/drivers_controller.rb | 68 +++++++++++++++++++ RideShare/app/helpers/drivers_helper.rb | 2 + RideShare/app/models/driver.rb | 2 + RideShare/config/routes.rb | 2 + .../migrate/20180403224142_create_drivers.rb | 10 +++ .../controllers/drivers_controller_test.rb | 7 ++ RideShare/test/fixtures/drivers.yml | 9 +++ RideShare/test/models/driver_test.rb | 9 +++ 10 files changed, 114 insertions(+) create mode 100644 RideShare/app/assets/javascripts/drivers.js create mode 100644 RideShare/app/assets/stylesheets/drivers.scss create mode 100644 RideShare/app/controllers/drivers_controller.rb create mode 100644 RideShare/app/helpers/drivers_helper.rb create mode 100644 RideShare/app/models/driver.rb create mode 100644 RideShare/db/migrate/20180403224142_create_drivers.rb create mode 100644 RideShare/test/controllers/drivers_controller_test.rb create mode 100644 RideShare/test/fixtures/drivers.yml create mode 100644 RideShare/test/models/driver_test.rb diff --git a/RideShare/app/assets/javascripts/drivers.js b/RideShare/app/assets/javascripts/drivers.js new file mode 100644 index 000000000..dee720fac --- /dev/null +++ b/RideShare/app/assets/javascripts/drivers.js @@ -0,0 +1,2 @@ +// Place all the behaviors and hooks related to the matching controller here. +// All this logic will automatically be available in application.js. diff --git a/RideShare/app/assets/stylesheets/drivers.scss b/RideShare/app/assets/stylesheets/drivers.scss new file mode 100644 index 000000000..186a23a88 --- /dev/null +++ b/RideShare/app/assets/stylesheets/drivers.scss @@ -0,0 +1,3 @@ +// Place all the styles related to the drivers controller here. +// They will automatically be included in application.css. +// You can use Sass (SCSS) here: http://sass-lang.com/ diff --git a/RideShare/app/controllers/drivers_controller.rb b/RideShare/app/controllers/drivers_controller.rb new file mode 100644 index 000000000..470d2b327 --- /dev/null +++ b/RideShare/app/controllers/drivers_controller.rb @@ -0,0 +1,68 @@ +class DriversController < ApplicationController + + def index + + @drivers = Driver.all + + end + + def new + @driver = Driver.new + end + + def create + driver = Driver.new(driver_params) + + if driver.save + redirect_to drivers_path + end + end + + def show + driver_id = params[:id] + + @driver = Driver.find(driver_id) + end + + def edit + @driver = Driver.find(params[:id]) + end + + def update + driver = Driver.find(params[:id]) + + driver.assign_attributes(driver_params) + + if driver.save + redirect_to driver_path(driver) + end + end + + def destroy + Driver.destroy(params[:id]) + + redirect_to drivers_path + end + + # def complete + # driver = Task.find(params[:id]) + # driver.completion_date = DateTime.now.strftime("%a, %B %d, %Y") + # + # if driver.status == "complete" + # driver.assign_attributes(status: "not complete", completion_date: nil) + # else + # driver.assign_attributes(status: "complete") + # end + # + # if driver.save + # redirect_to drivers_path + # end + # end + + private + + def driver_params + return params.require(:driver).permit(:name, :vin) + end + +end diff --git a/RideShare/app/helpers/drivers_helper.rb b/RideShare/app/helpers/drivers_helper.rb new file mode 100644 index 000000000..e5fc532e4 --- /dev/null +++ b/RideShare/app/helpers/drivers_helper.rb @@ -0,0 +1,2 @@ +module DriversHelper +end diff --git a/RideShare/app/models/driver.rb b/RideShare/app/models/driver.rb new file mode 100644 index 000000000..1ff364562 --- /dev/null +++ b/RideShare/app/models/driver.rb @@ -0,0 +1,2 @@ +class Driver < ApplicationRecord +end diff --git a/RideShare/config/routes.rb b/RideShare/config/routes.rb index 65a39e782..4f32c67ae 100644 --- a/RideShare/config/routes.rb +++ b/RideShare/config/routes.rb @@ -5,4 +5,6 @@ resources :passengers +resources :drivers + end diff --git a/RideShare/db/migrate/20180403224142_create_drivers.rb b/RideShare/db/migrate/20180403224142_create_drivers.rb new file mode 100644 index 000000000..eddae1b05 --- /dev/null +++ b/RideShare/db/migrate/20180403224142_create_drivers.rb @@ -0,0 +1,10 @@ +class CreateDrivers < ActiveRecord::Migration[5.1] + def change + create_table :drivers do |t| + t.string :name + t.string :vin + + t.timestamps + end + end +end diff --git a/RideShare/test/controllers/drivers_controller_test.rb b/RideShare/test/controllers/drivers_controller_test.rb new file mode 100644 index 000000000..3ba908d00 --- /dev/null +++ b/RideShare/test/controllers/drivers_controller_test.rb @@ -0,0 +1,7 @@ +require "test_helper" + +describe DriversController do + # it "must be a real test" do + # flunk "Need real tests" + # end +end diff --git a/RideShare/test/fixtures/drivers.yml b/RideShare/test/fixtures/drivers.yml new file mode 100644 index 000000000..022996d58 --- /dev/null +++ b/RideShare/test/fixtures/drivers.yml @@ -0,0 +1,9 @@ +# Read about fixtures at http://api.rubyonrails.org/classes/ActiveRecord/FixtureSet.html + +one: + name: MyString + vin: MyString + +two: + name: MyString + vin: MyString diff --git a/RideShare/test/models/driver_test.rb b/RideShare/test/models/driver_test.rb new file mode 100644 index 000000000..203cc4e33 --- /dev/null +++ b/RideShare/test/models/driver_test.rb @@ -0,0 +1,9 @@ +require "test_helper" + +describe Driver do + let(:driver) { Driver.new } + + it "must be valid" do + value(driver).must_be :valid? + end +end From 538692e9578b740d2f03d8fc3fd9727835f07d63 Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Tue, 3 Apr 2018 15:50:56 -0700 Subject: [PATCH 05/42] Adding the foreign_key for driver and passenger into trips --- ...0180403224723_add_passenger_id_to_trips.rb | 5 +++++ .../20180403224928_add_driver_id_to_trips.rb | 5 +++++ RideShare/db/schema.rb | 22 ++++++++++++++++++- 3 files changed, 31 insertions(+), 1 deletion(-) create mode 100644 RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb create mode 100644 RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb diff --git a/RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb b/RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb new file mode 100644 index 000000000..199c0159d --- /dev/null +++ b/RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb @@ -0,0 +1,5 @@ +class AddPassengerIdToTrips < ActiveRecord::Migration[5.1] + def change + add_reference :trips, :passenger, foreign_key: true + end +end diff --git a/RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb b/RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb new file mode 100644 index 000000000..36acd9eef --- /dev/null +++ b/RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb @@ -0,0 +1,5 @@ +class AddDriverIdToTrips < ActiveRecord::Migration[5.1] + def change + add_reference :trips, :driver, foreign_key: true + end +end diff --git a/RideShare/db/schema.rb b/RideShare/db/schema.rb index 4a4af4e0f..0c33c57f4 100644 --- a/RideShare/db/schema.rb +++ b/RideShare/db/schema.rb @@ -10,17 +10,37 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180403190625) do +ActiveRecord::Schema.define(version: 20180403224928) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" + create_table "drivers", force: :cascade do |t| + t.string "name" + t.string "vin" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + + create_table "passengers", force: :cascade do |t| + t.string "name" + t.integer "phone_num" + t.datetime "created_at", null: false + t.datetime "updated_at", null: false + end + create_table "trips", force: :cascade do |t| t.date "date" t.integer "rating" t.float "cost" t.datetime "created_at", null: false t.datetime "updated_at", null: false + t.bigint "passenger_id" + t.bigint "driver_id" + t.index ["driver_id"], name: "index_trips_on_driver_id" + t.index ["passenger_id"], name: "index_trips_on_passenger_id" end + add_foreign_key "trips", "drivers" + add_foreign_key "trips", "passengers" end From aa655e6ed3d09cc9f6bf755b29e43aa41dbe383f Mon Sep 17 00:00:00 2001 From: Kiera Date: Tue, 3 Apr 2018 16:34:13 -0700 Subject: [PATCH 06/42] Updated model relationships. Added seed data. --- RideShare/app/models/driver.rb | 1 + RideShare/app/models/passenger.rb | 1 + RideShare/app/models/trip.rb | 2 + RideShare/db/seed_data/drivers.csv | 101 +++++ RideShare/db/seed_data/passengers.csv | 301 +++++++++++++ RideShare/db/seed_data/trips.csv | 597 ++++++++++++++++++++++++++ RideShare/db/seeds.rb | 83 ++++ 7 files changed, 1086 insertions(+) create mode 100644 RideShare/db/seed_data/drivers.csv create mode 100644 RideShare/db/seed_data/passengers.csv create mode 100644 RideShare/db/seed_data/trips.csv diff --git a/RideShare/app/models/driver.rb b/RideShare/app/models/driver.rb index 1ff364562..197e65507 100644 --- a/RideShare/app/models/driver.rb +++ b/RideShare/app/models/driver.rb @@ -1,2 +1,3 @@ class Driver < ApplicationRecord + has_many :trips end diff --git a/RideShare/app/models/passenger.rb b/RideShare/app/models/passenger.rb index 2c5748ac2..2fef89192 100644 --- a/RideShare/app/models/passenger.rb +++ b/RideShare/app/models/passenger.rb @@ -1,2 +1,3 @@ class Passenger < ApplicationRecord + has_many :trips end diff --git a/RideShare/app/models/trip.rb b/RideShare/app/models/trip.rb index a8c077a10..8e2566cd8 100644 --- a/RideShare/app/models/trip.rb +++ b/RideShare/app/models/trip.rb @@ -1,2 +1,4 @@ class Trip < ApplicationRecord + belongs_to :driver + belongs_to :passenger end diff --git a/RideShare/db/seed_data/drivers.csv b/RideShare/db/seed_data/drivers.csv new file mode 100644 index 000000000..f31c275eb --- /dev/null +++ b/RideShare/db/seed_data/drivers.csv @@ -0,0 +1,101 @@ +id,name,vin +1,Bernardo Prosacco,WBWSS52P9NEYLVDE9 +2,Emory Rosenbaum,1B9WEX2R92R12900E +3,Daryl Nitzsche,SAL6P2M2XNHC5Y656 +4,Jeromy O'Keefe DVM,L1CKRVH55W8S6S9T1 +5,Verla Marquardt,TAMLE35L3MAYRV1JD +6,Mr. Hyman Wolf,L1CXMYNZ3MMGTTYWU +7,Lizeth Dickens,W09XNTZR9KTFK10WW +8,Shania Olson,KPH7TNNL14MDUFNF8 +9,Simone Hackett,4RA34A5K3YPN8H5P4 +10,Dr. Kenton Berge,SXMMLZX8XGDN7L7TL +11,Billy Walsh,SARJG2FD3A7T21H18 +12,Ms. Llewellyn Marquardt,TAMX2B609RPZY1XHT +13,Mr. Delbert Gleason,XF9HBFH148FLD41K8 +14,Antwan Prosacco,KPLUTG0L6NW1A0ZRF +15,Gayle Herzog,L1CDHZJ0567RJKCJ6 +16,Shakira Stamm,SALUVSAL3WA67SBPZ +17,Federico Bins V,W092FDPH6FNNK102M +18,Ms. Kamille Wyman,SUA4ALKJ0YRFMASB2 +19,Bill Denesik,L1C4AHZE55DGBKAK6 +20,Abby Hettinger,1C9511EE4YR35640C +21,Adell Jacobs,RF5J464C70D9C3KTB +22,Devan O'Kon,J811TNPS4FYZF4VGU +23,Bo Stroman DVM,1F8C93JX5D62SYRYY +24,Camryn Hegmann,RF3M0UR85BEJHH27W +25,Briana Braun,SU9PYDRK6214WL15M +26,Palma Conroy PhD,KPLD0JH17AMELZAHH +27,Nicholas Larkin,1F90EY0F4DTJ041CS +28,Ms. Carmelo Swaniawski,9BENHE4130KV2P38S +29,Miss Gustave Erdman,WD3HAS8D0ZT3T9XND +30,Casper Flatley,L1CN7SPD96M6SNFYU +31,Sheila VonRueden,KPH9RLSZ9YKNVMGH2 +32,Belle Rohan,RF4NN09F9JH8738HF +33,Dock Lemke,VF5JF6DT01CWDCAHJ +34,Velma O'Connell,VF63VETH08Y8CUAKW +35,May Rolfson,W09WNXAX60PBK10PH +36,Mr. Marcelina Jenkins,WD3VLLK2X04HF50PL +37,Arnulfo Anderson,WBW8W7DC0FJLMYCCR +38,Albina Dach,1C91DT907AMU5649F +39,Mrs. Skylar Strosin,WD3R6AJ15CPJZLR0T +40,Nicola Blanda IV,SARFDDM35AL1BESM5 +41,Mario Olson,RFWG8S4U59C22CW1F +42,Granville Mertz,1B9TPKC24YPL290Y4 +43,Mr. Kristy Funk,KPLZHRBB1E3RSF9WA +44,Rusty Turner,WBT5XKHH6BKH1V82M +45,Vanessa Hilpert,LLD9S75M72GZX3B1H +46,Junius Daniel,8C9UWXN29AYHME1WB +47,Jerald Robel,J811JTDM3UB2STDX6 +48,Antonietta O'Kon,1G8ZBYM74NYHJK217 +49,Stanford Hills,WD3HFVVW4N1FVPC5X +50,Maye Bauch,1B6FU8M80MVDHHTMD +51,Lane Bogan I,1F8C9NNV613L0RYSM +52,Favian Jaskolski,TAMAMDNT2WGL7H8HW +53,Evie Wisoky,1C9C39EC2XVXACA9T +54,Rogers Bartell IV,1C9EVBRM0YBC564DZ +55,Kaitlin Veum,SAR860AUXSBF8E4W9 +56,Adriel Swift,RF5D1APK7B8SDK1HR +57,Fermin Jakubowski,1C9YKRAL923SACAZM +58,Miss Arnulfo Heathcote,3A9D1R1B4F5K068P9 +59,Kole Stark,DLAZG3L44NFXP9FN0 +60,Oma Swift DDS,TAMCBRPM7EN5GD88L +61,Mrs. Everardo Von,WBTTYCCG00Y9K1VHZ +62,Jimmie Boehm,WD251GUW8HGMJ0ZNZ +63,Zachariah Kertzmann,1F9A1D0651D0041MZ +64,Salvador Sawayn,SUA9K8KA35CZ8X2FT +65,Adriana McKenzie,1B6T67KY436CYBAXM +66,Carey Christiansen I,WBTDYBGY2MKY5XRHV +67,Kelley Prosacco MD,3R9Y9ZMH82KD097KU +68,Iliana Harris,MB4Y2SKH7NX3MRF4W +69,Ernesto Torp,RF4BPA803R4AACTR1 +70,Meaghan Harvey,4RA62BCGXGK0KW7GB +71,Ms. Samantha Becker,SXMYX1NY6A1MPG827 +72,Orlando Huel,MB4Z24VD69SZ2UP0U +73,Augustus Nicolas,SU9FXMPJ2A7KWL1PZ +74,Marley Satterfield IV,DLADW1MKXLHMCDX3W +75,Mohammed Barrows,4RACJHJL843CUJ46R +76,Jay Wintheiser,RF457CL16G5L41HH5 +77,Mr. Shanie Gusikowski,XF9HHMKS402GD41NF +78,Casimir Vandervort,SUA6WS160SW70DUP4 +79,Vivian Fahey,WD3Y8KHA4B7CC63K4 +80,Victoria Windler,1F9DRSRF78XH041L4 +81,Amber Boyer,1F9ZCCZ6XJAG041GX +82,Toney Shields MD,WD3TVFYZ7MB5XVTM8 +83,Charley Kiehn,1B6BESZ55PXV3NB40 +84,Marcellus Little,SUAZR7LR7EL07VZ11 +85,Dr. Lambert Kuhlman,4RAYXBSK2HFSE1PKR +86,Garland Pouros,MB4JNWLU9G5PV1KG4 +87,Jannie Lubowitz,SXM5DVE26JE83TSZV +88,Anthony Sauer DVM,1F9GFDFT6MVU04129 +89,Tracy Huels,GA1G04255VG79LGCD +90,Kristy Cremin,1F9FF7C27LJA041VR +91,Miss Colt Runolfsson,1A9XL31P6FD5396CN +92,Oceane O'Kon,VF4CK0WS3JY0UVDGJ +93,Mrs. Rickey Dickens,5FS0Y47Z59YGGSXS0 +94,Arlo Douglas,SUA0RTWT48E144Z4U +95,Dalton Schiller,8C946K4F3KWRME1PY +96,Miss Cali Huel,TRCDP08V4X1XYADGK +97,Haven O'Keefe,LLD38LYB3ZEN45K2M +98,Ms. Winston Emard,1F9Z5CF13VV8041ND +99,Jayden Ledner,RF4AT3WL6JJXPFUJL +100,Minnie Dach,XF9Z0ST7X18WD41HT diff --git a/RideShare/db/seed_data/passengers.csv b/RideShare/db/seed_data/passengers.csv new file mode 100644 index 000000000..5e62f136f --- /dev/null +++ b/RideShare/db/seed_data/passengers.csv @@ -0,0 +1,301 @@ +id,name,phone_num +1,Nina Hintz Sr.,560.815.3059 +2,Kaia Klocko,(392) 217-0777 +3,Marcellus Hoeger,(222) 926-0138 +4,Ervin Wiza,272-041-9587 +5,Elmore Heller MD,1-297-522-2558 x431 +6,Patience Keeling II,412-432-7640 +7,Emmanuelle Breitenberg,(707) 341-7157 x98757 +8,Dariana Bernhard IV,1-904-093-5211 x9183 +9,Merl Glover III,1-602-620-2330 x3723 +10,Katharina Fisher,686-561-4711 x308 +11,Annalise Orn,222.752.6773 x113 +12,Jean Donnelly,120-307-6251 x164 +13,Dr. Leilani Mertz,777.380.7540 +14,Dortha Wiegand,989.272.6045 +15,Miss Lori Okuneva,(317) 197-0404 x7013 +16,Mr. Onie Spinka,699-582-5703 x5420 +17,Rebekah Hodkiewicz,(311) 542-6559 x86081 +18,Victor Kovacek,(368) 630-0443 x43210 +19,Berenice Abernathy,219-144-2635 +20,Andre Jerde,(958) 349-8093 x50712 +21,Jovani Nienow,941-758-7258 x0683 +22,Gay Mayert,258.896.1072 +23,Kevin Stark,315.906.2450 x6575 +24,Dario Rau MD,(638) 455-9446 x08412 +25,Aric O'Kon,978.529.4671 x523 +26,Golden Marquardt MD,1-866-930-8624 x352 +27,Archibald Nitzsche,(202) 356-9605 x2341 +28,Earlene Bogan,1-295-646-5152 +29,Florence Fisher IV,(229) 074-9445 +30,Tre Hegmann,488.926.3178 x37683 +31,Ms. Enrique Kiehn,416-848-6488 x8656 +32,Melba Torphy,246.356.5591 x70530 +33,Cecilia Klocko,536-163-3265 x70743 +34,Karli Sanford Sr.,(455) 397-6687 x973 +35,Remington Borer V,(273) 637-3904 +36,Tyrese Marvin,1-167-515-8578 x40983 +37,Russ O'Keefe II,1-177-606-1748 x1615 +38,Christian Pacocha,509.994.4549 x681 +39,Logan Bauch,(122) 147-0956 +40,Julius Johns,569-206-0528 x7060 +41,Ms. Westley Pouros,133.000.1809 x9028 +42,Marcelina Howe,656-421-8363 x85791 +43,Dr. Ashlee Roberts,256.402.8661 x519 +44,Mr. Braeden Reichel,589.775.3350 +45,Lavina Friesen,1-213-163-6582 +46,Mr. Barbara Bosco,953-543-7474 x1938 +47,Gavin Ryan IV,(944) 956-4879 x790 +48,Abbey Sporer,(712) 565-9368 x3557 +49,Javier Gulgowski,413.458.3031 x542 +50,Leonie Smith,1-629-453-3416 +51,Beverly Yundt,(480) 234-4903 x6388 +52,Kitty Heaney MD,642-187-8354 x72287 +53,Dedric Goyette,(551) 932-9300 +54,Gracie Emmerich,591-707-1595 x0908 +55,Mrs. Reyes VonRueden,690.953.4563 x550 +56,Rebecca Moen DVM,(117) 028-4562 x913 +57,Dallas Cummings,(215) 874-1092 x902 +58,Dr. Destiny Orn,1-548-683-6914 x436 +59,Granville Price Sr.,477.906.8699 x83635 +60,Hillard Quigley,(683) 403-2725 +61,Lisa Considine,(930) 944-9498 x852 +62,Donato Hirthe II,948-973-3656 +63,Quinn Baumbach,973.104.8233 x51135 +64,Retta Brown,367-989-7333 x822 +65,Webster Koepp,924.531.8045 +66,Claudine Greenholt,790-531-6973 +67,Evie White,292.081.5043 x4294 +68,Jarvis Gislason,353-589-2965 x842 +69,Ansel Robel,465.070.8915 +70,Iva Hickle,449-257-7418 x65480 +71,Mrs. Linnie Armstrong,638.554.8248 +72,Mrs. Agustina Johns,(213) 938-6889 +73,Bertram Schuppe,(265) 815-1732 +74,Felicity Cole,889-451-6215 +75,Krystina Huel DVM,1-658-210-5542 x085 +76,Devin Koss,1-538-085-3994 x66810 +77,Stanford Yundt,1-714-302-1427 x3760 +78,Hassan White III,1-919-281-6741 +79,Dr. Gladys Wilkinson,1-245-565-4763 x153 +80,Celestine Smith,1-256-942-4605 +81,Paolo Lynch,785-170-4077 +82,Charley Rogahn,1-666-034-0080 x3067 +83,Dr. Cullen Hegmann,1-936-768-4709 +84,Annabel Ledner,876-812-8666 +85,Merlin Renner,678-848-0216 x846 +86,Adrien Raynor,585.810.4813 x18518 +87,Ms. Emmalee Orn,736.325.5949 x6548 +88,Conrad Koelpin,286-931-4457 x687 +89,Jace Osinski,1-726-433-7325 x7274 +90,Zackary Willms I,471-731-8253 x6048 +91,Alize Walter III,828.495.1074 x094 +92,Albina Barrows MD,540-301-5133 +93,Kaylie Okuneva IV,(170) 751-2406 +94,Athena Cronin,978.908.7915 x6913 +95,Elinor Ruecker,438-611-5976 x2124 +96,Arnold Kautzer,(570) 494-6697 +97,Winnifred Hoppe,(935) 904-1991 x444 +98,Emelie Feeney,(579) 933-1380 +99,Theresia Hessel,1-440-395-0568 x9245 +100,Hipolito Rogahn,944.179.4883 +101,Mrs. Keanu Gerlach,(314) 234-3272 x1012 +102,Laron Fay,(406) 493-3684 x25626 +103,Marge Cummings,1-862-280-8661 +104,Anibal Douglas,627-506-6152 +105,Earline Crist,(354) 972-3036 x965 +106,Eda Huel,740.330.7670 +107,Winfield Pouros,273-122-8168 +108,Abigayle Rau Jr.,1-761-352-4516 x63527 +109,Thomas Waters V,691.579.4592 x14714 +110,Howard Predovic Jr.,1-929-242-0808 +111,Diamond Harris DDS,242-079-8166 x699 +112,Raphael McCullough II,(986) 895-9022 x981 +113,Miss Spencer Roob,791-036-8385 +114,Khalil Orn,(332) 812-6858 x06506 +115,Ms. Andreanne Littel,550-756-7630 +116,Laurianne Larkin,567.228.1637 x86366 +117,Rossie Luettgen MD,211.322.0450 +118,Nathen Jacobson,212-159-8597 x3145 +119,Miss Armand Treutel,138-649-0336 +120,Kassandra Howell,287.160.1892 x919 +121,Erik Turner III,216-912-1936 x37221 +122,Courtney Boehm,1-192-160-2459 +123,Mr. Stanley Kulas,(676) 335-5666 +124,Willie Cummerata Sr.,700-353-4086 x3607 +125,Kenyon Schneider Jr.,(508) 848-0063 +126,Patsy Boehm,959.070.1254 x901 +127,Alessia Hartmann,920.959.3500 +128,Aisha Tremblay,(144) 832-8234 x900 +129,Aubree Treutel,611.597.4223 +130,Dr. Alyce Beer,(625) 637-3457 x128 +131,Tanya Murphy,(111) 469-0284 +132,Althea Kuhic,719.950.9921 +133,Dr. Kathlyn Robel,1-857-447-4700 x0939 +134,Astrid Schmeler IV,399.941.0742 +135,Kayla O'Keefe,153.456.5323 +136,Jett Schmitt DDS,1-903-807-6445 +137,Miss Xzavier Hills,(474) 751-9123 x613 +138,Miss Frida Abshire,(379) 941-0373 +139,Adah Miller,(139) 629-6031 +140,Mrs. Mayra Halvorson,683.894.4647 x7521 +141,Mrs. Elsa Jacobi,(704) 833-6668 x9214 +142,Armand Kuhlman,1-135-650-4385 x75275 +143,Carolyne Strosin,700-497-7947 x0176 +144,Mollie Farrell,456-557-9294 +145,Miss Paxton Bednar,928-521-7116 x019 +146,Kirk Hand,(175) 727-5781 +147,Trevion Hammes Sr.,1-730-945-0044 x94825 +148,Ms. Noble Kub,139-955-7721 +149,Kendrick Marks,925.035.9247 x52567 +150,Angelita Donnelly III,457.104.0961 +151,Earnest Pacocha,1-110-231-7582 x4319 +152,Kenyatta Wiza,(527) 640-8511 +153,Daisha Zboncak DDS,1-227-712-3316 x290 +154,Crawford Pfeffer,372.588.3654 x152 +155,Rubye Carter MD,999-359-3649 x2266 +156,Ms. Kayleigh Nitzsche,(731) 804-8969 x79457 +157,Yvonne Okuneva IV,(215) 056-6568 x5330 +158,Mr. Johnpaul Muller,794.250.1223 x13918 +159,Celestine Blanda PhD,1-343-220-7104 x266 +160,Garret Hane,248.949.2664 +161,Marques Wyman,935.138.2407 x25556 +162,Tomasa Bruen IV,132.932.3611 x4702 +163,Bailee Yundt,(427) 199-6497 +164,Dominique Gleason PhD,460.497.2371 +165,Mertie Rowe,447-076-7468 +166,Brennon Mohr II,(600) 049-2836 x12982 +167,Mary Fisher Jr.,1-544-400-7690 x822 +168,Hayden Wisozk,(332) 422-8680 x79530 +169,Jaclyn Upton,458-797-3216 +170,Dock Schmeler,549.749.9578 x21020 +171,Brandy Parisian,261.469.8464 x39317 +172,Makenna Lehner,(808) 321-3229 x5707 +173,Mr. Gia Jakubowski,1-257-501-5007 +174,Lempi Steuber,1-552-467-6184 x600 +175,Carter Medhurst,1-932-512-0204 +176,Hellen Frami,875-612-4447 +177,Shanie Witting III,(309) 845-2263 x83317 +178,Lyric Stiedemann,(749) 453-1622 x03482 +179,Vern Pollich,1-411-679-9794 +180,Manuela Homenick,982.094.8497 +181,Talia Kerluke,947.490.0539 +182,Omari Nader PhD,330.940.0404 x71841 +183,Pinkie Friesen,173.979.8010 x88161 +184,Xavier Emard PhD,(259) 254-5545 x4965 +185,Abdullah Williamson,367-713-4754 +186,Rosemarie Jakubowski,648.354.0997 x9988 +187,Crawford Stoltenberg,804.132.9174 x16882 +188,Mae Thiel,464.592.2939 x92569 +189,Mireille Torphy,1-129-905-5327 +190,Elissa Kozey,112-945-3718 x78002 +191,Mrs. Jackie Bernier,1-280-004-6422 x7398 +192,Miss Kraig Rolfson,(467) 611-2679 +193,Thomas Hodkiewicz,221-222-6260 x7867 +194,Mya Carroll MD,887-701-0841 x4737 +195,Destinee Cormier,554-000-1348 x99557 +196,Nyasia McCullough DVM,1-155-862-9800 x3231 +197,Ryleigh Jast,901-199-0271 x8648 +198,Reese Gleason,(431) 508-5681 x223 +199,Mrs. Raymond Legros,(509) 229-8408 +200,Cecil Halvorson III,455-068-4957 x31138 +201,Meredith O'Reilly,(220) 815-0823 +202,Janiya Zieme,1-501-880-8012 x52577 +203,Antoinette Runte,422.554.6019 x7509 +204,Bonnie Beatty,622-776-9773 x922 +205,Miss Clay Larson,(218) 099-2447 +206,Buster Smitham,1-486-953-1839 +207,Lenny Dibbert,1-337-699-8456 x6266 +208,Dina Feeney,1-527-668-1700 x60806 +209,Ms. Rachael Wuckert,1-790-786-0768 x822 +210,Rhea Zieme,940-838-2968 x4910 +211,Ms. Zoila Hoppe,(327) 590-6095 +212,Fletcher Goldner,437-554-0195 x8747 +213,Tabitha Brekke,(559) 664-1251 +214,Stephan Armstrong,1-850-213-2131 x404 +215,Zackary Hoeger,1-650-496-4636 x801 +216,Assunta Waters Jr.,(319) 982-0908 +217,Kira Hagenes,(793) 415-8184 x98200 +218,Jasen Carroll,225.282.3531 x5156 +219,Eladio Gleichner,276-651-5935 x124 +220,Enid Thiel,107-928-8642 x26437 +221,Jerod Abernathy,1-797-846-1991 +222,Mrs. Dominic Hayes,1-497-741-6425 x1655 +223,Cale Konopelski,801.760.8569 +224,Asia Yundt,256.224.2795 +225,Daren Batz DVM,1-628-098-6863 +226,Krystal Wilderman,1-748-755-3350 +227,Abdul Reilly,(592) 156-1310 x2203 +228,Ulices Batz,1-793-027-9928 +229,Randall Streich,411.960.5218 +230,Pierce Hoeger,494.136.6194 +231,Marley Cassin,791-451-8440 +232,Creola Bernier PhD,(138) 423-1993 x0341 +233,Ernestine Pfannerstill,(664) 208-7421 x310 +234,Delfina Bogisich,801-784-9149 +235,Mrs. Dustin Kub,148.363.7787 x995 +236,Jamil Kovacek,1-321-312-2459 x3205 +237,Miss Cathy Herman,(186) 628-7305 x078 +238,Heber Romaguera,1-580-581-8405 x079 +239,Tyreek Skiles,260-267-8750 +240,Eliseo Labadie,709-104-6748 x4468 +241,Dr. Keon Ruecker,976.616.1240 x8187 +242,Kailee Hickle Sr.,971-698-0478 x3506 +243,Asa Satterfield,121.792.5214 x46603 +244,Orrin Greenfelder,146.285.1152 +245,Eleonore Berge,937-238-2536 +246,Edyth Miller,(140) 409-9130 x496 +247,Ms. Chadd Leannon,221-039-2173 x454 +248,Kamryn Sporer,1-670-453-8435 +249,Halle Durgan,183-077-0300 x9865 +250,Kylie Cartwright,734.297.0789 x3288 +251,Jillian Klocko,699-005-5878 +252,Cameron Casper IV,377-047-7349 +253,Mrs. Keara Kozey,1-710-354-9533 x65384 +254,Meaghan Williamson,848.077.5455 +255,Mr. Dustin Stroman,769.167.6194 x749 +256,Kiara Kuhn,458.159.0504 x540 +257,Annette Volkman Jr.,1-310-932-4684 +258,Kim Bayer,(495) 861-7483 x05907 +259,Kristopher Collins Jr.,893-517-8880 x5568 +260,Arch Koepp,241.009.9299 x0597 +261,Davion Pacocha DDS,1-971-034-3299 x71384 +262,Erick Lind,(905) 731-2328 +263,Autumn Borer IV,(496) 807-7783 +264,Mrs. Odell Raynor,1-729-057-3767 x80278 +265,Dessie Crist,872.740.9928 +266,Kadin Olson,400.669.3623 x71791 +267,Brandyn Hand,1-120-738-6015 x9899 +268,Jocelyn Roberts,(134) 882-5516 x0662 +269,April Zemlak,363-485-0115 +270,Ms. Tyrel Torp,299.389.6335 +271,Rollin Halvorson,1-800-820-5456 x42342 +272,Dr. Jack Lebsack,554.333.4552 +273,Shakira Satterfield IV,1-392-813-5637 +274,Marcellus Kris,918.143.9835 +275,Shayna Johns,918-224-0806 x508 +276,Edwin Douglas,1-391-957-6932 x99099 +277,Belle Bechtelar,963.085.7338 x23232 +278,Kendall Wintheiser,250-123-1768 x501 +279,Prince Gleason,1-788-221-4269 +280,Mrs. Dorothy Gottlieb,113-328-3377 +281,Hilton DuBuque,852-915-4336 x96432 +282,Josephine Schoen MD,1-443-726-9947 x443 +283,Clementina Rippin I,582.914.0385 x721 +284,Mrs. Yesenia Hane,489-348-0781 x4487 +285,Maddison Reilly,330.376.9142 x12921 +286,Earnest Tromp,400.748.7179 x869 +287,Creola Kautzer,(506) 363-4376 +288,Ellsworth Gerlach,1-165-188-9350 x79027 +289,Christ Marks,(686) 795-4097 +290,Quinn Tillman,1-792-899-2953 x22718 +291,Bria Bosco,1-395-934-4923 +292,Reba Kozey III,660-848-9493 x0680 +293,Mr. Adrianna Auer,655.823.7582 x23010 +294,Mr. Ola Sporer,1-916-091-1165 +295,Craig Corwin Sr.,(401) 722-0045 +296,Juana Murray,886.998.6304 +297,Jamal Pfannerstill,1-446-501-3373 x5818 +298,Maybelle Wilkinson,569.532.1204 +299,Sanford Leannon,190.916.9114 x1396 +300,Miss Isom Gleason,791-114-8423 x70188 diff --git a/RideShare/db/seed_data/trips.csv b/RideShare/db/seed_data/trips.csv new file mode 100644 index 000000000..9049ff299 --- /dev/null +++ b/RideShare/db/seed_data/trips.csv @@ -0,0 +1,597 @@ +id,driver_id,passenger_id,date,rating,cost +1,1,54,2016-04-05,3,1293 +2,67,146,2016-01-13,5,2157 +3,50,87,2016-05-02,3,1181 +4,13,70,2016-05-14,4,2436 +5,3,12,2015-12-14,2,1406 +6,48,137,2016-06-02,5,1474 +7,84,236,2015-05-20,4,2476 +8,93,104,2016-08-08,5,1424 +9,17,286,2016-03-03,5,2347 +10,8,263,2015-12-14,5,2329 +11,71,149,2016-01-12,1,2043 +12,12,237,2016-08-21,1,2671 +13,83,298,2015-05-27,5,1287 +14,48,247,2015-09-13,1,2865 +15,26,143,2016-06-17,5,2071 +16,25,259,2016-05-25,5,2129 +17,21,63,2015-08-23,4,2876 +18,72,192,2017-01-10,1,2796 +19,5,140,2016-02-16,5,1388 +20,3,8,2016-02-05,1,2526 +21,71,16,2016-10-16,2,1884 +22,96,275,2015-03-13,1,1809 +23,51,189,2015-05-02,5,2882 +24,75,280,2015-11-04,4,1092 +25,21,257,2016-05-17,4,2369 +26,92,194,2016-12-08,3,2923 +27,9,158,2015-03-12,4,2180 +28,57,40,2016-03-12,4,1900 +29,45,127,2016-02-02,3,2919 +30,28,230,2016-10-12,5,2027 +31,66,113,2015-07-15,3,1148 +32,20,57,2016-06-17,5,1659 +33,92,31,2015-12-09,5,2655 +34,94,41,2016-05-30,3,1406 +35,84,148,2016-12-10,2,2363 +36,38,154,2017-02-08,2,2364 +37,49,80,2016-04-01,4,1465 +38,16,281,2016-06-13,2,1764 +39,48,191,2016-06-03,2,1906 +40,76,221,2017-01-30,2,2437 +41,56,35,2015-10-22,5,1361 +42,69,267,2017-01-14,2,2277 +43,38,135,2016-11-08,1,2095 +44,17,146,2016-03-06,5,2888 +45,57,284,2017-01-28,4,1089 +46,98,1,2016-06-28,2,2070 +47,88,157,2016-05-12,2,1447 +48,73,202,2015-06-24,1,1203 +49,26,266,2015-11-15,2,2564 +50,47,277,2015-10-12,4,1155 +51,64,275,2015-07-01,5,2342 +52,21,254,2015-11-07,1,1477 +53,9,119,2015-04-02,5,1170 +54,99,149,2015-11-27,1,2972 +55,15,161,2015-07-31,1,1103 +56,31,85,2016-05-24,2,1396 +57,40,237,2015-10-21,3,2746 +58,91,240,2016-06-13,4,2328 +59,97,65,2016-03-09,4,1680 +60,57,190,2015-08-09,1,2726 +61,4,254,2016-11-21,2,2999 +62,29,253,2016-08-18,5,2960 +63,36,293,2016-07-14,2,1039 +64,58,118,2015-06-19,1,1680 +65,49,258,2015-06-03,5,1802 +66,26,274,2016-03-15,3,2507 +67,9,77,2015-11-14,4,2112 +68,94,53,2015-09-24,2,1722 +69,29,226,2016-10-20,1,2694 +70,3,162,2016-09-09,3,2039 +71,42,29,2015-05-26,2,2477 +72,7,62,2016-03-19,3,2871 +73,87,296,2015-10-26,2,1118 +74,94,118,2015-03-18,4,2800 +75,19,44,2015-10-25,5,1271 +76,51,164,2016-10-09,5,2620 +77,40,205,2016-05-18,2,2486 +78,52,70,2015-12-23,1,2463 +79,30,222,2017-02-01,5,1704 +80,88,175,2016-07-05,1,1861 +81,60,241,2016-05-22,2,1222 +82,23,221,2015-12-14,3,2299 +84,61,217,2015-04-19,4,1666 +85,90,86,2017-02-05,3,2428 +86,99,211,2015-06-26,5,2732 +87,20,138,2016-06-10,2,1030 +89,92,183,2015-11-19,5,1666 +90,48,288,2015-03-17,4,1962 +91,42,81,2015-04-20,4,1838 +92,10,80,2015-05-13,1,2563 +93,57,19,2015-06-25,5,2568 +94,47,139,2015-06-19,5,1105 +95,97,118,2016-03-06,1,2224 +96,73,97,2016-12-14,1,1474 +97,54,271,2016-06-14,5,1151 +98,65,172,2016-09-18,1,1218 +99,29,107,2015-07-03,4,1268 +100,29,138,2016-09-04,2,2547 +101,70,225,2016-06-24,1,1246 +102,58,70,2015-07-11,1,1183 +103,72,26,2015-08-03,4,2604 +104,85,272,2015-04-27,4,1295 +105,44,246,2016-09-19,5,2738 +106,65,45,2017-01-05,3,1620 +107,54,254,2015-11-18,2,2888 +108,43,90,2016-11-13,4,2786 +109,5,165,2016-07-01,5,2189 +110,83,140,2016-12-30,1,1538 +111,90,273,2015-12-14,3,1400 +112,78,145,2016-01-15,1,2442 +113,45,188,2016-12-30,3,2889 +114,2,87,2015-08-29,3,1662 +115,16,35,2015-11-22,5,1502 +116,84,129,2015-05-16,2,2199 +117,82,111,2016-12-27,2,2390 +118,2,234,2016-01-07,5,2353 +119,55,278,2016-12-04,3,1244 +120,40,153,2015-07-14,2,1370 +121,29,106,2016-11-27,1,1802 +122,1,247,2015-12-24,5,2510 +123,10,280,2015-11-27,4,1827 +124,1,26,2016-10-16,4,1553 +125,48,35,2015-09-14,1,1752 +126,46,56,2016-10-31,3,1426 +127,30,15,2016-10-11,3,1764 +128,55,249,2015-05-21,2,2254 +129,54,122,2015-12-02,3,2239 +130,46,273,2016-01-02,1,1129 +131,51,172,2015-07-25,4,1199 +132,5,113,2017-02-10,5,2391 +133,12,240,2015-04-05,1,2820 +134,73,32,2017-02-26,2,2195 +135,77,146,2016-05-05,5,1945 +136,38,147,2015-10-02,3,1275 +137,45,162,2015-04-05,1,2360 +138,5,192,2016-08-16,3,1280 +139,56,88,2016-03-25,5,1463 +140,2,206,2015-07-21,2,1514 +141,11,19,2016-08-27,2,1387 +142,40,294,2016-05-26,1,1515 +143,59,277,2016-10-06,4,2348 +144,48,170,2017-03-01,3,1569 +145,58,185,2015-08-23,1,1244 +146,38,102,2017-01-20,4,2034 +147,58,28,2015-04-20,3,1779 +148,48,133,2015-07-07,4,1005 +149,32,183,2015-04-12,1,2139 +150,56,40,2016-01-17,1,1736 +151,80,273,2015-07-13,1,2528 +152,45,135,2016-03-25,3,1666 +153,45,110,2016-05-10,1,2669 +155,65,194,2016-07-17,2,2889 +156,94,41,2017-01-01,4,1373 +157,53,291,2016-04-18,3,1982 +158,80,207,2016-03-09,4,2663 +159,8,285,2016-12-31,5,2116 +160,26,101,2016-01-30,4,2971 +161,50,245,2016-07-15,2,2602 +162,6,93,2015-03-09,4,1469 +163,17,225,2017-03-01,3,2648 +164,38,26,2015-12-04,4,1912 +165,67,236,2015-10-25,5,1671 +166,31,278,2015-08-27,1,2098 +167,67,37,2017-01-17,5,1220 +168,21,179,2016-12-04,4,2421 +169,6,204,2015-05-19,4,2416 +170,92,6,2016-10-12,3,1651 +171,13,181,2017-01-06,1,1998 +172,77,214,2017-01-07,2,2321 +173,93,57,2016-08-28,1,2725 +174,88,121,2016-10-30,3,1180 +175,44,249,2016-06-05,4,1520 +176,11,139,2017-02-05,5,2772 +177,65,119,2016-04-26,2,2481 +178,82,291,2017-01-12,3,2708 +179,8,93,2016-06-15,1,2032 +180,81,164,2017-01-28,3,2458 +181,22,284,2015-05-06,5,1339 +182,64,111,2016-07-14,4,1440 +183,70,132,2016-03-03,2,2274 +184,75,93,2016-04-01,2,2353 +185,98,83,2015-03-09,4,1261 +186,52,77,2016-07-12,3,1605 +187,60,164,2016-07-01,3,1496 +188,71,124,2016-01-17,2,2230 +189,73,268,2016-11-26,1,2967 +190,14,265,2015-04-22,5,2712 +191,9,197,2016-09-21,1,2528 +192,69,74,2015-03-17,3,2152 +193,83,165,2016-10-24,4,2945 +194,4,207,2017-02-15,5,1606 +195,54,30,2015-11-25,5,1615 +196,80,288,2015-06-22,2,2957 +197,95,162,2015-11-22,5,2223 +198,36,17,2015-07-23,1,1827 +199,92,18,2017-01-30,1,1360 +200,93,186,2016-06-04,3,2610 +201,20,161,2016-02-20,1,2429 +202,40,250,2016-04-05,3,2387 +203,97,85,2016-12-31,2,1010 +204,98,12,2015-06-09,2,1124 +205,87,131,2015-07-09,2,2266 +206,47,225,2015-03-08,2,1288 +207,70,59,2016-09-24,1,1077 +208,46,92,2016-06-13,2,2450 +209,94,141,2016-10-30,1,1200 +210,81,164,2015-07-14,5,1124 +211,34,208,2016-06-22,3,1122 +212,28,89,2015-06-03,1,1744 +213,32,197,2015-12-27,5,2353 +214,78,230,2016-12-31,1,2573 +215,41,233,2016-10-09,3,1692 +216,1,201,2015-03-24,1,1890 +217,78,274,2016-09-11,4,1018 +218,11,147,2016-04-03,2,2675 +219,3,171,2016-03-12,4,2326 +220,56,254,2016-02-13,3,1788 +221,25,207,2016-09-07,1,1362 +222,83,284,2016-12-01,5,1066 +223,61,289,2016-05-15,1,1549 +224,57,141,2016-11-16,3,1722 +225,28,67,2015-03-24,4,2944 +226,8,183,2016-09-26,3,1354 +227,11,198,2016-06-21,2,1136 +228,18,19,2015-10-10,5,1091 +229,25,67,2015-11-02,5,2103 +230,99,233,2016-10-12,4,1138 +231,66,76,2015-05-11,2,2612 +232,92,281,2017-02-07,3,2506 +233,80,191,2016-03-27,5,2005 +234,85,234,2016-12-08,2,2838 +235,81,229,2015-12-10,2,1547 +236,2,263,2015-12-08,2,1506 +237,17,170,2016-08-09,2,1816 +238,83,209,2016-12-19,5,2697 +239,52,177,2015-03-19,3,1948 +240,44,272,2017-01-15,4,1760 +241,89,274,2015-12-08,5,2847 +242,34,14,2016-01-26,4,2185 +243,44,90,2016-09-14,2,2592 +244,82,193,2016-10-12,3,2068 +245,62,34,2016-04-24,2,1818 +246,59,26,2015-07-02,2,1584 +247,3,290,2016-03-09,4,1033 +248,66,214,2015-06-16,5,2534 +249,17,7,2015-09-27,3,1829 +250,69,203,2016-04-14,1,2575 +251,54,265,2016-11-08,5,1565 +252,25,152,2016-01-26,4,1953 +253,17,200,2016-12-28,3,2247 +254,4,37,2015-08-17,3,2221 +255,45,62,2015-10-15,4,1568 +256,11,22,2015-10-29,4,1541 +257,26,141,2016-01-30,2,1388 +258,51,213,2016-06-26,4,1883 +259,38,163,2016-12-05,4,2137 +260,42,258,2015-12-14,1,1827 +261,45,136,2016-03-24,4,2034 +262,19,164,2015-08-15,1,1663 +263,30,108,2017-02-13,3,1699 +264,32,128,2016-09-02,5,1353 +265,12,85,2015-08-27,5,1305 +266,66,176,2015-03-08,1,2547 +268,42,154,2015-05-22,2,1332 +269,17,238,2016-01-24,3,2289 +270,70,210,2016-02-15,5,2841 +271,88,295,2015-03-12,3,1699 +272,17,1,2015-09-14,4,1652 +273,7,88,2015-07-26,3,1174 +274,25,6,2016-06-24,3,2806 +275,68,120,2016-04-02,5,2755 +276,7,204,2015-10-20,2,2583 +277,18,87,2015-09-21,3,2937 +278,83,220,2015-10-02,1,1467 +279,47,278,2015-04-02,3,2115 +280,97,198,2016-10-03,4,2548 +281,20,288,2015-03-11,3,1172 +282,52,288,2016-10-10,4,1313 +283,21,69,2015-08-20,3,2025 +284,42,246,2015-04-23,2,1469 +285,65,88,2015-10-19,5,2715 +286,60,226,2016-11-11,5,2740 +287,74,78,2016-01-29,2,2653 +288,70,140,2015-09-26,2,1923 +289,60,86,2015-05-19,2,1408 +290,19,16,2016-06-13,5,1241 +291,95,235,2015-06-07,4,2329 +292,15,77,2016-08-25,5,2870 +293,15,83,2016-08-01,2,1556 +294,54,232,2015-10-06,2,2262 +295,6,87,2015-08-14,1,2816 +296,29,158,2016-06-30,3,1881 +297,19,7,2016-02-27,5,2002 +298,59,70,2016-10-28,2,1933 +299,55,85,2015-11-01,2,2918 +300,90,251,2016-01-31,2,2959 +301,69,295,2015-07-11,2,2448 +302,16,103,2015-12-11,1,2938 +303,98,203,2016-06-28,2,1822 +304,91,211,2015-07-10,1,1549 +305,69,232,2015-05-19,5,2735 +306,49,89,2017-02-03,1,1642 +307,93,240,2015-11-26,4,2039 +308,5,265,2015-09-22,3,2459 +309,45,210,2015-03-17,2,2139 +310,80,88,2017-01-22,4,1252 +311,17,76,2016-03-21,3,1845 +312,3,279,2015-10-07,1,2579 +313,35,171,2016-09-18,1,1204 +314,77,176,2016-02-06,3,1834 +315,49,79,2016-02-18,2,1832 +316,84,154,2015-03-13,2,2531 +317,84,168,2016-09-17,4,2334 +318,67,217,2015-09-14,5,2810 +319,5,164,2016-02-03,1,1507 +320,53,204,2015-04-07,1,1784 +321,72,148,2015-09-28,3,2289 +322,9,154,2016-06-07,3,2579 +323,16,242,2016-02-11,2,2388 +324,28,254,2015-04-10,5,2488 +325,79,156,2015-07-18,4,1111 +326,52,127,2015-10-13,1,1358 +327,72,56,2015-10-13,2,2599 +328,54,192,2016-03-10,1,1517 +329,49,75,2015-12-10,3,2694 +330,8,137,2015-11-10,3,2430 +331,40,280,2015-08-22,5,2374 +332,81,96,2017-01-22,3,1845 +333,75,80,2015-05-29,4,1120 +334,70,231,2016-01-03,1,1914 +335,90,243,2016-06-24,3,2384 +336,42,244,2016-09-11,1,2498 +337,31,45,2016-11-10,2,1241 +338,67,51,2016-12-30,1,2967 +339,8,182,2016-08-07,2,2968 +340,51,142,2016-01-03,4,1213 +341,96,3,2016-02-28,2,2427 +342,39,54,2016-02-29,2,1027 +343,23,170,2015-08-28,3,1500 +344,43,249,2016-02-26,3,1557 +345,13,99,2015-03-26,5,2923 +346,39,293,2016-07-19,3,2883 +347,5,74,2016-06-09,4,1351 +348,76,51,2015-08-13,2,1263 +349,44,105,2016-07-01,4,2749 +350,78,179,2016-01-31,5,1255 +351,87,79,2015-06-08,5,1781 +352,13,88,2016-08-06,4,1256 +353,22,24,2016-11-26,3,2745 +354,95,120,2015-03-28,3,1035 +355,54,45,2015-04-02,2,2060 +356,46,292,2016-11-24,1,2419 +357,69,239,2016-05-01,2,2268 +358,32,58,2015-04-20,1,1294 +359,41,230,2015-07-18,2,1101 +360,20,133,2016-05-06,2,2988 +361,72,136,2016-05-13,3,2071 +362,33,237,2016-01-30,4,2597 +363,72,246,2016-11-05,1,2922 +364,4,257,2016-01-15,5,1029 +365,45,151,2015-04-05,2,2463 +366,76,260,2017-01-19,1,2234 +367,71,45,2017-02-07,2,2370 +368,20,179,2015-03-16,3,2274 +369,65,224,2016-10-05,4,2264 +370,97,159,2015-12-06,5,2270 +371,41,218,2015-08-07,1,1274 +372,90,63,2015-05-22,2,1743 +373,15,281,2016-05-09,4,2626 +374,78,240,2015-09-06,2,1413 +375,81,211,2016-01-20,2,2563 +376,66,97,2016-05-08,5,2001 +377,36,252,2015-06-01,2,2075 +378,21,59,2015-05-18,1,1698 +379,63,172,2016-04-04,2,1477 +380,83,262,2017-01-25,4,1652 +381,77,12,2015-06-13,5,1087 +382,58,113,2015-10-06,4,2361 +383,10,2,2015-07-14,2,1108 +384,91,212,2015-08-10,4,1417 +385,12,208,2016-09-20,1,2367 +386,58,236,2015-07-03,1,1068 +387,95,245,2016-06-06,5,2397 +388,37,265,2015-11-30,3,1988 +389,34,195,2015-10-08,1,2227 +390,39,170,2016-06-18,4,1711 +391,59,238,2016-05-09,3,1550 +392,19,62,2016-12-24,5,2972 +393,98,290,2015-08-22,5,2562 +394,85,180,2015-05-01,2,2557 +395,30,214,2016-04-27,4,1587 +396,80,137,2017-02-01,5,1281 +397,92,276,2015-12-31,3,2588 +398,54,220,2016-08-07,4,1627 +399,64,144,2017-01-30,2,1814 +400,9,132,2016-10-19,5,1836 +401,41,231,2016-06-15,2,2431 +402,64,33,2017-02-19,3,1015 +403,24,181,2016-11-06,3,2772 +404,71,44,2016-12-11,4,2289 +405,34,125,2015-08-14,5,2950 +406,77,248,2015-08-07,5,2698 +407,95,240,2015-07-21,5,1425 +408,98,124,2015-05-08,5,1743 +409,64,202,2016-03-01,1,1782 +410,72,189,2016-09-11,1,2156 +411,82,61,2016-03-18,1,1440 +412,21,243,2015-05-28,4,2261 +413,71,167,2016-04-14,1,1853 +414,84,196,2016-04-16,2,1775 +415,10,169,2016-08-03,5,2216 +416,78,20,2016-01-23,4,2122 +417,1,129,2015-03-29,1,2791 +418,28,235,2016-08-13,4,2460 +419,34,81,2016-04-13,3,1683 +420,99,92,2016-10-08,1,1105 +421,46,92,2016-04-10,1,1114 +422,38,85,2016-06-24,2,2812 +423,99,245,2016-06-29,5,2970 +424,66,139,2016-09-18,2,2916 +425,18,257,2016-01-09,4,1446 +426,60,205,2016-08-28,2,2686 +427,74,12,2015-04-18,5,1474 +428,16,105,2016-11-22,4,2102 +429,43,163,2015-08-11,4,2334 +430,3,15,2016-02-10,5,1917 +431,12,197,2016-08-11,5,2665 +432,22,57,2016-09-15,3,2347 +433,64,225,2016-12-22,1,2056 +434,1,112,2015-06-07,2,2779 +435,49,267,2015-09-12,4,1790 +436,58,182,2017-01-06,2,1194 +437,13,132,2016-07-20,5,2701 +438,4,85,2015-09-17,4,2703 +439,1,146,2015-09-23,1,1179 +440,19,143,2016-10-18,2,1425 +441,4,236,2016-12-23,4,2305 +442,21,289,2016-08-25,1,2860 +443,42,39,2016-03-27,4,2896 +444,71,183,2016-11-18,1,2308 +445,91,132,2016-03-25,3,1800 +446,26,209,2016-01-10,5,1921 +447,47,148,2015-08-30,5,2207 +448,90,63,2016-09-22,5,2520 +449,90,228,2016-08-01,5,1818 +450,40,76,2015-10-10,2,1304 +451,2,233,2015-08-17,5,1984 +452,53,139,2015-11-28,4,1398 +453,89,234,2016-04-24,4,2010 +454,82,137,2016-09-22,4,2075 +455,57,219,2015-08-13,5,1748 +456,78,13,2016-03-14,4,1676 +457,83,161,2015-04-23,5,2220 +458,48,285,2016-03-22,2,1897 +459,21,211,2016-03-29,3,1019 +460,34,144,2017-02-16,1,2006 +461,68,236,2016-12-21,2,2069 +462,8,292,2016-07-31,5,2283 +463,95,125,2017-01-16,2,1207 +464,62,237,2016-02-08,4,1132 +465,12,214,2015-08-01,1,2761 +466,18,135,2016-12-17,4,1507 +467,51,139,2016-01-09,2,1665 +468,27,161,2015-04-28,1,1980 +469,61,176,2016-05-01,4,1292 +470,86,253,2016-04-14,3,1052 +471,86,192,2017-01-19,3,2144 +472,2,191,2016-09-07,3,2570 +473,66,223,2016-11-24,4,2251 +474,39,73,2016-08-27,3,2829 +475,30,22,2015-11-24,2,1601 +476,54,38,2015-09-04,5,1786 +477,56,30,2015-10-16,5,1602 +478,31,253,2015-06-26,5,2366 +479,30,250,2016-05-25,2,2440 +480,96,70,2016-06-08,1,2947 +481,81,168,2015-05-20,5,1747 +482,8,194,2016-07-24,2,2650 +483,44,179,2015-07-28,5,1709 +484,52,16,2015-09-30,3,2599 +485,40,287,2016-02-01,5,1626 +486,24,114,2016-04-27,5,2002 +487,82,218,2016-10-09,1,1908 +488,82,90,2016-09-13,1,1646 +489,44,117,2016-06-13,3,1056 +490,47,88,2017-02-07,4,2052 +491,81,27,2016-08-10,3,2649 +492,13,9,2016-07-02,5,2671 +493,79,215,2016-07-09,1,1931 +494,28,269,2015-06-14,3,2136 +495,55,232,2017-02-27,1,1724 +496,4,82,2016-08-03,4,2124 +497,43,153,2016-04-27,3,2524 +498,28,246,2016-12-18,4,2575 +499,69,296,2016-10-04,3,2211 +500,5,74,2015-12-04,2,2749 +501,65,40,2016-03-23,1,1249 +502,98,209,2017-01-11,1,2941 +503,21,104,2015-04-28,1,1160 +504,60,165,2015-05-06,4,1502 +505,74,92,2017-01-18,2,1378 +506,15,144,2015-11-01,5,1439 +507,74,168,2015-09-22,2,1532 +508,77,191,2015-03-11,5,1524 +509,96,99,2015-07-29,5,2738 +510,94,21,2015-11-23,1,2857 +511,4,251,2016-05-10,3,1417 +512,83,274,2017-01-28,5,1626 +513,60,55,2016-05-09,5,2992 +514,89,22,2015-08-31,4,1866 +515,57,275,2017-01-02,5,1152 +516,47,269,2015-09-08,2,2893 +517,98,130,2016-11-23,5,2345 +518,22,283,2016-03-11,2,1132 +519,7,137,2017-02-09,5,1569 +520,3,25,2017-02-10,3,2868 +521,36,270,2016-12-09,3,2059 +522,41,287,2017-01-09,1,2000 +523,93,208,2015-06-22,3,1535 +524,44,133,2015-08-18,1,1931 +525,33,279,2015-03-13,3,1267 +526,63,155,2016-03-15,3,2049 +527,74,280,2016-10-20,5,2534 +528,38,284,2016-07-27,5,2804 +529,35,265,2015-05-14,3,1565 +530,1,196,2016-04-04,1,1726 +531,99,148,2016-07-11,1,1149 +532,52,3,2015-12-27,5,2027 +533,2,200,2015-09-20,3,1776 +534,13,81,2016-09-30,5,2979 +535,62,122,2015-08-11,5,1688 +536,55,294,2015-11-28,1,2916 +537,56,62,2016-10-01,2,2136 +538,93,132,2015-08-01,4,2978 +539,70,222,2015-12-08,4,1006 +540,22,113,2015-08-04,5,2849 +541,98,202,2015-11-04,4,1111 +542,69,256,2015-06-14,1,2397 +543,48,87,2015-10-03,4,1257 +544,36,210,2015-03-13,1,1093 +545,65,102,2015-03-30,3,2637 +546,80,225,2015-11-11,4,2953 +547,21,213,2016-08-24,4,1558 +548,88,277,2015-09-16,1,1399 +549,8,80,2015-04-25,4,2492 +550,92,121,2015-07-20,1,2756 +551,12,5,2016-12-09,1,1318 +552,30,243,2016-10-20,2,2941 +553,1,266,2016-12-16,3,1553 +554,95,172,2015-03-11,4,1449 +555,52,154,2015-08-10,1,2743 +556,59,133,2016-12-18,4,1829 +557,26,232,2015-12-29,2,2885 +558,22,4,2016-01-09,2,1414 +559,2,58,2016-07-19,2,1683 +560,78,296,2016-01-12,3,1414 +561,64,192,2016-10-06,3,1761 +562,80,157,2016-12-24,5,1414 +563,91,225,2016-04-12,3,1393 +564,34,250,2015-09-29,3,2513 +565,25,57,2015-08-01,3,1839 +566,74,94,2017-01-25,3,1798 +567,12,50,2016-12-22,2,2442 +568,15,84,2015-05-28,5,2084 +569,91,41,2016-02-10,3,2584 +570,16,190,2016-04-30,1,1721 +571,54,107,2015-04-12,1,1895 +572,15,215,2017-01-06,5,1859 +573,58,119,2016-06-03,5,2108 +574,69,219,2015-07-20,4,1351 +575,61,292,2016-02-12,1,1946 +576,59,34,2015-05-23,4,2014 +577,95,99,2015-09-10,1,1768 +578,73,140,2016-01-21,5,1487 +579,57,166,2016-03-29,3,2866 +580,45,137,2016-11-27,2,2304 +581,91,85,2015-04-23,1,1294 +582,28,274,2016-06-01,3,2500 +583,47,271,2016-07-21,3,1585 +584,54,291,2015-11-04,2,2498 +585,82,190,2016-10-19,2,2263 +586,57,246,2016-09-18,5,1252 +587,34,250,2016-05-04,1,1892 +588,96,195,2017-02-20,2,1576 +589,46,212,2016-04-19,2,1851 +590,76,197,2016-04-29,3,2961 +591,96,266,2015-08-24,5,1608 +592,34,196,2015-12-16,3,2596 +593,3,158,2015-10-08,5,2059 +594,96,144,2015-05-05,3,2359 +595,26,277,2016-10-04,3,1600 +596,63,81,2017-02-19,4,1499 +597,36,178,2015-12-17,1,2166 +598,18,7,2015-09-16,1,1826 +599,61,225,2016-08-08,2,2239 +600,61,168,2016-04-25,3,2073 diff --git a/RideShare/db/seeds.rb b/RideShare/db/seeds.rb index 1beea2acc..b37748bec 100644 --- a/RideShare/db/seeds.rb +++ b/RideShare/db/seeds.rb @@ -5,3 +5,86 @@ # # movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) # Character.create(name: 'Luke', movie: movies.first) +require 'csv' + +DRIVER_FILE = Rails.root.join('db', 'seed_data', 'drivers.csv') +puts "Loading raw driver data from #{DRIVER_FILE}" + +driver_failures = [] +CSV.foreach(DRIVER_FILE, :headers => true) do |row| + driver = Driver.new + driver.id = row['id'] + driver.name = row['name'] + driver.vin = row['vin'] + successful = driver.save + if !successful + driver_failures << driver + puts "Failed to save driver: #{driver.inspect}" + else + puts "Created driver: #{driver.inspect}" + end +end + +puts "Added #{Driver.count} driver records" +puts "#{driver_failures.length} drivers failed to save" + + + +PASSENGER_FILE = Rails.root.join('db', 'seed_data', 'passengers.csv') +puts "Loading raw passenger data from #{PASSENGER_FILE}" + +passenger_failures = [] +CSV.foreach(PASSENGER_FILE, :headers => true) do |row| + passenger = Passenger.new + passenger.id = row['id'] + passenger.name = row['name'] + passenger.phone_num = row['phone_num'] + successful = passenger.save + if !successful + passenger_failures << passenger + puts "Failed to save passenger: #{passenger.inspect}" + else + puts "Created passenger: #{passenger.inspect}" + end +end + +puts "Added #{Passenger.count} passenger records" +puts "#{passenger_failures.length} passengers failed to save" + + + +TRIP_FILE = Rails.root.join('db', 'seed_data', 'trips.csv') +puts "Loading raw trip data from #{TRIP_FILE}" + +trip_failures = [] +CSV.foreach(TRIP_FILE, :headers => true) do |row| + trip = Trip.new + trip.id = row['id'] + trip.driver_id = row['driver_id'] + trip.passenger_id = row['passenger_id'] + trip.date = Date.strptime(row['date'], '%Y-%m-%d') + trip.rating = row['rating'] + trip.cost = row['cost'] + successful = trip.save + if !successful + trip_failures << trip + puts "Failed to save trip: #{trip.inspect}" + else + puts "Created trip: #{trip.inspect}" + end +end + +puts "Added #{Trip.count} trip records" +puts "#{trip_failures.length} trips failed to save" + + +# Since we set the primary key (the ID) manually on each of the +# tables, we've got to tell postgres to reload the latest ID +# values. Otherwise when we create a new record it will try +# to start at ID 1, which will be a conflict. +puts "Manually resetting PK sequence on each table" +ActiveRecord::Base.connection.tables.each do |t| + ActiveRecord::Base.connection.reset_pk_sequence!(t) +end + +puts "done" From 092a0e7ca671e3aa5ac41161933f32ff1d8e93b2 Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Tue, 3 Apr 2018 17:13:34 -0700 Subject: [PATCH 07/42] We accidently created a rails folder withint the rails folder. So we have to reconfigure the origin rails folder and moved all the files and recreated models and controllers --- RideShare/.gitignore => .gitignore | 0 RideShare/Gemfile => Gemfile | 2 +- RideShare/Gemfile.lock => Gemfile.lock | 2 +- RideShare/Rakefile => Rakefile | 0 RideShare/README.md | 24 - RideShare/db/seed_data/drivers.csv | 101 --- RideShare/db/seed_data/passengers.csv | 301 --------- RideShare/db/seed_data/trips.csv | 597 ------------------ .../app => app}/assets/config/manifest.js | 0 {RideShare/app => app}/assets/images/.keep | 0 .../assets/javascripts/application.js | 0 .../app => app}/assets/javascripts/cable.js | 0 .../assets/javascripts/channels/.keep | 0 .../app => app}/assets/javascripts/drivers.js | 0 .../assets/javascripts/passengers.js | 0 .../app => app}/assets/javascripts/trips.js | 0 .../assets/stylesheets/application.css | 0 .../assets/stylesheets/drivers.scss | 0 .../assets/stylesheets/passengers.scss | 0 .../app => app}/assets/stylesheets/trips.scss | 0 .../channels/application_cable/channel.rb | 0 .../channels/application_cable/connection.rb | 0 .../controllers/application_controller.rb | 0 .../app => app}/controllers/concerns/.keep | 0 .../controllers/drivers_controller.rb | 0 .../controllers/passengers_controller.rb | 2 + .../controllers/trips_controller.rb | 1 - .../app => app}/helpers/application_helper.rb | 0 .../app => app}/helpers/drivers_helper.rb | 0 .../app => app}/helpers/passengers_helper.rb | 0 .../app => app}/helpers/trips_helper.rb | 0 .../app => app}/jobs/application_job.rb | 0 .../app => app}/mailers/application_mailer.rb | 0 .../app => app}/models/application_record.rb | 0 {RideShare/app => app}/models/concerns/.keep | 0 {RideShare/app => app}/models/driver.rb | 0 {RideShare/app => app}/models/passenger.rb | 0 {RideShare/app => app}/models/trip.rb | 0 .../views/layouts/application.html.erb | 2 +- .../app => app}/views/layouts/mailer.html.erb | 0 .../app => app}/views/layouts/mailer.text.erb | 0 {RideShare/bin => bin}/bundle | 0 {RideShare/bin => bin}/rails | 0 {RideShare/bin => bin}/rake | 0 {RideShare/bin => bin}/setup | 0 {RideShare/bin => bin}/spring | 0 {RideShare/bin => bin}/update | 0 {RideShare/bin => bin}/yarn | 0 RideShare/config.ru => config.ru | 0 {RideShare/config => config}/application.rb | 2 +- {RideShare/config => config}/boot.rb | 0 {RideShare/config => config}/cable.yml | 2 +- {RideShare/config => config}/database.yml | 12 +- {RideShare/config => config}/environment.rb | 0 .../environments/development.rb | 0 .../environments/production.rb | 2 +- .../config => config}/environments/test.rb | 0 .../application_controller_renderer.rb | 0 .../config => config}/initializers/assets.rb | 0 .../initializers/backtrace_silencers.rb | 0 .../initializers/cookies_serializer.rb | 0 .../initializers/filter_parameter_logging.rb | 0 .../initializers/inflections.rb | 0 .../initializers/mime_types.rb | 0 .../initializers/wrap_parameters.rb | 0 {RideShare/config => config}/locales/en.yml | 0 {RideShare/config => config}/puma.rb | 0 {RideShare/config => config}/routes.rb | 7 +- {RideShare/config => config}/secrets.yml | 4 +- {RideShare/config => config}/spring.rb | 0 {RideShare/db => db-seeds}/seeds.rb | 7 - ...0180403224723_add_passenger_id_to_trips.rb | 0 .../20180403224928_add_driver_id_to_trips.rb | 0 .../migrate/20180403235918_create_trips.rb | 0 .../migrate/20180404000259_create_drivers.rb | 0 .../20180404000329_create_passengers.rb | 0 {RideShare/db => db}/schema.rb | 2 +- db/seeds.rb | 7 + {RideShare/lib => lib}/assets/.keep | 0 {RideShare/lib => lib}/tasks/.keep | 0 {RideShare/log => log}/.keep | 0 RideShare/package.json => package.json | 2 +- {RideShare/public => public}/404.html | 0 {RideShare/public => public}/422.html | 0 {RideShare/public => public}/500.html | 0 .../apple-touch-icon-precomposed.png | 0 .../public => public}/apple-touch-icon.png | 0 {RideShare/public => public}/favicon.ico | 0 {RideShare/public => public}/robots.txt | 0 .../application_system_test_case.rb | 0 {RideShare/test => test}/controllers/.keep | 0 .../controllers/drivers_controller_test.rb | 0 .../controllers/passengers_controller_test.rb | 0 .../controllers/trips_controller_test.rb | 0 {RideShare/test => test}/fixtures/.keep | 0 {RideShare/test => test}/fixtures/drivers.yml | 0 {RideShare/test => test}/fixtures/files/.keep | 0 .../test => test}/fixtures/passengers.yml | 0 {RideShare/test => test}/fixtures/trips.yml | 0 {RideShare/test => test}/helpers/.keep | 0 {RideShare/test => test}/integration/.keep | 0 {RideShare/test => test}/mailers/.keep | 0 {RideShare/test => test}/models/.keep | 0 .../test => test}/models/driver_test.rb | 0 .../test => test}/models/passenger_test.rb | 0 {RideShare/test => test}/models/trip_test.rb | 0 {RideShare/test => test}/system/.keep | 0 {RideShare/test => test}/test_helper.rb | 0 {RideShare/tmp => tmp}/.keep | 0 {RideShare/vendor => vendor}/.keep | 0 110 files changed, 28 insertions(+), 1051 deletions(-) rename RideShare/.gitignore => .gitignore (100%) rename RideShare/Gemfile => Gemfile (98%) rename RideShare/Gemfile.lock => Gemfile.lock (99%) rename RideShare/Rakefile => Rakefile (100%) delete mode 100644 RideShare/README.md delete mode 100644 RideShare/db/seed_data/drivers.csv delete mode 100644 RideShare/db/seed_data/passengers.csv delete mode 100644 RideShare/db/seed_data/trips.csv rename {RideShare/app => app}/assets/config/manifest.js (100%) rename {RideShare/app => app}/assets/images/.keep (100%) rename {RideShare/app => app}/assets/javascripts/application.js (100%) rename {RideShare/app => app}/assets/javascripts/cable.js (100%) rename {RideShare/app => app}/assets/javascripts/channels/.keep (100%) rename {RideShare/app => app}/assets/javascripts/drivers.js (100%) rename {RideShare/app => app}/assets/javascripts/passengers.js (100%) rename {RideShare/app => app}/assets/javascripts/trips.js (100%) rename {RideShare/app => app}/assets/stylesheets/application.css (100%) rename {RideShare/app => app}/assets/stylesheets/drivers.scss (100%) rename {RideShare/app => app}/assets/stylesheets/passengers.scss (100%) rename {RideShare/app => app}/assets/stylesheets/trips.scss (100%) rename {RideShare/app => app}/channels/application_cable/channel.rb (100%) rename {RideShare/app => app}/channels/application_cable/connection.rb (100%) rename {RideShare/app => app}/controllers/application_controller.rb (100%) rename {RideShare/app => app}/controllers/concerns/.keep (100%) rename {RideShare/app => app}/controllers/drivers_controller.rb (100%) rename {RideShare/app => app}/controllers/passengers_controller.rb (99%) rename {RideShare/app => app}/controllers/trips_controller.rb (99%) rename {RideShare/app => app}/helpers/application_helper.rb (100%) rename {RideShare/app => app}/helpers/drivers_helper.rb (100%) rename {RideShare/app => app}/helpers/passengers_helper.rb (100%) rename {RideShare/app => app}/helpers/trips_helper.rb (100%) rename {RideShare/app => app}/jobs/application_job.rb (100%) rename {RideShare/app => app}/mailers/application_mailer.rb (100%) rename {RideShare/app => app}/models/application_record.rb (100%) rename {RideShare/app => app}/models/concerns/.keep (100%) rename {RideShare/app => app}/models/driver.rb (100%) rename {RideShare/app => app}/models/passenger.rb (100%) rename {RideShare/app => app}/models/trip.rb (100%) rename {RideShare/app => app}/views/layouts/application.html.erb (89%) rename {RideShare/app => app}/views/layouts/mailer.html.erb (100%) rename {RideShare/app => app}/views/layouts/mailer.text.erb (100%) rename {RideShare/bin => bin}/bundle (100%) rename {RideShare/bin => bin}/rails (100%) rename {RideShare/bin => bin}/rake (100%) rename {RideShare/bin => bin}/setup (100%) rename {RideShare/bin => bin}/spring (100%) rename {RideShare/bin => bin}/update (100%) rename {RideShare/bin => bin}/yarn (100%) rename RideShare/config.ru => config.ru (100%) rename {RideShare/config => config}/application.rb (97%) rename {RideShare/config => config}/boot.rb (100%) rename {RideShare/config => config}/cable.yml (72%) rename {RideShare/config => config}/database.yml (92%) rename {RideShare/config => config}/environment.rb (100%) rename {RideShare/config => config}/environments/development.rb (100%) rename {RideShare/config => config}/environments/production.rb (98%) rename {RideShare/config => config}/environments/test.rb (100%) rename {RideShare/config => config}/initializers/application_controller_renderer.rb (100%) rename {RideShare/config => config}/initializers/assets.rb (100%) rename {RideShare/config => config}/initializers/backtrace_silencers.rb (100%) rename {RideShare/config => config}/initializers/cookies_serializer.rb (100%) rename {RideShare/config => config}/initializers/filter_parameter_logging.rb (100%) rename {RideShare/config => config}/initializers/inflections.rb (100%) rename {RideShare/config => config}/initializers/mime_types.rb (100%) rename {RideShare/config => config}/initializers/wrap_parameters.rb (100%) rename {RideShare/config => config}/locales/en.yml (100%) rename {RideShare/config => config}/puma.rb (100%) rename {RideShare/config => config}/routes.rb (68%) rename {RideShare/config => config}/secrets.yml (76%) rename {RideShare/config => config}/spring.rb (100%) rename {RideShare/db => db-seeds}/seeds.rb (86%) rename {RideShare/db => db}/migrate/20180403224723_add_passenger_id_to_trips.rb (100%) rename {RideShare/db => db}/migrate/20180403224928_add_driver_id_to_trips.rb (100%) rename RideShare/db/migrate/20180403190625_create_trips.rb => db/migrate/20180403235918_create_trips.rb (100%) rename RideShare/db/migrate/20180403224142_create_drivers.rb => db/migrate/20180404000259_create_drivers.rb (100%) rename RideShare/db/migrate/20180403192757_create_passengers.rb => db/migrate/20180404000329_create_passengers.rb (100%) rename {RideShare/db => db}/schema.rb (96%) rename {RideShare/lib => lib}/assets/.keep (100%) rename {RideShare/lib => lib}/tasks/.keep (100%) rename {RideShare/log => log}/.keep (100%) rename RideShare/package.json => package.json (60%) rename {RideShare/public => public}/404.html (100%) rename {RideShare/public => public}/422.html (100%) rename {RideShare/public => public}/500.html (100%) rename {RideShare/public => public}/apple-touch-icon-precomposed.png (100%) rename {RideShare/public => public}/apple-touch-icon.png (100%) rename {RideShare/public => public}/favicon.ico (100%) rename {RideShare/public => public}/robots.txt (100%) rename {RideShare/test => test}/application_system_test_case.rb (100%) rename {RideShare/test => test}/controllers/.keep (100%) rename {RideShare/test => test}/controllers/drivers_controller_test.rb (100%) rename {RideShare/test => test}/controllers/passengers_controller_test.rb (100%) rename {RideShare/test => test}/controllers/trips_controller_test.rb (100%) rename {RideShare/test => test}/fixtures/.keep (100%) rename {RideShare/test => test}/fixtures/drivers.yml (100%) rename {RideShare/test => test}/fixtures/files/.keep (100%) rename {RideShare/test => test}/fixtures/passengers.yml (100%) rename {RideShare/test => test}/fixtures/trips.yml (100%) rename {RideShare/test => test}/helpers/.keep (100%) rename {RideShare/test => test}/integration/.keep (100%) rename {RideShare/test => test}/mailers/.keep (100%) rename {RideShare/test => test}/models/.keep (100%) rename {RideShare/test => test}/models/driver_test.rb (100%) rename {RideShare/test => test}/models/passenger_test.rb (100%) rename {RideShare/test => test}/models/trip_test.rb (100%) rename {RideShare/test => test}/system/.keep (100%) rename {RideShare/test => test}/test_helper.rb (100%) rename {RideShare/tmp => tmp}/.keep (100%) rename {RideShare/vendor => vendor}/.keep (100%) diff --git a/RideShare/.gitignore b/.gitignore similarity index 100% rename from RideShare/.gitignore rename to .gitignore diff --git a/RideShare/Gemfile b/Gemfile similarity index 98% rename from RideShare/Gemfile rename to Gemfile index 9f37ac349..a72e49011 100644 --- a/RideShare/Gemfile +++ b/Gemfile @@ -7,7 +7,7 @@ end # Bundle edge Rails instead: gem 'rails', github: 'rails/rails' -gem 'rails', '~> 5.1.5' +gem 'rails', '~> 5.1.6' # Use postgresql as the database for Active Record gem 'pg', '>= 0.18', '< 2.0' # Use Puma as the app server diff --git a/RideShare/Gemfile.lock b/Gemfile.lock similarity index 99% rename from RideShare/Gemfile.lock rename to Gemfile.lock index 8c4827325..aa15b4601 100644 --- a/RideShare/Gemfile.lock +++ b/Gemfile.lock @@ -211,7 +211,7 @@ DEPENDENCIES pg (>= 0.18, < 2.0) pry-rails puma (~> 3.7) - rails (~> 5.1.5) + rails (~> 5.1.6) sass-rails (~> 5.0) selenium-webdriver spring diff --git a/RideShare/Rakefile b/Rakefile similarity index 100% rename from RideShare/Rakefile rename to Rakefile diff --git a/RideShare/README.md b/RideShare/README.md deleted file mode 100644 index 7db80e4ca..000000000 --- a/RideShare/README.md +++ /dev/null @@ -1,24 +0,0 @@ -# README - -This README would normally document whatever steps are necessary to get the -application up and running. - -Things you may want to cover: - -* Ruby version - -* System dependencies - -* Configuration - -* Database creation - -* Database initialization - -* How to run the test suite - -* Services (job queues, cache servers, search engines, etc.) - -* Deployment instructions - -* ... diff --git a/RideShare/db/seed_data/drivers.csv b/RideShare/db/seed_data/drivers.csv deleted file mode 100644 index f31c275eb..000000000 --- a/RideShare/db/seed_data/drivers.csv +++ /dev/null @@ -1,101 +0,0 @@ -id,name,vin -1,Bernardo Prosacco,WBWSS52P9NEYLVDE9 -2,Emory Rosenbaum,1B9WEX2R92R12900E -3,Daryl Nitzsche,SAL6P2M2XNHC5Y656 -4,Jeromy O'Keefe DVM,L1CKRVH55W8S6S9T1 -5,Verla Marquardt,TAMLE35L3MAYRV1JD -6,Mr. Hyman Wolf,L1CXMYNZ3MMGTTYWU -7,Lizeth Dickens,W09XNTZR9KTFK10WW -8,Shania Olson,KPH7TNNL14MDUFNF8 -9,Simone Hackett,4RA34A5K3YPN8H5P4 -10,Dr. Kenton Berge,SXMMLZX8XGDN7L7TL -11,Billy Walsh,SARJG2FD3A7T21H18 -12,Ms. Llewellyn Marquardt,TAMX2B609RPZY1XHT -13,Mr. Delbert Gleason,XF9HBFH148FLD41K8 -14,Antwan Prosacco,KPLUTG0L6NW1A0ZRF -15,Gayle Herzog,L1CDHZJ0567RJKCJ6 -16,Shakira Stamm,SALUVSAL3WA67SBPZ -17,Federico Bins V,W092FDPH6FNNK102M -18,Ms. Kamille Wyman,SUA4ALKJ0YRFMASB2 -19,Bill Denesik,L1C4AHZE55DGBKAK6 -20,Abby Hettinger,1C9511EE4YR35640C -21,Adell Jacobs,RF5J464C70D9C3KTB -22,Devan O'Kon,J811TNPS4FYZF4VGU -23,Bo Stroman DVM,1F8C93JX5D62SYRYY -24,Camryn Hegmann,RF3M0UR85BEJHH27W -25,Briana Braun,SU9PYDRK6214WL15M -26,Palma Conroy PhD,KPLD0JH17AMELZAHH -27,Nicholas Larkin,1F90EY0F4DTJ041CS -28,Ms. Carmelo Swaniawski,9BENHE4130KV2P38S -29,Miss Gustave Erdman,WD3HAS8D0ZT3T9XND -30,Casper Flatley,L1CN7SPD96M6SNFYU -31,Sheila VonRueden,KPH9RLSZ9YKNVMGH2 -32,Belle Rohan,RF4NN09F9JH8738HF -33,Dock Lemke,VF5JF6DT01CWDCAHJ -34,Velma O'Connell,VF63VETH08Y8CUAKW -35,May Rolfson,W09WNXAX60PBK10PH -36,Mr. Marcelina Jenkins,WD3VLLK2X04HF50PL -37,Arnulfo Anderson,WBW8W7DC0FJLMYCCR -38,Albina Dach,1C91DT907AMU5649F -39,Mrs. Skylar Strosin,WD3R6AJ15CPJZLR0T -40,Nicola Blanda IV,SARFDDM35AL1BESM5 -41,Mario Olson,RFWG8S4U59C22CW1F -42,Granville Mertz,1B9TPKC24YPL290Y4 -43,Mr. Kristy Funk,KPLZHRBB1E3RSF9WA -44,Rusty Turner,WBT5XKHH6BKH1V82M -45,Vanessa Hilpert,LLD9S75M72GZX3B1H -46,Junius Daniel,8C9UWXN29AYHME1WB -47,Jerald Robel,J811JTDM3UB2STDX6 -48,Antonietta O'Kon,1G8ZBYM74NYHJK217 -49,Stanford Hills,WD3HFVVW4N1FVPC5X -50,Maye Bauch,1B6FU8M80MVDHHTMD -51,Lane Bogan I,1F8C9NNV613L0RYSM -52,Favian Jaskolski,TAMAMDNT2WGL7H8HW -53,Evie Wisoky,1C9C39EC2XVXACA9T -54,Rogers Bartell IV,1C9EVBRM0YBC564DZ -55,Kaitlin Veum,SAR860AUXSBF8E4W9 -56,Adriel Swift,RF5D1APK7B8SDK1HR -57,Fermin Jakubowski,1C9YKRAL923SACAZM -58,Miss Arnulfo Heathcote,3A9D1R1B4F5K068P9 -59,Kole Stark,DLAZG3L44NFXP9FN0 -60,Oma Swift DDS,TAMCBRPM7EN5GD88L -61,Mrs. Everardo Von,WBTTYCCG00Y9K1VHZ -62,Jimmie Boehm,WD251GUW8HGMJ0ZNZ -63,Zachariah Kertzmann,1F9A1D0651D0041MZ -64,Salvador Sawayn,SUA9K8KA35CZ8X2FT -65,Adriana McKenzie,1B6T67KY436CYBAXM -66,Carey Christiansen I,WBTDYBGY2MKY5XRHV -67,Kelley Prosacco MD,3R9Y9ZMH82KD097KU -68,Iliana Harris,MB4Y2SKH7NX3MRF4W -69,Ernesto Torp,RF4BPA803R4AACTR1 -70,Meaghan Harvey,4RA62BCGXGK0KW7GB -71,Ms. Samantha Becker,SXMYX1NY6A1MPG827 -72,Orlando Huel,MB4Z24VD69SZ2UP0U -73,Augustus Nicolas,SU9FXMPJ2A7KWL1PZ -74,Marley Satterfield IV,DLADW1MKXLHMCDX3W -75,Mohammed Barrows,4RACJHJL843CUJ46R -76,Jay Wintheiser,RF457CL16G5L41HH5 -77,Mr. Shanie Gusikowski,XF9HHMKS402GD41NF -78,Casimir Vandervort,SUA6WS160SW70DUP4 -79,Vivian Fahey,WD3Y8KHA4B7CC63K4 -80,Victoria Windler,1F9DRSRF78XH041L4 -81,Amber Boyer,1F9ZCCZ6XJAG041GX -82,Toney Shields MD,WD3TVFYZ7MB5XVTM8 -83,Charley Kiehn,1B6BESZ55PXV3NB40 -84,Marcellus Little,SUAZR7LR7EL07VZ11 -85,Dr. Lambert Kuhlman,4RAYXBSK2HFSE1PKR -86,Garland Pouros,MB4JNWLU9G5PV1KG4 -87,Jannie Lubowitz,SXM5DVE26JE83TSZV -88,Anthony Sauer DVM,1F9GFDFT6MVU04129 -89,Tracy Huels,GA1G04255VG79LGCD -90,Kristy Cremin,1F9FF7C27LJA041VR -91,Miss Colt Runolfsson,1A9XL31P6FD5396CN -92,Oceane O'Kon,VF4CK0WS3JY0UVDGJ -93,Mrs. Rickey Dickens,5FS0Y47Z59YGGSXS0 -94,Arlo Douglas,SUA0RTWT48E144Z4U -95,Dalton Schiller,8C946K4F3KWRME1PY -96,Miss Cali Huel,TRCDP08V4X1XYADGK -97,Haven O'Keefe,LLD38LYB3ZEN45K2M -98,Ms. Winston Emard,1F9Z5CF13VV8041ND -99,Jayden Ledner,RF4AT3WL6JJXPFUJL -100,Minnie Dach,XF9Z0ST7X18WD41HT diff --git a/RideShare/db/seed_data/passengers.csv b/RideShare/db/seed_data/passengers.csv deleted file mode 100644 index 5e62f136f..000000000 --- a/RideShare/db/seed_data/passengers.csv +++ /dev/null @@ -1,301 +0,0 @@ -id,name,phone_num -1,Nina Hintz Sr.,560.815.3059 -2,Kaia Klocko,(392) 217-0777 -3,Marcellus Hoeger,(222) 926-0138 -4,Ervin Wiza,272-041-9587 -5,Elmore Heller MD,1-297-522-2558 x431 -6,Patience Keeling II,412-432-7640 -7,Emmanuelle Breitenberg,(707) 341-7157 x98757 -8,Dariana Bernhard IV,1-904-093-5211 x9183 -9,Merl Glover III,1-602-620-2330 x3723 -10,Katharina Fisher,686-561-4711 x308 -11,Annalise Orn,222.752.6773 x113 -12,Jean Donnelly,120-307-6251 x164 -13,Dr. Leilani Mertz,777.380.7540 -14,Dortha Wiegand,989.272.6045 -15,Miss Lori Okuneva,(317) 197-0404 x7013 -16,Mr. Onie Spinka,699-582-5703 x5420 -17,Rebekah Hodkiewicz,(311) 542-6559 x86081 -18,Victor Kovacek,(368) 630-0443 x43210 -19,Berenice Abernathy,219-144-2635 -20,Andre Jerde,(958) 349-8093 x50712 -21,Jovani Nienow,941-758-7258 x0683 -22,Gay Mayert,258.896.1072 -23,Kevin Stark,315.906.2450 x6575 -24,Dario Rau MD,(638) 455-9446 x08412 -25,Aric O'Kon,978.529.4671 x523 -26,Golden Marquardt MD,1-866-930-8624 x352 -27,Archibald Nitzsche,(202) 356-9605 x2341 -28,Earlene Bogan,1-295-646-5152 -29,Florence Fisher IV,(229) 074-9445 -30,Tre Hegmann,488.926.3178 x37683 -31,Ms. Enrique Kiehn,416-848-6488 x8656 -32,Melba Torphy,246.356.5591 x70530 -33,Cecilia Klocko,536-163-3265 x70743 -34,Karli Sanford Sr.,(455) 397-6687 x973 -35,Remington Borer V,(273) 637-3904 -36,Tyrese Marvin,1-167-515-8578 x40983 -37,Russ O'Keefe II,1-177-606-1748 x1615 -38,Christian Pacocha,509.994.4549 x681 -39,Logan Bauch,(122) 147-0956 -40,Julius Johns,569-206-0528 x7060 -41,Ms. Westley Pouros,133.000.1809 x9028 -42,Marcelina Howe,656-421-8363 x85791 -43,Dr. Ashlee Roberts,256.402.8661 x519 -44,Mr. Braeden Reichel,589.775.3350 -45,Lavina Friesen,1-213-163-6582 -46,Mr. Barbara Bosco,953-543-7474 x1938 -47,Gavin Ryan IV,(944) 956-4879 x790 -48,Abbey Sporer,(712) 565-9368 x3557 -49,Javier Gulgowski,413.458.3031 x542 -50,Leonie Smith,1-629-453-3416 -51,Beverly Yundt,(480) 234-4903 x6388 -52,Kitty Heaney MD,642-187-8354 x72287 -53,Dedric Goyette,(551) 932-9300 -54,Gracie Emmerich,591-707-1595 x0908 -55,Mrs. Reyes VonRueden,690.953.4563 x550 -56,Rebecca Moen DVM,(117) 028-4562 x913 -57,Dallas Cummings,(215) 874-1092 x902 -58,Dr. Destiny Orn,1-548-683-6914 x436 -59,Granville Price Sr.,477.906.8699 x83635 -60,Hillard Quigley,(683) 403-2725 -61,Lisa Considine,(930) 944-9498 x852 -62,Donato Hirthe II,948-973-3656 -63,Quinn Baumbach,973.104.8233 x51135 -64,Retta Brown,367-989-7333 x822 -65,Webster Koepp,924.531.8045 -66,Claudine Greenholt,790-531-6973 -67,Evie White,292.081.5043 x4294 -68,Jarvis Gislason,353-589-2965 x842 -69,Ansel Robel,465.070.8915 -70,Iva Hickle,449-257-7418 x65480 -71,Mrs. Linnie Armstrong,638.554.8248 -72,Mrs. Agustina Johns,(213) 938-6889 -73,Bertram Schuppe,(265) 815-1732 -74,Felicity Cole,889-451-6215 -75,Krystina Huel DVM,1-658-210-5542 x085 -76,Devin Koss,1-538-085-3994 x66810 -77,Stanford Yundt,1-714-302-1427 x3760 -78,Hassan White III,1-919-281-6741 -79,Dr. Gladys Wilkinson,1-245-565-4763 x153 -80,Celestine Smith,1-256-942-4605 -81,Paolo Lynch,785-170-4077 -82,Charley Rogahn,1-666-034-0080 x3067 -83,Dr. Cullen Hegmann,1-936-768-4709 -84,Annabel Ledner,876-812-8666 -85,Merlin Renner,678-848-0216 x846 -86,Adrien Raynor,585.810.4813 x18518 -87,Ms. Emmalee Orn,736.325.5949 x6548 -88,Conrad Koelpin,286-931-4457 x687 -89,Jace Osinski,1-726-433-7325 x7274 -90,Zackary Willms I,471-731-8253 x6048 -91,Alize Walter III,828.495.1074 x094 -92,Albina Barrows MD,540-301-5133 -93,Kaylie Okuneva IV,(170) 751-2406 -94,Athena Cronin,978.908.7915 x6913 -95,Elinor Ruecker,438-611-5976 x2124 -96,Arnold Kautzer,(570) 494-6697 -97,Winnifred Hoppe,(935) 904-1991 x444 -98,Emelie Feeney,(579) 933-1380 -99,Theresia Hessel,1-440-395-0568 x9245 -100,Hipolito Rogahn,944.179.4883 -101,Mrs. Keanu Gerlach,(314) 234-3272 x1012 -102,Laron Fay,(406) 493-3684 x25626 -103,Marge Cummings,1-862-280-8661 -104,Anibal Douglas,627-506-6152 -105,Earline Crist,(354) 972-3036 x965 -106,Eda Huel,740.330.7670 -107,Winfield Pouros,273-122-8168 -108,Abigayle Rau Jr.,1-761-352-4516 x63527 -109,Thomas Waters V,691.579.4592 x14714 -110,Howard Predovic Jr.,1-929-242-0808 -111,Diamond Harris DDS,242-079-8166 x699 -112,Raphael McCullough II,(986) 895-9022 x981 -113,Miss Spencer Roob,791-036-8385 -114,Khalil Orn,(332) 812-6858 x06506 -115,Ms. Andreanne Littel,550-756-7630 -116,Laurianne Larkin,567.228.1637 x86366 -117,Rossie Luettgen MD,211.322.0450 -118,Nathen Jacobson,212-159-8597 x3145 -119,Miss Armand Treutel,138-649-0336 -120,Kassandra Howell,287.160.1892 x919 -121,Erik Turner III,216-912-1936 x37221 -122,Courtney Boehm,1-192-160-2459 -123,Mr. Stanley Kulas,(676) 335-5666 -124,Willie Cummerata Sr.,700-353-4086 x3607 -125,Kenyon Schneider Jr.,(508) 848-0063 -126,Patsy Boehm,959.070.1254 x901 -127,Alessia Hartmann,920.959.3500 -128,Aisha Tremblay,(144) 832-8234 x900 -129,Aubree Treutel,611.597.4223 -130,Dr. Alyce Beer,(625) 637-3457 x128 -131,Tanya Murphy,(111) 469-0284 -132,Althea Kuhic,719.950.9921 -133,Dr. Kathlyn Robel,1-857-447-4700 x0939 -134,Astrid Schmeler IV,399.941.0742 -135,Kayla O'Keefe,153.456.5323 -136,Jett Schmitt DDS,1-903-807-6445 -137,Miss Xzavier Hills,(474) 751-9123 x613 -138,Miss Frida Abshire,(379) 941-0373 -139,Adah Miller,(139) 629-6031 -140,Mrs. Mayra Halvorson,683.894.4647 x7521 -141,Mrs. Elsa Jacobi,(704) 833-6668 x9214 -142,Armand Kuhlman,1-135-650-4385 x75275 -143,Carolyne Strosin,700-497-7947 x0176 -144,Mollie Farrell,456-557-9294 -145,Miss Paxton Bednar,928-521-7116 x019 -146,Kirk Hand,(175) 727-5781 -147,Trevion Hammes Sr.,1-730-945-0044 x94825 -148,Ms. Noble Kub,139-955-7721 -149,Kendrick Marks,925.035.9247 x52567 -150,Angelita Donnelly III,457.104.0961 -151,Earnest Pacocha,1-110-231-7582 x4319 -152,Kenyatta Wiza,(527) 640-8511 -153,Daisha Zboncak DDS,1-227-712-3316 x290 -154,Crawford Pfeffer,372.588.3654 x152 -155,Rubye Carter MD,999-359-3649 x2266 -156,Ms. Kayleigh Nitzsche,(731) 804-8969 x79457 -157,Yvonne Okuneva IV,(215) 056-6568 x5330 -158,Mr. Johnpaul Muller,794.250.1223 x13918 -159,Celestine Blanda PhD,1-343-220-7104 x266 -160,Garret Hane,248.949.2664 -161,Marques Wyman,935.138.2407 x25556 -162,Tomasa Bruen IV,132.932.3611 x4702 -163,Bailee Yundt,(427) 199-6497 -164,Dominique Gleason PhD,460.497.2371 -165,Mertie Rowe,447-076-7468 -166,Brennon Mohr II,(600) 049-2836 x12982 -167,Mary Fisher Jr.,1-544-400-7690 x822 -168,Hayden Wisozk,(332) 422-8680 x79530 -169,Jaclyn Upton,458-797-3216 -170,Dock Schmeler,549.749.9578 x21020 -171,Brandy Parisian,261.469.8464 x39317 -172,Makenna Lehner,(808) 321-3229 x5707 -173,Mr. Gia Jakubowski,1-257-501-5007 -174,Lempi Steuber,1-552-467-6184 x600 -175,Carter Medhurst,1-932-512-0204 -176,Hellen Frami,875-612-4447 -177,Shanie Witting III,(309) 845-2263 x83317 -178,Lyric Stiedemann,(749) 453-1622 x03482 -179,Vern Pollich,1-411-679-9794 -180,Manuela Homenick,982.094.8497 -181,Talia Kerluke,947.490.0539 -182,Omari Nader PhD,330.940.0404 x71841 -183,Pinkie Friesen,173.979.8010 x88161 -184,Xavier Emard PhD,(259) 254-5545 x4965 -185,Abdullah Williamson,367-713-4754 -186,Rosemarie Jakubowski,648.354.0997 x9988 -187,Crawford Stoltenberg,804.132.9174 x16882 -188,Mae Thiel,464.592.2939 x92569 -189,Mireille Torphy,1-129-905-5327 -190,Elissa Kozey,112-945-3718 x78002 -191,Mrs. Jackie Bernier,1-280-004-6422 x7398 -192,Miss Kraig Rolfson,(467) 611-2679 -193,Thomas Hodkiewicz,221-222-6260 x7867 -194,Mya Carroll MD,887-701-0841 x4737 -195,Destinee Cormier,554-000-1348 x99557 -196,Nyasia McCullough DVM,1-155-862-9800 x3231 -197,Ryleigh Jast,901-199-0271 x8648 -198,Reese Gleason,(431) 508-5681 x223 -199,Mrs. Raymond Legros,(509) 229-8408 -200,Cecil Halvorson III,455-068-4957 x31138 -201,Meredith O'Reilly,(220) 815-0823 -202,Janiya Zieme,1-501-880-8012 x52577 -203,Antoinette Runte,422.554.6019 x7509 -204,Bonnie Beatty,622-776-9773 x922 -205,Miss Clay Larson,(218) 099-2447 -206,Buster Smitham,1-486-953-1839 -207,Lenny Dibbert,1-337-699-8456 x6266 -208,Dina Feeney,1-527-668-1700 x60806 -209,Ms. Rachael Wuckert,1-790-786-0768 x822 -210,Rhea Zieme,940-838-2968 x4910 -211,Ms. Zoila Hoppe,(327) 590-6095 -212,Fletcher Goldner,437-554-0195 x8747 -213,Tabitha Brekke,(559) 664-1251 -214,Stephan Armstrong,1-850-213-2131 x404 -215,Zackary Hoeger,1-650-496-4636 x801 -216,Assunta Waters Jr.,(319) 982-0908 -217,Kira Hagenes,(793) 415-8184 x98200 -218,Jasen Carroll,225.282.3531 x5156 -219,Eladio Gleichner,276-651-5935 x124 -220,Enid Thiel,107-928-8642 x26437 -221,Jerod Abernathy,1-797-846-1991 -222,Mrs. Dominic Hayes,1-497-741-6425 x1655 -223,Cale Konopelski,801.760.8569 -224,Asia Yundt,256.224.2795 -225,Daren Batz DVM,1-628-098-6863 -226,Krystal Wilderman,1-748-755-3350 -227,Abdul Reilly,(592) 156-1310 x2203 -228,Ulices Batz,1-793-027-9928 -229,Randall Streich,411.960.5218 -230,Pierce Hoeger,494.136.6194 -231,Marley Cassin,791-451-8440 -232,Creola Bernier PhD,(138) 423-1993 x0341 -233,Ernestine Pfannerstill,(664) 208-7421 x310 -234,Delfina Bogisich,801-784-9149 -235,Mrs. Dustin Kub,148.363.7787 x995 -236,Jamil Kovacek,1-321-312-2459 x3205 -237,Miss Cathy Herman,(186) 628-7305 x078 -238,Heber Romaguera,1-580-581-8405 x079 -239,Tyreek Skiles,260-267-8750 -240,Eliseo Labadie,709-104-6748 x4468 -241,Dr. Keon Ruecker,976.616.1240 x8187 -242,Kailee Hickle Sr.,971-698-0478 x3506 -243,Asa Satterfield,121.792.5214 x46603 -244,Orrin Greenfelder,146.285.1152 -245,Eleonore Berge,937-238-2536 -246,Edyth Miller,(140) 409-9130 x496 -247,Ms. Chadd Leannon,221-039-2173 x454 -248,Kamryn Sporer,1-670-453-8435 -249,Halle Durgan,183-077-0300 x9865 -250,Kylie Cartwright,734.297.0789 x3288 -251,Jillian Klocko,699-005-5878 -252,Cameron Casper IV,377-047-7349 -253,Mrs. Keara Kozey,1-710-354-9533 x65384 -254,Meaghan Williamson,848.077.5455 -255,Mr. Dustin Stroman,769.167.6194 x749 -256,Kiara Kuhn,458.159.0504 x540 -257,Annette Volkman Jr.,1-310-932-4684 -258,Kim Bayer,(495) 861-7483 x05907 -259,Kristopher Collins Jr.,893-517-8880 x5568 -260,Arch Koepp,241.009.9299 x0597 -261,Davion Pacocha DDS,1-971-034-3299 x71384 -262,Erick Lind,(905) 731-2328 -263,Autumn Borer IV,(496) 807-7783 -264,Mrs. Odell Raynor,1-729-057-3767 x80278 -265,Dessie Crist,872.740.9928 -266,Kadin Olson,400.669.3623 x71791 -267,Brandyn Hand,1-120-738-6015 x9899 -268,Jocelyn Roberts,(134) 882-5516 x0662 -269,April Zemlak,363-485-0115 -270,Ms. Tyrel Torp,299.389.6335 -271,Rollin Halvorson,1-800-820-5456 x42342 -272,Dr. Jack Lebsack,554.333.4552 -273,Shakira Satterfield IV,1-392-813-5637 -274,Marcellus Kris,918.143.9835 -275,Shayna Johns,918-224-0806 x508 -276,Edwin Douglas,1-391-957-6932 x99099 -277,Belle Bechtelar,963.085.7338 x23232 -278,Kendall Wintheiser,250-123-1768 x501 -279,Prince Gleason,1-788-221-4269 -280,Mrs. Dorothy Gottlieb,113-328-3377 -281,Hilton DuBuque,852-915-4336 x96432 -282,Josephine Schoen MD,1-443-726-9947 x443 -283,Clementina Rippin I,582.914.0385 x721 -284,Mrs. Yesenia Hane,489-348-0781 x4487 -285,Maddison Reilly,330.376.9142 x12921 -286,Earnest Tromp,400.748.7179 x869 -287,Creola Kautzer,(506) 363-4376 -288,Ellsworth Gerlach,1-165-188-9350 x79027 -289,Christ Marks,(686) 795-4097 -290,Quinn Tillman,1-792-899-2953 x22718 -291,Bria Bosco,1-395-934-4923 -292,Reba Kozey III,660-848-9493 x0680 -293,Mr. Adrianna Auer,655.823.7582 x23010 -294,Mr. Ola Sporer,1-916-091-1165 -295,Craig Corwin Sr.,(401) 722-0045 -296,Juana Murray,886.998.6304 -297,Jamal Pfannerstill,1-446-501-3373 x5818 -298,Maybelle Wilkinson,569.532.1204 -299,Sanford Leannon,190.916.9114 x1396 -300,Miss Isom Gleason,791-114-8423 x70188 diff --git a/RideShare/db/seed_data/trips.csv b/RideShare/db/seed_data/trips.csv deleted file mode 100644 index 9049ff299..000000000 --- a/RideShare/db/seed_data/trips.csv +++ /dev/null @@ -1,597 +0,0 @@ -id,driver_id,passenger_id,date,rating,cost -1,1,54,2016-04-05,3,1293 -2,67,146,2016-01-13,5,2157 -3,50,87,2016-05-02,3,1181 -4,13,70,2016-05-14,4,2436 -5,3,12,2015-12-14,2,1406 -6,48,137,2016-06-02,5,1474 -7,84,236,2015-05-20,4,2476 -8,93,104,2016-08-08,5,1424 -9,17,286,2016-03-03,5,2347 -10,8,263,2015-12-14,5,2329 -11,71,149,2016-01-12,1,2043 -12,12,237,2016-08-21,1,2671 -13,83,298,2015-05-27,5,1287 -14,48,247,2015-09-13,1,2865 -15,26,143,2016-06-17,5,2071 -16,25,259,2016-05-25,5,2129 -17,21,63,2015-08-23,4,2876 -18,72,192,2017-01-10,1,2796 -19,5,140,2016-02-16,5,1388 -20,3,8,2016-02-05,1,2526 -21,71,16,2016-10-16,2,1884 -22,96,275,2015-03-13,1,1809 -23,51,189,2015-05-02,5,2882 -24,75,280,2015-11-04,4,1092 -25,21,257,2016-05-17,4,2369 -26,92,194,2016-12-08,3,2923 -27,9,158,2015-03-12,4,2180 -28,57,40,2016-03-12,4,1900 -29,45,127,2016-02-02,3,2919 -30,28,230,2016-10-12,5,2027 -31,66,113,2015-07-15,3,1148 -32,20,57,2016-06-17,5,1659 -33,92,31,2015-12-09,5,2655 -34,94,41,2016-05-30,3,1406 -35,84,148,2016-12-10,2,2363 -36,38,154,2017-02-08,2,2364 -37,49,80,2016-04-01,4,1465 -38,16,281,2016-06-13,2,1764 -39,48,191,2016-06-03,2,1906 -40,76,221,2017-01-30,2,2437 -41,56,35,2015-10-22,5,1361 -42,69,267,2017-01-14,2,2277 -43,38,135,2016-11-08,1,2095 -44,17,146,2016-03-06,5,2888 -45,57,284,2017-01-28,4,1089 -46,98,1,2016-06-28,2,2070 -47,88,157,2016-05-12,2,1447 -48,73,202,2015-06-24,1,1203 -49,26,266,2015-11-15,2,2564 -50,47,277,2015-10-12,4,1155 -51,64,275,2015-07-01,5,2342 -52,21,254,2015-11-07,1,1477 -53,9,119,2015-04-02,5,1170 -54,99,149,2015-11-27,1,2972 -55,15,161,2015-07-31,1,1103 -56,31,85,2016-05-24,2,1396 -57,40,237,2015-10-21,3,2746 -58,91,240,2016-06-13,4,2328 -59,97,65,2016-03-09,4,1680 -60,57,190,2015-08-09,1,2726 -61,4,254,2016-11-21,2,2999 -62,29,253,2016-08-18,5,2960 -63,36,293,2016-07-14,2,1039 -64,58,118,2015-06-19,1,1680 -65,49,258,2015-06-03,5,1802 -66,26,274,2016-03-15,3,2507 -67,9,77,2015-11-14,4,2112 -68,94,53,2015-09-24,2,1722 -69,29,226,2016-10-20,1,2694 -70,3,162,2016-09-09,3,2039 -71,42,29,2015-05-26,2,2477 -72,7,62,2016-03-19,3,2871 -73,87,296,2015-10-26,2,1118 -74,94,118,2015-03-18,4,2800 -75,19,44,2015-10-25,5,1271 -76,51,164,2016-10-09,5,2620 -77,40,205,2016-05-18,2,2486 -78,52,70,2015-12-23,1,2463 -79,30,222,2017-02-01,5,1704 -80,88,175,2016-07-05,1,1861 -81,60,241,2016-05-22,2,1222 -82,23,221,2015-12-14,3,2299 -84,61,217,2015-04-19,4,1666 -85,90,86,2017-02-05,3,2428 -86,99,211,2015-06-26,5,2732 -87,20,138,2016-06-10,2,1030 -89,92,183,2015-11-19,5,1666 -90,48,288,2015-03-17,4,1962 -91,42,81,2015-04-20,4,1838 -92,10,80,2015-05-13,1,2563 -93,57,19,2015-06-25,5,2568 -94,47,139,2015-06-19,5,1105 -95,97,118,2016-03-06,1,2224 -96,73,97,2016-12-14,1,1474 -97,54,271,2016-06-14,5,1151 -98,65,172,2016-09-18,1,1218 -99,29,107,2015-07-03,4,1268 -100,29,138,2016-09-04,2,2547 -101,70,225,2016-06-24,1,1246 -102,58,70,2015-07-11,1,1183 -103,72,26,2015-08-03,4,2604 -104,85,272,2015-04-27,4,1295 -105,44,246,2016-09-19,5,2738 -106,65,45,2017-01-05,3,1620 -107,54,254,2015-11-18,2,2888 -108,43,90,2016-11-13,4,2786 -109,5,165,2016-07-01,5,2189 -110,83,140,2016-12-30,1,1538 -111,90,273,2015-12-14,3,1400 -112,78,145,2016-01-15,1,2442 -113,45,188,2016-12-30,3,2889 -114,2,87,2015-08-29,3,1662 -115,16,35,2015-11-22,5,1502 -116,84,129,2015-05-16,2,2199 -117,82,111,2016-12-27,2,2390 -118,2,234,2016-01-07,5,2353 -119,55,278,2016-12-04,3,1244 -120,40,153,2015-07-14,2,1370 -121,29,106,2016-11-27,1,1802 -122,1,247,2015-12-24,5,2510 -123,10,280,2015-11-27,4,1827 -124,1,26,2016-10-16,4,1553 -125,48,35,2015-09-14,1,1752 -126,46,56,2016-10-31,3,1426 -127,30,15,2016-10-11,3,1764 -128,55,249,2015-05-21,2,2254 -129,54,122,2015-12-02,3,2239 -130,46,273,2016-01-02,1,1129 -131,51,172,2015-07-25,4,1199 -132,5,113,2017-02-10,5,2391 -133,12,240,2015-04-05,1,2820 -134,73,32,2017-02-26,2,2195 -135,77,146,2016-05-05,5,1945 -136,38,147,2015-10-02,3,1275 -137,45,162,2015-04-05,1,2360 -138,5,192,2016-08-16,3,1280 -139,56,88,2016-03-25,5,1463 -140,2,206,2015-07-21,2,1514 -141,11,19,2016-08-27,2,1387 -142,40,294,2016-05-26,1,1515 -143,59,277,2016-10-06,4,2348 -144,48,170,2017-03-01,3,1569 -145,58,185,2015-08-23,1,1244 -146,38,102,2017-01-20,4,2034 -147,58,28,2015-04-20,3,1779 -148,48,133,2015-07-07,4,1005 -149,32,183,2015-04-12,1,2139 -150,56,40,2016-01-17,1,1736 -151,80,273,2015-07-13,1,2528 -152,45,135,2016-03-25,3,1666 -153,45,110,2016-05-10,1,2669 -155,65,194,2016-07-17,2,2889 -156,94,41,2017-01-01,4,1373 -157,53,291,2016-04-18,3,1982 -158,80,207,2016-03-09,4,2663 -159,8,285,2016-12-31,5,2116 -160,26,101,2016-01-30,4,2971 -161,50,245,2016-07-15,2,2602 -162,6,93,2015-03-09,4,1469 -163,17,225,2017-03-01,3,2648 -164,38,26,2015-12-04,4,1912 -165,67,236,2015-10-25,5,1671 -166,31,278,2015-08-27,1,2098 -167,67,37,2017-01-17,5,1220 -168,21,179,2016-12-04,4,2421 -169,6,204,2015-05-19,4,2416 -170,92,6,2016-10-12,3,1651 -171,13,181,2017-01-06,1,1998 -172,77,214,2017-01-07,2,2321 -173,93,57,2016-08-28,1,2725 -174,88,121,2016-10-30,3,1180 -175,44,249,2016-06-05,4,1520 -176,11,139,2017-02-05,5,2772 -177,65,119,2016-04-26,2,2481 -178,82,291,2017-01-12,3,2708 -179,8,93,2016-06-15,1,2032 -180,81,164,2017-01-28,3,2458 -181,22,284,2015-05-06,5,1339 -182,64,111,2016-07-14,4,1440 -183,70,132,2016-03-03,2,2274 -184,75,93,2016-04-01,2,2353 -185,98,83,2015-03-09,4,1261 -186,52,77,2016-07-12,3,1605 -187,60,164,2016-07-01,3,1496 -188,71,124,2016-01-17,2,2230 -189,73,268,2016-11-26,1,2967 -190,14,265,2015-04-22,5,2712 -191,9,197,2016-09-21,1,2528 -192,69,74,2015-03-17,3,2152 -193,83,165,2016-10-24,4,2945 -194,4,207,2017-02-15,5,1606 -195,54,30,2015-11-25,5,1615 -196,80,288,2015-06-22,2,2957 -197,95,162,2015-11-22,5,2223 -198,36,17,2015-07-23,1,1827 -199,92,18,2017-01-30,1,1360 -200,93,186,2016-06-04,3,2610 -201,20,161,2016-02-20,1,2429 -202,40,250,2016-04-05,3,2387 -203,97,85,2016-12-31,2,1010 -204,98,12,2015-06-09,2,1124 -205,87,131,2015-07-09,2,2266 -206,47,225,2015-03-08,2,1288 -207,70,59,2016-09-24,1,1077 -208,46,92,2016-06-13,2,2450 -209,94,141,2016-10-30,1,1200 -210,81,164,2015-07-14,5,1124 -211,34,208,2016-06-22,3,1122 -212,28,89,2015-06-03,1,1744 -213,32,197,2015-12-27,5,2353 -214,78,230,2016-12-31,1,2573 -215,41,233,2016-10-09,3,1692 -216,1,201,2015-03-24,1,1890 -217,78,274,2016-09-11,4,1018 -218,11,147,2016-04-03,2,2675 -219,3,171,2016-03-12,4,2326 -220,56,254,2016-02-13,3,1788 -221,25,207,2016-09-07,1,1362 -222,83,284,2016-12-01,5,1066 -223,61,289,2016-05-15,1,1549 -224,57,141,2016-11-16,3,1722 -225,28,67,2015-03-24,4,2944 -226,8,183,2016-09-26,3,1354 -227,11,198,2016-06-21,2,1136 -228,18,19,2015-10-10,5,1091 -229,25,67,2015-11-02,5,2103 -230,99,233,2016-10-12,4,1138 -231,66,76,2015-05-11,2,2612 -232,92,281,2017-02-07,3,2506 -233,80,191,2016-03-27,5,2005 -234,85,234,2016-12-08,2,2838 -235,81,229,2015-12-10,2,1547 -236,2,263,2015-12-08,2,1506 -237,17,170,2016-08-09,2,1816 -238,83,209,2016-12-19,5,2697 -239,52,177,2015-03-19,3,1948 -240,44,272,2017-01-15,4,1760 -241,89,274,2015-12-08,5,2847 -242,34,14,2016-01-26,4,2185 -243,44,90,2016-09-14,2,2592 -244,82,193,2016-10-12,3,2068 -245,62,34,2016-04-24,2,1818 -246,59,26,2015-07-02,2,1584 -247,3,290,2016-03-09,4,1033 -248,66,214,2015-06-16,5,2534 -249,17,7,2015-09-27,3,1829 -250,69,203,2016-04-14,1,2575 -251,54,265,2016-11-08,5,1565 -252,25,152,2016-01-26,4,1953 -253,17,200,2016-12-28,3,2247 -254,4,37,2015-08-17,3,2221 -255,45,62,2015-10-15,4,1568 -256,11,22,2015-10-29,4,1541 -257,26,141,2016-01-30,2,1388 -258,51,213,2016-06-26,4,1883 -259,38,163,2016-12-05,4,2137 -260,42,258,2015-12-14,1,1827 -261,45,136,2016-03-24,4,2034 -262,19,164,2015-08-15,1,1663 -263,30,108,2017-02-13,3,1699 -264,32,128,2016-09-02,5,1353 -265,12,85,2015-08-27,5,1305 -266,66,176,2015-03-08,1,2547 -268,42,154,2015-05-22,2,1332 -269,17,238,2016-01-24,3,2289 -270,70,210,2016-02-15,5,2841 -271,88,295,2015-03-12,3,1699 -272,17,1,2015-09-14,4,1652 -273,7,88,2015-07-26,3,1174 -274,25,6,2016-06-24,3,2806 -275,68,120,2016-04-02,5,2755 -276,7,204,2015-10-20,2,2583 -277,18,87,2015-09-21,3,2937 -278,83,220,2015-10-02,1,1467 -279,47,278,2015-04-02,3,2115 -280,97,198,2016-10-03,4,2548 -281,20,288,2015-03-11,3,1172 -282,52,288,2016-10-10,4,1313 -283,21,69,2015-08-20,3,2025 -284,42,246,2015-04-23,2,1469 -285,65,88,2015-10-19,5,2715 -286,60,226,2016-11-11,5,2740 -287,74,78,2016-01-29,2,2653 -288,70,140,2015-09-26,2,1923 -289,60,86,2015-05-19,2,1408 -290,19,16,2016-06-13,5,1241 -291,95,235,2015-06-07,4,2329 -292,15,77,2016-08-25,5,2870 -293,15,83,2016-08-01,2,1556 -294,54,232,2015-10-06,2,2262 -295,6,87,2015-08-14,1,2816 -296,29,158,2016-06-30,3,1881 -297,19,7,2016-02-27,5,2002 -298,59,70,2016-10-28,2,1933 -299,55,85,2015-11-01,2,2918 -300,90,251,2016-01-31,2,2959 -301,69,295,2015-07-11,2,2448 -302,16,103,2015-12-11,1,2938 -303,98,203,2016-06-28,2,1822 -304,91,211,2015-07-10,1,1549 -305,69,232,2015-05-19,5,2735 -306,49,89,2017-02-03,1,1642 -307,93,240,2015-11-26,4,2039 -308,5,265,2015-09-22,3,2459 -309,45,210,2015-03-17,2,2139 -310,80,88,2017-01-22,4,1252 -311,17,76,2016-03-21,3,1845 -312,3,279,2015-10-07,1,2579 -313,35,171,2016-09-18,1,1204 -314,77,176,2016-02-06,3,1834 -315,49,79,2016-02-18,2,1832 -316,84,154,2015-03-13,2,2531 -317,84,168,2016-09-17,4,2334 -318,67,217,2015-09-14,5,2810 -319,5,164,2016-02-03,1,1507 -320,53,204,2015-04-07,1,1784 -321,72,148,2015-09-28,3,2289 -322,9,154,2016-06-07,3,2579 -323,16,242,2016-02-11,2,2388 -324,28,254,2015-04-10,5,2488 -325,79,156,2015-07-18,4,1111 -326,52,127,2015-10-13,1,1358 -327,72,56,2015-10-13,2,2599 -328,54,192,2016-03-10,1,1517 -329,49,75,2015-12-10,3,2694 -330,8,137,2015-11-10,3,2430 -331,40,280,2015-08-22,5,2374 -332,81,96,2017-01-22,3,1845 -333,75,80,2015-05-29,4,1120 -334,70,231,2016-01-03,1,1914 -335,90,243,2016-06-24,3,2384 -336,42,244,2016-09-11,1,2498 -337,31,45,2016-11-10,2,1241 -338,67,51,2016-12-30,1,2967 -339,8,182,2016-08-07,2,2968 -340,51,142,2016-01-03,4,1213 -341,96,3,2016-02-28,2,2427 -342,39,54,2016-02-29,2,1027 -343,23,170,2015-08-28,3,1500 -344,43,249,2016-02-26,3,1557 -345,13,99,2015-03-26,5,2923 -346,39,293,2016-07-19,3,2883 -347,5,74,2016-06-09,4,1351 -348,76,51,2015-08-13,2,1263 -349,44,105,2016-07-01,4,2749 -350,78,179,2016-01-31,5,1255 -351,87,79,2015-06-08,5,1781 -352,13,88,2016-08-06,4,1256 -353,22,24,2016-11-26,3,2745 -354,95,120,2015-03-28,3,1035 -355,54,45,2015-04-02,2,2060 -356,46,292,2016-11-24,1,2419 -357,69,239,2016-05-01,2,2268 -358,32,58,2015-04-20,1,1294 -359,41,230,2015-07-18,2,1101 -360,20,133,2016-05-06,2,2988 -361,72,136,2016-05-13,3,2071 -362,33,237,2016-01-30,4,2597 -363,72,246,2016-11-05,1,2922 -364,4,257,2016-01-15,5,1029 -365,45,151,2015-04-05,2,2463 -366,76,260,2017-01-19,1,2234 -367,71,45,2017-02-07,2,2370 -368,20,179,2015-03-16,3,2274 -369,65,224,2016-10-05,4,2264 -370,97,159,2015-12-06,5,2270 -371,41,218,2015-08-07,1,1274 -372,90,63,2015-05-22,2,1743 -373,15,281,2016-05-09,4,2626 -374,78,240,2015-09-06,2,1413 -375,81,211,2016-01-20,2,2563 -376,66,97,2016-05-08,5,2001 -377,36,252,2015-06-01,2,2075 -378,21,59,2015-05-18,1,1698 -379,63,172,2016-04-04,2,1477 -380,83,262,2017-01-25,4,1652 -381,77,12,2015-06-13,5,1087 -382,58,113,2015-10-06,4,2361 -383,10,2,2015-07-14,2,1108 -384,91,212,2015-08-10,4,1417 -385,12,208,2016-09-20,1,2367 -386,58,236,2015-07-03,1,1068 -387,95,245,2016-06-06,5,2397 -388,37,265,2015-11-30,3,1988 -389,34,195,2015-10-08,1,2227 -390,39,170,2016-06-18,4,1711 -391,59,238,2016-05-09,3,1550 -392,19,62,2016-12-24,5,2972 -393,98,290,2015-08-22,5,2562 -394,85,180,2015-05-01,2,2557 -395,30,214,2016-04-27,4,1587 -396,80,137,2017-02-01,5,1281 -397,92,276,2015-12-31,3,2588 -398,54,220,2016-08-07,4,1627 -399,64,144,2017-01-30,2,1814 -400,9,132,2016-10-19,5,1836 -401,41,231,2016-06-15,2,2431 -402,64,33,2017-02-19,3,1015 -403,24,181,2016-11-06,3,2772 -404,71,44,2016-12-11,4,2289 -405,34,125,2015-08-14,5,2950 -406,77,248,2015-08-07,5,2698 -407,95,240,2015-07-21,5,1425 -408,98,124,2015-05-08,5,1743 -409,64,202,2016-03-01,1,1782 -410,72,189,2016-09-11,1,2156 -411,82,61,2016-03-18,1,1440 -412,21,243,2015-05-28,4,2261 -413,71,167,2016-04-14,1,1853 -414,84,196,2016-04-16,2,1775 -415,10,169,2016-08-03,5,2216 -416,78,20,2016-01-23,4,2122 -417,1,129,2015-03-29,1,2791 -418,28,235,2016-08-13,4,2460 -419,34,81,2016-04-13,3,1683 -420,99,92,2016-10-08,1,1105 -421,46,92,2016-04-10,1,1114 -422,38,85,2016-06-24,2,2812 -423,99,245,2016-06-29,5,2970 -424,66,139,2016-09-18,2,2916 -425,18,257,2016-01-09,4,1446 -426,60,205,2016-08-28,2,2686 -427,74,12,2015-04-18,5,1474 -428,16,105,2016-11-22,4,2102 -429,43,163,2015-08-11,4,2334 -430,3,15,2016-02-10,5,1917 -431,12,197,2016-08-11,5,2665 -432,22,57,2016-09-15,3,2347 -433,64,225,2016-12-22,1,2056 -434,1,112,2015-06-07,2,2779 -435,49,267,2015-09-12,4,1790 -436,58,182,2017-01-06,2,1194 -437,13,132,2016-07-20,5,2701 -438,4,85,2015-09-17,4,2703 -439,1,146,2015-09-23,1,1179 -440,19,143,2016-10-18,2,1425 -441,4,236,2016-12-23,4,2305 -442,21,289,2016-08-25,1,2860 -443,42,39,2016-03-27,4,2896 -444,71,183,2016-11-18,1,2308 -445,91,132,2016-03-25,3,1800 -446,26,209,2016-01-10,5,1921 -447,47,148,2015-08-30,5,2207 -448,90,63,2016-09-22,5,2520 -449,90,228,2016-08-01,5,1818 -450,40,76,2015-10-10,2,1304 -451,2,233,2015-08-17,5,1984 -452,53,139,2015-11-28,4,1398 -453,89,234,2016-04-24,4,2010 -454,82,137,2016-09-22,4,2075 -455,57,219,2015-08-13,5,1748 -456,78,13,2016-03-14,4,1676 -457,83,161,2015-04-23,5,2220 -458,48,285,2016-03-22,2,1897 -459,21,211,2016-03-29,3,1019 -460,34,144,2017-02-16,1,2006 -461,68,236,2016-12-21,2,2069 -462,8,292,2016-07-31,5,2283 -463,95,125,2017-01-16,2,1207 -464,62,237,2016-02-08,4,1132 -465,12,214,2015-08-01,1,2761 -466,18,135,2016-12-17,4,1507 -467,51,139,2016-01-09,2,1665 -468,27,161,2015-04-28,1,1980 -469,61,176,2016-05-01,4,1292 -470,86,253,2016-04-14,3,1052 -471,86,192,2017-01-19,3,2144 -472,2,191,2016-09-07,3,2570 -473,66,223,2016-11-24,4,2251 -474,39,73,2016-08-27,3,2829 -475,30,22,2015-11-24,2,1601 -476,54,38,2015-09-04,5,1786 -477,56,30,2015-10-16,5,1602 -478,31,253,2015-06-26,5,2366 -479,30,250,2016-05-25,2,2440 -480,96,70,2016-06-08,1,2947 -481,81,168,2015-05-20,5,1747 -482,8,194,2016-07-24,2,2650 -483,44,179,2015-07-28,5,1709 -484,52,16,2015-09-30,3,2599 -485,40,287,2016-02-01,5,1626 -486,24,114,2016-04-27,5,2002 -487,82,218,2016-10-09,1,1908 -488,82,90,2016-09-13,1,1646 -489,44,117,2016-06-13,3,1056 -490,47,88,2017-02-07,4,2052 -491,81,27,2016-08-10,3,2649 -492,13,9,2016-07-02,5,2671 -493,79,215,2016-07-09,1,1931 -494,28,269,2015-06-14,3,2136 -495,55,232,2017-02-27,1,1724 -496,4,82,2016-08-03,4,2124 -497,43,153,2016-04-27,3,2524 -498,28,246,2016-12-18,4,2575 -499,69,296,2016-10-04,3,2211 -500,5,74,2015-12-04,2,2749 -501,65,40,2016-03-23,1,1249 -502,98,209,2017-01-11,1,2941 -503,21,104,2015-04-28,1,1160 -504,60,165,2015-05-06,4,1502 -505,74,92,2017-01-18,2,1378 -506,15,144,2015-11-01,5,1439 -507,74,168,2015-09-22,2,1532 -508,77,191,2015-03-11,5,1524 -509,96,99,2015-07-29,5,2738 -510,94,21,2015-11-23,1,2857 -511,4,251,2016-05-10,3,1417 -512,83,274,2017-01-28,5,1626 -513,60,55,2016-05-09,5,2992 -514,89,22,2015-08-31,4,1866 -515,57,275,2017-01-02,5,1152 -516,47,269,2015-09-08,2,2893 -517,98,130,2016-11-23,5,2345 -518,22,283,2016-03-11,2,1132 -519,7,137,2017-02-09,5,1569 -520,3,25,2017-02-10,3,2868 -521,36,270,2016-12-09,3,2059 -522,41,287,2017-01-09,1,2000 -523,93,208,2015-06-22,3,1535 -524,44,133,2015-08-18,1,1931 -525,33,279,2015-03-13,3,1267 -526,63,155,2016-03-15,3,2049 -527,74,280,2016-10-20,5,2534 -528,38,284,2016-07-27,5,2804 -529,35,265,2015-05-14,3,1565 -530,1,196,2016-04-04,1,1726 -531,99,148,2016-07-11,1,1149 -532,52,3,2015-12-27,5,2027 -533,2,200,2015-09-20,3,1776 -534,13,81,2016-09-30,5,2979 -535,62,122,2015-08-11,5,1688 -536,55,294,2015-11-28,1,2916 -537,56,62,2016-10-01,2,2136 -538,93,132,2015-08-01,4,2978 -539,70,222,2015-12-08,4,1006 -540,22,113,2015-08-04,5,2849 -541,98,202,2015-11-04,4,1111 -542,69,256,2015-06-14,1,2397 -543,48,87,2015-10-03,4,1257 -544,36,210,2015-03-13,1,1093 -545,65,102,2015-03-30,3,2637 -546,80,225,2015-11-11,4,2953 -547,21,213,2016-08-24,4,1558 -548,88,277,2015-09-16,1,1399 -549,8,80,2015-04-25,4,2492 -550,92,121,2015-07-20,1,2756 -551,12,5,2016-12-09,1,1318 -552,30,243,2016-10-20,2,2941 -553,1,266,2016-12-16,3,1553 -554,95,172,2015-03-11,4,1449 -555,52,154,2015-08-10,1,2743 -556,59,133,2016-12-18,4,1829 -557,26,232,2015-12-29,2,2885 -558,22,4,2016-01-09,2,1414 -559,2,58,2016-07-19,2,1683 -560,78,296,2016-01-12,3,1414 -561,64,192,2016-10-06,3,1761 -562,80,157,2016-12-24,5,1414 -563,91,225,2016-04-12,3,1393 -564,34,250,2015-09-29,3,2513 -565,25,57,2015-08-01,3,1839 -566,74,94,2017-01-25,3,1798 -567,12,50,2016-12-22,2,2442 -568,15,84,2015-05-28,5,2084 -569,91,41,2016-02-10,3,2584 -570,16,190,2016-04-30,1,1721 -571,54,107,2015-04-12,1,1895 -572,15,215,2017-01-06,5,1859 -573,58,119,2016-06-03,5,2108 -574,69,219,2015-07-20,4,1351 -575,61,292,2016-02-12,1,1946 -576,59,34,2015-05-23,4,2014 -577,95,99,2015-09-10,1,1768 -578,73,140,2016-01-21,5,1487 -579,57,166,2016-03-29,3,2866 -580,45,137,2016-11-27,2,2304 -581,91,85,2015-04-23,1,1294 -582,28,274,2016-06-01,3,2500 -583,47,271,2016-07-21,3,1585 -584,54,291,2015-11-04,2,2498 -585,82,190,2016-10-19,2,2263 -586,57,246,2016-09-18,5,1252 -587,34,250,2016-05-04,1,1892 -588,96,195,2017-02-20,2,1576 -589,46,212,2016-04-19,2,1851 -590,76,197,2016-04-29,3,2961 -591,96,266,2015-08-24,5,1608 -592,34,196,2015-12-16,3,2596 -593,3,158,2015-10-08,5,2059 -594,96,144,2015-05-05,3,2359 -595,26,277,2016-10-04,3,1600 -596,63,81,2017-02-19,4,1499 -597,36,178,2015-12-17,1,2166 -598,18,7,2015-09-16,1,1826 -599,61,225,2016-08-08,2,2239 -600,61,168,2016-04-25,3,2073 diff --git a/RideShare/app/assets/config/manifest.js b/app/assets/config/manifest.js similarity index 100% rename from RideShare/app/assets/config/manifest.js rename to app/assets/config/manifest.js diff --git a/RideShare/app/assets/images/.keep b/app/assets/images/.keep similarity index 100% rename from RideShare/app/assets/images/.keep rename to app/assets/images/.keep diff --git a/RideShare/app/assets/javascripts/application.js b/app/assets/javascripts/application.js similarity index 100% rename from RideShare/app/assets/javascripts/application.js rename to app/assets/javascripts/application.js diff --git a/RideShare/app/assets/javascripts/cable.js b/app/assets/javascripts/cable.js similarity index 100% rename from RideShare/app/assets/javascripts/cable.js rename to app/assets/javascripts/cable.js diff --git a/RideShare/app/assets/javascripts/channels/.keep b/app/assets/javascripts/channels/.keep similarity index 100% rename from RideShare/app/assets/javascripts/channels/.keep rename to app/assets/javascripts/channels/.keep diff --git a/RideShare/app/assets/javascripts/drivers.js b/app/assets/javascripts/drivers.js similarity index 100% rename from RideShare/app/assets/javascripts/drivers.js rename to app/assets/javascripts/drivers.js diff --git a/RideShare/app/assets/javascripts/passengers.js b/app/assets/javascripts/passengers.js similarity index 100% rename from RideShare/app/assets/javascripts/passengers.js rename to app/assets/javascripts/passengers.js diff --git a/RideShare/app/assets/javascripts/trips.js b/app/assets/javascripts/trips.js similarity index 100% rename from RideShare/app/assets/javascripts/trips.js rename to app/assets/javascripts/trips.js diff --git a/RideShare/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css similarity index 100% rename from RideShare/app/assets/stylesheets/application.css rename to app/assets/stylesheets/application.css diff --git a/RideShare/app/assets/stylesheets/drivers.scss b/app/assets/stylesheets/drivers.scss similarity index 100% rename from RideShare/app/assets/stylesheets/drivers.scss rename to app/assets/stylesheets/drivers.scss diff --git a/RideShare/app/assets/stylesheets/passengers.scss b/app/assets/stylesheets/passengers.scss similarity index 100% rename from RideShare/app/assets/stylesheets/passengers.scss rename to app/assets/stylesheets/passengers.scss diff --git a/RideShare/app/assets/stylesheets/trips.scss b/app/assets/stylesheets/trips.scss similarity index 100% rename from RideShare/app/assets/stylesheets/trips.scss rename to app/assets/stylesheets/trips.scss diff --git a/RideShare/app/channels/application_cable/channel.rb b/app/channels/application_cable/channel.rb similarity index 100% rename from RideShare/app/channels/application_cable/channel.rb rename to app/channels/application_cable/channel.rb diff --git a/RideShare/app/channels/application_cable/connection.rb b/app/channels/application_cable/connection.rb similarity index 100% rename from RideShare/app/channels/application_cable/connection.rb rename to app/channels/application_cable/connection.rb diff --git a/RideShare/app/controllers/application_controller.rb b/app/controllers/application_controller.rb similarity index 100% rename from RideShare/app/controllers/application_controller.rb rename to app/controllers/application_controller.rb diff --git a/RideShare/app/controllers/concerns/.keep b/app/controllers/concerns/.keep similarity index 100% rename from RideShare/app/controllers/concerns/.keep rename to app/controllers/concerns/.keep diff --git a/RideShare/app/controllers/drivers_controller.rb b/app/controllers/drivers_controller.rb similarity index 100% rename from RideShare/app/controllers/drivers_controller.rb rename to app/controllers/drivers_controller.rb diff --git a/RideShare/app/controllers/passengers_controller.rb b/app/controllers/passengers_controller.rb similarity index 99% rename from RideShare/app/controllers/passengers_controller.rb rename to app/controllers/passengers_controller.rb index 51a474a5e..ceaff3cb3 100644 --- a/RideShare/app/controllers/passengers_controller.rb +++ b/app/controllers/passengers_controller.rb @@ -1,4 +1,5 @@ class PassengersController < ApplicationController + def index @passengers = Passenger.all @@ -63,4 +64,5 @@ def destroy def passenger_params return params.require(:passenger).permit(:name, :phone_num) end + end diff --git a/RideShare/app/controllers/trips_controller.rb b/app/controllers/trips_controller.rb similarity index 99% rename from RideShare/app/controllers/trips_controller.rb rename to app/controllers/trips_controller.rb index ec5a77f94..ec8d53155 100644 --- a/RideShare/app/controllers/trips_controller.rb +++ b/app/controllers/trips_controller.rb @@ -1,5 +1,4 @@ class TripsController < ApplicationController - def index @trips = Trip.all diff --git a/RideShare/app/helpers/application_helper.rb b/app/helpers/application_helper.rb similarity index 100% rename from RideShare/app/helpers/application_helper.rb rename to app/helpers/application_helper.rb diff --git a/RideShare/app/helpers/drivers_helper.rb b/app/helpers/drivers_helper.rb similarity index 100% rename from RideShare/app/helpers/drivers_helper.rb rename to app/helpers/drivers_helper.rb diff --git a/RideShare/app/helpers/passengers_helper.rb b/app/helpers/passengers_helper.rb similarity index 100% rename from RideShare/app/helpers/passengers_helper.rb rename to app/helpers/passengers_helper.rb diff --git a/RideShare/app/helpers/trips_helper.rb b/app/helpers/trips_helper.rb similarity index 100% rename from RideShare/app/helpers/trips_helper.rb rename to app/helpers/trips_helper.rb diff --git a/RideShare/app/jobs/application_job.rb b/app/jobs/application_job.rb similarity index 100% rename from RideShare/app/jobs/application_job.rb rename to app/jobs/application_job.rb diff --git a/RideShare/app/mailers/application_mailer.rb b/app/mailers/application_mailer.rb similarity index 100% rename from RideShare/app/mailers/application_mailer.rb rename to app/mailers/application_mailer.rb diff --git a/RideShare/app/models/application_record.rb b/app/models/application_record.rb similarity index 100% rename from RideShare/app/models/application_record.rb rename to app/models/application_record.rb diff --git a/RideShare/app/models/concerns/.keep b/app/models/concerns/.keep similarity index 100% rename from RideShare/app/models/concerns/.keep rename to app/models/concerns/.keep diff --git a/RideShare/app/models/driver.rb b/app/models/driver.rb similarity index 100% rename from RideShare/app/models/driver.rb rename to app/models/driver.rb diff --git a/RideShare/app/models/passenger.rb b/app/models/passenger.rb similarity index 100% rename from RideShare/app/models/passenger.rb rename to app/models/passenger.rb diff --git a/RideShare/app/models/trip.rb b/app/models/trip.rb similarity index 100% rename from RideShare/app/models/trip.rb rename to app/models/trip.rb diff --git a/RideShare/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb similarity index 89% rename from RideShare/app/views/layouts/application.html.erb rename to app/views/layouts/application.html.erb index d202d95d1..353326840 100644 --- a/RideShare/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -1,7 +1,7 @@ - RideShare + RideshareRails <%= csrf_meta_tags %> <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %> diff --git a/RideShare/app/views/layouts/mailer.html.erb b/app/views/layouts/mailer.html.erb similarity index 100% rename from RideShare/app/views/layouts/mailer.html.erb rename to app/views/layouts/mailer.html.erb diff --git a/RideShare/app/views/layouts/mailer.text.erb b/app/views/layouts/mailer.text.erb similarity index 100% rename from RideShare/app/views/layouts/mailer.text.erb rename to app/views/layouts/mailer.text.erb diff --git a/RideShare/bin/bundle b/bin/bundle similarity index 100% rename from RideShare/bin/bundle rename to bin/bundle diff --git a/RideShare/bin/rails b/bin/rails similarity index 100% rename from RideShare/bin/rails rename to bin/rails diff --git a/RideShare/bin/rake b/bin/rake similarity index 100% rename from RideShare/bin/rake rename to bin/rake diff --git a/RideShare/bin/setup b/bin/setup similarity index 100% rename from RideShare/bin/setup rename to bin/setup diff --git a/RideShare/bin/spring b/bin/spring similarity index 100% rename from RideShare/bin/spring rename to bin/spring diff --git a/RideShare/bin/update b/bin/update similarity index 100% rename from RideShare/bin/update rename to bin/update diff --git a/RideShare/bin/yarn b/bin/yarn similarity index 100% rename from RideShare/bin/yarn rename to bin/yarn diff --git a/RideShare/config.ru b/config.ru similarity index 100% rename from RideShare/config.ru rename to config.ru diff --git a/RideShare/config/application.rb b/config/application.rb similarity index 97% rename from RideShare/config/application.rb rename to config/application.rb index f4e117aaf..4c6d223cf 100644 --- a/RideShare/config/application.rb +++ b/config/application.rb @@ -6,7 +6,7 @@ # you've limited to :test, :development, or :production. Bundler.require(*Rails.groups) -module RideShare +module RideshareRails class Application < Rails::Application config.generators do |g| # Force new test files to be generated in the minitest-spec style diff --git a/RideShare/config/boot.rb b/config/boot.rb similarity index 100% rename from RideShare/config/boot.rb rename to config/boot.rb diff --git a/RideShare/config/cable.yml b/config/cable.yml similarity index 72% rename from RideShare/config/cable.yml rename to config/cable.yml index d86525669..db55d1026 100644 --- a/RideShare/config/cable.yml +++ b/config/cable.yml @@ -7,4 +7,4 @@ test: production: adapter: redis url: redis://localhost:6379/1 - channel_prefix: RideShare_production + channel_prefix: rideshare-rails_production diff --git a/RideShare/config/database.yml b/config/database.yml similarity index 92% rename from RideShare/config/database.yml rename to config/database.yml index e1e7ad8a5..bf1c2b58e 100644 --- a/RideShare/config/database.yml +++ b/config/database.yml @@ -23,13 +23,13 @@ default: &default development: <<: *default - database: RideShare_development + database: rideshare-rails_development # The specified database role being used to connect to postgres. # To create additional roles in postgres see `$ createuser --help`. # When left blank, postgres will use the default role. This is # the same name as the operating system user that initialized the database. - #username: RideShare + #username: rideshare-rails # The password associated with the postgres role (username). #password: @@ -57,7 +57,7 @@ development: # Do not set this db to the same as development or production. test: <<: *default - database: RideShare_test + database: rideshare-rails_test # 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 @@ -80,6 +80,6 @@ test: # production: <<: *default - database: RideShare_production - username: RideShare - password: <%= ENV['RIDESHARE_DATABASE_PASSWORD'] %> + database: rideshare-rails_production + username: rideshare-rails + password: <%= ENV['RIDESHARE-RAILS_DATABASE_PASSWORD'] %> diff --git a/RideShare/config/environment.rb b/config/environment.rb similarity index 100% rename from RideShare/config/environment.rb rename to config/environment.rb diff --git a/RideShare/config/environments/development.rb b/config/environments/development.rb similarity index 100% rename from RideShare/config/environments/development.rb rename to config/environments/development.rb diff --git a/RideShare/config/environments/production.rb b/config/environments/production.rb similarity index 98% rename from RideShare/config/environments/production.rb rename to config/environments/production.rb index 79696ff0c..8eb974095 100644 --- a/RideShare/config/environments/production.rb +++ b/config/environments/production.rb @@ -59,7 +59,7 @@ # Use a real queuing backend for Active Job (and separate queues per environment) # config.active_job.queue_adapter = :resque - # config.active_job.queue_name_prefix = "RideShare_#{Rails.env}" + # config.active_job.queue_name_prefix = "rideshare-rails_#{Rails.env}" config.action_mailer.perform_caching = false # Ignore bad email addresses and do not raise email delivery errors. diff --git a/RideShare/config/environments/test.rb b/config/environments/test.rb similarity index 100% rename from RideShare/config/environments/test.rb rename to config/environments/test.rb diff --git a/RideShare/config/initializers/application_controller_renderer.rb b/config/initializers/application_controller_renderer.rb similarity index 100% rename from RideShare/config/initializers/application_controller_renderer.rb rename to config/initializers/application_controller_renderer.rb diff --git a/RideShare/config/initializers/assets.rb b/config/initializers/assets.rb similarity index 100% rename from RideShare/config/initializers/assets.rb rename to config/initializers/assets.rb diff --git a/RideShare/config/initializers/backtrace_silencers.rb b/config/initializers/backtrace_silencers.rb similarity index 100% rename from RideShare/config/initializers/backtrace_silencers.rb rename to config/initializers/backtrace_silencers.rb diff --git a/RideShare/config/initializers/cookies_serializer.rb b/config/initializers/cookies_serializer.rb similarity index 100% rename from RideShare/config/initializers/cookies_serializer.rb rename to config/initializers/cookies_serializer.rb diff --git a/RideShare/config/initializers/filter_parameter_logging.rb b/config/initializers/filter_parameter_logging.rb similarity index 100% rename from RideShare/config/initializers/filter_parameter_logging.rb rename to config/initializers/filter_parameter_logging.rb diff --git a/RideShare/config/initializers/inflections.rb b/config/initializers/inflections.rb similarity index 100% rename from RideShare/config/initializers/inflections.rb rename to config/initializers/inflections.rb diff --git a/RideShare/config/initializers/mime_types.rb b/config/initializers/mime_types.rb similarity index 100% rename from RideShare/config/initializers/mime_types.rb rename to config/initializers/mime_types.rb diff --git a/RideShare/config/initializers/wrap_parameters.rb b/config/initializers/wrap_parameters.rb similarity index 100% rename from RideShare/config/initializers/wrap_parameters.rb rename to config/initializers/wrap_parameters.rb diff --git a/RideShare/config/locales/en.yml b/config/locales/en.yml similarity index 100% rename from RideShare/config/locales/en.yml rename to config/locales/en.yml diff --git a/RideShare/config/puma.rb b/config/puma.rb similarity index 100% rename from RideShare/config/puma.rb rename to config/puma.rb diff --git a/RideShare/config/routes.rb b/config/routes.rb similarity index 68% rename from RideShare/config/routes.rb rename to config/routes.rb index 4f32c67ae..7fe238d1a 100644 --- a/RideShare/config/routes.rb +++ b/config/routes.rb @@ -1,10 +1,9 @@ Rails.application.routes.draw do # For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html + resources :trips -resources :trips + resources :passengers -resources :passengers - -resources :drivers + resources :drivers end diff --git a/RideShare/config/secrets.yml b/config/secrets.yml similarity index 76% rename from RideShare/config/secrets.yml rename to config/secrets.yml index 62361a6bb..45affbcf8 100644 --- a/RideShare/config/secrets.yml +++ b/config/secrets.yml @@ -18,10 +18,10 @@ # Environmental secrets are only available for that specific environment. development: - secret_key_base: 495a4b129ed7dc18f4dc8cb2adca0babc8441150fbe841f8ee2a08a0f09c712e6f6b1c2a6fdabe00f12985702f71067da06541bc1ecaeaccd30779f6373fec44 + secret_key_base: 832340c78920d59c32a140f1055e6af9c89c07860d081a11270f288a46be4d585fc6f555d9ddc9eb41fa6792cedff933537d20f07ec5f3d40ea509d298a34d26 test: - secret_key_base: b99c7e206e7effa8213db800edb25d6684f60fd895051c446638e40c0f259f940bf91a2864d14fe5916192b1ed53ae015f38e6b79c0eefb8d0eaf21461f51ec3 + secret_key_base: c0c54ec987a9e9bd46c51b549f096c6d4f4e97baca729151458b0423de3759f5290bef089512d990be461a6c4333b641fb16e9ba7c97a6c3c07a517fe34b2973 # Do not keep production secrets in the unencrypted secrets file. # Instead, either read values from the environment. diff --git a/RideShare/config/spring.rb b/config/spring.rb similarity index 100% rename from RideShare/config/spring.rb rename to config/spring.rb diff --git a/RideShare/db/seeds.rb b/db-seeds/seeds.rb similarity index 86% rename from RideShare/db/seeds.rb rename to db-seeds/seeds.rb index b37748bec..eab2a92ee 100644 --- a/RideShare/db/seeds.rb +++ b/db-seeds/seeds.rb @@ -1,10 +1,3 @@ -# This file should contain all the record creation needed to seed the database with its default values. -# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). -# -# Examples: -# -# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) -# Character.create(name: 'Luke', movie: movies.first) require 'csv' DRIVER_FILE = Rails.root.join('db', 'seed_data', 'drivers.csv') diff --git a/RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb b/db/migrate/20180403224723_add_passenger_id_to_trips.rb similarity index 100% rename from RideShare/db/migrate/20180403224723_add_passenger_id_to_trips.rb rename to db/migrate/20180403224723_add_passenger_id_to_trips.rb diff --git a/RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb b/db/migrate/20180403224928_add_driver_id_to_trips.rb similarity index 100% rename from RideShare/db/migrate/20180403224928_add_driver_id_to_trips.rb rename to db/migrate/20180403224928_add_driver_id_to_trips.rb diff --git a/RideShare/db/migrate/20180403190625_create_trips.rb b/db/migrate/20180403235918_create_trips.rb similarity index 100% rename from RideShare/db/migrate/20180403190625_create_trips.rb rename to db/migrate/20180403235918_create_trips.rb diff --git a/RideShare/db/migrate/20180403224142_create_drivers.rb b/db/migrate/20180404000259_create_drivers.rb similarity index 100% rename from RideShare/db/migrate/20180403224142_create_drivers.rb rename to db/migrate/20180404000259_create_drivers.rb diff --git a/RideShare/db/migrate/20180403192757_create_passengers.rb b/db/migrate/20180404000329_create_passengers.rb similarity index 100% rename from RideShare/db/migrate/20180403192757_create_passengers.rb rename to db/migrate/20180404000329_create_passengers.rb diff --git a/RideShare/db/schema.rb b/db/schema.rb similarity index 96% rename from RideShare/db/schema.rb rename to db/schema.rb index 0c33c57f4..eb009a7b8 100644 --- a/RideShare/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180403224928) do +ActiveRecord::Schema.define(version: 20180404000329) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" diff --git a/db/seeds.rb b/db/seeds.rb index eab2a92ee..b37748bec 100644 --- a/db/seeds.rb +++ b/db/seeds.rb @@ -1,3 +1,10 @@ +# This file should contain all the record creation needed to seed the database with its default values. +# The data can then be loaded with the rails db:seed command (or created alongside the database with db:setup). +# +# Examples: +# +# movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings' }]) +# Character.create(name: 'Luke', movie: movies.first) require 'csv' DRIVER_FILE = Rails.root.join('db', 'seed_data', 'drivers.csv') diff --git a/RideShare/lib/assets/.keep b/lib/assets/.keep similarity index 100% rename from RideShare/lib/assets/.keep rename to lib/assets/.keep diff --git a/RideShare/lib/tasks/.keep b/lib/tasks/.keep similarity index 100% rename from RideShare/lib/tasks/.keep rename to lib/tasks/.keep diff --git a/RideShare/log/.keep b/log/.keep similarity index 100% rename from RideShare/log/.keep rename to log/.keep diff --git a/RideShare/package.json b/package.json similarity index 60% rename from RideShare/package.json rename to package.json index 6354c69a7..2d821c4e4 100644 --- a/RideShare/package.json +++ b/package.json @@ -1,5 +1,5 @@ { - "name": "RideShare", + "name": "rideshare-rails", "private": true, "dependencies": {} } diff --git a/RideShare/public/404.html b/public/404.html similarity index 100% rename from RideShare/public/404.html rename to public/404.html diff --git a/RideShare/public/422.html b/public/422.html similarity index 100% rename from RideShare/public/422.html rename to public/422.html diff --git a/RideShare/public/500.html b/public/500.html similarity index 100% rename from RideShare/public/500.html rename to public/500.html diff --git a/RideShare/public/apple-touch-icon-precomposed.png b/public/apple-touch-icon-precomposed.png similarity index 100% rename from RideShare/public/apple-touch-icon-precomposed.png rename to public/apple-touch-icon-precomposed.png diff --git a/RideShare/public/apple-touch-icon.png b/public/apple-touch-icon.png similarity index 100% rename from RideShare/public/apple-touch-icon.png rename to public/apple-touch-icon.png diff --git a/RideShare/public/favicon.ico b/public/favicon.ico similarity index 100% rename from RideShare/public/favicon.ico rename to public/favicon.ico diff --git a/RideShare/public/robots.txt b/public/robots.txt similarity index 100% rename from RideShare/public/robots.txt rename to public/robots.txt diff --git a/RideShare/test/application_system_test_case.rb b/test/application_system_test_case.rb similarity index 100% rename from RideShare/test/application_system_test_case.rb rename to test/application_system_test_case.rb diff --git a/RideShare/test/controllers/.keep b/test/controllers/.keep similarity index 100% rename from RideShare/test/controllers/.keep rename to test/controllers/.keep diff --git a/RideShare/test/controllers/drivers_controller_test.rb b/test/controllers/drivers_controller_test.rb similarity index 100% rename from RideShare/test/controllers/drivers_controller_test.rb rename to test/controllers/drivers_controller_test.rb diff --git a/RideShare/test/controllers/passengers_controller_test.rb b/test/controllers/passengers_controller_test.rb similarity index 100% rename from RideShare/test/controllers/passengers_controller_test.rb rename to test/controllers/passengers_controller_test.rb diff --git a/RideShare/test/controllers/trips_controller_test.rb b/test/controllers/trips_controller_test.rb similarity index 100% rename from RideShare/test/controllers/trips_controller_test.rb rename to test/controllers/trips_controller_test.rb diff --git a/RideShare/test/fixtures/.keep b/test/fixtures/.keep similarity index 100% rename from RideShare/test/fixtures/.keep rename to test/fixtures/.keep diff --git a/RideShare/test/fixtures/drivers.yml b/test/fixtures/drivers.yml similarity index 100% rename from RideShare/test/fixtures/drivers.yml rename to test/fixtures/drivers.yml diff --git a/RideShare/test/fixtures/files/.keep b/test/fixtures/files/.keep similarity index 100% rename from RideShare/test/fixtures/files/.keep rename to test/fixtures/files/.keep diff --git a/RideShare/test/fixtures/passengers.yml b/test/fixtures/passengers.yml similarity index 100% rename from RideShare/test/fixtures/passengers.yml rename to test/fixtures/passengers.yml diff --git a/RideShare/test/fixtures/trips.yml b/test/fixtures/trips.yml similarity index 100% rename from RideShare/test/fixtures/trips.yml rename to test/fixtures/trips.yml diff --git a/RideShare/test/helpers/.keep b/test/helpers/.keep similarity index 100% rename from RideShare/test/helpers/.keep rename to test/helpers/.keep diff --git a/RideShare/test/integration/.keep b/test/integration/.keep similarity index 100% rename from RideShare/test/integration/.keep rename to test/integration/.keep diff --git a/RideShare/test/mailers/.keep b/test/mailers/.keep similarity index 100% rename from RideShare/test/mailers/.keep rename to test/mailers/.keep diff --git a/RideShare/test/models/.keep b/test/models/.keep similarity index 100% rename from RideShare/test/models/.keep rename to test/models/.keep diff --git a/RideShare/test/models/driver_test.rb b/test/models/driver_test.rb similarity index 100% rename from RideShare/test/models/driver_test.rb rename to test/models/driver_test.rb diff --git a/RideShare/test/models/passenger_test.rb b/test/models/passenger_test.rb similarity index 100% rename from RideShare/test/models/passenger_test.rb rename to test/models/passenger_test.rb diff --git a/RideShare/test/models/trip_test.rb b/test/models/trip_test.rb similarity index 100% rename from RideShare/test/models/trip_test.rb rename to test/models/trip_test.rb diff --git a/RideShare/test/system/.keep b/test/system/.keep similarity index 100% rename from RideShare/test/system/.keep rename to test/system/.keep diff --git a/RideShare/test/test_helper.rb b/test/test_helper.rb similarity index 100% rename from RideShare/test/test_helper.rb rename to test/test_helper.rb diff --git a/RideShare/tmp/.keep b/tmp/.keep similarity index 100% rename from RideShare/tmp/.keep rename to tmp/.keep diff --git a/RideShare/vendor/.keep b/vendor/.keep similarity index 100% rename from RideShare/vendor/.keep rename to vendor/.keep From b4d831f57a56b980d5473bccd1b968479b4859d8 Mon Sep 17 00:00:00 2001 From: Kiera Date: Tue, 3 Apr 2018 18:04:35 -0700 Subject: [PATCH 08/42] Troubleshooted seed data, created database and migrations --- ..._to_trips.rb => 20180404005351_add_passenger_id_to_trips.rb} | 0 ..._id_to_trips.rb => 20180404005535_add_driver_id_to_trips.rb} | 0 db/schema.rb | 2 +- 3 files changed, 1 insertion(+), 1 deletion(-) rename db/migrate/{20180403224723_add_passenger_id_to_trips.rb => 20180404005351_add_passenger_id_to_trips.rb} (100%) rename db/migrate/{20180403224928_add_driver_id_to_trips.rb => 20180404005535_add_driver_id_to_trips.rb} (100%) diff --git a/db/migrate/20180403224723_add_passenger_id_to_trips.rb b/db/migrate/20180404005351_add_passenger_id_to_trips.rb similarity index 100% rename from db/migrate/20180403224723_add_passenger_id_to_trips.rb rename to db/migrate/20180404005351_add_passenger_id_to_trips.rb diff --git a/db/migrate/20180403224928_add_driver_id_to_trips.rb b/db/migrate/20180404005535_add_driver_id_to_trips.rb similarity index 100% rename from db/migrate/20180403224928_add_driver_id_to_trips.rb rename to db/migrate/20180404005535_add_driver_id_to_trips.rb diff --git a/db/schema.rb b/db/schema.rb index eb009a7b8..06a57f64c 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20180404000329) do +ActiveRecord::Schema.define(version: 20180404005535) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" From b22b33d7f2e5118db14e54b2c7991a3297f6fdd8 Mon Sep 17 00:00:00 2001 From: Kiera Date: Tue, 3 Apr 2018 22:53:14 -0700 Subject: [PATCH 09/42] Added basic elements to index and show views for passenger. Added basic css to application such as nav bar and page header --- app/assets/stylesheets/application.css | 3 ++ app/views/layouts/application.html.erb | 23 +++++++++++- app/views/passengers/index.html.erb | 11 ++++++ app/views/passengers/show.html.erb | 49 ++++++++++++++++++++++++++ 4 files changed, 85 insertions(+), 1 deletion(-) create mode 100644 app/views/passengers/index.html.erb create mode 100644 app/views/passengers/show.html.erb diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index d05ea0f51..972ae25b8 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,3 +13,6 @@ *= require_tree . *= require_self */ +li { + list-style-type: none; +} diff --git a/app/views/layouts/application.html.erb b/app/views/layouts/application.html.erb index 353326840..9009148cf 100644 --- a/app/views/layouts/application.html.erb +++ b/app/views/layouts/application.html.erb @@ -9,6 +9,27 @@ - <%= yield %> +
+

RideShare

+
+ +
+ <%= yield %> +
+
+

+ © Luxi & Kiera, 2018 +

+
+ diff --git a/app/views/passengers/index.html.erb b/app/views/passengers/index.html.erb new file mode 100644 index 000000000..9a4139541 --- /dev/null +++ b/app/views/passengers/index.html.erb @@ -0,0 +1,11 @@ +

RideShare Passenger List

+ +
    + <% @passengers.each do |passenger| %> +
  • + <%= link_to(passenger.name,passenger_path(passenger)) %> + <%= 'Edit'%> + <%= 'Delete'%> +
  • +
+<% end%> diff --git a/app/views/passengers/show.html.erb b/app/views/passengers/show.html.erb new file mode 100644 index 000000000..e4a5d7256 --- /dev/null +++ b/app/views/passengers/show.html.erb @@ -0,0 +1,49 @@ + + +
+
    +
  • + Name: <%= @passenger.name %> +
  • +
  • + Phone Number: <%= @passenger.phone_num %> + Total Spent +
  • +
  • + Request Ride +
  • +
+ + +
+ +

Passenger Trips

+
+
    + <% @passenger.trips.each do |trip|%> + +
  • + Id <%= trip.id %> +
  • +
  • + Date <%= trip.date %> +
  • +
  • + Driver_id <%= trip.driver_id %> +
  • +
  • + Rating <%= trip.rating %> +
  • +
  • + Cost $<%= trip.cost %> +
  • +
  • + delete +
  • + +
+ <%end%> +
From 64948d38e8f0c9ac4423921363544e1a25974e25 Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Tue, 3 Apr 2018 23:12:59 -0700 Subject: [PATCH 10/42] Updated controller. Created index.html.erb and show.html.erb. --- app/controllers/drivers_controller.rb | 16 +++++++++++----- app/views/drivers/index.html.erb | 17 +++++++++++++++++ app/views/drivers/show.html.erb | 17 +++++++++++++++++ 3 files changed, 45 insertions(+), 5 deletions(-) create mode 100644 app/views/drivers/index.html.erb create mode 100644 app/views/drivers/show.html.erb diff --git a/app/controllers/drivers_controller.rb b/app/controllers/drivers_controller.rb index 470d2b327..05afbd7ef 100644 --- a/app/controllers/drivers_controller.rb +++ b/app/controllers/drivers_controller.rb @@ -11,11 +11,15 @@ def new end def create - driver = Driver.new(driver_params) + @driver = Driver.new(driver_params) - if driver.save + if @driver.save redirect_to drivers_path + else + # Validations failed! What do we do now? See below... + render :new end + end def show @@ -29,12 +33,14 @@ def edit end def update - driver = Driver.find(params[:id]) + @driver = Driver.find(params[:id]) - driver.assign_attributes(driver_params) + @driver.assign_attributes(driver_params) - if driver.save + if @driver.save redirect_to driver_path(driver) + else + render :edit end end diff --git a/app/views/drivers/index.html.erb b/app/views/drivers/index.html.erb new file mode 100644 index 000000000..c1d88440d --- /dev/null +++ b/app/views/drivers/index.html.erb @@ -0,0 +1,17 @@ +

RideShare Drivers

+ +
    + <% @drivers.each do |driver| %> +
  • + <%= link_to(driver.name, driver_path(driver)) %> + + + + +
  • + <% end %> +
diff --git a/app/views/drivers/show.html.erb b/app/views/drivers/show.html.erb new file mode 100644 index 000000000..bd87b3fc6 --- /dev/null +++ b/app/views/drivers/show.html.erb @@ -0,0 +1,17 @@ +

<%= @driver.name %>

+ +

+ VIN: <%= @driver.vin %> +

+ +
+

Driver Trips

+ +
    + <% @driver.trips.each do |trip| %> +
  • + <%= trip %> +
  • + <% end %> +
+
From 895e81db497286b239c2e1705a424463bc0e89d1 Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Wed, 4 Apr 2018 12:06:36 -0700 Subject: [PATCH 11/42] making sure all udpates are up to date --- app/controllers/drivers_controller.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/app/controllers/drivers_controller.rb b/app/controllers/drivers_controller.rb index 05afbd7ef..4f0ebd32b 100644 --- a/app/controllers/drivers_controller.rb +++ b/app/controllers/drivers_controller.rb @@ -4,6 +4,8 @@ def index @drivers = Driver.all + # @drivers = Driver.limit(10) + end def new From 593c0d94733b6ae2d7c4e01773da692f1ab27eca Mon Sep 17 00:00:00 2001 From: Luxi Lindsey Date: Wed, 4 Apr 2018 12:34:08 -0700 Subject: [PATCH 12/42] Updated the show.html.erb for driver --- app/views/drivers/show.html.erb | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/app/views/drivers/show.html.erb b/app/views/drivers/show.html.erb index bd87b3fc6..73ae3c244 100644 --- a/app/views/drivers/show.html.erb +++ b/app/views/drivers/show.html.erb @@ -9,9 +9,23 @@
    <% @driver.trips.each do |trip| %> +
  • - <%= trip %> + Id <%= trip.id %>
  • +
  • + Date <%= trip.date %> +
  • +
  • + Driver_id <%= trip.driver_id %> +
  • +
  • + Rating <%= trip.rating %> +
  • +
  • + Cost $<%= trip.cost %> +
  • + <% end %>
From 495421f5c376097d983229ccc5aece0e715de5e2 Mon Sep 17 00:00:00 2001 From: Kiera Date: Wed, 4 Apr 2018 12:36:03 -0700 Subject: [PATCH 13/42] Added division to cost to display on show pages for driver and passenger --- app/views/drivers/show.html.erb | 4 ++-- app/views/passengers/show.html.erb | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/app/views/drivers/show.html.erb b/app/views/drivers/show.html.erb index 73ae3c244..3b1e05388 100644 --- a/app/views/drivers/show.html.erb +++ b/app/views/drivers/show.html.erb @@ -9,7 +9,7 @@