Skip to content

Commit

Permalink
Upgrade to rails 5.1
Browse files Browse the repository at this point in the history
  • Loading branch information
leesmith committed Jul 4, 2017
1 parent 1c252d3 commit 26213f7
Show file tree
Hide file tree
Showing 14 changed files with 156 additions and 123 deletions.
2 changes: 2 additions & 0 deletions .pryrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require 'awesome_print'
AwesomePrint.pry!
181 changes: 91 additions & 90 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -2,49 +2,49 @@ GEM
remote: https://rubygems.org/
remote: https://rails-assets.org/
specs:
actioncable (5.0.2)
actionpack (= 5.0.2)
nio4r (>= 1.2, < 3.0)
actioncable (5.1.2)
actionpack (= 5.1.2)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.0.2)
actionpack (= 5.0.2)
actionview (= 5.0.2)
activejob (= 5.0.2)
actionmailer (5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.2)
actionview (= 5.0.2)
activesupport (= 5.0.2)
actionpack (5.1.2)
actionview (= 5.1.2)
activesupport (= 5.1.2)
rack (~> 2.0)
rack-test (~> 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.2)
activesupport (= 5.0.2)
actionview (5.1.2)
activesupport (= 5.1.2)
builder (~> 3.1)
erubis (~> 2.7.0)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.0.2)
activesupport (= 5.0.2)
activejob (5.1.2)
activesupport (= 5.1.2)
globalid (>= 0.3.6)
activemodel (5.0.2)
activesupport (= 5.0.2)
activerecord (5.0.2)
activemodel (= 5.0.2)
activesupport (= 5.0.2)
arel (~> 7.0)
activesupport (5.0.2)
activemodel (5.1.2)
activesupport (= 5.1.2)
activerecord (5.1.2)
activemodel (= 5.1.2)
activesupport (= 5.1.2)
arel (~> 8.0)
activesupport (5.1.2)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.0)
addressable (2.5.1)
public_suffix (~> 2.0, >= 2.0.2)
arel (7.1.4)
autoprefixer-rails (6.7.6)
arel (8.0.0)
autoprefixer-rails (7.1.1.3)
execjs
awesome_print (1.7.0)
awesome_print (1.8.0)
bcrypt (3.1.11)
better_errors (2.1.1)
coderay (>= 1.0.0)
Expand All @@ -55,10 +55,10 @@ GEM
bootstrap (4.0.0.alpha6)
autoprefixer-rails (>= 6.0.3)
sass (>= 3.4.19)
brakeman (3.5.0)
brakeman (3.7.0)
builder (3.2.3)
byebug (9.0.6)
capybara (2.12.1)
capybara (2.14.4)
addressable
mime-types (>= 1.16)
nokogiri (>= 1.3.3)
Expand All @@ -67,26 +67,27 @@ GEM
xpath (~> 2.0)
code_analyzer (0.4.7)
sexp_processor
codeclimate-test-reporter (1.0.6)
simplecov
codeclimate-test-reporter (1.0.8)
simplecov (<= 0.13)
coderay (1.1.1)
coffee-rails (4.2.1)
coffee-rails (4.2.2)
coffee-script (>= 2.2.0)
railties (>= 4.0.0, < 5.2.x)
railties (>= 4.0.0)
coffee-script (2.4.1)
coffee-script-source
execjs
coffee-script-source (1.12.2)
concurrent-ruby (1.0.5)
daemons (1.2.4)
database_cleaner (1.5.3)
debug_inspector (0.0.2)
database_cleaner (1.6.1)
debug_inspector (0.0.3)
diff-lcs (1.3)
docile (1.1.5)
email_spec (2.1.0)
email_spec (2.1.1)
htmlentities (~> 4.3.3)
launchy (~> 2.1)
mail (~> 2.6.3)
mail (~> 2.6)
erubi (1.6.1)
erubis (2.7.0)
eventmachine (1.2.3)
execjs (2.7.0)
Expand All @@ -95,117 +96,117 @@ GEM
factory_girl_rails (4.8.0)
factory_girl (~> 4.8.0)
railties (>= 3.0.0)
globalid (0.3.7)
activesupport (>= 4.1.0)
hamlit (2.8.0)
globalid (0.4.0)
activesupport (>= 4.2.0)
hamlit (2.8.4)
temple (>= 0.8.0)
thor
tilt
htmlentities (4.3.4)
i18n (0.8.1)
jquery-rails (4.2.2)
i18n (0.8.4)
jquery-rails (4.3.1)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
thor (>= 0.14, < 2.0)
json (2.0.3)
json (2.1.0)
launchy (2.4.3)
addressable (~> 2.3)
loofah (2.0.3)
nokogiri (>= 1.5.9)
mail (2.6.4)
mail (2.6.6)
mime-types (>= 1.16, < 4)
method_source (0.8.2)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_portile2 (2.1.0)
minitest (5.10.1)
nio4r (2.0.0)
nokogiri (1.7.0.1)
mini_portile2 (~> 2.1.0)
pg (0.19.0)
mini_portile2 (2.2.0)
minitest (5.10.2)
nio4r (2.1.0)
nokogiri (1.8.0)
mini_portile2 (~> 2.2.0)
pg (0.21.0)
pry (0.10.4)
coderay (~> 1.1.0)
method_source (~> 0.8.1)
slop (~> 3.4)
pry-byebug (3.4.2)
byebug (~> 9.0)
pry (~> 0.10)
pry-rails (0.3.5)
pry (>= 0.9.10)
pry-rails (0.3.6)
pry (>= 0.10.4)
public_suffix (2.0.5)
rack (2.0.1)
rack (2.0.3)
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.2)
actioncable (= 5.0.2)
actionmailer (= 5.0.2)
actionpack (= 5.0.2)
actionview (= 5.0.2)
activejob (= 5.0.2)
activemodel (= 5.0.2)
activerecord (= 5.0.2)
activesupport (= 5.0.2)
rails (5.1.2)
actioncable (= 5.1.2)
actionmailer (= 5.1.2)
actionpack (= 5.1.2)
actionview (= 5.1.2)
activejob (= 5.1.2)
activemodel (= 5.1.2)
activerecord (= 5.1.2)
activesupport (= 5.1.2)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.2)
railties (= 5.1.2)
sprockets-rails (>= 2.0.0)
rails-assets-tether (1.4.0)
rails-dom-testing (2.0.2)
activesupport (>= 4.2.0, < 6.0)
nokogiri (~> 1.6)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.0.3)
loofah (~> 2.0)
rails_best_practices (1.18.0)
rails_best_practices (1.18.1)
activesupport
code_analyzer (>= 0.4.3)
erubis
i18n
json
require_all
ruby-progressbar
railties (5.0.2)
actionpack (= 5.0.2)
activesupport (= 5.0.2)
railties (5.1.2)
actionpack (= 5.1.2)
activesupport (= 5.1.2)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
rake (12.0.0)
require_all (1.4.0)
rspec-core (3.5.4)
rspec-support (~> 3.5.0)
rspec-expectations (3.5.0)
rspec-core (3.6.0)
rspec-support (~> 3.6.0)
rspec-expectations (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-mocks (3.5.0)
rspec-support (~> 3.6.0)
rspec-mocks (3.6.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-rails (3.5.2)
rspec-support (~> 3.6.0)
rspec-rails (3.6.0)
actionpack (>= 3.0)
activesupport (>= 3.0)
railties (>= 3.0)
rspec-core (~> 3.5.0)
rspec-expectations (~> 3.5.0)
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
rspec-core (~> 3.6.0)
rspec-expectations (~> 3.6.0)
rspec-mocks (~> 3.6.0)
rspec-support (~> 3.6.0)
rspec-support (3.6.0)
ruby-progressbar (1.8.1)
sass (3.4.23)
sass (3.4.24)
sass-rails (5.0.6)
railties (>= 4.0.0, < 6)
sass (~> 3.1)
sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3)
sexp_processor (4.8.0)
sexp_processor (4.9.0)
shoulda-matchers (3.1.1)
activesupport (>= 4.0.0)
simplecov (0.13.0)
docile (~> 1.1.0)
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.0)
simplecov-html (0.10.1)
slop (3.6.0)
spring (2.0.1)
spring (2.0.2)
activesupport (>= 4.2)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
Expand All @@ -215,21 +216,21 @@ GEM
activesupport (>= 4.0)
sprockets (>= 3.0.0)
temple (0.8.0)
thin (1.7.0)
thin (1.7.1)
daemons (~> 1.0, >= 1.0.9)
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
thor (0.19.4)
thread_safe (0.3.6)
tilt (2.0.6)
tzinfo (1.2.2)
tilt (2.0.7)
tzinfo (1.2.3)
thread_safe (~> 0.1)
uglifier (3.1.3)
uglifier (3.2.0)
execjs (>= 0.3.0, < 3)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
xpath (2.0.0)
xpath (2.1.0)
nokogiri (~> 1.3)

PLATFORMS
Expand Down
5 changes: 4 additions & 1 deletion bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,10 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# puts "\n== Copying sample files =="
# Install JavaScript dependencies if using Yarn
# system('bin/yarn')

puts "\n== Copying sample files =="
unless File.exist?('config/database.yml')
cp 'config/database.postgres.yml', 'config/database.yml'
end
Expand Down
11 changes: 11 additions & 0 deletions bin/yarn
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/usr/bin/env ruby
VENDOR_PATH = File.expand_path('..', __dir__)
Dir.chdir(VENDOR_PATH) do
begin
exec "yarnpkg #{ARGV.join(" ")}"
rescue Errno::ENOENT
$stderr.puts "Yarn executable was not detected in the system."
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
exit 1
end
end
3 changes: 3 additions & 0 deletions config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@

module DecentAuthentication
class Application < Rails::Application
# Initialize configuration defaults for originally generated Rails version.
config.load_defaults 5.1

# Settings in config/environments/* take precedence over those specified here.
# Application configuration should go into files in config/initializers
# -- all .rb files in that directory are automatically loaded.
Expand Down
1 change: 1 addition & 0 deletions config/cable.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ test:
production:
adapter: redis
url: redis://localhost:6379/1
channel_prefix: decent_authentication_production
2 changes: 1 addition & 1 deletion config/environments/development.rb
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

config.cache_store = :memory_store
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=172800'
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
}
else
config.action_controller.perform_caching = false
Expand Down
2 changes: 1 addition & 1 deletion config/environments/production.rb
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@
if ENV["RAILS_LOG_TO_STDOUT"].present?
logger = ActiveSupport::Logger.new(STDOUT)
logger.formatter = config.log_formatter
config.logger = ActiveSupport::TaggedLogging.new(logger)
config.logger = ActiveSupport::TaggedLogging.new(logger)
end

# Do not dump schema after migrations.
Expand Down
2 changes: 1 addition & 1 deletion config/environments/test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
# Configure public file server for tests with Cache-Control for performance.
config.public_file_server.enabled = true
config.public_file_server.headers = {
'Cache-Control' => 'public, max-age=3600'
'Cache-Control' => "public, max-age=#{1.hour.seconds.to_i}"
}

# Show full error reports and disable caching.
Expand Down
Loading

0 comments on commit 26213f7

Please sign in to comment.