Skip to content

Commit

Permalink
Merge pull request #537 from coopdevs/develop
Browse files Browse the repository at this point in the history
Release v2.1
  • Loading branch information
sauloperez authored Jan 22, 2020
2 parents 69bdf5f + 0a16f3d commit c634a8d
Show file tree
Hide file tree
Showing 11 changed files with 23 additions and 138 deletions.
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

0 comments on commit c634a8d

Please sign in to comment.