Skip to content

Commit

Permalink
Merge pull request #227 from mberlanda/rails-61
Browse files Browse the repository at this point in the history
chore: upgrade to rails <7
  • Loading branch information
mberlanda committed Apr 9, 2022
2 parents ecebdc4 + 13723a1 commit d47f792
Show file tree
Hide file tree
Showing 12 changed files with 112 additions and 106 deletions.
2 changes: 1 addition & 1 deletion Dockerfile.web
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ ENV NODE_ENV "production"
# Install node and yarn
RUN curl --silent --show-error --location \
https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo "deb https://deb.nodesource.com/node_12.x/ stretch main" > /etc/apt/sources.list.d/nodesource.list \
&& echo "deb https://deb.nodesource.com/node_16.x/ stretch main" > /etc/apt/sources.list.d/nodesource.list \
&& curl --silent --show-error --location https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
# Need to update debian version
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.worker
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ ENV NODE_ENV "production"
# Install node and yarn
RUN curl --silent --show-error --location \
https://deb.nodesource.com/gpgkey/nodesource.gpg.key | apt-key add - \
&& echo "deb https://deb.nodesource.com/node_12.x/ stretch main" > /etc/apt/sources.list.d/nodesource.list \
&& echo "deb https://deb.nodesource.com/node_16.x/ stretch main" > /etc/apt/sources.list.d/nodesource.list \
&& curl --silent --show-error --location https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" > /etc/apt/sources.list.d/yarn.list \
# Need to update debian version
Expand Down
4 changes: 2 additions & 2 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@ gem 'haml-rails'
gem 'jbuilder' # TODO: remove the couple of templates using it
gem 'mini_racer'
gem 'pg'
gem 'rails', '< 6.1' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'rails', '< 7' # Bundle edge Rails instead: gem 'rails', github: 'rails/rails'
gem 'react-rails', '~> 2.4'
gem 'sassc-rails'
gem 'uglifier' # Use Uglifier as compressor for JavaScript assets
gem 'unicorn'
gem 'unicorn-worker-killer'
gem 'webpacker', '< 6.1'
gem 'webpacker', '< 7'

gem 'rails-html-sanitizer', '~> 1.4.0' # Force this version after CVE-2018-8048
gem 'sprockets'
Expand Down
167 changes: 85 additions & 82 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,65 +1,69 @@
GEM
remote: https://rubygems.org/
specs:
actioncable (6.0.4.1)
actionpack (= 6.0.4.1)
actioncable (6.1.5)
actionpack (= 6.1.5)
activesupport (= 6.1.5)
nio4r (~> 2.0)
websocket-driver (>= 0.6.1)
actionmailbox (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actionmailbox (6.1.5)
actionpack (= 6.1.5)
activejob (= 6.1.5)
activerecord (= 6.1.5)
activestorage (= 6.1.5)
activesupport (= 6.1.5)
mail (>= 2.7.1)
actionmailer (6.0.4.1)
actionpack (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
actionmailer (6.1.5)
actionpack (= 6.1.5)
actionview (= 6.1.5)
activejob (= 6.1.5)
activesupport (= 6.1.5)
mail (~> 2.5, >= 2.5.4)
rails-dom-testing (~> 2.0)
actionpack (6.0.4.1)
actionview (= 6.0.4.1)
activesupport (= 6.0.4.1)
rack (~> 2.0, >= 2.0.8)
actionpack (6.1.5)
actionview (= 6.1.5)
activesupport (= 6.1.5)
rack (~> 2.0, >= 2.0.9)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actiontext (6.0.4.1)
actionpack (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
actiontext (6.1.5)
actionpack (= 6.1.5)
activerecord (= 6.1.5)
activestorage (= 6.1.5)
activesupport (= 6.1.5)
nokogiri (>= 1.8.5)
actionview (6.0.4.1)
activesupport (= 6.0.4.1)
actionview (6.1.5)
activesupport (= 6.1.5)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activejob (6.0.4.1)
activesupport (= 6.0.4.1)
activejob (6.1.5)
activesupport (= 6.1.5)
globalid (>= 0.3.6)
activemodel (6.0.4.1)
activesupport (= 6.0.4.1)
activemodel (6.1.5)
activesupport (= 6.1.5)
activemodel-serializers-xml (1.0.2)
activemodel (> 5.x)
activesupport (> 5.x)
builder (~> 3.1)
activerecord (6.0.4.1)
activemodel (= 6.0.4.1)
activesupport (= 6.0.4.1)
activestorage (6.0.4.1)
actionpack (= 6.0.4.1)
activejob (= 6.0.4.1)
activerecord (= 6.0.4.1)
marcel (~> 1.0.0)
activesupport (6.0.4.1)
activerecord (6.1.5)
activemodel (= 6.1.5)
activesupport (= 6.1.5)
activestorage (6.1.5)
actionpack (= 6.1.5)
activejob (= 6.1.5)
activerecord (= 6.1.5)
activesupport (= 6.1.5)
marcel (~> 1.0)
mini_mime (>= 1.1.0)
activesupport (6.1.5)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 0.7, < 2)
minitest (~> 5.1)
tzinfo (~> 1.1)
zeitwerk (~> 2.2, >= 2.2.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
zeitwerk (~> 2.3)
ast (2.4.2)
babel-source (5.8.35)
babel-transpiler (0.7.0)
Expand All @@ -77,7 +81,7 @@ GEM
thor (~> 1.0)
byebug (11.1.3)
childprocess (4.1.0)
concurrent-ruby (1.1.9)
concurrent-ruby (1.1.10)
connection_pool (2.2.5)
cookies_eu (1.7.7)
js_cookie_rails (~> 2.2.0)
Expand Down Expand Up @@ -136,7 +140,7 @@ GEM
gibbon (3.4.0)
faraday (>= 0.16.0)
multi_json (>= 1.11.0)
globalid (0.5.2)
globalid (1.0.0)
activesupport (>= 5.0)
haml (5.2.2)
temple (>= 0.8.0)
Expand All @@ -160,7 +164,7 @@ GEM
haml (>= 4.0, < 6)
nokogiri (>= 1.6.0)
ruby_parser (~> 3.5)
i18n (1.8.11)
i18n (1.10.0)
concurrent-ruby (~> 1.0)
iniparse (1.5.0)
jbuilder (2.11.2)
Expand All @@ -177,23 +181,23 @@ GEM
activesupport (>= 4)
railties (>= 4)
request_store (~> 1.0)
loofah (2.13.0)
loofah (2.16.0)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
mail (2.7.1)
mini_mime (>= 0.1.1)
marcel (1.0.2)
method_source (1.0.0)
mini_mime (1.1.2)
mini_portile2 (2.6.1)
mini_portile2 (2.8.0)
mini_racer (0.4.0)
libv8-node (~> 15.14.0.0)
minitest (5.14.4)
minitest (5.15.0)
multi_json (1.15.0)
multipart-post (2.1.1)
nio4r (2.5.8)
nokogiri (1.12.5)
mini_portile2 (~> 2.6.1)
nokogiri (1.13.3)
mini_portile2 (~> 2.8.0)
racc (~> 1.4)
orm_adapter (0.5.0)
overcommit (0.58.0)
Expand All @@ -206,24 +210,24 @@ GEM
pg (1.2.3)
racc (1.6.0)
rack (2.2.3)
rack-proxy (0.7.0)
rack-proxy (0.7.2)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rails (6.0.4.1)
actioncable (= 6.0.4.1)
actionmailbox (= 6.0.4.1)
actionmailer (= 6.0.4.1)
actionpack (= 6.0.4.1)
actiontext (= 6.0.4.1)
actionview (= 6.0.4.1)
activejob (= 6.0.4.1)
activemodel (= 6.0.4.1)
activerecord (= 6.0.4.1)
activestorage (= 6.0.4.1)
activesupport (= 6.0.4.1)
bundler (>= 1.3.0)
railties (= 6.0.4.1)
rails (6.1.5)
actioncable (= 6.1.5)
actionmailbox (= 6.1.5)
actionmailer (= 6.1.5)
actionpack (= 6.1.5)
actiontext (= 6.1.5)
actionview (= 6.1.5)
activejob (= 6.1.5)
activemodel (= 6.1.5)
activerecord (= 6.1.5)
activestorage (= 6.1.5)
activesupport (= 6.1.5)
bundler (>= 1.15.0)
railties (= 6.1.5)
sprockets-rails (>= 2.0.0)
rails-controller-testing (1.0.5)
actionpack (>= 5.0.1.rc1)
Expand All @@ -234,12 +238,12 @@ GEM
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.2)
loofah (~> 2.3)
railties (6.0.4.1)
actionpack (= 6.0.4.1)
activesupport (= 6.0.4.1)
railties (6.1.5)
actionpack (= 6.1.5)
activesupport (= 6.1.5)
method_source
rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0)
rake (>= 12.2)
thor (~> 1.0)
rainbow (3.0.0)
raindrops (0.19.2)
rake (13.0.6)
Expand All @@ -252,7 +256,7 @@ GEM
execjs
railties (>= 3.2)
tilt
redis (4.5.1)
redis (4.6.0)
regexp_parser (2.1.1)
request_store (1.5.0)
rack (>= 1.4)
Expand Down Expand Up @@ -318,7 +322,7 @@ GEM
sexp_processor (4.15.3)
shoulda-matchers (5.0.0)
activesupport (>= 5.2.0)
sidekiq (6.2.2)
sidekiq (6.4.1)
connection_pool (>= 2.2.2)
rack (~> 2.0)
redis (>= 4.2.0)
Expand All @@ -335,20 +339,19 @@ GEM
spring-watcher-listen (2.0.1)
listen (>= 2.7, < 4.0)
spring (>= 1.2, < 3.0)
sprockets (4.0.2)
sprockets (4.0.3)
concurrent-ruby (~> 1.0)
rack (> 1, < 3)
sprockets-rails (3.2.2)
actionpack (>= 4.0)
activesupport (>= 4.0)
sprockets-rails (3.4.2)
actionpack (>= 5.2)
activesupport (>= 5.2)
sprockets (>= 3.0.0)
sysexits (1.2.0)
temple (0.8.2)
thor (1.1.0)
thread_safe (0.3.6)
thor (1.2.1)
tilt (2.0.10)
tzinfo (1.2.9)
thread_safe (~> 0.1)
tzinfo (2.0.4)
concurrent-ruby (~> 1.0)
uglifier (4.2.0)
execjs (>= 0.3.0, < 3)
unicode-display_width (2.0.0)
Expand All @@ -374,7 +377,7 @@ GEM
websocket-driver (0.7.5)
websocket-extensions (>= 0.1.0)
websocket-extensions (0.1.5)
zeitwerk (2.5.1)
zeitwerk (2.5.4)

PLATFORMS
ruby
Expand All @@ -401,7 +404,7 @@ DEPENDENCIES
mini_racer
overcommit
pg
rails (< 6.1)
rails (< 7)
rails-controller-testing
rails-html-sanitizer (~> 1.4.0)
react-rails (~> 2.4)
Expand All @@ -425,10 +428,10 @@ DEPENDENCIES
unicorn
unicorn-worker-killer
web-console
webpacker (< 6.1)
webpacker (< 7)

RUBY VERSION
ruby 2.7.0p0

BUNDLED WITH
2.1.4
2.3.8
10 changes: 5 additions & 5 deletions app/views/events/details.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -30,15 +30,15 @@
- if current_user
#reservation-form
- if current_user.rejected?
= render(file: 'reservations/rejected_user')
= render 'reservations/rejected_user'
- elsif !current_user.active?
= render(file: 'reservations/pending_user')
= render 'reservations/pending_user'
- elsif !@event.book_range?
= render(file: 'reservations/no_user_form')
= render 'reservations/no_user_form'
- elsif @reservation&.id
= render(file: 'reservations/status')
= render 'reservations/status'
- elsif !current_user.can_book?(@event)
= render(file: 'reservations/no_user_form')
= render 'reservations/no_user_form'
- else
= react_component('ReservationForm', @reservation_form.merge(url: form_create_reservations_path, authenticity_token: form_authenticity_token), prerender: true)
- else
Expand Down
14 changes: 14 additions & 0 deletions app/views/reservations/_status.html.haml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.row
%p{ class: "status-#{@reservation.status}" }= t("reservations.show.status.#{@reservation.status}")
%p= t('reservations.show.fans')
%ul
- @reservation.fan_names.each do |n|
%li= n
%p= t('reservations.show.phone_number', number: @reservation.phone_number)
- if @reservation.stop.present?
%p Punto di partenza: #{@reservation.stop}

- if @reservation.pending?
.row
%p Riceverai aggiornamenti sulla tua mail.
%p Per eventuali modifiche scrivi a : cheidelacoriera@gmail.com
15 changes: 1 addition & 14 deletions app/views/reservations/status.html.haml
Original file line number Diff line number Diff line change
@@ -1,14 +1 @@
.row
%p{ class: "status-#{@reservation.status}" }= t("reservations.show.status.#{@reservation.status}")
%p= t('reservations.show.fans')
%ul
- @reservation.fan_names.each do |n|
%li= n
%p= t('reservations.show.phone_number', number: @reservation.phone_number)
- if @reservation.stop.present?
%p Punto di partenza: #{@reservation.stop}

- if @reservation.pending?
.row
%p Riceverai aggiornamenti sulla tua mail.
%p Per eventuali modifiche scrivi a : cheidelacoriera@gmail.com
= render 'status'
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
]
},
"engines": {
"node": ">=10.15.3 <15",
"node": ">=10.15.3 <17",
"npm": ">=6.4.1 <7",
"yarn": ">=1.15.2 <2"
},
Expand Down

0 comments on commit d47f792

Please sign in to comment.