Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
D
Datababes
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Royce Matthew Chan
Datababes
Commits
4504f9bf
Commit
4504f9bf
authored
Jul 05, 2016
by
George Nicole Balmaceda
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
re-created initial ruby files
parent
6272a01b
Changes
27
Hide whitespace changes
Inline
Side-by-side
Showing
27 changed files
with
269 additions
and
235 deletions
+269
-235
.gitignore
parkinglot/.gitignore
+1
-5
Gemfile
parkinglot/Gemfile
+15
-19
Gemfile.lock
parkinglot/Gemfile.lock
+80
-94
README.rdoc
parkinglot/README.rdoc
+28
-0
Rakefile
parkinglot/Rakefile
+1
-1
application.js
parkinglot/app/assets/javascripts/application.js
+2
-2
application.css
parkinglot/app/assets/stylesheets/application.css
+3
-3
application_controller.rb
parkinglot/app/controllers/application_controller.rb
+2
-0
.keep
parkinglot/app/mailers/.keep
+0
-0
.keep
parkinglot/app/models/.keep
+0
-0
application.html.erb
parkinglot/app/views/layouts/application.html.erb
+9
-9
bundle
parkinglot/bin/bundle
+1
-1
rails
parkinglot/bin/rails
+2
-7
rake
parkinglot/bin/rake
+1
-6
setup
parkinglot/bin/setup
+13
-18
config.ru
parkinglot/config.ru
+1
-2
application.rb
parkinglot/config/application.rb
+12
-1
boot.rb
parkinglot/config/boot.rb
+1
-1
environment.rb
parkinglot/config/environment.rb
+1
-1
development.rb
parkinglot/config/environments/development.rb
+11
-24
production.rb
parkinglot/config/environments/production.rb
+17
-24
test.rb
parkinglot/config/environments/test.rb
+6
-6
cookies_serializer.rb
parkinglot/config/initializers/cookies_serializer.rb
+0
-2
wrap_parameters.rb
parkinglot/config/initializers/wrap_parameters.rb
+2
-2
routes.rb
parkinglot/config/routes.rb
+54
-1
secrets.yml
parkinglot/config/secrets.yml
+3
-3
seeds.rb
parkinglot/db/seeds.rb
+3
-3
No files found.
parkinglot/.gitignore
View file @
4504f9bf
...
@@ -13,9 +13,5 @@
...
@@ -13,9 +13,5 @@
# Ignore all logfiles and tempfiles.
# Ignore all logfiles and tempfiles.
/log/*
/log/*
/tmp/*
!/log/.keep
!/log/.keep
!/tmp/.keep
/tmp
# Ignore Byebug command history file.
.byebug_history
parkinglot/Gemfile
View file @
4504f9bf
...
@@ -2,46 +2,42 @@ source 'https://rubygems.org'
...
@@ -2,46 +2,42 @@ source 'https://rubygems.org'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem
'rails'
,
'
~> 5.0
.0'
gem
'rails'
,
'
4.2
.0'
# Use sqlite3 as the database for Active Record
# Use sqlite3 as the database for Active Record
gem
'sqlite3'
gem
'sqlite3'
# Use Puma as the app server
gem
'puma'
,
'~> 3.0'
# Use SCSS for stylesheets
# Use SCSS for stylesheets
gem
'sass-rails'
,
'~> 5.0'
gem
'sass-rails'
,
'~> 5.0'
# Use Uglifier as compressor for JavaScript assets
# Use Uglifier as compressor for JavaScript assets
gem
'uglifier'
,
'>= 1.3.0'
gem
'uglifier'
,
'>= 1.3.0'
# Use CoffeeScript for .coffee assets and views
# Use CoffeeScript for .coffee assets and views
gem
'coffee-rails'
,
'~> 4.
2
'
gem
'coffee-rails'
,
'~> 4.
1.0
'
# See https://github.com/
rails
/execjs#readme for more supported runtimes
# See https://github.com/
sstephenson
/execjs#readme for more supported runtimes
# gem 'therubyracer', platforms: :ruby
# gem 'therubyracer', platforms: :ruby
# Use jquery as the JavaScript library
# Use jquery as the JavaScript library
gem
'jquery-rails'
gem
'jquery-rails'
# Turbolinks makes
navigating your web application faster. Read more: https://github.com/turbolink
s/turbolinks
# Turbolinks makes
following links in your web application faster. Read more: https://github.com/rail
s/turbolinks
gem
'turbolinks'
,
'~> 5'
gem
'turbolinks'
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
gem
'jbuilder'
,
'~> 2.5'
gem
'jbuilder'
,
'~> 2.0'
# Use Redis adapter to run Action Cable in production
# bundle exec rake doc:rails generates the API under doc/api.
# gem 'redis', '~> 3.0'
gem
'sdoc'
,
'~> 0.4.0'
,
group: :doc
# Use ActiveModel has_secure_password
# Use ActiveModel has_secure_password
# gem 'bcrypt', '~> 3.1.7'
# gem 'bcrypt', '~> 3.1.7'
# Use Unicorn as the app server
# gem 'unicorn'
# Use Capistrano for deployment
# Use Capistrano for deployment
# gem 'capistrano-rails', group: :development
# gem 'capistrano-rails', group: :development
group
:development
,
:test
do
group
:development
,
:test
do
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
gem
'byebug'
,
platform: :mri
gem
'byebug'
end
group
:development
do
# Access an IRB console on exception pages or by using <%= console %> in views
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
gem
'web-console'
,
'~> 2.0'
gem
'web-console'
gem
'listen'
,
'~> 3.0.5'
# 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
end
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
...
...
parkinglot/Gemfile.lock
View file @
4504f9bf
GEM
GEM
remote: https://rubygems.org/
remote: https://rubygems.org/
specs:
specs:
actioncable (5.0.0)
actionmailer (4.2.0)
actionpack (= 5.0.0)
actionpack (= 4.2.0)
nio4r (~> 1.2)
actionview (= 4.2.0)
websocket-driver (~> 0.6.1)
activejob (= 4.2.0)
actionmailer (5.0.0)
actionpack (= 5.0.0)
actionview (= 5.0.0)
activejob (= 5.0.0)
mail (~> 2.5, >= 2.5.4)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
actionpack (
5.0
.0)
actionpack (
4.2
.0)
actionview (=
5.0
.0)
actionview (=
4.2
.0)
activesupport (=
5.0
.0)
activesupport (=
4.2
.0)
rack (~>
2
.0)
rack (~>
1.6
.0)
rack-test (~> 0.6.
3
)
rack-test (~> 0.6.
2
)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-html-sanitizer (~> 1.0, >= 1.0.
2
)
rails-html-sanitizer (~> 1.0, >= 1.0.
1
)
actionview (
5.0
.0)
actionview (
4.2
.0)
activesupport (=
5.0
.0)
activesupport (=
4.2
.0)
builder (~> 3.1)
builder (~> 3.1)
erubis (~> 2.7.0)
erubis (~> 2.7.0)
rails-dom-testing (~>
2.0
)
rails-dom-testing (~>
1.0, >= 1.0.5
)
rails-html-sanitizer (~> 1.0, >= 1.0.
2
)
rails-html-sanitizer (~> 1.0, >= 1.0.
1
)
activejob (
5.0
.0)
activejob (
4.2
.0)
activesupport (=
5.0
.0)
activesupport (=
4.2
.0)
globalid (>= 0.3.
6
)
globalid (>= 0.3.
0
)
activemodel (
5.0
.0)
activemodel (
4.2
.0)
activesupport (=
5.0
.0)
activesupport (=
4.2
.0)
activerecord (5.0.0
)
builder (~> 3.1
)
activemodel (= 5.0
.0)
activerecord (4.2
.0)
active
support (= 5.0
.0)
active
model (= 4.2
.0)
a
rel (~> 7
.0)
a
ctivesupport (= 4.2
.0)
activesupport (5.0
.0)
arel (~> 6
.0)
concurrent-ruby (~> 1.0, >= 1.0.2
)
activesupport (4.2.0
)
i18n (~> 0.7)
i18n (~> 0.7)
json (~> 1.7, >= 1.7.7)
minitest (~> 5.1)
minitest (~> 5.1)
thread_safe (~> 0.3, >= 0.3.4)
tzinfo (~> 1.1)
tzinfo (~> 1.1)
arel (7.0.0)
arel (6.0.3)
binding_of_caller (0.7.2)
debug_inspector (>= 0.0.1)
builder (3.2.2)
builder (3.2.2)
byebug (9.0.5)
byebug (9.0.5)
coffee-rails (4.
2
.1)
coffee-rails (4.
1
.1)
coffee-script (>= 2.2.0)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.
2
.x)
railties (>= 4.0.0, < 5.
1
.x)
coffee-script (2.4.1)
coffee-script (2.4.1)
coffee-script-source
coffee-script-source
execjs
execjs
...
@@ -52,7 +52,6 @@ GEM
...
@@ -52,7 +52,6 @@ GEM
debug_inspector (0.0.2)
debug_inspector (0.0.2)
erubis (2.7.0)
erubis (2.7.0)
execjs (2.7.0)
execjs (2.7.0)
ffi (1.9.10)
globalid (0.3.6)
globalid (0.3.6)
activesupport (>= 4.1.0)
activesupport (>= 4.1.0)
i18n (0.7.0)
i18n (0.7.0)
...
@@ -63,112 +62,99 @@ GEM
...
@@ -63,112 +62,99 @@ GEM
rails-dom-testing (>= 1, < 3)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
thor (>= 0.14, < 2.0)
listen (3.0.8)
json (1.8.3)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
loofah (2.0.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
nokogiri (>= 1.5.9)
mail (2.6.4)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
mini_portile2 (2.1.0)
minitest (5.9.0)
minitest (5.9.0)
multi_json (1.12.1)
multi_json (1.12.1)
nio4r (1.2.1)
nokogiri (1.6.8-x86-mingw32)
nokogiri (1.6.8)
mini_portile2 (~> 2.1.0)
mini_portile2 (~> 2.1.0)
pkg-config (~> 1.1.7)
pkg-config (~> 1.1.7)
pkg-config (1.1.7)
pkg-config (1.1.7)
puma (3.4.0)
rack (1.6.4)
rack (2.0.1)
rack-test (0.6.3)
rack-test (0.6.3)
rack (>= 1.0)
rack (>= 1.0)
rails (5.0.0)
rails (4.2.0)
actioncable (= 5.0.0)
actionmailer (= 4.2.0)
actionmailer (= 5.0.0)
actionpack (= 4.2.0)
actionpack (= 5.0.0)
actionview (= 4.2.0)
actionview (= 5.0.0)
activejob (= 4.2.0)
activejob (= 5.0.0)
activemodel (= 4.2.0)
activemodel (= 5.0.0)
activerecord (= 4.2.0)
activerecord (= 5.0.0)
activesupport (= 4.2.0)
activesupport (= 5.0.0)
bundler (>= 1.3.0, < 2.0)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.0)
railties (= 4.2.0)
sprockets-rails (>= 2.0.0)
sprockets-rails
rails-dom-testing (2.0.1)
rails-deprecated_sanitizer (1.0.3)
activesupport (>= 4.2.0, < 6.0)
activesupport (>= 4.2.0.alpha)
rails-dom-testing (1.0.7)
activesupport (>= 4.2.0.beta, < 5.0)
nokogiri (~> 1.6.0)
nokogiri (~> 1.6.0)
rails-deprecated_sanitizer (>= 1.0.1)
rails-html-sanitizer (1.0.3)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
loofah (~> 2.0)
railties (5.0.0)
railties (4.2.0)
actionpack (= 5.0.0)
actionpack (= 4.2.0)
activesupport (= 5.0.0)
activesupport (= 4.2.0)
method_source
rake (>= 0.8.7)
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
thor (>= 0.18.1, < 2.0)
rake (11.2.2)
rake (11.2.2)
rb-fsevent (0.9.7)
rdoc (4.2.2)
rb-inotify (0.9.7)
json (~> 1.4)
ffi (>= 0.5.0)
sass (3.4.22)
sass (3.4.22)
sass-rails (5.0.
5
)
sass-rails (5.0.
4
)
railties (>= 4.0.0, <
6
)
railties (>= 4.0.0, <
5.0
)
sass (~> 3.1)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
tilt (>= 1.1, < 3)
spring (1.7.2)
sdoc (0.4.1)
spring-watcher-listen (2.0.0)
json (~> 1.7, >= 1.7.7)
listen (>= 2.7, < 4.0)
rdoc (~> 4.0)
spring (~> 1.2)
sprockets (3.6.2)
sprockets (3.6.3)
concurrent-ruby (~> 1.0)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
rack (> 1, < 3)
sprockets-rails (3.1.1)
sprockets-rails (3.1.1)
actionpack (>= 4.0)
actionpack (>= 4.0)
activesupport (>= 4.0)
activesupport (>= 4.0)
sprockets (>= 3.0.0)
sprockets (>= 3.0.0)
sqlite3 (1.3.11)
sqlite3 (1.3.11
-x86-mingw32
)
thor (0.19.1)
thor (0.19.1)
thread_safe (0.3.5)
thread_safe (0.3.5)
tilt (2.0.5)
tilt (2.0.5)
turbolinks (5.0.0)
turbolinks (2.5.3)
turbolinks-source (~> 5)
coffee-rails
turbolinks-source (5.0.0)
tzinfo (1.2.2)
tzinfo (1.2.2)
thread_safe (~> 0.1)
thread_safe (~> 0.1)
tzinfo-data (1.2016.5)
tzinfo (>= 1.0.0)
uglifier (3.0.0)
uglifier (3.0.0)
execjs (>= 0.3.0, < 3)
execjs (>= 0.3.0, < 3)
web-console (3.3.0)
web-console (2.3.0)
activemodel (>= 4.2)
activemodel (>= 4.0)
debug_inspector
binding_of_caller (>= 0.7.2)
railties (>= 4.2)
railties (>= 4.0)
websocket-driver (0.6.4)
sprockets-rails (>= 2.0, < 4.0)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
PLATFORMS
PLATFORMS
ruby
x86-mingw32
DEPENDENCIES
DEPENDENCIES
byebug
byebug
coffee-rails (~> 4.
2
)
coffee-rails (~> 4.
1.0
)
jbuilder (~> 2.
5
)
jbuilder (~> 2.
0
)
jquery-rails
jquery-rails
listen (~> 3.0.5)
rails (= 4.2.0)
puma (~> 3.0)
rails (~> 5.0.0)
sass-rails (~> 5.0)
sass-rails (~> 5.0)
spring
sdoc (~> 0.4.0)
spring-watcher-listen (~> 2.0.0)
sqlite3
sqlite3
turbolinks
(~> 5)
turbolinks
tzinfo-data
tzinfo-data
uglifier (>= 1.3.0)
uglifier (>= 1.3.0)
web-console
web-console (~> 2.0)
BUNDLED WITH
1.12.5
parkinglot/README.rdoc
0 → 100644
View file @
4504f9bf
== 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
* ...
Please feel free to use a different markup language if you do not plan to run
<tt>rake doc:app</tt>.
parkinglot/Rakefile
View file @
4504f9bf
# Add your own tasks in files placed in lib/tasks ending in .rake,
# 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.
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
require
_relative
'config/application'
require
File
.
expand_path
(
'../config/application'
,
__FILE__
)
Rails
.
application
.
load_tasks
Rails
.
application
.
load_tasks
parkinglot/app/assets/javascripts/application.js
View file @
4504f9bf
...
@@ -5,9 +5,9 @@
...
@@ -5,9 +5,9 @@
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
// 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
// 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.
// compiled file.
//
//
// Read Sprockets README (https://github.com/
rails
/sprockets#sprockets-directives) for details
// Read Sprockets README (https://github.com/
sstephenson
/sprockets#sprockets-directives) for details
// about supported directives.
// about supported directives.
//
//
//= require jquery
//= require jquery
...
...
parkinglot/app/assets/stylesheets/application.css
View file @
4504f9bf
...
@@ -6,9 +6,9 @@
...
@@ -6,9 +6,9 @@
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
* 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
* 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
* compiled file so the styles you add here take precedence over styles defined in any
styles
*
files in this directory. Styles in this file should be added after the last require_* statement.
*
defined in the other CSS/SCSS files in this directory. It is generally better to create a new
*
It is generally better to create a new
file per style scope.
* file per style scope.
*
*
*= require_tree .
*= require_tree .
*= require_self
*= require_self
...
...
parkinglot/app/controllers/application_controller.rb
View file @
4504f9bf
class
ApplicationController
<
ActionController
::
Base
class
ApplicationController
<
ActionController
::
Base
# Prevent CSRF attacks by raising an exception.
# For APIs, you may want to use :null_session instead.
protect_from_forgery
with: :exception
protect_from_forgery
with: :exception
end
end
parkinglot/app/mailers/.keep
0 → 100644
View file @
4504f9bf
parkinglot/app/models/.keep
0 → 100644
View file @
4504f9bf
parkinglot/app/views/layouts/application.html.erb
View file @
4504f9bf
<!DOCTYPE html>
<!DOCTYPE html>
<html>
<html>
<head>
<head>
<title>
Parkinglot
</title>
<title>
Parkinglot
</title>
<%=
csrf_meta_tags
%>
<%=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
=>
true
%>
<%=
javascript_include_tag
'application'
,
'data-turbolinks-track'
=>
true
%>
<%=
csrf_meta_tags
%>
</head>
<body>
<%=
stylesheet_link_tag
'application'
,
media:
'all'
,
'data-turbolinks-track'
:
'reload'
%>
<%=
yield
%>
<%=
javascript_include_tag
'application'
,
'data-turbolinks-track'
:
'reload'
%>
</head>
<body>
</body>
<%=
yield
%>
</body>
</html>
</html>
parkinglot/bin/bundle
View file @
4504f9bf
#!/usr/bin/env ruby
#!/usr/bin/env ruby
.exe
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
load Gem.bin_path('bundler', 'bundle')
load Gem.bin_path('bundler', 'bundle')
parkinglot/bin/rails
View file @
4504f9bf
#!/usr/bin/env ruby
#!/usr/bin/env ruby.exe
begin
APP_PATH = File.expand_path('../../config/application', __FILE__)
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_relative '../config/boot'
require 'rails/commands'
require 'rails/commands'
parkinglot/bin/rake
View file @
4504f9bf
#!/usr/bin/env ruby
#!/usr/bin/env ruby.exe
begin
load
File
.
expand_path
(
'../spring'
,
__FILE__
)
rescue
LoadError
=>
e
raise
unless
e
.
message
.
include?
(
'spring'
)
end
require_relative '../config/boot'
require_relative '../config/boot'
require 'rake'
require 'rake'
Rake.application.run
Rake.application.run
parkinglot/bin/setup
View file @
4504f9bf
#!/usr/bin/env ruby
#!/usr/bin/env ruby
.exe
require 'pathname'
require 'pathname'
require
'fileutils'
include
FileUtils
# path to your application root.
# path to your application root.
APP_ROOT
=
Pathname
.
new
File
.
expand_path
(
'../../'
,
__FILE__
)
APP_ROOT = Pathname.new File.expand_path('../../',
__FILE__)
def
system!
(
*
args
)
Dir.chdir APP_ROOT do
system
(
*
args
)
||
abort
(
"
\n
== Command
#{
args
}
failed =="
)
end
chdir
APP_ROOT
do
# This script is a starting point to setup your application.
# This script is a starting point to setup your application.
# Add necessary setup steps to this file
.
# Add necessary setup steps to this file
:
puts
'== Installing dependencies =='
puts
"== Installing dependencies =="
system
!
'gem install bundler --conservative'
system
"gem install bundler --conservative"
system
(
'bundle check'
)
||
system
!
(
'bundle install'
)
system
"bundle check || bundle install"
# puts "\n== Copying sample files =="
# puts "\n== Copying sample files =="
# unless File.exist?(
'config/database.yml'
)
# unless File.exist?(
"config/database.yml"
)
#
cp 'config/database.yml.sample', 'config/database.yml'
#
system "cp config/database.yml.sample config/database.yml"
# end
# end
puts "\n== Preparing database =="
puts "\n== Preparing database =="
system
!
'bin/rails db:setup'
system
"bin/rake db:setup"
puts "\n== Removing old logs and tempfiles =="
puts "\n== Removing old logs and tempfiles =="
system
!
'bin/rails log:clear tmp:clear'
system "rm -f log/*"
system "rm -rf tmp/cache"
puts "\n== Restarting application server =="
puts "\n== Restarting application server =="
system
!
'bin/rails restart'
system
"touch tmp/restart.txt"
end
end
parkinglot/config.ru
View file @
4504f9bf
# This file is used by Rack-based servers to start the application.
# This file is used by Rack-based servers to start the application.
require_relative
'config/environment'
require
::
File
.
expand_path
(
'../config/environment'
,
__FILE__
)
run
Rails
.
application
run
Rails
.
application
parkinglot/config/application.rb
View file @
4504f9bf
require
_relative
'boot'
require
File
.
expand_path
(
'../boot'
,
__FILE__
)
require
'rails/all'
require
'rails/all'
...
@@ -11,5 +11,16 @@ module Parkinglot
...
@@ -11,5 +11,16 @@ module Parkinglot
# Settings in config/environments/* take precedence over those specified here.
# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
# -- all .rb files in that directory are automatically loaded.
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
# config.time_zone = 'Central Time (US & Canada)'
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
# config.i18n.default_locale = :de
# Do not swallow errors in after_commit/after_rollback callbacks.
config
.
active_record
.
raise_in_transactional_callbacks
=
true
end
end
end
end
parkinglot/config/boot.rb
View file @
4504f9bf
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
'../
Gemfile'
,
__dir
__
)
ENV
[
'BUNDLE_GEMFILE'
]
||=
File
.
expand_path
(
'../
../Gemfile'
,
__FILE
__
)
require
'bundler/setup'
# Set up gems listed in the Gemfile.
require
'bundler/setup'
# Set up gems listed in the Gemfile.
parkinglot/config/environment.rb
View file @
4504f9bf
# Load the Rails application.
# Load the Rails application.
require
_relative
'application'
require
File
.
expand_path
(
'../application'
,
__FILE__
)
# Initialize the Rails application.
# Initialize the Rails application.
Rails
.
application
.
initialize!
Rails
.
application
.
initialize!
parkinglot/config/environments/development.rb
View file @
4504f9bf
...
@@ -9,28 +9,13 @@ Rails.application.configure do
...
@@ -9,28 +9,13 @@ Rails.application.configure do
# Do not eager load code on boot.
# Do not eager load code on boot.
config
.
eager_load
=
false
config
.
eager_load
=
false
# Show full error reports.
# Show full error reports and disable caching.
config
.
consider_all_requests_local
=
true
config
.
consider_all_requests_local
=
true
config
.
action_controller
.
perform_caching
=
false
# 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=172800'
}
else
config
.
action_controller
.
perform_caching
=
false
config
.
cache_store
=
:null_store
end
# Don't care if the mailer can't send.
# Don't care if the mailer can't send.
config
.
action_mailer
.
raise_delivery_errors
=
false
config
.
action_mailer
.
raise_delivery_errors
=
false
config
.
action_mailer
.
perform_caching
=
false
# Print deprecation notices to the Rails logger.
# Print deprecation notices to the Rails logger.
config
.
active_support
.
deprecation
=
:log
config
.
active_support
.
deprecation
=
:log
...
@@ -42,13 +27,15 @@ Rails.application.configure do
...
@@ -42,13 +27,15 @@ Rails.application.configure do
# number of complex assets.
# number of complex assets.
config
.
assets
.
debug
=
true
config
.
assets
.
debug
=
true
# Suppress logger output for asset requests.
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
config
.
assets
.
quiet
=
true
# yet still be able to expire them through the digest params.
config
.
assets
.
digest
=
true
# Adds additional error checking when serving assets at runtime.
# Checks for improperly declared sprockets dependencies.
# Raises helpful error messages.
config
.
assets
.
raise_runtime_errors
=
true
# Raises error for missing translations
# Raises error for missing translations
# config.action_view.raise_on_missing_translations = true
# 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
end
parkinglot/config/environments/production.rb
View file @
4504f9bf
...
@@ -14,9 +14,15 @@ Rails.application.configure do
...
@@ -14,9 +14,15 @@ Rails.application.configure do
config
.
consider_all_requests_local
=
false
config
.
consider_all_requests_local
=
false
config
.
action_controller
.
perform_caching
=
true
config
.
action_controller
.
perform_caching
=
true
# Enable Rack::Cache to put a simple HTTP cache in front of your application
# Add `rack-cache` to your Gemfile before enabling this.
# For large-scale production use, consider using a caching reverse proxy like
# NGINX, varnish or squid.
# config.action_dispatch.rack_cache = true
# Disable serving static files from the `/public` folder by default since
# Disable serving static files from the `/public` folder by default since
# Apache or NGINX already handles this.
# Apache or NGINX already handles this.
config
.
public_file_server
.
enabled
=
ENV
[
'RAILS_SERVE_STATIC_FILES'
].
present?
config
.
serve_static_files
=
ENV
[
'RAILS_SERVE_STATIC_FILES'
].
present?
# Compress JavaScripts and CSS.
# Compress JavaScripts and CSS.
config
.
assets
.
js_compressor
=
:uglifier
config
.
assets
.
js_compressor
=
:uglifier
...
@@ -25,20 +31,16 @@ Rails.application.configure do
...
@@ -25,20 +31,16 @@ Rails.application.configure do
# Do not fallback to assets pipeline if a precompiled asset is missed.
# Do not fallback to assets pipeline if a precompiled asset is missed.
config
.
assets
.
compile
=
false
config
.
assets
.
compile
=
false
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# Asset digests allow you to set far-future HTTP expiration dates on all assets,
# yet still be able to expire them through the digest params.
config
.
assets
.
digest
=
true
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# `config.assets.precompile` and `config.assets.version` have moved to config/initializers/assets.rb
# config.action_controller.asset_host = 'http://assets.example.com'
# Specifies the header that your server uses for sending files.
# 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-Sendfile' # for Apache
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
# 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.
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
# config.force_ssl = true
# config.force_ssl = true
...
@@ -47,15 +49,16 @@ Rails.application.configure do
...
@@ -47,15 +49,16 @@ Rails.application.configure do
config
.
log_level
=
:debug
config
.
log_level
=
:debug
# Prepend all log lines with the following tags.
# Prepend all log lines with the following tags.
config
.
log_tags
=
[
:request_id
]
# config.log_tags = [ :subdomain, :uuid ]
# Use a different logger for distributed setups.
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
# Use a different cache store in production.
# Use a different cache store in production.
# config.cache_store = :mem_cache_store
# config.cache_store = :mem_cache_store
# Use a real queuing backend for Active Job (and separate queues per environment)
# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.active_job.queue_adapter = :resque
# config.action_controller.asset_host = 'http://assets.example.com'
# config.active_job.queue_name_prefix = "parkinglot_#{Rails.env}"
config
.
action_mailer
.
perform_caching
=
false
# Ignore bad email addresses and do not raise email delivery errors.
# 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.
# Set this to true and configure the email server for immediate delivery to raise delivery errors.
...
@@ -71,16 +74,6 @@ Rails.application.configure do
...
@@ -71,16 +74,6 @@ Rails.application.configure do
# Use default logging formatter so that PID and timestamp are not suppressed.
# Use default logging formatter so that PID and timestamp are not suppressed.
config
.
log_formatter
=
::
Logger
::
Formatter
.
new
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.
# Do not dump schema after migrations.
config
.
active_record
.
dump_schema_after_migration
=
false
config
.
active_record
.
dump_schema_after_migration
=
false
end
end
parkinglot/config/environments/test.rb
View file @
4504f9bf
...
@@ -12,11 +12,9 @@ Rails.application.configure do
...
@@ -12,11 +12,9 @@ Rails.application.configure do
# preloads Rails for running tests, you may have to set it to true.
# preloads Rails for running tests, you may have to set it to true.
config
.
eager_load
=
false
config
.
eager_load
=
false
# Configure public file server for tests with Cache-Control for performance.
# Configure static file server for tests with Cache-Control for performance.
config
.
public_file_server
.
enabled
=
true
config
.
serve_static_files
=
true
config
.
public_file_server
.
headers
=
{
config
.
static_cache_control
=
'public, max-age=3600'
'Cache-Control'
=>
'public, max-age=3600'
}
# Show full error reports and disable caching.
# Show full error reports and disable caching.
config
.
consider_all_requests_local
=
true
config
.
consider_all_requests_local
=
true
...
@@ -27,13 +25,15 @@ Rails.application.configure do
...
@@ -27,13 +25,15 @@ Rails.application.configure do
# Disable request forgery protection in test environment.
# Disable request forgery protection in test environment.
config
.
action_controller
.
allow_forgery_protection
=
false
config
.
action_controller
.
allow_forgery_protection
=
false
config
.
action_mailer
.
perform_caching
=
false
# Tell Action Mailer not to deliver emails to the real world.
# Tell Action Mailer not to deliver emails to the real world.
# The :test delivery method accumulates sent emails in the
# The :test delivery method accumulates sent emails in the
# ActionMailer::Base.deliveries array.
# ActionMailer::Base.deliveries array.
config
.
action_mailer
.
delivery_method
=
:test
config
.
action_mailer
.
delivery_method
=
:test
# Randomize the order test cases are executed.
config
.
active_support
.
test_order
=
:random
# Print deprecation notices to the stderr.
# Print deprecation notices to the stderr.
config
.
active_support
.
deprecation
=
:stderr
config
.
active_support
.
deprecation
=
:stderr
...
...
parkinglot/config/initializers/cookies_serializer.rb
View file @
4504f9bf
# Be sure to restart your server when you modify this file.
# 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
Rails
.
application
.
config
.
action_dispatch
.
cookies_serializer
=
:json
parkinglot/config/initializers/wrap_parameters.rb
View file @
4504f9bf
...
@@ -5,10 +5,10 @@
...
@@ -5,10 +5,10 @@
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
ActiveSupport
.
on_load
(
:action_controller
)
do
ActiveSupport
.
on_load
(
:action_controller
)
do
wrap_parameters
format:
[
:json
]
wrap_parameters
format:
[
:json
]
if
respond_to?
(
:wrap_parameters
)
end
end
# To enable root element in JSON for ActiveRecord objects.
# To enable root element in JSON for ActiveRecord objects.
# ActiveSupport.on_load(:active_record) do
# ActiveSupport.on_load(:active_record) do
#
self.include_root_in_json = true
# self.include_root_in_json = true
# end
# end
parkinglot/config/routes.rb
View file @
4504f9bf
Rails
.
application
.
routes
.
draw
do
Rails
.
application
.
routes
.
draw
do
# For details on the DSL available within this file, see http://guides.rubyonrails.org/routing.html
# The priority is based upon order of creation: first created -> highest priority.
# See how all your routes lay out with "rake routes".
# You can have the root of your site routed with "root"
# root 'welcome#index'
# Example of regular route:
# get 'products/:id' => 'catalog#view'
# Example of named route that can be invoked with purchase_url(id: product.id)
# get 'products/:id/purchase' => 'catalog#purchase', as: :purchase
# Example resource route (maps HTTP verbs to controller actions automatically):
# resources :products
# Example resource route with options:
# resources :products do
# member do
# get 'short'
# post 'toggle'
# end
#
# collection do
# get 'sold'
# end
# end
# Example resource route with sub-resources:
# resources :products do
# resources :comments, :sales
# resource :seller
# end
# Example resource route with more complex sub-resources:
# resources :products do
# resources :comments
# resources :sales do
# get 'recent', on: :collection
# end
# end
# Example resource route with concerns:
# concern :toggleable do
# post 'toggle'
# end
# resources :posts, concerns: :toggleable
# resources :photos, concerns: :toggleable
# Example resource route within a namespace:
# namespace :admin do
# # Directs /admin/products/* to Admin::ProductsController
# # (app/controllers/admin/products_controller.rb)
# resources :products
# end
end
end
parkinglot/config/secrets.yml
View file @
4504f9bf
...
@@ -5,16 +5,16 @@
...
@@ -5,16 +5,16 @@
# Make sure the secret is at least 30 characters and all random,
# Make sure the secret is at least 30 characters and all random,
# no regular words or you'll be exposed to dictionary attacks.
# no regular words or you'll be exposed to dictionary attacks.
# You can use `ra
ils
secret` to generate a secure secret key.
# You can use `ra
ke
secret` to generate a secure secret key.
# Make sure the secrets in this file are kept private
# Make sure the secrets in this file are kept private
# if you're sharing your code publicly.
# if you're sharing your code publicly.
development
:
development
:
secret_key_base
:
15c868e40d33b41e52b5d5f7daf42a4f58ddf0e6d9e189f879d901c9ce818a3db63360635b25361d3be2cd9d3f46d3f1620fc4daea7ac21b80da5c8eb99af921
secret_key_base
:
6af929f14c9f4cfe1fa979bfd1b01adc8c6068a047258c78f538c64619ef6bd650fdf5cee65adf1d464bd019e47885a8d7348b7cd5f69ca6b63cdbe9d266a708
test
:
test
:
secret_key_base
:
944d232bac9a1d3bf8e076e443f037e107df923ff34da2620f32a0cbc5839cb4be0bcf44e9ba62261eb9bd675741a51ca3532f25fab4ff08862c194c73b6bfc2
secret_key_base
:
7bc9ef09f4a0a020654f6ad4f66102e7a7250151132ac5f19cf986a2d0e4565ba4fe6cf1bd14d1903ac34d428b2a84448313debfd3e1fa8f155cc5c2db8cd903
# Do not keep production secrets in the repository,
# Do not keep production secrets in the repository,
# instead read values from the environment.
# instead read values from the environment.
...
...
parkinglot/db/seeds.rb
View file @
4504f9bf
# This file should contain all the record creation needed to seed the database with its default values.
# 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 ra
ils db:seed command (or created alongside the database
with db:setup).
# The data can then be loaded with the ra
ke db:seed (or created alongside the db
with db:setup).
#
#
# Examples:
# Examples:
#
#
#
movies = Movie.create([{ name: 'Star Wars' }, { name: 'Lord of the Rings
' }])
#
cities = City.create([{ name: 'Chicago' }, { name: 'Copenhagen
' }])
#
Character.create(name: 'Luke', movie: mov
ies.first)
#
Mayor.create(name: 'Emanuel', city: cit
ies.first)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment