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

Commit 0741c10

Browse files
committed
update to rails 5.1.1
1 parent 0843797 commit 0741c10

22 files changed

+178
-152
lines changed

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,9 @@
1313
!/log/.keep
1414
!/tmp/.keep
1515

16-
# Ignore Byebug command history file.
16+
/node_modules
17+
/yarn-error.log
18+
1719
.byebug_history
1820

1921
# Ignore .env file

Gemfile

+10-8
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,18 @@ end
77

88

99
# Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
10-
gem 'rails', '~> 5.0.2'
10+
gem 'rails', '~> 5.1.1'
1111
# Use Puma as the app server
12-
gem 'puma', '~> 3.0'
12+
gem 'puma', '~> 3.7'
1313
# Use SCSS for stylesheets
1414
gem 'sass-rails', '~> 5.0'
1515
# Use Uglifier as compressor for JavaScript assets
1616
gem 'uglifier', '>= 1.3.0'
17-
# Use CoffeeScript for .coffee assets and views
18-
gem 'coffee-rails', '~> 4.2'
1917
# See https://github.com/rails/execjs#readme for more supported runtimes
2018
# gem 'therubyracer', platforms: :ruby
2119

22-
# Use jquery as the JavaScript library
23-
gem 'jquery-rails'
20+
# Use CoffeeScript for .coffee assets and views
21+
gem 'coffee-rails', '~> 4.2'
2422
# Turbolinks makes navigating your web application faster. Read more: https://github.com/turbolinks/turbolinks
2523
gem 'turbolinks', '~> 5'
2624
# Build JSON APIs with ease. Read more: https://github.com/rails/jbuilder
@@ -33,13 +31,16 @@ gem 'jbuilder', '~> 2.5'
3331

3432
group :development, :test do
3533
# Call 'byebug' anywhere in the code to stop execution and get a debugger console
36-
gem 'byebug', platform: :mri
34+
gem 'byebug', platforms: [:mri, :mingw, :x64_mingw]
35+
# Adds support for Capybara system testing and selenium driver
36+
# gem 'capybara', '~> 2.13'
37+
# gem 'selenium-webdriver'
3738
end
3839

3940
group :development do
4041
# Access an IRB console on exception pages or by using <%= console %> anywhere in the code.
4142
gem 'web-console', '>= 3.3.0'
42-
gem 'listen', '~> 3.0.5'
43+
gem 'listen', '~> 3.0.5', '< 3.2'
4344
# Spring speeds up development by keeping your application running in the background. Read more: https://github.com/rails/spring
4445
gem 'spring'
4546
gem 'spring-watcher-listen', '~> 2.0.0'
@@ -55,6 +56,7 @@ ruby '2.4.1' # tell heroku, which ruby version we want
5556
gem 'fidor_api'
5657
gem 'faraday-detailed_logger'
5758

59+
gem 'jquery-rails'
5860
gem 'bootstrap-sass'
5961
gem 'kaminari'
6062
gem 'rails-i18n'

Gemfile.lock

+74-74
Original file line numberDiff line numberDiff line change
@@ -2,46 +2,47 @@ GEM
22
remote: https://rubygems.org/
33
remote: https://rails-assets.org/
44
specs:
5-
actioncable (5.0.2)
6-
actionpack (= 5.0.2)
7-
nio4r (>= 1.2, < 3.0)
5+
actioncable (5.1.1)
6+
actionpack (= 5.1.1)
7+
nio4r (~> 2.0)
88
websocket-driver (~> 0.6.1)
9-
actionmailer (5.0.2)
10-
actionpack (= 5.0.2)
11-
actionview (= 5.0.2)
12-
activejob (= 5.0.2)
9+
actionmailer (5.1.1)
10+
actionpack (= 5.1.1)
11+
actionview (= 5.1.1)
12+
activejob (= 5.1.1)
1313
mail (~> 2.5, >= 2.5.4)
1414
rails-dom-testing (~> 2.0)
15-
actionpack (5.0.2)
16-
actionview (= 5.0.2)
17-
activesupport (= 5.0.2)
15+
actionpack (5.1.1)
16+
actionview (= 5.1.1)
17+
activesupport (= 5.1.1)
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.0.2)
23-
activesupport (= 5.0.2)
22+
actionview (5.1.1)
23+
activesupport (= 5.1.1)
2424
builder (~> 3.1)
25-
erubis (~> 2.7.0)
25+
erubi (~> 1.4)
2626
rails-dom-testing (~> 2.0)
2727
rails-html-sanitizer (~> 1.0, >= 1.0.3)
28-
activejob (5.0.2)
29-
activesupport (= 5.0.2)
28+
activejob (5.1.1)
29+
activesupport (= 5.1.1)
3030
globalid (>= 0.3.6)
31-
activemodel (5.0.2)
32-
activesupport (= 5.0.2)
33-
activerecord (5.0.2)
34-
activemodel (= 5.0.2)
35-
activesupport (= 5.0.2)
36-
arel (~> 7.0)
37-
activesupport (5.0.2)
31+
activemodel (5.1.1)
32+
activesupport (= 5.1.1)
33+
activerecord (5.1.1)
34+
activemodel (= 5.1.1)
35+
activesupport (= 5.1.1)
36+
arel (~> 8.0)
37+
activesupport (5.1.1)
3838
concurrent-ruby (~> 1.0, >= 1.0.2)
3939
i18n (~> 0.7)
4040
minitest (~> 5.1)
4141
tzinfo (~> 1.1)
42-
arel (7.1.4)
43-
autoprefixer-rails (6.7.1)
42+
arel (8.0.0)
43+
autoprefixer-rails (6.7.7.2)
4444
execjs
45+
bindex (0.5.0)
4546
bootstrap-sass (3.3.7)
4647
autoprefixer-rails (>= 5.2.1)
4748
sass (>= 3.3.4)
@@ -55,30 +56,29 @@ GEM
5556
execjs
5657
coffee-script-source (1.12.2)
5758
concurrent-ruby (1.0.5)
58-
debug_inspector (0.0.2)
59-
dotenv (2.2.0)
60-
dotenv-rails (2.2.0)
61-
dotenv (= 2.2.0)
62-
railties (>= 3.2, < 5.1)
63-
erubis (2.7.0)
59+
dotenv (2.2.1)
60+
dotenv-rails (2.2.1)
61+
dotenv (= 2.2.1)
62+
railties (>= 3.2, < 5.2)
63+
erubi (1.6.0)
6464
execjs (2.7.0)
65-
faraday (0.11.0)
65+
faraday (0.12.1)
6666
multipart-post (>= 1.2, < 3)
6767
faraday-detailed_logger (2.1.1)
6868
faraday (~> 0.8)
69-
ffi (1.9.17)
70-
fidor_api (0.1.0)
71-
activemodel (>= 4.2, < 5.1)
72-
activesupport (>= 4.2, < 5.1)
69+
ffi (1.9.18)
70+
fidor_api (0.1.1)
71+
activemodel (>= 4.2, < 5.2)
72+
activesupport (>= 4.2, < 5.2)
7373
faraday (~> 0.8)
7474
model_attribute (~> 2.1)
75-
globalid (0.3.7)
76-
activesupport (>= 4.1.0)
75+
globalid (0.4.0)
76+
activesupport (>= 4.2.0)
7777
i18n (0.8.1)
78-
jbuilder (2.6.1)
79-
activesupport (>= 3.0.0, < 5.1)
78+
jbuilder (2.6.3)
79+
activesupport (>= 3.0.0, < 5.2)
8080
multi_json (~> 1.2)
81-
jquery-rails (4.2.2)
81+
jquery-rails (4.3.1)
8282
rails-dom-testing (>= 1, < 3)
8383
railties (>= 4.2.0)
8484
thor (>= 0.14, < 2.0)
@@ -99,48 +99,48 @@ GEM
9999
rb-inotify (~> 0.9, >= 0.9.7)
100100
loofah (2.0.3)
101101
nokogiri (>= 1.5.9)
102-
mail (2.6.4)
102+
mail (2.6.5)
103103
mime-types (>= 1.16, < 4)
104104
method_source (0.8.2)
105105
mime-types (3.1)
106106
mime-types-data (~> 3.2015)
107107
mime-types-data (3.2016.0521)
108108
mini_portile2 (2.1.0)
109-
minitest (5.10.1)
109+
minitest (5.10.2)
110110
model_attribute (2.1.0)
111111
multi_json (1.12.1)
112112
multipart-post (2.0.0)
113113
nio4r (2.0.0)
114-
nokogiri (1.7.0.1)
114+
nokogiri (1.7.2)
115115
mini_portile2 (~> 2.1.0)
116-
puma (3.7.0)
117-
rack (2.0.1)
116+
puma (3.8.2)
117+
rack (2.0.3)
118118
rack-test (0.6.3)
119119
rack (>= 1.0)
120-
rails (5.0.2)
121-
actioncable (= 5.0.2)
122-
actionmailer (= 5.0.2)
123-
actionpack (= 5.0.2)
124-
actionview (= 5.0.2)
125-
activejob (= 5.0.2)
126-
activemodel (= 5.0.2)
127-
activerecord (= 5.0.2)
128-
activesupport (= 5.0.2)
120+
rails (5.1.1)
121+
actioncable (= 5.1.1)
122+
actionmailer (= 5.1.1)
123+
actionpack (= 5.1.1)
124+
actionview (= 5.1.1)
125+
activejob (= 5.1.1)
126+
activemodel (= 5.1.1)
127+
activerecord (= 5.1.1)
128+
activesupport (= 5.1.1)
129129
bundler (>= 1.3.0, < 2.0)
130-
railties (= 5.0.2)
130+
railties (= 5.1.1)
131131
sprockets-rails (>= 2.0.0)
132-
rails-assets-vanilla-masker (1.1.0)
133-
rails-dom-testing (2.0.2)
134-
activesupport (>= 4.2.0, < 6.0)
135-
nokogiri (~> 1.6)
132+
rails-assets-vanilla-masker (1.1.1)
133+
rails-dom-testing (2.0.3)
134+
activesupport (>= 4.2.0)
135+
nokogiri (>= 1.6)
136136
rails-html-sanitizer (1.0.3)
137137
loofah (~> 2.0)
138-
rails-i18n (5.0.2)
138+
rails-i18n (5.0.3)
139139
i18n (~> 0.7)
140140
railties (~> 5.0)
141-
railties (5.0.2)
142-
actionpack (= 5.0.2)
143-
activesupport (= 5.0.2)
141+
railties (5.1.1)
142+
actionpack (= 5.1.1)
143+
activesupport (= 5.1.1)
144144
method_source
145145
rake (>= 0.8.7)
146146
thor (>= 0.18.1, < 2.0)
@@ -155,9 +155,9 @@ GEM
155155
sprockets (>= 2.8, < 4.0)
156156
sprockets-rails (>= 2.0, < 4.0)
157157
tilt (>= 1.1, < 3)
158-
simple_form (3.4.0)
159-
actionpack (> 4, < 5.1)
160-
activemodel (> 4, < 5.1)
158+
simple_form (3.5.0)
159+
actionpack (> 4, < 5.2)
160+
activemodel (> 4, < 5.2)
161161
spring (2.0.1)
162162
activesupport (>= 4.2)
163163
spring-watcher-listen (2.0.1)
@@ -172,18 +172,18 @@ GEM
172172
sprockets (>= 3.0.0)
173173
thor (0.19.4)
174174
thread_safe (0.3.6)
175-
tilt (2.0.6)
175+
tilt (2.0.7)
176176
turbolinks (5.0.1)
177177
turbolinks-source (~> 5)
178178
turbolinks-source (5.0.0)
179-
tzinfo (1.2.2)
179+
tzinfo (1.2.3)
180180
thread_safe (~> 0.1)
181-
uglifier (3.0.4)
181+
uglifier (3.2.0)
182182
execjs (>= 0.3.0, < 3)
183-
web-console (3.4.0)
183+
web-console (3.5.0)
184184
actionview (>= 5.0)
185185
activemodel (>= 5.0)
186-
debug_inspector
186+
bindex (>= 0.4.0)
187187
railties (>= 5.0)
188188
websocket-driver (0.6.5)
189189
websocket-extensions (>= 0.1.0)
@@ -202,9 +202,9 @@ DEPENDENCIES
202202
jbuilder (~> 2.5)
203203
jquery-rails
204204
kaminari
205-
listen (~> 3.0.5)
206-
puma (~> 3.0)
207-
rails (~> 5.0.2)
205+
listen (~> 3.0.5, < 3.2)
206+
puma (~> 3.7)
207+
rails (~> 5.1.1)
208208
rails-assets-vanilla-masker!
209209
rails-i18n
210210
sass-rails (~> 5.0)

app/assets/javascripts/application.js

+4-4
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,20 @@
11
// This is a manifest file that'll be compiled into application.js, which will include all the files
22
// listed below.
33
//
4-
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
5-
// or any plugin's vendor/assets/javascripts directory can be referenced here using a relative path.
4+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, or any plugin's
5+
// vendor/assets/javascripts directory can be referenced here using a relative path.
66
//
77
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
88
// compiled file. JavaScript code in this file should be added after the last require_* statement.
99
//
1010
// Read Sprockets README (https://github.com/rails/sprockets#sprockets-directives) for details
1111
// about supported directives.
1212
//
13-
//= require jquery
14-
//= require jquery_ujs
13+
//= require rails-ujs
1514
//= require turbolinks
1615
//= require_tree .
1716

17+
//= require jquery
1818
//= require bootstrap-sprockets
1919
//= require vanilla-masker
2020

app/assets/stylesheets/application.scss

+2-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22
* This is a manifest file that'll be compiled into application.css, which will include all the files
33
* listed below.
44
*
5-
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
6-
* or any plugin's vendor/assets/stylesheets directory can be referenced here using a relative path.
5+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, or any plugin's
6+
* vendor/assets/stylesheets directory can be referenced here using a relative path.
77
*
88
* You're free to add application-wide styles to this file and they'll appear at the bottom of the
99
* compiled file so the styles you add here take precedence over styles defined in any other CSS/SCSS

app/controllers/transactions_controller.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
class TransactionsController < ApplicationController
2-
before_filter :require_valid_session
2+
before_action :require_valid_session
33

44
def index
55
transactions = FidorApi::Transaction.all(pagination)

bin/setup

+4
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ chdir APP_ROOT do
1818
system! 'gem install bundler --conservative'
1919
system('bundle check') || system!('bundle install')
2020

21+
# Install JavaScript dependencies if using Yarn
22+
# system('bin/yarn')
23+
24+
2125
# puts "\n== Copying sample files =="
2226
# unless File.exist?('config/database.yml')
2327
# cp 'config/database.yml.sample', 'config/database.yml'

bin/yarn

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/usr/bin/env ruby
2+
VENDOR_PATH = File.expand_path('..', __dir__)
3+
Dir.chdir(VENDOR_PATH) do
4+
begin
5+
exec "yarnpkg #{ARGV.join(" ")}"
6+
rescue Errno::ENOENT
7+
$stderr.puts "Yarn executable was not detected in the system."
8+
$stderr.puts "Download Yarn at https://yarnpkg.com/en/docs/install"
9+
exit 1
10+
end
11+
end

config/application.rb

+3
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,9 @@
1818

1919
module FidorApiDemo
2020
class Application < Rails::Application
21+
# Initialize configuration defaults for originally generated Rails version.
22+
config.load_defaults 5.1
23+
2124
# Settings in config/environments/* take precedence over those specified here.
2225
# Application configuration should go into files in config/initializers
2326
# -- all .rb files in that directory are automatically loaded.

config/environments/development.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818

1919
config.cache_store = :memory_store
2020
config.public_file_server.headers = {
21-
'Cache-Control' => 'public, max-age=172800'
21+
'Cache-Control' => "public, max-age=#{2.days.seconds.to_i}"
2222
}
2323
else
2424
config.action_controller.perform_caching = false

0 commit comments

Comments
 (0)