Skip to content

Commit fe72c6b

Browse files
authored
Merge pull request #12 from Azure-Samples/Rails-5.2.3
Upgrade to Rails 5.2.3
2 parents eebdd8a + bf64277 commit fe72c6b

31 files changed

+276
-171
lines changed

.gitignore

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,4 +24,14 @@
2424
!/log/.keep
2525
!/tmp/.keep
2626

27+
# Ignore uploaded files in development
28+
/storage/*
29+
!/storage/.keep
30+
31+
/node_modules
32+
/yarn-error.log
33+
2734
.byebug_history
35+
36+
# Ignore master key for decrypting credentials and more.
37+
/config/master.key

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
2.6.2

Gemfile

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
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.6.2'
85

96
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 5.1.2'
7+
gem 'rails', '~> 5.2.3'
118
# Use sqlite3 as the database for Active Record
12-
gem 'sqlite3', '~> 1.3.13'
9+
gem 'sqlite3'
1310
# Use Puma as the app server
14-
gem 'puma', '~> 3.7'
11+
gem 'puma', '~> 3.11'
1512
# Use SCSS for stylesheets
1613
gem 'sass-rails', '~> 5.0'
1714
# Use Uglifier as compressor for JavaScript assets
1815
gem 'uglifier', '>= 1.3.0'
1916
# See https://github.com/rails/execjs#readme for more supported runtimes
20-
# gem 'therubyracer', platforms: :ruby
17+
# gem 'mini_racer', platforms: :ruby
2118

2219
# Use CoffeeScript for .coffee assets and views
2320
gem 'coffee-rails', '~> 4.2'
@@ -26,24 +23,39 @@ gem 'turbolinks', '~> 5'
2623
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
2724
gem 'jbuilder', '~> 2.5'
2825
# Use Redis adapter to run Action Cable in production
29-
# gem 'redis', '~> 3.0'
26+
# gem 'redis', '~> 4.0'
3027
# Use ActiveModel has_secure_password
3128
# gem 'bcrypt', '~> 3.1.7'
3229

30+
# Use ActiveStorage variant
31+
# gem 'mini_magick', '~> 4.8'
32+
3333
# Use Capistrano for deployment
3434
# gem 'capistrano-rails', group: :development
3535

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

4444
group :development do
45-
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
45+
# Access an interactive console on exception pages or by calling 'console' anywhere in the code.
4646
gem 'web-console', '>= 3.3.0'
47+
gem 'listen', '>= 3.0.5', '< 3.2'
48+
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
49+
gem 'spring'
50+
gem 'spring-watcher-listen', '~> 2.0.0'
51+
end
52+
53+
group :test do
54+
# Adds support for Capybara system testing and selenium driver
55+
gem 'capybara', '>= 2.15'
56+
gem 'selenium-webdriver'
57+
# Easy installation and use of chromedriver to run system tests with Chrome
58+
gem 'chromedriver-helper'
4759
end
4860

4961
# Windows does not include zoneinfo files, so bundle the tzinfo-data gem

Gemfile.lock

Lines changed: 103 additions & 69 deletions
Original file line numberDiff line numberDiff line change
@@ -1,124 +1,146 @@
11
GEM
22
remote: https://rubygems.org/
33
specs:
4-
actioncable (5.1.6.1)
5-
actionpack (= 5.1.6.1)
4+
actioncable (5.2.3)
5+
actionpack (= 5.2.3)
66
nio4r (~> 2.0)
7-
websocket-driver (~> 0.6.1)
8-
actionmailer (5.1.6.1)
9-
actionpack (= 5.1.6.1)
10-
actionview (= 5.1.6.1)
11-
activejob (= 5.1.6.1)
7+
websocket-driver (>= 0.6.1)
8+
actionmailer (5.2.3)
9+
actionpack (= 5.2.3)
10+
actionview (= 5.2.3)
11+
activejob (= 5.2.3)
1212
mail (~> 2.5, >= 2.5.4)
1313
rails-dom-testing (~> 2.0)
14-
actionpack (5.1.6.1)
15-
actionview (= 5.1.6.1)
16-
activesupport (= 5.1.6.1)
14+
actionpack (5.2.3)
15+
actionview (= 5.2.3)
16+
activesupport (= 5.2.3)
1717
rack (~> 2.0)
1818
rack-test (>= 0.6.3)
1919
rails-dom-testing (~> 2.0)
2020
rails-html-sanitizer (~> 1.0, >= 1.0.2)
21-
actionview (5.1.6.1)
22-
activesupport (= 5.1.6.1)
21+
actionview (5.2.3)
22+
activesupport (= 5.2.3)
2323
builder (~> 3.1)
2424
erubi (~> 1.4)
2525
rails-dom-testing (~> 2.0)
2626
rails-html-sanitizer (~> 1.0, >= 1.0.3)
27-
activejob (5.1.6.1)
28-
activesupport (= 5.1.6.1)
27+
activejob (5.2.3)
28+
activesupport (= 5.2.3)
2929
globalid (>= 0.3.6)
30-
activemodel (5.1.6.1)
31-
activesupport (= 5.1.6.1)
32-
activerecord (5.1.6.1)
33-
activemodel (= 5.1.6.1)
34-
activesupport (= 5.1.6.1)
35-
arel (~> 8.0)
36-
activesupport (5.1.6.1)
30+
activemodel (5.2.3)
31+
activesupport (= 5.2.3)
32+
activerecord (5.2.3)
33+
activemodel (= 5.2.3)
34+
activesupport (= 5.2.3)
35+
arel (>= 9.0)
36+
activestorage (5.2.3)
37+
actionpack (= 5.2.3)
38+
activerecord (= 5.2.3)
39+
marcel (~> 0.3.1)
40+
activesupport (5.2.3)
3741
concurrent-ruby (~> 1.0, >= 1.0.2)
3842
i18n (>= 0.7, < 2)
3943
minitest (~> 5.1)
4044
tzinfo (~> 1.1)
4145
addressable (2.6.0)
4246
public_suffix (>= 2.0.2, < 4.0)
43-
arel (8.0.0)
44-
bindex (0.5.0)
47+
archive-zip (0.12.0)
48+
io-like (~> 0.3.0)
49+
arel (9.0.0)
50+
bindex (0.8.1)
51+
bootsnap (1.4.4)
52+
msgpack (~> 1.0)
4553
builder (3.2.3)
46-
byebug (11.0.0)
47-
capybara (2.18.0)
54+
byebug (11.0.1)
55+
capybara (3.25.0)
4856
addressable
4957
mini_mime (>= 0.1.3)
50-
nokogiri (>= 1.3.3)
51-
rack (>= 1.0.0)
52-
rack-test (>= 0.5.4)
53-
xpath (>= 2.0, < 4.0)
54-
childprocess (0.9.0)
55-
ffi (~> 1.0, >= 1.0.11)
58+
nokogiri (~> 1.8)
59+
rack (>= 1.6.0)
60+
rack-test (>= 0.6.3)
61+
regexp_parser (~> 1.5)
62+
xpath (~> 3.2)
63+
childprocess (1.0.1)
64+
rake (< 13.0)
65+
chromedriver-helper (2.1.1)
66+
archive-zip (~> 0.10)
67+
nokogiri (~> 1.8)
5668
coffee-rails (4.2.2)
5769
coffee-script (>= 2.2.0)
5870
railties (>= 4.0.0)
5971
coffee-script (2.4.1)
6072
coffee-script-source
6173
execjs
6274
coffee-script-source (1.12.2)
63-
concurrent-ruby (1.1.4)
75+
concurrent-ruby (1.1.5)
6476
crass (1.0.4)
6577
erubi (1.8.0)
6678
execjs (2.7.0)
67-
ffi (1.10.0)
79+
ffi (1.11.1)
6880
globalid (0.4.2)
6981
activesupport (>= 4.2.0)
70-
i18n (1.5.3)
82+
i18n (1.6.0)
7183
concurrent-ruby (~> 1.0)
72-
jbuilder (2.8.0)
84+
io-like (0.3.0)
85+
jbuilder (2.9.1)
7386
activesupport (>= 4.2.0)
74-
multi_json (>= 1.2)
87+
listen (3.1.5)
88+
rb-fsevent (~> 0.9, >= 0.9.4)
89+
rb-inotify (~> 0.9, >= 0.9.7)
90+
ruby_dep (~> 1.2)
7591
loofah (2.2.3)
7692
crass (~> 1.0.2)
7793
nokogiri (>= 1.5.9)
7894
mail (2.7.1)
7995
mini_mime (>= 0.1.1)
96+
marcel (0.3.3)
97+
mimemagic (~> 0.3.2)
8098
method_source (0.9.2)
81-
mini_mime (1.0.1)
99+
mimemagic (0.3.3)
100+
mini_mime (1.0.2)
82101
mini_portile2 (2.4.0)
83102
minitest (5.11.3)
84-
multi_json (1.13.1)
85-
nio4r (2.3.1)
86-
nokogiri (1.10.1)
103+
msgpack (1.3.0)
104+
nio4r (2.4.0)
105+
nokogiri (1.10.3)
87106
mini_portile2 (~> 2.4.0)
88-
public_suffix (3.0.3)
89-
puma (3.12.0)
90-
rack (2.0.6)
107+
public_suffix (3.1.1)
108+
puma (3.12.1)
109+
rack (2.0.7)
91110
rack-test (1.1.0)
92111
rack (>= 1.0, < 3)
93-
rails (5.1.6.1)
94-
actioncable (= 5.1.6.1)
95-
actionmailer (= 5.1.6.1)
96-
actionpack (= 5.1.6.1)
97-
actionview (= 5.1.6.1)
98-
activejob (= 5.1.6.1)
99-
activemodel (= 5.1.6.1)
100-
activerecord (= 5.1.6.1)
101-
activesupport (= 5.1.6.1)
112+
rails (5.2.3)
113+
actioncable (= 5.2.3)
114+
actionmailer (= 5.2.3)
115+
actionpack (= 5.2.3)
116+
actionview (= 5.2.3)
117+
activejob (= 5.2.3)
118+
activemodel (= 5.2.3)
119+
activerecord (= 5.2.3)
120+
activestorage (= 5.2.3)
121+
activesupport (= 5.2.3)
102122
bundler (>= 1.3.0)
103-
railties (= 5.1.6.1)
123+
railties (= 5.2.3)
104124
sprockets-rails (>= 2.0.0)
105125
rails-dom-testing (2.0.3)
106126
activesupport (>= 4.2.0)
107127
nokogiri (>= 1.6)
108128
rails-html-sanitizer (1.0.4)
109129
loofah (~> 2.2, >= 2.2.2)
110-
railties (5.1.6.1)
111-
actionpack (= 5.1.6.1)
112-
activesupport (= 5.1.6.1)
130+
railties (5.2.3)
131+
actionpack (= 5.2.3)
132+
activesupport (= 5.2.3)
113133
method_source
114134
rake (>= 0.8.7)
115-
thor (>= 0.18.1, < 2.0)
135+
thor (>= 0.19.0, < 2.0)
116136
rake (12.3.2)
117137
rb-fsevent (0.10.3)
118138
rb-inotify (0.10.0)
119139
ffi (~> 1.0)
120-
rubyzip (1.2.2)
121-
sass (3.7.3)
140+
regexp_parser (1.5.1)
141+
ruby_dep (1.5.0)
142+
rubyzip (1.2.3)
143+
sass (3.7.4)
122144
sass-listen (~> 4.0.0)
123145
sass-listen (4.0.0)
124146
rb-fsevent (~> 0.9, >= 0.9.4)
@@ -129,17 +151,21 @@ GEM
129151
sprockets (>= 2.8, < 4.0)
130152
sprockets-rails (>= 2.0, < 4.0)
131153
tilt (>= 1.1, < 3)
132-
selenium-webdriver (3.141.0)
133-
childprocess (~> 0.5)
154+
selenium-webdriver (3.142.3)
155+
childprocess (>= 0.5, < 2.0)
134156
rubyzip (~> 1.2, >= 1.2.2)
157+
spring (2.1.0)
158+
spring-watcher-listen (2.0.1)
159+
listen (>= 2.7, < 4.0)
160+
spring (>= 1.2, < 3.0)
135161
sprockets (3.7.2)
136162
concurrent-ruby (~> 1.0)
137163
rack (> 1, < 3)
138164
sprockets-rails (3.2.1)
139165
actionpack (>= 4.0)
140166
activesupport (>= 4.0)
141167
sprockets (>= 3.0.0)
142-
sqlite3 (1.3.13)
168+
sqlite3 (1.4.1)
143169
thor (0.20.3)
144170
thread_safe (0.3.6)
145171
tilt (2.0.9)
@@ -155,29 +181,37 @@ GEM
155181
activemodel (>= 5.0)
156182
bindex (>= 0.4.0)
157183
railties (>= 5.0)
158-
websocket-driver (0.6.5)
184+
websocket-driver (0.7.1)
159185
websocket-extensions (>= 0.1.0)
160-
websocket-extensions (0.1.3)
186+
websocket-extensions (0.1.4)
161187
xpath (3.2.0)
162188
nokogiri (~> 1.8)
163189

164190
PLATFORMS
165191
ruby
166192

167193
DEPENDENCIES
194+
bootsnap (>= 1.1.0)
168195
byebug
169-
capybara (~> 2.13)
196+
capybara (>= 2.15)
197+
chromedriver-helper
170198
coffee-rails (~> 4.2)
171199
jbuilder (~> 2.5)
172-
puma (~> 3.7)
173-
rails (~> 5.1.2)
200+
listen (>= 3.0.5, < 3.2)
201+
puma (~> 3.11)
202+
rails (~> 5.2.3)
174203
sass-rails (~> 5.0)
175204
selenium-webdriver
176-
sqlite3 (~> 1.3.13)
205+
spring
206+
spring-watcher-listen (~> 2.0.0)
207+
sqlite3
177208
turbolinks (~> 5)
178209
tzinfo-data
179210
uglifier (>= 1.3.0)
180211
web-console (>= 3.3.0)
181212

213+
RUBY VERSION
214+
ruby 2.6.2p47
215+
182216
BUNDLED WITH
183-
1.17.0
217+
1.17.2

app/assets/javascripts/application.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@
1111
// about supported directives.
1212
//
1313
//= require rails-ujs
14+
//= require activestorage
1415
//= require turbolinks
1516
//= require_tree .

app/controllers/application_controller.rb

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
class ApplicationController < ActionController::Base
2-
protect_from_forgery with: :exception
32
def hello
43
render html: "Hello, world from Azure App Service on Linux!"
54
end

app/views/layouts/application.html.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
<head>
44
<title>HelloWorld</title>
55
<%= csrf_meta_tags %>
6+
<%= csp_meta_tag %>
67

78
<%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks-track': 'reload' %>
89
<%= javascript_include_tag 'application', 'data-turbolinks-track': 'reload' %>

bin/bundle

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

0 commit comments

Comments
 (0)