Skip to content
This repository was archived by the owner on Jul 17, 2023. It is now read-only.

Commit f305011

Browse files
neumayrKlaus Meyer
authored and
Klaus Meyer
committed
Update to rails v5.2.0 (#34)
1 parent 4286746 commit f305011

25 files changed

+559
-201
lines changed

.gitignore

+11
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,27 @@
77
# Ignore bundler config.
88
/.bundle
99

10+
# Ignore the default SQLite database.
11+
/db/*.sqlite3
12+
/db/*.sqlite3-journal
13+
1014
# Ignore all logfiles and tempfiles.
1115
/log/*
1216
/tmp/*
1317
!/log/.keep
1418
!/tmp/.keep
1519

20+
# Ignore uploaded files in development
21+
/storage/*
22+
1623
/node_modules
1724
/yarn-error.log
1825

26+
/public/assets
1927
.byebug_history
2028

29+
# Ignore master key for decrypting credentials and more.
30+
/config/master.key
31+
2132
# Ignore .env file
2233
.env

Gemfile

+20-15
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,18 @@
11
source 'https://rubygems.org'
2+
git_source(:github) { |repo| "https://github.com/#{repo}.git" }
23

3-
git_source(:github) do |repo_name|
4-
repo_name = "#{repo_name}/#{repo_name}" unless repo_name.include?("/")
5-
"https://github.com/#{repo_name}.git"
6-
end
7-
4+
ruby '2.5.1'
85

96
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 5.1.6'
7+
gem 'rails', '~> 5.2.0'
118
# Use Puma as the app server
12-
gem 'puma', '~> 3.7'
9+
gem 'puma', '~> 3.11'
1310
# Use SCSS for stylesheets
1411
gem 'sass-rails', '~> 5.0'
1512
# Use Uglifier as compressor for JavaScript assets
1613
gem 'uglifier', '>= 1.3.0'
1714
# See https://github.com/rails/execjs#readme for more supported runtimes
18-
# gem 'therubyracer', platforms: :ruby
15+
# gem 'mini_racer', platforms: :ruby
1916

2017
# Use CoffeeScript for .coffee assets and views
2118
gem 'coffee-rails', '~> 4.2'
@@ -28,33 +25,41 @@ gem 'jbuilder', '~> 2.5'
2825
# Use ActiveModel has_secure_password
2926
# gem 'bcrypt', '~> 3.1.7'
3027

28+
# Use ActiveStorage variant
29+
# gem 'mini_magick', '~> 4.8'
30+
3131
# Use Capistrano for deployment
3232
# gem 'capistrano-rails', group: :development
3333

34+
# Reduces boot times through caching; required in config/boot.rb
35+
gem 'bootsnap', '>= 1.1.0', require: false
36+
3437
group :development, :test do
3538
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
3639
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
37-
# Adds support for Capybara system testing and selenium driver
38-
gem 'capybara', '~> 3.0'
39-
# gem 'selenium-webdriver'
4040
end
4141

4242
group :development do
43-
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
43+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
4444
gem 'web-console', '>= 3.3.0'
4545
gem 'listen', '~> 3.1.5', '< 3.2'
4646
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
4747
gem 'spring'
4848
gem 'spring-watcher-listen', '~> 2.0.0'
4949
end
5050

51+
group :test do
52+
# Adds support for Capybara system testing and selenium driver
53+
gem 'capybara', '>= 2.15', '< 4.0'
54+
gem 'selenium-webdriver'
55+
# Easy installation and use of chromedriver to run system tests with Chrome
56+
gem 'chromedriver-helper'
57+
end
58+
5159
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem
5260
# gem 'tzinfo-data', platforms: [:mingw, :mswin, :x64_mingw, :jruby]
5361

5462
# custom
55-
56-
ruby '2.5.1' # tell heroku, which ruby version we want
57-
5863
gem 'fidor_api'
5964
gem 'faraday-detailed_logger'
6065

Gemfile.lock

+65-39
Original file line numberDiff line numberDiff line change
@@ -2,49 +2,57 @@ GEM
22
remote: https://rubygems.org/
33
remote: https://rails-assets.org/
44
specs:
5-
actioncable (5.1.6)
6-
actionpack (= 5.1.6)
5+
actioncable (5.2.0)
6+
actionpack (= 5.2.0)
77
nio4r (~> 2.0)
8-
websocket-driver (~> 0.6.1)
9-
actionmailer (5.1.6)
10-
actionpack (= 5.1.6)
11-
actionview (= 5.1.6)
12-
activejob (= 5.1.6)
8+
websocket-driver (>= 0.6.1)
9+
actionmailer (5.2.0)
10+
actionpack (= 5.2.0)
11+
actionview (= 5.2.0)
12+
activejob (= 5.2.0)
1313
mail (~> 2.5, >= 2.5.4)
1414
rails-dom-testing (~> 2.0)
15-
actionpack (5.1.6)
16-
actionview (= 5.1.6)
17-
activesupport (= 5.1.6)
15+
actionpack (5.2.0)
16+
actionview (= 5.2.0)
17+
activesupport (= 5.2.0)
1818
rack (~> 2.0)
1919
rack-test (>= 0.6.3)
2020
rails-dom-testing (~> 2.0)
2121
rails-html-sanitizer (~> 1.0, >= 1.0.2)
22-
actionview (5.1.6)
23-
activesupport (= 5.1.6)
22+
actionview (5.2.0)
23+
activesupport (= 5.2.0)
2424
builder (~> 3.1)
2525
erubi (~> 1.4)
2626
rails-dom-testing (~> 2.0)
2727
rails-html-sanitizer (~> 1.0, >= 1.0.3)
28-
activejob (5.1.6)
29-
activesupport (= 5.1.6)
28+
activejob (5.2.0)
29+
activesupport (= 5.2.0)
3030
globalid (>= 0.3.6)
31-
activemodel (5.1.6)
32-
activesupport (= 5.1.6)
33-
activerecord (5.1.6)
34-
activemodel (= 5.1.6)
35-
activesupport (= 5.1.6)
36-
arel (~> 8.0)
37-
activesupport (5.1.6)
31+
activemodel (5.2.0)
32+
activesupport (= 5.2.0)
33+
activerecord (5.2.0)
34+
activemodel (= 5.2.0)
35+
activesupport (= 5.2.0)
36+
arel (>= 9.0)
37+
activestorage (5.2.0)
38+
actionpack (= 5.2.0)
39+
activerecord (= 5.2.0)
40+
marcel (~> 0.3.1)
41+
activesupport (5.2.0)
3842
concurrent-ruby (~> 1.0, >= 1.0.2)
3943
i18n (>= 0.7, < 2)
4044
minitest (~> 5.1)
4145
tzinfo (~> 1.1)
4246
addressable (2.5.2)
4347
public_suffix (>= 2.0.2, < 4.0)
44-
arel (8.0.0)
48+
archive-zip (0.11.0)
49+
io-like (~> 0.3.0)
50+
arel (9.0.0)
4551
autoprefixer-rails (8.0.0)
4652
execjs
4753
bindex (0.5.0)
54+
bootsnap (1.3.0)
55+
msgpack (~> 1.0)
4856
bootstrap (4.0.0)
4957
autoprefixer-rails (>= 6.0.3)
5058
popper_js (>= 1.12.9, < 2)
@@ -58,6 +66,11 @@ GEM
5866
rack (>= 1.6.0)
5967
rack-test (>= 0.6.3)
6068
xpath (~> 3.0)
69+
childprocess (0.9.0)
70+
ffi (~> 1.0, >= 1.0.11)
71+
chromedriver-helper (1.2.0)
72+
archive-zip (~> 0.10)
73+
nokogiri (~> 1.8)
6174
coffee-rails (4.2.2)
6275
coffee-script (>= 2.2.0)
6376
railties (>= 4.0.0)
@@ -88,6 +101,7 @@ GEM
88101
activesupport (>= 4.2.0)
89102
i18n (1.0.0)
90103
concurrent-ruby (~> 1.0)
104+
io-like (0.3.0)
91105
jbuilder (2.7.0)
92106
activesupport (>= 4.2.0)
93107
multi_json (>= 1.2)
@@ -116,11 +130,15 @@ GEM
116130
nokogiri (>= 1.5.9)
117131
mail (2.7.0)
118132
mini_mime (>= 0.1.1)
133+
marcel (0.3.2)
134+
mimemagic (~> 0.3.2)
119135
method_source (0.9.0)
136+
mimemagic (0.3.2)
120137
mini_mime (1.0.0)
121138
mini_portile2 (2.3.0)
122139
minitest (5.11.3)
123140
model_attribute (2.1.0)
141+
msgpack (1.2.4)
124142
multi_json (1.13.1)
125143
multipart-post (2.0.0)
126144
nio4r (2.3.0)
@@ -132,17 +150,18 @@ GEM
132150
rack (2.0.4)
133151
rack-test (1.0.0)
134152
rack (>= 1.0, < 3)
135-
rails (5.1.6)
136-
actioncable (= 5.1.6)
137-
actionmailer (= 5.1.6)
138-
actionpack (= 5.1.6)
139-
actionview (= 5.1.6)
140-
activejob (= 5.1.6)
141-
activemodel (= 5.1.6)
142-
activerecord (= 5.1.6)
143-
activesupport (= 5.1.6)
153+
rails (5.2.0)
154+
actioncable (= 5.2.0)
155+
actionmailer (= 5.2.0)
156+
actionpack (= 5.2.0)
157+
actionview (= 5.2.0)
158+
activejob (= 5.2.0)
159+
activemodel (= 5.2.0)
160+
activerecord (= 5.2.0)
161+
activestorage (= 5.2.0)
162+
activesupport (= 5.2.0)
144163
bundler (>= 1.3.0)
145-
railties (= 5.1.6)
164+
railties (= 5.2.0)
146165
sprockets-rails (>= 2.0.0)
147166
rails-assets-vanilla-masker (1.1.1)
148167
rails-dom-testing (2.0.3)
@@ -153,9 +172,9 @@ GEM
153172
rails-i18n (5.1.1)
154173
i18n (>= 0.7, < 2)
155174
railties (>= 5.0, < 6)
156-
railties (5.1.6)
157-
actionpack (= 5.1.6)
158-
activesupport (= 5.1.6)
175+
railties (5.2.0)
176+
actionpack (= 5.2.0)
177+
activesupport (= 5.2.0)
159178
method_source
160179
rake (>= 0.8.7)
161180
thor (>= 0.18.1, < 2.0)
@@ -181,6 +200,7 @@ GEM
181200
rspec-support (~> 3.7.0)
182201
rspec-support (3.7.1)
183202
ruby_dep (1.5.0)
203+
rubyzip (1.2.1)
184204
sass (3.5.5)
185205
sass-listen (~> 4.0.0)
186206
sass-listen (4.0.0)
@@ -192,6 +212,9 @@ GEM
192212
sprockets (>= 2.8, < 4.0)
193213
sprockets-rails (>= 2.0, < 4.0)
194214
tilt (>= 1.1, < 3)
215+
selenium-webdriver (3.11.0)
216+
childprocess (~> 0.5)
217+
rubyzip (~> 1.2)
195218
simple_form (4.0.0)
196219
actionpack (> 4)
197220
activemodel (> 4)
@@ -222,7 +245,7 @@ GEM
222245
activemodel (>= 5.0)
223246
bindex (>= 0.4.0)
224247
railties (>= 5.0)
225-
websocket-driver (0.6.5)
248+
websocket-driver (0.7.0)
226249
websocket-extensions (>= 0.1.0)
227250
websocket-extensions (0.1.3)
228251
xpath (3.0.0)
@@ -232,9 +255,11 @@ PLATFORMS
232255
ruby
233256

234257
DEPENDENCIES
258+
bootsnap (>= 1.1.0)
235259
bootstrap (~> 4.0.0)
236260
byebug
237-
capybara (~> 3.0)
261+
capybara (>= 2.15, < 4.0)
262+
chromedriver-helper
238263
coffee-rails (~> 4.2)
239264
dotenv-rails
240265
faraday-detailed_logger
@@ -243,12 +268,13 @@ DEPENDENCIES
243268
jquery-rails
244269
kaminari
245270
listen (~> 3.1.5, < 3.2)
246-
puma (~> 3.7)
247-
rails (~> 5.1.6)
271+
puma (~> 3.11)
272+
rails (~> 5.2.0)
248273
rails-assets-vanilla-masker!
249274
rails-i18n
250275
rspec-rails (~> 3.7)
251276
sass-rails (~> 5.0)
277+
selenium-webdriver
252278
simple_form
253279
spring
254280
spring-watcher-listen (~> 2.0.0)

app/assets/javascripts/application.js

+1
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
// about supported directives.
1212
//
1313
//= require rails-ujs
14+
// require activestorage
1415
//= require turbolinks
1516
//= require_tree .
1617

app/controllers/application_controller.rb

-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
class ApplicationController < ActionController::Base
2-
protect_from_forgery with: :exception
3-
42
before_action :require_complete_setup
53

64
include Authentication
+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
<div class="my-5">
2-
<p class="text-center text-muted small"><i class="fa fa-beer"></i> Handcrafted in Bavaria.</p>
2+
<p class="text-center text-muted small">🍺 Handcrafted in Bavaria. 🥨</p>
33
</div>

app/views/layouts/application_base.html.erb

+1
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<title>Fidor API Demo</title>
55
<%= csrf_meta_tags %>
6+
<%= csp_meta_tag %>
67

78
<%= stylesheet_link_tag "application", media: "all", "data-turbolinks-track": "reload" %>
89
<%= stylesheet_link_tag "//maxcdn.icons8.com/fonts/line-awesome/1.1/css/line-awesome-font-awesome.min.css" %>

bin/bundle

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
11
#!/usr/bin/env ruby
2-
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2+
ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
33
load Gem.bin_path('bundler', 'bundle')

bin/setup

+1-3
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/usr/bin/env ruby
2-
require 'pathname'
32
require 'fileutils'
43
include FileUtils
54

65
# path to your application root.
7-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6+
APP_ROOT = File.expand_path('..', __dir__)
87

98
def system!(*args)
109
system(*args) || abort("\n== Command #{args} failed ==")
@@ -21,7 +20,6 @@ chdir APP_ROOT do
2120
# Install JavaScript dependencies if using Yarn
2221
# system('bin/yarn')
2322

24-
2523
# puts "\n== Copying sample files =="
2624
# unless File.exist?('config/database.yml')
2725
# cp 'config/database.yml.sample', 'config/database.yml'

bin/update

+4-2
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,9 @@
11
#!/usr/bin/env ruby
2-
require 'pathname'
32
require 'fileutils'
43
include FileUtils
54

65
# path to your application root.
7-
APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6+
APP_ROOT = File.expand_path('..', __dir__)
87

98
def system!(*args)
109
system(*args) || abort("\n== Command #{args} failed ==")
@@ -18,6 +17,9 @@ chdir APP_ROOT do
1817
system! 'gem install bundler --conservative'
1918
system('bundle check') || system!('bundle install')
2019

20+
# Install JavaScript dependencies if using Yarn
21+
# system('bin/yarn')
22+
2123
puts "\n== Updating database =="
2224
system! 'bin/rails db:migrate'
2325

0 commit comments

Comments
 (0)