Skip to content

Commit

Permalink
Merge pull request eurucamp#53 from isleofruby/feature/rails-5.1.6
Browse files Browse the repository at this point in the history
Rails 5.1.6
  • Loading branch information
myabc authored Apr 19, 2018
2 parents 2496d69 + 75582d0 commit 72c75a7
Show file tree
Hide file tree
Showing 41 changed files with 249 additions and 144 deletions.
8 changes: 6 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
source 'https://rubygems.org'

gem 'rails', '5.0.1'
gem 'rails', '5.1.6'
gem 'pg'

gem 'puma', '~> 3.11.4'
Expand All @@ -18,7 +18,7 @@ gem 'modernizr-rails'
gem 'sprockets-rails', '~> 3.2.0'
gem 'jquery-rails'
gem 'turbolinks'
gem 'jbuilder', '~> 1.0.1'
gem 'jbuilder', '~> 2.5'
gem 'bourbon', '~> 5.0.0'
gem 'neat', '~> 2.1.0'
gem 'haml-rails'
Expand All @@ -38,6 +38,10 @@ group :development do
gem 'foreman'
gem 'better_errors'
gem 'binding_of_caller'

gem 'listen', '>= 3.0.5', '< 3.2'
gem 'spring'
gem 'spring-watcher-listen', '~> 2.0.0'
end

group :test, :development do
Expand Down
123 changes: 67 additions & 56 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4,50 +4,50 @@ GEM
accept_values_for (0.7.4)
activemodel (>= 4.2, < 5.2)
rspec (>= 2.0, < 4.0)
actioncable (5.0.1)
actionpack (= 5.0.1)
nio4r (~> 1.2)
actioncable (5.1.6)
actionpack (= 5.1.6)
nio4r (~> 2.0)
websocket-driver (~> 0.6.1)
actionmailer (5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
actionmailer (5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (5.0.1)
actionview (= 5.0.1)
activesupport (= 5.0.1)
actionpack (5.1.6)
actionview (= 5.1.6)
activesupport (= 5.1.6)
rack (~> 2.0)
rack-test (~> 0.6.3)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
actionview (5.0.1)
activesupport (= 5.0.1)
actionview (5.1.6)
activesupport (= 5.1.6)
builder (~> 3.1)
erubis (~> 2.7.0)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.0.2)
activejob (5.0.1)
activesupport (= 5.0.1)
rails-html-sanitizer (~> 1.0, >= 1.0.3)
activejob (5.1.6)
activesupport (= 5.1.6)
globalid (>= 0.3.6)
activemodel (5.0.1)
activesupport (= 5.0.1)
activemodel (5.1.6)
activesupport (= 5.1.6)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (5.0.1)
activemodel (= 5.0.1)
activesupport (= 5.0.1)
arel (~> 7.0)
activesupport (5.0.1)
activerecord (5.1.6)
activemodel (= 5.1.6)
activesupport (= 5.1.6)
arel (~> 8.0)
activesupport (5.1.6)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (~> 0.7)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
addressable (2.5.2)
public_suffix (>= 2.0.2, < 4.0)
arel (7.1.4)
arel (8.0.0)
autoprefixer-rails (8.3.0)
execjs
bcrypt (3.1.11)
Expand Down Expand Up @@ -113,8 +113,8 @@ GEM
ffi (1.9.23)
foreman (0.84.0)
thor (~> 0.19.1)
globalid (0.3.7)
activesupport (>= 4.1.0)
globalid (0.4.1)
activesupport (>= 4.2.0)
haml (4.0.7)
tilt
haml-rails (0.9.0)
Expand All @@ -129,10 +129,11 @@ GEM
haml (~> 4.0)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
i18n (0.9.5)
i18n (1.0.1)
concurrent-ruby (~> 1.0)
jbuilder (1.0.2)
activesupport (>= 3.0.0)
jbuilder (2.7.0)
activesupport (>= 4.2.0)
multi_json (>= 1.2)
jquery-rails (4.2.2)
rails-dom-testing (>= 1, < 3)
railties (>= 4.2.0)
Expand All @@ -142,15 +143,16 @@ GEM
multi_json (~> 1.0)
rspec (>= 2.0, < 4.0)
jwt (1.5.6)
listen (3.1.5)
rb-fsevent (~> 0.9, >= 0.9.4)
rb-inotify (~> 0.9, >= 0.9.7)
ruby_dep (~> 1.2)
loofah (2.2.2)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.6.4)
mime-types (>= 1.16, < 4)
mail (2.7.0)
mini_mime (>= 0.1.1)
method_source (0.9.0)
mime-types (3.1)
mime-types-data (~> 3.2015)
mime-types-data (3.2016.0521)
mini_mime (1.0.0)
mini_portile2 (2.3.0)
minitest (5.11.3)
Expand All @@ -162,7 +164,7 @@ GEM
sass (~> 3.4)
thor (~> 0.19)
newrelic_rpm (3.18.1.330)
nio4r (1.2.1)
nio4r (2.3.0)
nokogiri (1.8.2)
mini_portile2 (~> 2.3.0)
oauth (0.5.1)
Expand Down Expand Up @@ -196,19 +198,19 @@ GEM
rack (2.0.4)
rack-robotz (0.0.4)
rack
rack-test (0.6.3)
rack (>= 1.0)
rails (5.0.1)
actioncable (= 5.0.1)
actionmailer (= 5.0.1)
actionpack (= 5.0.1)
actionview (= 5.0.1)
activejob (= 5.0.1)
activemodel (= 5.0.1)
activerecord (= 5.0.1)
activesupport (= 5.0.1)
bundler (>= 1.3.0, < 2.0)
railties (= 5.0.1)
rack-test (1.0.0)
rack (>= 1.0, < 3)
rails (5.1.6)
actioncable (= 5.1.6)
actionmailer (= 5.1.6)
actionpack (= 5.1.6)
actionview (= 5.1.6)
activejob (= 5.1.6)
activemodel (= 5.1.6)
activerecord (= 5.1.6)
activesupport (= 5.1.6)
bundler (>= 1.3.0)
railties (= 5.1.6)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.2)
actionpack (~> 5.x, >= 5.0.1)
Expand All @@ -221,9 +223,9 @@ GEM
loofah (~> 2.2, >= 2.2.2)
rails_html_helpers (0.1.1)
railties (>= 3.2)
railties (5.0.1)
actionpack (= 5.0.1)
activesupport (= 5.0.1)
railties (5.1.6)
actionpack (= 5.1.6)
activesupport (= 5.1.6)
method_source
rake (>= 0.8.7)
thor (>= 0.18.1, < 2.0)
Expand Down Expand Up @@ -265,6 +267,7 @@ GEM
rspec-mocks (~> 3.5.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
ruby_dep (1.5.0)
ruby_parser (3.8.4)
sexp_processor (~> 4.1)
sass (3.5.6)
Expand All @@ -288,6 +291,11 @@ GEM
json (>= 1.8, < 3)
simplecov-html (~> 0.10.0)
simplecov-html (0.10.2)
spring (2.0.2)
activesupport (>= 4.2)
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (3.7.1)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
Expand All @@ -309,7 +317,7 @@ GEM
rack (>= 1.0)
websocket-driver (0.6.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.2)
websocket-extensions (0.1.3)
xpath (3.0.0)
nokogiri (~> 1.8)

Expand All @@ -332,9 +340,10 @@ DEPENDENCIES
factory_girl_rails (~> 4.2)
foreman
haml-rails
jbuilder (~> 1.0.1)
jbuilder (~> 2.5)
jquery-rails
json_spec
listen (>= 3.0.5, < 3.2)
modernizr-rails
neat (~> 2.1.0)
newrelic_rpm
Expand All @@ -345,7 +354,7 @@ DEPENDENCIES
puma (~> 3.11.4)
pundit
rack-robotz (~> 0.0.3)
rails (= 5.0.1)
rails (= 5.1.6)
rails-controller-testing
rails_html_helpers
redcarpet
Expand All @@ -356,6 +365,8 @@ DEPENDENCIES
settingslogic
simple_form (~> 3.5.1)
simplecov
spring
spring-watcher-listen (~> 2.0.0)
sprockets-rails (~> 3.2.0)
turbolinks
uglifier (>= 1.0.3)
Expand Down
4 changes: 0 additions & 4 deletions app/controllers/authentications_controller.rb
Original file line number Diff line number Diff line change
@@ -1,10 +1,6 @@
class AuthenticationsController < ApplicationController
skip_before_action :authenticate_user!

rescue_from ActionController::RedirectBackError do |exception|
redirect_to edit_user_registration_path
end

def create
omniauth = request.env['omniauth.auth']
provider, uid = omniauth.values_at('provider', 'uid')
Expand Down
5 changes: 5 additions & 0 deletions bin/rails
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
APP_PATH = File.expand_path('../config/application', __dir__)
require_relative '../config/boot'
require 'rails/commands'
5 changes: 5 additions & 0 deletions bin/rake
Original file line number Diff line number Diff line change
@@ -1,4 +1,9 @@
#!/usr/bin/env ruby
begin
load File.expand_path('../spring', __FILE__)
rescue LoadError => e
raise unless e.message.include?('spring')
end
require_relative '../config/boot'
require 'rake'
Rake.application.run
4 changes: 4 additions & 0 deletions bin/setup
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@ chdir APP_ROOT do
system! 'gem install bundler --conservative'
system('bundle check') || system!('bundle install')

# Install JavaScript dependencies if using Yarn
# system('bin/yarn')


# puts "\n== Copying sample files =="
# unless File.exist?('config/database.yml')
# cp 'config/database.yml.sample', 'config/database.yml'
Expand Down
17 changes: 17 additions & 0 deletions bin/spring
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env ruby

# This file loads spring without using Bundler, in order to be fast.
# It gets overwritten when you run the `spring binstub` command.

unless defined?(Spring)
require 'rubygems'
require 'bundler'

lockfile = Bundler::LockfileParser.new(Bundler.default_lockfile.read)
spring = lockfile.specs.detect { |spec| spec.name == "spring" }
if spring
Gem.use_paths Gem.dir, Bundler.bundle_path.to_s, *Gem.path
gem 'spring', spring.version
require 'spring/binstub'
end
end
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
5 changes: 4 additions & 1 deletion config/application.rb
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,13 @@

module Activities
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.

config.time_zone = 'Europe/London'
end
end
end
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: activities_production
4 changes: 2 additions & 2 deletions 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 Expand Up @@ -52,5 +52,5 @@

# Use an evented file watcher to asynchronously detect changes in source code,
# routes, locales, etc. This feature depends on the listen gem.
# config.file_watcher = ActiveSupport::EventedFileUpdateChecker
config.file_watcher = ActiveSupport::EventedFileUpdateChecker
end
Loading

0 comments on commit 72c75a7

Please sign in to comment.