Depreciation 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- metadata +4 -120
- data/.gitignore +0 -23
- data/Gemfile +0 -54
- data/Gemfile.lock +0 -237
- data/README.md +0 -24
- data/Rakefile +0 -6
- data/app/assets/config/manifest.js +0 -3
- data/app/assets/images/.keep +0 -0
- data/app/assets/javascripts/application.js +0 -17
- data/app/assets/javascripts/brands.coffee +0 -3
- data/app/assets/javascripts/cable.js +0 -13
- data/app/assets/javascripts/channels/.keep +0 -0
- data/app/assets/stylesheets/application.css.scss +0 -17
- data/app/assets/stylesheets/brands.scss +0 -3
- data/app/channels/application_cable/channel.rb +0 -4
- data/app/channels/application_cable/connection.rb +0 -4
- data/app/controllers/application_controller.rb +0 -3
- data/app/controllers/brands_controller.rb +0 -43
- data/app/controllers/concerns/.keep +0 -0
- data/app/helpers/application_helper.rb +0 -2
- data/app/helpers/brands_helper.rb +0 -2
- data/app/jobs/application_job.rb +0 -2
- data/app/mailers/application_mailer.rb +0 -4
- data/app/models/application_record.rb +0 -3
- data/app/models/brand.rb +0 -5
- data/app/models/concerns/.keep +0 -0
- data/app/models/user.rb +0 -6
- data/app/models/variant.rb +0 -3
- data/app/views/brands/_form.html.erb +0 -4
- data/app/views/brands/edit.html.erb +0 -3
- data/app/views/brands/index.html.erb +0 -5
- data/app/views/brands/new.html.erb +0 -2
- data/app/views/brands/show.html.erb +0 -36
- data/app/views/devise/confirmations/new.html.erb +0 -16
- data/app/views/devise/mailer/confirmation_instructions.html.erb +0 -5
- data/app/views/devise/mailer/email_changed.html.erb +0 -7
- data/app/views/devise/mailer/password_change.html.erb +0 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +0 -8
- data/app/views/devise/mailer/unlock_instructions.html.erb +0 -7
- data/app/views/devise/passwords/edit.html.erb +0 -19
- data/app/views/devise/passwords/new.html.erb +0 -15
- data/app/views/devise/registrations/edit.html.erb +0 -27
- data/app/views/devise/registrations/new.html.erb +0 -78
- data/app/views/devise/sessions/new.html.erb +0 -36
- data/app/views/devise/shared/_links.html.erb +0 -25
- data/app/views/devise/unlocks/new.html.erb +0 -16
- data/app/views/layouts/application.html.erb +0 -34
- data/app/views/layouts/mailer.html.erb +0 -13
- data/app/views/layouts/mailer.text.erb +0 -1
- data/bin/bundle +0 -3
- data/bin/rails +0 -4
- data/bin/rake +0 -4
- data/bin/setup +0 -38
- data/bin/update +0 -29
- data/bin/yarn +0 -11
- data/config.ru +0 -5
- data/config/application.rb +0 -18
- data/config/boot.rb +0 -3
- data/config/cable.yml +0 -10
- data/config/database.yml +0 -25
- data/config/environment.rb +0 -5
- data/config/environments/development.rb +0 -56
- data/config/environments/production.rb +0 -91
- data/config/environments/test.rb +0 -42
- data/config/initializers/application_controller_renderer.rb +0 -8
- data/config/initializers/assets.rb +0 -14
- data/config/initializers/backtrace_silencers.rb +0 -7
- data/config/initializers/cookies_serializer.rb +0 -5
- data/config/initializers/devise.rb +0 -283
- data/config/initializers/filter_parameter_logging.rb +0 -4
- data/config/initializers/inflections.rb +0 -16
- data/config/initializers/mime_types.rb +0 -4
- data/config/initializers/simple_form.rb +0 -170
- data/config/initializers/simple_form_bootstrap.rb +0 -155
- data/config/initializers/wrap_parameters.rb +0 -14
- data/config/locales/devise.en.yml +0 -64
- data/config/locales/en.yml +0 -33
- data/config/locales/simple_form.en.yml +0 -31
- data/config/puma.rb +0 -56
- data/config/routes.rb +0 -8
- data/config/secrets.yml +0 -32
- data/db/migrate/20180405123506_create_brands.rb +0 -9
- data/db/migrate/20180405124007_create_variants.rb +0 -18
- data/db/migrate/20180405142003_devise_create_users.rb +0 -44
- data/db/schema.rb +0 -83
- data/db/seeds.rb +0 -22
- data/lib/assets/.keep +0 -0
- data/lib/tasks/.keep +0 -0
- data/lib/templates/erb/scaffold/_form.html.erb +0 -14
- data/log/.keep +0 -0
- data/package.json +0 -7
- data/public/404.html +0 -67
- data/public/422.html +0 -67
- data/public/500.html +0 -66
- data/public/apple-touch-icon-precomposed.png +0 -0
- data/public/apple-touch-icon.png +0 -0
- data/public/favicon.ico +0 -0
- data/public/robots.txt +0 -1
- data/test/application_system_test_case.rb +0 -5
- data/test/controllers/.keep +0 -0
- data/test/controllers/brands_controller_test.rb +0 -7
- data/test/fixtures/.keep +0 -0
- data/test/fixtures/brands.yml +0 -7
- data/test/fixtures/files/.keep +0 -0
- data/test/fixtures/users.yml +0 -11
- data/test/fixtures/variants.yml +0 -23
- data/test/helpers/.keep +0 -0
- data/test/integration/.keep +0 -0
- data/test/mailers/.keep +0 -0
- data/test/models/.keep +0 -0
- data/test/models/brand_test.rb +0 -7
- data/test/models/user_test.rb +0 -7
- data/test/models/variant_test.rb +0 -7
- data/test/system/.keep +0 -0
- data/test/test_helper.rb +0 -10
- data/tmp/.keep +0 -0
- data/vendor/.keep +0 -0
@@ -1,155 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
# Use this setup block to configure all options available in SimpleForm.
|
3
|
-
SimpleForm.setup do |config|
|
4
|
-
config.error_notification_class = 'alert alert-danger'
|
5
|
-
config.button_class = 'btn btn-default'
|
6
|
-
config.boolean_label_class = nil
|
7
|
-
|
8
|
-
config.wrappers :vertical_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
9
|
-
b.use :html5
|
10
|
-
b.use :placeholder
|
11
|
-
b.optional :maxlength
|
12
|
-
b.optional :minlength
|
13
|
-
b.optional :pattern
|
14
|
-
b.optional :min_max
|
15
|
-
b.optional :readonly
|
16
|
-
b.use :label, class: 'control-label'
|
17
|
-
|
18
|
-
b.use :input, class: 'form-control'
|
19
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
20
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
21
|
-
end
|
22
|
-
|
23
|
-
config.wrappers :vertical_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
24
|
-
b.use :html5
|
25
|
-
b.use :placeholder
|
26
|
-
b.optional :maxlength
|
27
|
-
b.optional :minlength
|
28
|
-
b.optional :readonly
|
29
|
-
b.use :label, class: 'control-label'
|
30
|
-
|
31
|
-
b.use :input
|
32
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
33
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
34
|
-
end
|
35
|
-
|
36
|
-
config.wrappers :vertical_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
37
|
-
b.use :html5
|
38
|
-
b.optional :readonly
|
39
|
-
|
40
|
-
b.wrapper tag: 'div', class: 'checkbox' do |ba|
|
41
|
-
ba.use :label_input
|
42
|
-
end
|
43
|
-
|
44
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
45
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
46
|
-
end
|
47
|
-
|
48
|
-
config.wrappers :vertical_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
49
|
-
b.use :html5
|
50
|
-
b.optional :readonly
|
51
|
-
b.use :label, class: 'control-label'
|
52
|
-
b.use :input
|
53
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
54
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
55
|
-
end
|
56
|
-
|
57
|
-
config.wrappers :horizontal_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
58
|
-
b.use :html5
|
59
|
-
b.use :placeholder
|
60
|
-
b.optional :maxlength
|
61
|
-
b.optional :minlength
|
62
|
-
b.optional :pattern
|
63
|
-
b.optional :min_max
|
64
|
-
b.optional :readonly
|
65
|
-
b.use :label, class: 'col-sm-3 control-label'
|
66
|
-
|
67
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
68
|
-
ba.use :input, class: 'form-control'
|
69
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
70
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
71
|
-
end
|
72
|
-
end
|
73
|
-
|
74
|
-
config.wrappers :horizontal_file_input, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
75
|
-
b.use :html5
|
76
|
-
b.use :placeholder
|
77
|
-
b.optional :maxlength
|
78
|
-
b.optional :minlength
|
79
|
-
b.optional :readonly
|
80
|
-
b.use :label, class: 'col-sm-3 control-label'
|
81
|
-
|
82
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
83
|
-
ba.use :input
|
84
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
85
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
86
|
-
end
|
87
|
-
end
|
88
|
-
|
89
|
-
config.wrappers :horizontal_boolean, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
90
|
-
b.use :html5
|
91
|
-
b.optional :readonly
|
92
|
-
|
93
|
-
b.wrapper tag: 'div', class: 'col-sm-offset-3 col-sm-9' do |wr|
|
94
|
-
wr.wrapper tag: 'div', class: 'checkbox' do |ba|
|
95
|
-
ba.use :label_input
|
96
|
-
end
|
97
|
-
|
98
|
-
wr.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
99
|
-
wr.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
100
|
-
end
|
101
|
-
end
|
102
|
-
|
103
|
-
config.wrappers :horizontal_radio_and_checkboxes, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
104
|
-
b.use :html5
|
105
|
-
b.optional :readonly
|
106
|
-
|
107
|
-
b.use :label, class: 'col-sm-3 control-label'
|
108
|
-
|
109
|
-
b.wrapper tag: 'div', class: 'col-sm-9' do |ba|
|
110
|
-
ba.use :input
|
111
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
112
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
113
|
-
end
|
114
|
-
end
|
115
|
-
|
116
|
-
config.wrappers :inline_form, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
117
|
-
b.use :html5
|
118
|
-
b.use :placeholder
|
119
|
-
b.optional :maxlength
|
120
|
-
b.optional :minlength
|
121
|
-
b.optional :pattern
|
122
|
-
b.optional :min_max
|
123
|
-
b.optional :readonly
|
124
|
-
b.use :label, class: 'sr-only'
|
125
|
-
|
126
|
-
b.use :input, class: 'form-control'
|
127
|
-
b.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
128
|
-
b.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
129
|
-
end
|
130
|
-
|
131
|
-
config.wrappers :multi_select, tag: 'div', class: 'form-group', error_class: 'has-error' do |b|
|
132
|
-
b.use :html5
|
133
|
-
b.optional :readonly
|
134
|
-
b.use :label, class: 'control-label'
|
135
|
-
b.wrapper tag: 'div', class: 'form-inline' do |ba|
|
136
|
-
ba.use :input, class: 'form-control'
|
137
|
-
ba.use :error, wrap_with: { tag: 'span', class: 'help-block' }
|
138
|
-
ba.use :hint, wrap_with: { tag: 'p', class: 'help-block' }
|
139
|
-
end
|
140
|
-
end
|
141
|
-
# Wrappers for forms and inputs using the Bootstrap toolkit.
|
142
|
-
# Check the Bootstrap docs (http://getbootstrap.com)
|
143
|
-
# to learn about the different styles for forms and inputs,
|
144
|
-
# buttons and other elements.
|
145
|
-
config.default_wrapper = :vertical_form
|
146
|
-
config.wrapper_mappings = {
|
147
|
-
check_boxes: :vertical_radio_and_checkboxes,
|
148
|
-
radio_buttons: :vertical_radio_and_checkboxes,
|
149
|
-
file: :vertical_file_input,
|
150
|
-
boolean: :vertical_boolean,
|
151
|
-
datetime: :multi_select,
|
152
|
-
date: :multi_select,
|
153
|
-
time: :multi_select
|
154
|
-
}
|
155
|
-
end
|
@@ -1,14 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# This file contains settings for ActionController::ParamsWrapper which
|
4
|
-
# is enabled by default.
|
5
|
-
|
6
|
-
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
7
|
-
ActiveSupport.on_load(:action_controller) do
|
8
|
-
wrap_parameters format: [:json]
|
9
|
-
end
|
10
|
-
|
11
|
-
# To enable root element in JSON for ActiveRecord objects.
|
12
|
-
# ActiveSupport.on_load(:active_record) do
|
13
|
-
# self.include_root_in_json = true
|
14
|
-
# end
|
@@ -1,64 +0,0 @@
|
|
1
|
-
# Additional translations at https://github.com/plataformatec/devise/wiki/I18n
|
2
|
-
|
3
|
-
en:
|
4
|
-
devise:
|
5
|
-
confirmations:
|
6
|
-
confirmed: "Your email address has been successfully confirmed."
|
7
|
-
send_instructions: "You will receive an email with instructions for how to confirm your email address in a few minutes."
|
8
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive an email with instructions for how to confirm your email address in a few minutes."
|
9
|
-
failure:
|
10
|
-
already_authenticated: "You are already signed in."
|
11
|
-
inactive: "Your account is not activated yet."
|
12
|
-
invalid: "Invalid %{authentication_keys} or password."
|
13
|
-
locked: "Your account is locked."
|
14
|
-
last_attempt: "You have one more attempt before your account is locked."
|
15
|
-
not_found_in_database: "Invalid %{authentication_keys} or password."
|
16
|
-
timeout: "Your session expired. Please sign in again to continue."
|
17
|
-
unauthenticated: "You need to sign in or sign up before continuing."
|
18
|
-
unconfirmed: "You have to confirm your email address before continuing."
|
19
|
-
mailer:
|
20
|
-
confirmation_instructions:
|
21
|
-
subject: "Confirmation instructions"
|
22
|
-
reset_password_instructions:
|
23
|
-
subject: "Reset password instructions"
|
24
|
-
unlock_instructions:
|
25
|
-
subject: "Unlock instructions"
|
26
|
-
email_changed:
|
27
|
-
subject: "Email Changed"
|
28
|
-
password_change:
|
29
|
-
subject: "Password Changed"
|
30
|
-
omniauth_callbacks:
|
31
|
-
failure: "Could not authenticate you from %{kind} because \"%{reason}\"."
|
32
|
-
success: "Successfully authenticated from %{kind} account."
|
33
|
-
passwords:
|
34
|
-
no_token: "You can't access this page without coming from a password reset email. If you do come from a password reset email, please make sure you used the full URL provided."
|
35
|
-
send_instructions: "You will receive an email with instructions on how to reset your password in a few minutes."
|
36
|
-
send_paranoid_instructions: "If your email address exists in our database, you will receive a password recovery link at your email address in a few minutes."
|
37
|
-
updated: "Your password has been changed successfully. You are now signed in."
|
38
|
-
updated_not_active: "Your password has been changed successfully."
|
39
|
-
registrations:
|
40
|
-
destroyed: "Bye! Your account has been successfully cancelled. We hope to see you again soon."
|
41
|
-
signed_up: "Welcome! You have signed up successfully."
|
42
|
-
signed_up_but_inactive: "You have signed up successfully. However, we could not sign you in because your account is not yet activated."
|
43
|
-
signed_up_but_locked: "You have signed up successfully. However, we could not sign you in because your account is locked."
|
44
|
-
signed_up_but_unconfirmed: "A message with a confirmation link has been sent to your email address. Please follow the link to activate your account."
|
45
|
-
update_needs_confirmation: "You updated your account successfully, but we need to verify your new email address. Please check your email and follow the confirm link to confirm your new email address."
|
46
|
-
updated: "Your account has been updated successfully."
|
47
|
-
sessions:
|
48
|
-
signed_in: "Signed in successfully."
|
49
|
-
signed_out: "Signed out successfully."
|
50
|
-
already_signed_out: "Signed out successfully."
|
51
|
-
unlocks:
|
52
|
-
send_instructions: "You will receive an email with instructions for how to unlock your account in a few minutes."
|
53
|
-
send_paranoid_instructions: "If your account exists, you will receive an email with instructions for how to unlock it in a few minutes."
|
54
|
-
unlocked: "Your account has been unlocked successfully. Please sign in to continue."
|
55
|
-
errors:
|
56
|
-
messages:
|
57
|
-
already_confirmed: "was already confirmed, please try signing in"
|
58
|
-
confirmation_period_expired: "needs to be confirmed within %{period}, please request a new one"
|
59
|
-
expired: "has expired, please request a new one"
|
60
|
-
not_found: "not found"
|
61
|
-
not_locked: "was not locked"
|
62
|
-
not_saved:
|
63
|
-
one: "1 error prohibited this %{resource} from being saved:"
|
64
|
-
other: "%{count} errors prohibited this %{resource} from being saved:"
|
data/config/locales/en.yml
DELETED
@@ -1,33 +0,0 @@
|
|
1
|
-
# Files in the config/locales directory are used for internationalization
|
2
|
-
# and are automatically loaded by Rails. If you want to use locales other
|
3
|
-
# than English, add the necessary files in this directory.
|
4
|
-
#
|
5
|
-
# To use the locales, use `I18n.t`:
|
6
|
-
#
|
7
|
-
# I18n.t 'hello'
|
8
|
-
#
|
9
|
-
# In views, this is aliased to just `t`:
|
10
|
-
#
|
11
|
-
# <%= t('hello') %>
|
12
|
-
#
|
13
|
-
# To use a different locale, set it with `I18n.locale`:
|
14
|
-
#
|
15
|
-
# I18n.locale = :es
|
16
|
-
#
|
17
|
-
# This would use the information in config/locales/es.yml.
|
18
|
-
#
|
19
|
-
# The following keys must be escaped otherwise they will not be retrieved by
|
20
|
-
# the default I18n backend:
|
21
|
-
#
|
22
|
-
# true, false, on, off, yes, no
|
23
|
-
#
|
24
|
-
# Instead, surround them with single quotes.
|
25
|
-
#
|
26
|
-
# en:
|
27
|
-
# 'true': 'foo'
|
28
|
-
#
|
29
|
-
# To learn more, please read the Rails Internationalization guide
|
30
|
-
# available at http://guides.rubyonrails.org/i18n.html.
|
31
|
-
|
32
|
-
en:
|
33
|
-
hello: "Hello world"
|
@@ -1,31 +0,0 @@
|
|
1
|
-
en:
|
2
|
-
simple_form:
|
3
|
-
"yes": 'Yes'
|
4
|
-
"no": 'No'
|
5
|
-
required:
|
6
|
-
text: 'required'
|
7
|
-
mark: '*'
|
8
|
-
# You can uncomment the line below if you need to overwrite the whole required html.
|
9
|
-
# When using html, text and mark won't be used.
|
10
|
-
# html: '<abbr title="required">*</abbr>'
|
11
|
-
error_notification:
|
12
|
-
default_message: "Please review the problems below:"
|
13
|
-
# Examples
|
14
|
-
# labels:
|
15
|
-
# defaults:
|
16
|
-
# password: 'Password'
|
17
|
-
# user:
|
18
|
-
# new:
|
19
|
-
# email: 'E-mail to sign in.'
|
20
|
-
# edit:
|
21
|
-
# email: 'E-mail.'
|
22
|
-
# hints:
|
23
|
-
# defaults:
|
24
|
-
# username: 'User name to sign in.'
|
25
|
-
# password: 'No special characters, please.'
|
26
|
-
# include_blanks:
|
27
|
-
# defaults:
|
28
|
-
# age: 'Rather not say'
|
29
|
-
# prompts:
|
30
|
-
# defaults:
|
31
|
-
# age: 'Select your age'
|
data/config/puma.rb
DELETED
@@ -1,56 +0,0 @@
|
|
1
|
-
# Puma can serve each request in a thread from an internal thread pool.
|
2
|
-
# The `threads` method setting takes two numbers: a minimum and maximum.
|
3
|
-
# Any libraries that use thread pools should be configured to match
|
4
|
-
# the maximum value specified for Puma. Default is set to 5 threads for minimum
|
5
|
-
# and maximum; this matches the default thread size of Active Record.
|
6
|
-
#
|
7
|
-
threads_count = ENV.fetch("RAILS_MAX_THREADS") { 5 }
|
8
|
-
threads threads_count, threads_count
|
9
|
-
|
10
|
-
# Specifies the `port` that Puma will listen on to receive requests; default is 3000.
|
11
|
-
#
|
12
|
-
port ENV.fetch("PORT") { 3000 }
|
13
|
-
|
14
|
-
# Specifies the `environment` that Puma will run in.
|
15
|
-
#
|
16
|
-
environment ENV.fetch("RAILS_ENV") { "development" }
|
17
|
-
|
18
|
-
# Specifies the number of `workers` to boot in clustered mode.
|
19
|
-
# Workers are forked webserver processes. If using threads and workers together
|
20
|
-
# the concurrency of the application would be max `threads` * `workers`.
|
21
|
-
# Workers do not work on JRuby or Windows (both of which do not support
|
22
|
-
# processes).
|
23
|
-
#
|
24
|
-
# workers ENV.fetch("WEB_CONCURRENCY") { 2 }
|
25
|
-
|
26
|
-
# Use the `preload_app!` method when specifying a `workers` number.
|
27
|
-
# This directive tells Puma to first boot the application and load code
|
28
|
-
# before forking the application. This takes advantage of Copy On Write
|
29
|
-
# process behavior so workers use less memory. If you use this option
|
30
|
-
# you need to make sure to reconnect any threads in the `on_worker_boot`
|
31
|
-
# block.
|
32
|
-
#
|
33
|
-
# preload_app!
|
34
|
-
|
35
|
-
# If you are preloading your application and using Active Record, it's
|
36
|
-
# recommended that you close any connections to the database before workers
|
37
|
-
# are forked to prevent connection leakage.
|
38
|
-
#
|
39
|
-
# before_fork do
|
40
|
-
# ActiveRecord::Base.connection_pool.disconnect! if defined?(ActiveRecord)
|
41
|
-
# end
|
42
|
-
|
43
|
-
# The code in the `on_worker_boot` will be called if you are using
|
44
|
-
# clustered mode by specifying a number of `workers`. After each worker
|
45
|
-
# process is booted, this block will be run. If you are using the `preload_app!`
|
46
|
-
# option, you will want to use this block to reconnect to any threads
|
47
|
-
# or connections that may have been created at application boot, as Ruby
|
48
|
-
# cannot share connections between processes.
|
49
|
-
#
|
50
|
-
# on_worker_boot do
|
51
|
-
# ActiveRecord::Base.establish_connection if defined?(ActiveRecord)
|
52
|
-
# end
|
53
|
-
#
|
54
|
-
|
55
|
-
# Allow puma to be restarted by `rails restart` command.
|
56
|
-
plugin :tmp_restart
|
data/config/routes.rb
DELETED
data/config/secrets.yml
DELETED
@@ -1,32 +0,0 @@
|
|
1
|
-
# Be sure to restart your server when you modify this file.
|
2
|
-
|
3
|
-
# Your secret key is used for verifying the integrity of signed cookies.
|
4
|
-
# If you change this key, all old signed cookies will become invalid!
|
5
|
-
|
6
|
-
# Make sure the secret is at least 30 characters and all random,
|
7
|
-
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
-
# You can use `rails secret` to generate a secure secret key.
|
9
|
-
|
10
|
-
# Make sure the secrets in this file are kept private
|
11
|
-
# if you're sharing your code publicly.
|
12
|
-
|
13
|
-
# Shared secrets are available across all environments.
|
14
|
-
|
15
|
-
# shared:
|
16
|
-
# api_key: a1B2c3D4e5F6
|
17
|
-
|
18
|
-
# Environmental secrets are only available for that specific environment.
|
19
|
-
|
20
|
-
development:
|
21
|
-
secret_key_base: e30c84c03d941ef591207eaf519609f8b81b22420413f98ffcefb34077ba8a0394487037c8ff715c7270e5ce1ed2b9f75de62e09c3c95113f73c514d0499d21b
|
22
|
-
|
23
|
-
test:
|
24
|
-
secret_key_base: 68aeece30cb736c2d8c030a47deabd3153fe21061179c52ea19d9d3fb6b23bb32478fe21abc05f4c9050b690174e973f4fa8607ab844ff1d59fd60023cce62fa
|
25
|
-
|
26
|
-
# Do not keep production secrets in the unencrypted secrets file.
|
27
|
-
# Instead, either read values from the environment.
|
28
|
-
# Or, use `bin/rails secrets:setup` to configure encrypted secrets
|
29
|
-
# and move the `production:` environment over there.
|
30
|
-
|
31
|
-
production:
|
32
|
-
secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
|
@@ -1,18 +0,0 @@
|
|
1
|
-
class CreateVariants < ActiveRecord::Migration[5.1]
|
2
|
-
def change
|
3
|
-
create_table :variants do |t|
|
4
|
-
t.string :name
|
5
|
-
t.integer :enginecap
|
6
|
-
t.integer :year
|
7
|
-
t.string :fueltype
|
8
|
-
t.string :gearshift
|
9
|
-
t.integer :fuelcap
|
10
|
-
t.integer :seating
|
11
|
-
t.float :mileage
|
12
|
-
t.float :price
|
13
|
-
t.references :brand, foreign_key: true
|
14
|
-
|
15
|
-
t.timestamps
|
16
|
-
end
|
17
|
-
end
|
18
|
-
end
|
@@ -1,44 +0,0 @@
|
|
1
|
-
# frozen_string_literal: true
|
2
|
-
|
3
|
-
class DeviseCreateUsers < ActiveRecord::Migration[5.1]
|
4
|
-
def change
|
5
|
-
create_table :users do |t|
|
6
|
-
## Database authenticatable
|
7
|
-
t.string :email, null: false, default: ""
|
8
|
-
t.string :encrypted_password, null: false, default: ""
|
9
|
-
|
10
|
-
## Recoverable
|
11
|
-
t.string :reset_password_token
|
12
|
-
t.datetime :reset_password_sent_at
|
13
|
-
|
14
|
-
## Rememberable
|
15
|
-
t.datetime :remember_created_at
|
16
|
-
|
17
|
-
## Trackable
|
18
|
-
t.integer :sign_in_count, default: 0, null: false
|
19
|
-
t.datetime :current_sign_in_at
|
20
|
-
t.datetime :last_sign_in_at
|
21
|
-
t.string :current_sign_in_ip
|
22
|
-
t.string :last_sign_in_ip
|
23
|
-
|
24
|
-
## Confirmable
|
25
|
-
# t.string :confirmation_token
|
26
|
-
# t.datetime :confirmed_at
|
27
|
-
# t.datetime :confirmation_sent_at
|
28
|
-
# t.string :unconfirmed_email # Only if using reconfirmable
|
29
|
-
|
30
|
-
## Lockable
|
31
|
-
# t.integer :failed_attempts, default: 0, null: false # Only if lock strategy is :failed_attempts
|
32
|
-
# t.string :unlock_token # Only if unlock strategy is :email or :both
|
33
|
-
# t.datetime :locked_at
|
34
|
-
|
35
|
-
|
36
|
-
t.timestamps null: false
|
37
|
-
end
|
38
|
-
|
39
|
-
add_index :users, :email, unique: true
|
40
|
-
add_index :users, :reset_password_token, unique: true
|
41
|
-
# add_index :users, :confirmation_token, unique: true
|
42
|
-
# add_index :users, :unlock_token, unique: true
|
43
|
-
end
|
44
|
-
end
|