Skip to content

Release v2.1 #537

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 10 commits into from
Jan 22, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 1 addition & 5 deletions Capfile
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,7 @@ require 'capistrano/deploy'
# https://github.com/capistrano/passenger
#
require 'capistrano/rails'

stage = ARGV.first
if stage != 'production' # Sorry, production is not ready yet
require 'capistrano/rbenv'
end
require 'capistrano/rbenv'

# Load custom tasks from `lib/capistrano/tasks` if you have any defined
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }
1 change: 0 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ gem 'has_scope'
gem 'pundit', '~> 2.0.0'
gem 'pg', '0.21.0'
gem 'hstore_translate'
gem 'dalli'
gem 'devise', '~> 4.5.0'
gem "http_accept_language", '~> 2.1.1'
gem 'unicorn'
Expand Down
2 changes: 0 additions & 2 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,6 @@ GEM
concurrent-ruby (1.1.5)
connection_pool (2.2.1)
crass (1.0.4)
dalli (2.7.2)
database_cleaner (1.6.2)
debug_inspector (0.0.3)
devise (4.5.0)
Expand Down Expand Up @@ -405,7 +404,6 @@ DEPENDENCIES
capistrano-rbenv (~> 2.1)
capybara (~> 3.15)
coffee-rails
dalli
database_cleaner (= 1.6.2)
devise (~> 4.5.0)
dotenv-rails (~> 2.7.1)
Expand Down
18 changes: 0 additions & 18 deletions app/models/concerns/lazy_recoverable.rb

This file was deleted.

2 changes: 0 additions & 2 deletions app/models/user.rb
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
class User < ActiveRecord::Base
include LazyRecoverable

devise *[
:database_authenticatable,
:recoverable,
Expand Down
2 changes: 1 addition & 1 deletion app/views/devise/passwords/new.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
<div class="form-group">
<div class="row">
<div class="col-xs-12">
<%= f.submit t(".send_instructions"), class: "btn btn-primary btn-lg col-xs-12" %>
<%= f.submit t(".send_instructions"), class: "btn btn-primary btn-lg col-xs-12", data: { disable_with: '...' } %>
</div>
</div>
</div>
Expand Down
4 changes: 2 additions & 2 deletions config/database.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@ staging:
database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_staging') %>

production:
# Set DATABASE_URL environment variable
url: <%= ENV['DATABASE_URL'] %>
<<: *defaults
database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_production') %>

next:
<<: *defaults
Expand Down
25 changes: 18 additions & 7 deletions config/deploy.rb
Original file line number Diff line number Diff line change
Expand Up @@ -47,13 +47,20 @@
# Default value for keep_releases is 5
# set :keep_releases, 5

namespace :deploy do
after :restart, :clear_cache do
on roles(:web), in: :groups, limit: 3, wait: 10 do
# Here we can do anything such as:
# within release_path do
# execute :rake, 'cache:clear'
# end
namespace :unicorn do
desc 'reload Unicorn'
task :reload do
on roles(:app) do
execute "sudo systemctl reload timeoverflow"
end
end
end

namespace :sidekiq do
desc 'reload Sidekiq'
task :restart do
on roles(:app) do
execute "sudo systemctl restart sidekiq"
end
end
end
Expand All @@ -67,4 +74,8 @@
end
end
end

before "deploy:migrate", "deploy:db:load" if ENV["COLD"]

after "deploy:finishing", "unicorn:reload"
after "deploy:finishing", "sidekiq:restart"
98 changes: 0 additions & 98 deletions config/environments/next.rb

This file was deleted.

1 change: 1 addition & 0 deletions config/environments/next.rb
1 change: 0 additions & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
config.cache_store = :dalli_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
Expand Down
1 change: 0 additions & 1 deletion config/environments/staging.rb
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@

# Use a different cache store in production.
# config.cache_store = :mem_cache_store
config.cache_store = :dalli_store

# Enable serving of images, stylesheets, and JavaScripts from an asset server.
# config.action_controller.asset_host = 'http://assets.example.com'
Expand Down