Skip to content

Commit c634a8d

Browse files
authored
Merge pull request #537 from coopdevs/develop
Release v2.1
2 parents 69bdf5f + 0a16f3d commit c634a8d

File tree

11 files changed

+23
-138
lines changed

11 files changed

+23
-138
lines changed

Capfile

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,7 @@ require 'capistrano/deploy'
1616
# https://github.com/capistrano/passenger
1717
#
1818
require 'capistrano/rails'
19-
20-
stage = ARGV.first
21-
if stage != 'production' # Sorry, production is not ready yet
22-
require 'capistrano/rbenv'
23-
end
19+
require 'capistrano/rbenv'
2420

2521
# Load custom tasks from `lib/capistrano/tasks` if you have any defined
2622
Dir.glob('lib/capistrano/tasks/*.rake').each { |r| import r }

Gemfile

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ gem 'has_scope'
1010
gem 'pundit', '~> 2.0.0'
1111
gem 'pg', '0.21.0'
1212
gem 'hstore_translate'
13-
gem 'dalli'
1413
gem 'devise', '~> 4.5.0'
1514
gem "http_accept_language", '~> 2.1.1'
1615
gem 'unicorn'

Gemfile.lock

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,6 @@ GEM
107107
concurrent-ruby (1.1.5)
108108
connection_pool (2.2.1)
109109
crass (1.0.4)
110-
dalli (2.7.2)
111110
database_cleaner (1.6.2)
112111
debug_inspector (0.0.3)
113112
devise (4.5.0)
@@ -405,7 +404,6 @@ DEPENDENCIES
405404
capistrano-rbenv (~> 2.1)
406405
capybara (~> 3.15)
407406
coffee-rails
408-
dalli
409407
database_cleaner (= 1.6.2)
410408
devise (~> 4.5.0)
411409
dotenv-rails (~> 2.7.1)

app/models/concerns/lazy_recoverable.rb

Lines changed: 0 additions & 18 deletions
This file was deleted.

app/models/user.rb

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
class User < ActiveRecord::Base
2-
include LazyRecoverable
3-
42
devise *[
53
:database_authenticatable,
64
:recoverable,

app/views/devise/passwords/new.html.erb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
<div class="form-group">
1919
<div class="row">
2020
<div class="col-xs-12">
21-
<%= f.submit t(".send_instructions"), class: "btn btn-primary btn-lg col-xs-12" %>
21+
<%= f.submit t(".send_instructions"), class: "btn btn-primary btn-lg col-xs-12", data: { disable_with: '...' } %>
2222
</div>
2323
</div>
2424
</div>

config/database.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@ staging:
3131
database: <%= ENV.fetch('DATABASE_NAME', 'timeoverflow_staging') %>
3232

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

3737
next:
3838
<<: *defaults

config/deploy.rb

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -47,13 +47,20 @@
4747
# Default value for keep_releases is 5
4848
# set :keep_releases, 5
4949

50-
namespace :deploy do
51-
after :restart, :clear_cache do
52-
on roles(:web), in: :groups, limit: 3, wait: 10 do
53-
# Here we can do anything such as:
54-
# within release_path do
55-
# execute :rake, 'cache:clear'
56-
# end
50+
namespace :unicorn do
51+
desc 'reload Unicorn'
52+
task :reload do
53+
on roles(:app) do
54+
execute "sudo systemctl reload timeoverflow"
55+
end
56+
end
57+
end
58+
59+
namespace :sidekiq do
60+
desc 'reload Sidekiq'
61+
task :restart do
62+
on roles(:app) do
63+
execute "sudo systemctl restart sidekiq"
5764
end
5865
end
5966
end
@@ -67,4 +74,8 @@
6774
end
6875
end
6976
end
77+
7078
before "deploy:migrate", "deploy:db:load" if ENV["COLD"]
79+
80+
after "deploy:finishing", "unicorn:reload"
81+
after "deploy:finishing", "sidekiq:restart"

config/environments/next.rb

Lines changed: 0 additions & 98 deletions
This file was deleted.

config/environments/next.rb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
config/environments/production.rb

0 commit comments

Comments
 (0)