actualización a alpine 3.11 y ruby 2.6.5

This commit is contained in:
f 2019-12-20 15:51:20 -03:00
parent 0229094f3f
commit 4ef72f81d2
No known key found for this signature in database
GPG key ID: 2AE5A13E321F953D
6 changed files with 54 additions and 111 deletions

View file

@ -1,61 +1,5 @@
AllCops: AllCops:
TargetRubyVersion: '2.5' TargetRubyVersion: '2.6'
Style/AsciiComments: Style/AsciiComments:
Enabled: false Enabled: false
# Sólo existe para molestarnos (?)
Metrics/AbcSize:
Enabled: false
Metrics/LineLength:
Exclude:
- 'db/schema.rb'
- 'db/migrate/*.rb'
- 'app/models/site.rb'
Metrics/MethodLength:
Exclude:
- 'db/schema.rb'
- 'db/migrate/*.rb'
- 'app/models/site.rb'
- 'app/controllers/sites_controller.rb'
- 'app/controllers/posts_controller.rb'
- 'app/controllers/invitadxs_controller.rb'
- 'app/controllers/i18n_controller.rb'
- 'app/controllers/collaborations_controller.rb'
- 'app/controllers/usuaries_controller.rb'
- 'app/models/post.rb'
Metrics/BlockLength:
Exclude:
- 'config/environments/development.rb'
- 'config/environments/production.rb'
- 'config/initializers/devise.rb'
- 'db/schema.rb'
- 'config/routes.rb'
- 'test/controllers/sites_controller_test.rb'
Metrics/ClassLength:
Exclude:
- 'app/models/site.rb'
- 'app/controllers/posts_controller.rb'
- 'app/controllers/sites_controller.rb'
- 'test/models/post_test.rb'
- 'test/controllers/sites_controller_test.rb'
Lint/HandleExceptions:
Exclude:
- 'app/controllers/posts_controller.rb'
Style/GuardClause:
Exclude:
- 'app/controllers/posts_controller.rb'
Metrics/PerceivedComplexity:
Exclude:
- 'app/controllers/posts_controller.rb'
Lint/UnreachableCode:
Exclude:
- 'app/policies/post_policy.rb'

View file

@ -1 +1 @@
2.5.7 2.6.5

View file

@ -2,7 +2,7 @@
# el mismo repositorio de trabajo. Cuando tengamos CI/CD algunas cosas # el mismo repositorio de trabajo. Cuando tengamos CI/CD algunas cosas
# como el tarball van a tener que cambiar porque ya vamos a haber hecho # como el tarball van a tener que cambiar porque ya vamos a haber hecho
# un clone/pull limpio. # un clone/pull limpio.
FROM alpine:3.10 as build FROM alpine:3.11 as build
MAINTAINER "f <f@sutty.nl>" MAINTAINER "f <f@sutty.nl>"
ARG RAILS_MASTER_KEY ARG RAILS_MASTER_KEY
@ -19,7 +19,7 @@ RUN apk add --no-cache postgresql-libs git yarn brotli libssh2
# https://github.com/rubygems/rubygems/issues/2918 # https://github.com/rubygems/rubygems/issues/2918
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808 # https://gitlab.alpinelinux.org/alpine/aports/issues/10808
COPY ./rubygems-platform-musl.patch /tmp/ COPY ./rubygems-platform-musl.patch /tmp/
RUN cd /usr/lib/ruby/2.5.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch RUN cd /usr/lib/ruby/2.6.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch
# Agregar el usuario # Agregar el usuario
RUN addgroup -g 82 -S www-data RUN addgroup -g 82 -S www-data
@ -37,7 +37,7 @@ COPY --chown=app:www-data ./Gemfile .
COPY --chown=app:www-data ./Gemfile.lock . COPY --chown=app:www-data ./Gemfile.lock .
RUN bundle install --no-cache --path=./vendor --without='test development' RUN bundle install --no-cache --path=./vendor --without='test development'
# Vaciar la caché # Vaciar la caché
RUN rm vendor/ruby/2.5.0/cache/*.gem RUN rm vendor/ruby/2.6.0/cache/*.gem
# Copiar el repositorio git # Copiar el repositorio git
COPY --chown=app:www-data ./.git/ ./.git/ COPY --chown=app:www-data ./.git/ ./.git/
@ -64,7 +64,7 @@ RUN bundle clean
RUN rm -rf ./node_modules ./tmp/cache ./.git RUN rm -rf ./node_modules ./tmp/cache ./.git
# Contenedor final # Contenedor final
FROM sutty/monit:3.9 FROM sutty/monit:latest
ENV RAILS_ENV production ENV RAILS_ENV production
# Instalar las dependencias, separamos la librería de base de datos para # Instalar las dependencias, separamos la librería de base de datos para
@ -73,12 +73,12 @@ RUN apk add --no-cache libxslt libxml2 tzdata ruby ruby-bundler ruby-json ruby-b
RUN apk add --no-cache postgresql-libs libssh2 file rsync git RUN apk add --no-cache postgresql-libs libssh2 file rsync git
# Chequear que la versión de ruby sea la correcta # Chequear que la versión de ruby sea la correcta
RUN test "2.5.7" = `ruby -e 'puts RUBY_VERSION'` RUN test "2.6.5" = `ruby -e 'puts RUBY_VERSION'`
# https://github.com/rubygems/rubygems/issues/2918 # https://github.com/rubygems/rubygems/issues/2918
# https://gitlab.alpinelinux.org/alpine/aports/issues/10808 # https://gitlab.alpinelinux.org/alpine/aports/issues/10808
COPY ./rubygems-platform-musl.patch /tmp/ COPY ./rubygems-platform-musl.patch /tmp/
RUN cd /usr/lib/ruby/2.5.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch RUN cd /usr/lib/ruby/2.6.0 && patch -Np 0 -i /tmp/rubygems-platform-musl.patch
# Necesitamos yarn para que Jekyll pueda generar los sitios # Necesitamos yarn para que Jekyll pueda generar los sitios
# XXX: Eliminarlo cuando extraigamos la generación de sitios del proceso # XXX: Eliminarlo cuando extraigamos la generación de sitios del proceso

View file

@ -15,7 +15,7 @@ git_source(:github) do |repo_name|
end end
# Cambiar en Dockerfile también # Cambiar en Dockerfile también
ruby '2.5.7' ruby '2.6.5'
gem 'dotenv-rails', require: 'dotenv/rails-now' gem 'dotenv-rails', require: 'dotenv/rails-now'

View file

@ -73,20 +73,20 @@ GEM
zeitwerk (~> 2.2) zeitwerk (~> 2.2)
addressable (2.7.0) addressable (2.7.0)
public_suffix (>= 2.0.2, < 5.0) public_suffix (>= 2.0.2, < 5.0)
airbrussh (1.3.4) airbrussh (1.4.0)
sshkit (>= 1.6.1, != 1.7.0) sshkit (>= 1.6.1, != 1.7.0)
ast (2.4.0) ast (2.4.0)
autoprefixer-rails (9.6.1.1) autoprefixer-rails (9.7.3)
execjs execjs
bcrypt (3.1.13) bcrypt (3.1.13)
bcrypt_pbkdf (1.0.1) bcrypt_pbkdf (1.0.1)
bindex (0.8.1) bindex (0.8.1)
bootstrap (4.3.1) bootstrap (4.4.1)
autoprefixer-rails (>= 9.1.0) autoprefixer-rails (>= 9.1.0)
popper_js (>= 1.14.3, < 2) popper_js (>= 1.14.3, < 2)
sassc-rails (>= 2.0.0) sassc-rails (>= 2.0.0)
builder (3.2.4) builder (3.2.4)
capistrano (3.11.1) capistrano (3.11.2)
airbrussh (>= 1.0.0) airbrussh (>= 1.0.0)
i18n i18n
rake (>= 10.0.0) rake (>= 10.0.0)
@ -108,11 +108,10 @@ GEM
rack (>= 1.0.0) rack (>= 1.0.0)
rack-test (>= 0.5.4) rack-test (>= 0.5.4)
xpath (>= 2.0, < 4.0) xpath (>= 2.0, < 4.0)
childprocess (2.0.0) childprocess (3.0.0)
rake (< 13.0)
coderay (1.1.2) coderay (1.1.2)
colorator (1.1.0) colorator (1.1.0)
commonmarker (0.20.1) commonmarker (0.20.2)
ruby-enum (~> 0.5) ruby-enum (~> 0.5)
concurrent-ruby (1.1.5) concurrent-ruby (1.1.5)
crass (1.0.5) crass (1.0.5)
@ -123,8 +122,8 @@ GEM
railties (>= 4.1.0) railties (>= 4.1.0)
responders responders
warden (~> 1.2.3) warden (~> 1.2.3)
devise-i18n (1.8.2) devise-i18n (1.9.0)
devise (>= 4.6) devise (>= 4.7.1)
devise_invitable (2.0.1) devise_invitable (2.0.1)
actionmailer (>= 5.0) actionmailer (>= 5.0)
devise (>= 4.6) devise (>= 4.6)
@ -136,8 +135,8 @@ GEM
em-websocket (0.5.1) em-websocket (0.5.1)
eventmachine (>= 0.12.9) eventmachine (>= 0.12.9)
http_parser.rb (~> 0.6.0) http_parser.rb (~> 0.6.0)
email_address (0.1.11) email_address (0.1.12)
netaddr (~> 2.0) netaddr (>= 2.0.4, < 3)
simpleidn simpleidn
erubi (1.9.0) erubi (1.9.0)
eventmachine (1.2.7) eventmachine (1.2.7)
@ -145,14 +144,14 @@ GEM
actionmailer (>= 4.0, < 7) actionmailer (>= 4.0, < 7)
activesupport (>= 4.0, < 7) activesupport (>= 4.0, < 7)
execjs (2.7.0) execjs (2.7.0)
factory_bot (5.0.2) factory_bot (5.1.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
factory_bot_rails (5.0.2) factory_bot_rails (5.1.1)
factory_bot (~> 5.0.2) factory_bot (~> 5.1.0)
railties (>= 4.2.0) railties (>= 4.2.0)
ffi (1.11.1) ffi (1.11.3)
forwardable-extended (2.6.0) forwardable-extended (2.6.0)
friendly_id (5.2.5) friendly_id (5.3.0)
activerecord (>= 4.0.0) activerecord (>= 4.0.0)
globalid (0.4.2) globalid (0.4.2)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
@ -161,13 +160,12 @@ GEM
tilt tilt
haml-lint (0.999.999) haml-lint (0.999.999)
haml_lint haml_lint
haml_lint (0.33.0) haml_lint (0.34.1)
haml (>= 4.0, < 5.2) haml (>= 4.0, < 5.2)
rainbow rainbow
rake (>= 10, < 13)
rubocop (>= 0.50.0) rubocop (>= 0.50.0)
sysexits (~> 1.1) sysexits (~> 1.1)
hamlit (2.10.0) hamlit (2.11.0)
temple (>= 0.8.2) temple (>= 0.8.2)
thor thor
tilt tilt
@ -180,13 +178,13 @@ GEM
http_parser.rb (0.6.0) http_parser.rb (0.6.0)
i18n (1.7.0) i18n (1.7.0)
concurrent-ruby (~> 1.0) concurrent-ruby (~> 1.0)
image_processing (1.9.3) image_processing (1.10.0)
mini_magick (>= 4.9.5, < 5) mini_magick (>= 4.9.5, < 5)
ruby-vips (>= 2.0.13, < 3) ruby-vips (>= 2.0.13, < 3)
inline_svg (1.5.2) inline_svg (1.6.0)
activesupport (>= 3.0) activesupport (>= 3.0)
nokogiri (>= 1.6) nokogiri (>= 1.6)
jaro_winkler (1.5.3) jaro_winkler (1.5.4)
jbuilder (2.9.1) jbuilder (2.9.1)
activesupport (>= 4.2.0) activesupport (>= 4.2.0)
jekyll (4.0.0) jekyll (4.0.0)
@ -204,7 +202,7 @@ GEM
rouge (~> 3.0) rouge (~> 3.0)
safe_yaml (~> 1.0) safe_yaml (~> 1.0)
terminal-table (~> 1.8) terminal-table (~> 1.8)
jekyll-sass-converter (2.0.0) jekyll-sass-converter (2.0.1)
sassc (> 2.0.1, < 3.0) sassc (> 2.0.1, < 3.0)
jekyll-watch (2.2.1) jekyll-watch (2.2.1)
listen (~> 3.0) listen (~> 3.0)
@ -245,8 +243,8 @@ GEM
nokogiri (1.10.7) nokogiri (1.10.7)
mini_portile2 (~> 2.4.0) mini_portile2 (~> 2.4.0)
orm_adapter (0.5.0) orm_adapter (0.5.0)
parallel (1.17.0) parallel (1.19.1)
parser (2.6.4.1) parser (2.6.5.0)
ast (~> 2.4.0) ast (~> 2.4.0)
pathutil (0.16.2) pathutil (0.16.2)
forwardable-extended (~> 2.6) forwardable-extended (~> 2.6)
@ -297,7 +295,7 @@ GEM
rake (>= 0.8.7) rake (>= 0.8.7)
thor (>= 0.20.3, < 2.0) thor (>= 0.20.3, < 2.0)
rainbow (3.0.0) rainbow (3.0.0)
rake (12.3.3) rake (13.0.1)
rb-fsevent (0.10.3) rb-fsevent (0.10.3)
rb-inotify (0.10.0) rb-inotify (0.10.0)
ffi (~> 1.0) ffi (~> 1.0)
@ -311,39 +309,39 @@ GEM
redis-activesupport (5.2.0) redis-activesupport (5.2.0)
activesupport (>= 3, < 7) activesupport (>= 3, < 7)
redis-store (>= 1.3, < 2) redis-store (>= 1.3, < 2)
redis-rack (2.0.5) redis-rack (2.0.6)
rack (>= 1.5, < 3) rack (>= 1.5, < 3)
redis-store (>= 1.2, < 2) redis-store (>= 1.2, < 2)
redis-rails (5.0.2) redis-rails (5.0.2)
redis-actionpack (>= 5.0, < 6) redis-actionpack (>= 5.0, < 6)
redis-activesupport (>= 5.0, < 6) redis-activesupport (>= 5.0, < 6)
redis-store (>= 1.2, < 2) redis-store (>= 1.2, < 2)
redis-store (1.6.0) redis-store (1.8.1)
redis (>= 2.2, < 5) redis (>= 4, < 5)
request_store (1.4.1) request_store (1.5.0)
rack (>= 1.4) rack (>= 1.4)
responders (3.0.0) responders (3.0.0)
actionpack (>= 5.0) actionpack (>= 5.0)
railties (>= 5.0) railties (>= 5.0)
rouge (3.11.0) rouge (3.14.0)
rubocop (0.74.0) rubocop (0.78.0)
jaro_winkler (~> 1.5.1) jaro_winkler (~> 1.5.1)
parallel (~> 1.10) parallel (~> 1.10)
parser (>= 2.6) parser (>= 2.6)
rainbow (>= 2.2.2, < 4.0) rainbow (>= 2.2.2, < 4.0)
ruby-progressbar (~> 1.7) ruby-progressbar (~> 1.7)
unicode-display_width (>= 1.4.0, < 1.7) unicode-display_width (>= 1.4.0, < 1.7)
rubocop-rails (2.3.2) rubocop-rails (2.4.0)
rack (>= 1.1) rack (>= 1.1)
rubocop (>= 0.72.0) rubocop (>= 0.72.0)
ruby-enum (0.7.2) ruby-enum (0.7.2)
i18n i18n
ruby-progressbar (1.10.1) ruby-progressbar (1.10.1)
ruby-vips (2.0.15) ruby-vips (2.0.16)
ffi (~> 1.9) ffi (~> 1.9)
ruby_dep (1.5.0) ruby_dep (1.5.0)
rubyzip (1.3.0) rubyzip (2.0.0)
rugged (0.28.3.1) rugged (0.28.4.1)
safe_yaml (1.0.5) safe_yaml (1.0.5)
sass (3.7.4) sass (3.7.4)
sass-listen (~> 4.0.0) sass-listen (~> 4.0.0)
@ -356,7 +354,7 @@ GEM
sprockets (>= 2.8, < 4.0) sprockets (>= 2.8, < 4.0)
sprockets-rails (>= 2.0, < 4.0) sprockets-rails (>= 2.0, < 4.0)
tilt (>= 1.1, < 3) tilt (>= 1.1, < 3)
sassc (2.2.0) sassc (2.2.1)
ffi (~> 1.9) ffi (~> 1.9)
sassc-rails (2.1.2) sassc-rails (2.1.2)
railties (>= 4.0.0) railties (>= 4.0.0)
@ -364,9 +362,9 @@ GEM
sprockets (> 3.0) sprockets (> 3.0)
sprockets-rails sprockets-rails
tilt tilt
selenium-webdriver (3.142.4) selenium-webdriver (3.142.6)
childprocess (>= 0.5, < 3.0) childprocess (>= 0.5, < 4.0)
rubyzip (~> 1.2, >= 1.2.2) rubyzip (>= 1.2.2)
simpleidn (0.1.1) simpleidn (0.1.1)
unf (~> 0.1.4) unf (~> 0.1.4)
spring (2.1.0) spring (2.1.0)
@ -380,7 +378,7 @@ GEM
actionpack (>= 4.0) actionpack (>= 4.0)
activesupport (>= 4.0) activesupport (>= 4.0)
sprockets (>= 3.0.0) sprockets (>= 3.0.0)
sqlite3 (1.4.1) sqlite3 (1.4.2)
sshkit (1.20.0) sshkit (1.20.0)
net-scp (>= 1.1.2) net-scp (>= 1.1.2)
net-ssh (>= 2.8.0) net-ssh (>= 2.8.0)
@ -392,13 +390,13 @@ GEM
unicode-display_width (~> 1.1, >= 1.1.1) unicode-display_width (~> 1.1, >= 1.1.1)
thor (1.0.1) thor (1.0.1)
thread_safe (0.3.6) thread_safe (0.3.6)
tilt (2.0.9) tilt (2.0.10)
turbolinks (5.2.0) turbolinks (5.2.1)
turbolinks-source (~> 5.2) turbolinks-source (~> 5.2)
turbolinks-source (5.2.0) turbolinks-source (5.2.0)
tzinfo (1.2.5) tzinfo (1.2.5)
thread_safe (~> 0.1) thread_safe (~> 0.1)
uglifier (4.1.20) uglifier (4.2.0)
execjs (>= 0.3.0, < 3) execjs (>= 0.3.0, < 3)
unf (0.1.4) unf (0.1.4)
unf_ext unf_ext
@ -414,7 +412,7 @@ GEM
activemodel (>= 6.0.0) activemodel (>= 6.0.0)
bindex (>= 0.4.0) bindex (>= 0.4.0)
railties (>= 6.0.0) railties (>= 6.0.0)
webpacker (4.0.7) webpacker (4.2.2)
activesupport (>= 4.2) activesupport (>= 4.2)
rack-proxy (>= 0.6.1) rack-proxy (>= 0.6.1)
railties (>= 4.2) railties (>= 4.2)
@ -489,7 +487,7 @@ DEPENDENCIES
yaml_db! yaml_db!
RUBY VERSION RUBY VERSION
ruby 2.5.7p206 ruby 2.6.5p114
BUNDLED WITH BUNDLED WITH
2.0.2 2.0.2

View file

@ -24,6 +24,7 @@ load:
gem_dir := $(shell readlink -f ../gems) gem_dir := $(shell readlink -f ../gems)
gems := $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/*/extconf.rb && basename {}') gems := $(shell bundle show --paths | xargs -I {} sh -c 'test -f {}/ext/*/extconf.rb && basename {}')
gems += $(shell bundle show --paths | xargs -I {} sh -c 'find {} -name extconf.rb && basename {}')
gems_musl := $(patsubst %,$(gem_dir)/%-x86_64-linux-musl.gem,$(gems)) gems_musl := $(patsubst %,$(gem_dir)/%-x86_64-linux-musl.gem,$(gems))
$(gem_dir)/%-x86_64-linux-musl.gem: $(gem_dir)/%-x86_64-linux-musl.gem: