Permalink
Browse files

test

  • Loading branch information...
Lunatic2420 committed Nov 7, 2019
0 parents commit a77061fe70d3ab79e61ae81748187fb0c39868d9
Showing with 1,806 additions and 0 deletions.
  1. +27 −0 .gitignore
  2. +45 −0 Cars-app/.gitignore
  3. +1 −0 Cars-app/.ruby-version
  4. +41 −0 Cars-app/Gemfile
  5. +166 −0 Cars-app/Gemfile.lock
  6. +24 −0 Cars-app/README.md
  7. +6 −0 Cars-app/Rakefile
  8. +4 −0 Cars-app/app/channels/application_cable/channel.rb
  9. +4 −0 Cars-app/app/channels/application_cable/connection.rb
  10. +2 −0 Cars-app/app/controllers/application_controller.rb
  11. +51 −0 Cars-app/app/controllers/cars_controller.rb
  12. 0 Cars-app/app/controllers/concerns/.keep
  13. +51 −0 Cars-app/app/controllers/dealerships_controller.rb
  14. +7 −0 Cars-app/app/jobs/application_job.rb
  15. +4 −0 Cars-app/app/mailers/application_mailer.rb
  16. +3 −0 Cars-app/app/models/application_record.rb
  17. +3 −0 Cars-app/app/models/car.rb
  18. 0 Cars-app/app/models/concerns/.keep
  19. +3 −0 Cars-app/app/models/dealership.rb
  20. +13 −0 Cars-app/app/views/layouts/mailer.html.erb
  21. +1 −0 Cars-app/app/views/layouts/mailer.text.erb
  22. +105 −0 Cars-app/bin/bundle
  23. +9 −0 Cars-app/bin/rails
  24. +9 −0 Cars-app/bin/rake
  25. +33 −0 Cars-app/bin/setup
  26. +17 −0 Cars-app/bin/spring
  27. +5 −0 Cars-app/config.ru
  28. +37 −0 Cars-app/config/application.rb
  29. +4 −0 Cars-app/config/boot.rb
  30. +10 −0 Cars-app/config/cable.yml
  31. +1 −0 Cars-app/config/credentials.yml.enc
  32. +85 −0 Cars-app/config/database.yml
  33. +5 −0 Cars-app/config/environment.rb
  34. +52 −0 Cars-app/config/environments/development.rb
  35. +105 −0 Cars-app/config/environments/production.rb
  36. +48 −0 Cars-app/config/environments/test.rb
  37. +8 −0 Cars-app/config/initializers/application_controller_renderer.rb
  38. +7 −0 Cars-app/config/initializers/backtrace_silencers.rb
  39. +16 −0 Cars-app/config/initializers/cors.rb
  40. +4 −0 Cars-app/config/initializers/filter_parameter_logging.rb
  41. +16 −0 Cars-app/config/initializers/inflections.rb
  42. +4 −0 Cars-app/config/initializers/mime_types.rb
  43. +14 −0 Cars-app/config/initializers/wrap_parameters.rb
  44. +33 −0 Cars-app/config/locales/en.yml
  45. +38 −0 Cars-app/config/puma.rb
  46. +6 −0 Cars-app/config/routes.rb
  47. +6 −0 Cars-app/config/spring.rb
  48. +34 −0 Cars-app/config/storage.yml
  49. +13 −0 Cars-app/db/migrate/20191107192224_create_dealerships.rb
  50. +16 −0 Cars-app/db/migrate/20191107192432_create_cars.rb
  51. +43 −0 Cars-app/db/schema.rb
  52. +277 −0 Cars-app/db/seeds.rb
  53. 0 Cars-app/lib/tasks/.keep
  54. 0 Cars-app/log/.keep
  55. +1 −0 Cars-app/public/robots.txt
  56. 0 Cars-app/storage/.keep
  57. +11 −0 Cars-app/test/channels/application_cable/connection_test.rb
  58. 0 Cars-app/test/controllers/.keep
  59. +38 −0 Cars-app/test/controllers/cars_controller_test.rb
  60. +38 −0 Cars-app/test/controllers/dealerships_controller_test.rb
  61. 0 Cars-app/test/fixtures/.keep
  62. +21 −0 Cars-app/test/fixtures/cars.yml
  63. +15 −0 Cars-app/test/fixtures/dealerships.yml
  64. 0 Cars-app/test/fixtures/files/.keep
  65. 0 Cars-app/test/integration/.keep
  66. 0 Cars-app/test/mailers/.keep
  67. 0 Cars-app/test/models/.keep
  68. +7 −0 Cars-app/test/models/car_test.rb
  69. +7 −0 Cars-app/test/models/dealership_test.rb
  70. +13 −0 Cars-app/test/test_helper.rb
  71. 0 Cars-app/tmp/.keep
  72. 0 Cars-app/vendor/.keep
  73. BIN ERD/Cars ERD.jpeg
  74. BIN ERD/Cars ERD2.png
  75. BIN ERD/Homepage where you see the different cars/Home Page Basic Wireframe 2.jpg
  76. BIN ERD/Homepage where you see the different cars/follow up page of individual manufactured models.jpg
  77. BIN ERD/Priority Matrix 2.png
  78. BIN ERD/Priority Matrix.png
  79. BIN ERD/React Component heirarcy.png
  80. BIN ERD/React Hierachy 3.png
  81. BIN ERD/React component Hierarchy2.png
  82. +139 −0 README.md
@@ -0,0 +1,27 @@
# 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

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key

# Ignore public, as it is built on deploy
# Place files for /public in /client/public
/public
.DS_Store
@@ -0,0 +1,45 @@
# 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

# Ignore uploaded files in development.
/storage/*
!/storage/.keep
.byebug_history

# Ignore master key for decrypting credentials and more.
/config/master.key
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.

# dependencies
/node_modules
/.pnp
.pnp.js

# testing
/coverage

# production
/build

# misc
.DS_Store
.env.local
.env.development.local
.env.test.local
.env.production.local

npm-debug.log*
yarn-debug.log*
yarn-error.log*
@@ -0,0 +1 @@
2.6.3
@@ -0,0 +1,41 @@
source 'https://rubygems.org'
git_source(:github) { |repo| "https://github.com/#{repo}.git" }

ruby '2.6.3'

# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '~> 6.0.1'
# Use postgresql as the database for Active Record
gem 'pg', '>= 0.18', '< 2.0'
# Use Puma as the app server
gem 'puma', '~> 4.1'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# gem 'jbuilder', '~> 2.7'
# Use Redis adapter to run Action Cable in production
# gem 'redis', '~> 4.0'
# Use Active Model has_secure_password
# gem 'bcrypt', '~> 3.1.7'

# Use Active Storage variant
# gem 'image_processing', '~> 1.2'

# Reduces boot times through caching; required in config/boot.rb
gem 'bootsnap', '>= 1.4.2', require: false

# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible
# gem 'rack-cors'

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]
end

group :development do
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]
@@ -0,0 +1,166 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.1)
actionpack (= 6.0.1)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.1)
actionpack (= 6.0.1)
activejob (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
mail (>= 2.7.1)
actionmailer (6.0.1)
actionpack (= 6.0.1)
actionview (= 6.0.1)
activejob (= 6.0.1)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.1)
actionview (= 6.0.1)
activesupport (= 6.0.1)
rack (~> 2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.1)
actionpack (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
nokogiri (>= 1.8.5)
actionview (6.0.1)
activesupport (= 6.0.1)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.1)
activesupport (= 6.0.1)
globalid (>= 0.3.6)
activemodel (6.0.1)
activesupport (= 6.0.1)
activerecord (6.0.1)
activemodel (= 6.0.1)
activesupport (= 6.0.1)
activestorage (6.0.1)
actionpack (= 6.0.1)
activejob (= 6.0.1)
activerecord (= 6.0.1)
marcel (~> 0.3.1)
activesupport (6.0.1)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2)
bootsnap (1.4.5)
msgpack (~> 1.0)
builder (3.2.3)
byebug (11.0.1)
concurrent-ruby (1.1.5)
crass (1.0.5)
erubi (1.9.0)
ffi (1.11.1)
globalid (0.4.2)
activesupport (>= 4.2.0)
i18n (1.7.0)
concurrent-ruby (~> 1.0)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.3.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (0.3.3)
mimemagic (~> 0.3.2)
method_source (0.9.2)
mimemagic (0.3.3)
mini_mime (1.0.2)
mini_portile2 (2.4.0)
minitest (5.13.0)
msgpack (1.3.1)
nio4r (2.5.2)
nokogiri (1.10.5)
mini_portile2 (~> 2.4.0)
pg (1.1.4)
puma (4.2.1)
nio4r (~> 2.0)
rack (2.0.7)
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.1)
actioncable (= 6.0.1)
actionmailbox (= 6.0.1)
actionmailer (= 6.0.1)
actionpack (= 6.0.1)
actiontext (= 6.0.1)
actionview (= 6.0.1)
activejob (= 6.0.1)
activemodel (= 6.0.1)
activerecord (= 6.0.1)
activestorage (= 6.0.1)
activesupport (= 6.0.1)
bundler (>= 1.3.0)
railties (= 6.0.1)
sprockets-rails (>= 2.0.0)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.3.0)
loofah (~> 2.3)
railties (6.0.1)
actionpack (= 6.0.1)
activesupport (= 6.0.1)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (13.0.0)
rb-fsevent (0.10.3)
rb-inotify (0.10.0)
ffi (~> 1.0)
ruby_dep (1.5.0)
spring (2.1.0)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.0)
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.3)
thread_safe (0.3.6)
tzinfo (1.2.5)
thread_safe (~> 0.1)
websocket-driver (0.7.1)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.4)
zeitwerk (2.2.1)

PLATFORMS
ruby

DEPENDENCIES
bootsnap (>= 1.4.2)
byebug
listen (>= 3.0.5, < 3.2)
pg (>= 0.18, < 2.0)
puma (~> 4.1)
rails (~> 6.0.1)
spring
spring-watcher-listen (~> 2.0.0)
tzinfo-data

RUBY VERSION
ruby 2.6.3p62

BUNDLED WITH
2.0.2
@@ -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

* ...
@@ -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
@@ -0,0 +1,4 @@
module ApplicationCable
class Channel < ActionCable::Channel::Base
end
end
@@ -0,0 +1,4 @@
module ApplicationCable
class Connection < ActionCable::Connection::Base
end
end
@@ -0,0 +1,2 @@
class ApplicationController < ActionController::API
end
@@ -0,0 +1,51 @@
class CarsController < ApplicationController
before_action :set_car, only: [:show, :update, :destroy]

# GET /cars
def index
@cars = Car.all

render json: @cars
end

# GET /cars/1
def show
render json: @car
end

# POST /cars
def create
@car = Car.new(car_params)

if @car.save
render json: @car, status: :created, location: @car
else
render json: @car.errors, status: :unprocessable_entity
end
end

# PATCH/PUT /cars/1
def update
if @car.update(car_params)
render json: @car
else
render json: @car.errors, status: :unprocessable_entity
end
end

# DELETE /cars/1
def destroy
@car.destroy
end

private
# Use callbacks to share common setup or constraints between actions.
def set_car
@car = Car.find(params[:id])
end

# Only allow a trusted parameter "white list" through.
def car_params
params.require(:car).permit(:manufacturer, :make, :body, :model, :engine, :style, :year, :dealership_id)
end
end
No changes.
Oops, something went wrong.

0 comments on commit a77061f

Please sign in to comment.