From 475cb970bc1a100bde4a705410504e8764f24ce8 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 5 Jan 2021 12:00:32 -0300 Subject: [PATCH 1/3] =?UTF-8?q?actualizaci=C3=B3n=20de=20cuidados?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Gemfile.lock | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 2ce4a6a3..618ebd2c 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -156,7 +156,7 @@ GEM email_address (0.1.19) netaddr (>= 2.0.4, < 3) simpleidn - errbase (0.2.0) + errbase (0.2.1) erubi (1.10.0) eventmachine (1.2.7) exception_notification (4.4.3) @@ -203,7 +203,7 @@ GEM thor hiredis (0.6.3) http_parser.rb (0.6.0) - i18n (1.8.5) + i18n (1.8.7) concurrent-ruby (~> 1.0) icalendar (2.7.0) ice_cube (~> 0.16) @@ -300,7 +300,7 @@ GEM mini_histogram (0.3.1) mini_magick (4.11.0) mini_mime (1.0.2) - mini_portile2 (2.4.0) + mini_portile2 (2.5.0) minima (2.5.1) jekyll (>= 3.5, < 5.0) jekyll-feed (~> 0.9) @@ -311,8 +311,9 @@ GEM request_store (~> 1.0) netaddr (2.0.4) nio4r (2.5.4) - nokogiri (1.10.10) - mini_portile2 (~> 2.4.0) + nokogiri (1.11.0) + mini_portile2 (~> 2.5.0) + racc (~> 1.4) orm_adapter (0.5.0) parallel (1.20.1) parser (3.0.0.0) @@ -331,6 +332,7 @@ GEM nio4r (~> 2.0) pundit (2.1.0) activesupport (>= 3.0.0) + racc (1.5.2) rack (2.2.3) rack-cors (1.1.1) rack (>= 2.0.0) @@ -438,7 +440,7 @@ GEM rubocop-ast (>= 1.2.0, < 2.0) ruby-progressbar (~> 1.7) unicode-display_width (>= 1.4.0, < 2.0) - rubocop-ast (1.3.0) + rubocop-ast (1.4.0) parser (>= 2.7.1.5) rubocop-rails (2.9.1) activesupport (>= 4.2.0) @@ -447,7 +449,7 @@ GEM ruby-enum (0.8.0) i18n ruby-filemagic (0.7.2) - ruby-progressbar (1.10.1) + ruby-progressbar (1.11.0) ruby-statistics (2.1.2) ruby-vips (2.0.17) ffi (~> 1.9) From 3a3b39a2ac4b42f8eec8cd1d64e636e8e9934553 Mon Sep 17 00:00:00 2001 From: f Date: Tue, 5 Jan 2021 12:01:19 -0300 Subject: [PATCH 2/3] compilar todas las gemas binarias --- Makefile | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index df495e7d..69bb1236 100644 --- a/Makefile +++ b/Makefile @@ -39,14 +39,16 @@ load: mkdir -p $@ gem_dir := $(shell readlink -f ../gems) +gem_cache_dir := $(gem_dir)/cache +gem_binary_dir := $(gem_dir)/$(alpine_version) ifeq ($(MAKECMDGOALS),build-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 := $(patsubst %,$(gem_dir)/cache/%.gem,$(gems)) -gems_musl := $(patsubst $(gem_dir)/cache/%.gem,$(gem_dir)/$(alpine_version)/%-x86_64-linux-musl.gem,$(gems)) +gems := $(shell bundle show --paths | xargs -I {} sh -c 'find {}/ext/ -name extconf.rb &>/dev/null && basename {}') +gems := $(patsubst %-x86_64-linux,%,$(gems)) +gems := $(patsubst %,$(gem_cache_dir)/%.gem,$(gems)) +gems_musl := $(patsubst $(gem_cache_dir)/%.gem,$(gem_binary_dir)/%-x86_64-linux-musl.gem,$(gems)) endif -$(gem_dir)/%-x86_64-linux-musl.gem: +$(gem_binary_dir)/%-x86_64-linux-musl.gem: @docker run \ -v $(gem_dir):/srv/gems \ -v `readlink -f ~/.ccache`:/home/builder/.ccache \ From 66875efa73c9fd5baba2f914fe60f32d11db053e Mon Sep 17 00:00:00 2001 From: f Date: Sat, 9 Jan 2021 14:25:41 -0300 Subject: [PATCH 3/3] entorno de trabajo --- Makefile | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/Makefile b/Makefile index 69bb1236..d390b7e9 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,8 @@ public/packs/manifest.json: $(assets) assets: public/packs/manifest.json -serve: - bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/sutty.local.key&cert=../sutty.local/domain/sutty.local.crt" +serve: /etc/hosts + bundle exec rails s -b "ssl://0.0.0.0:3000?key=../sutty.local/domain/$(SUTTY).key&cert=../sutty.local/domain/$(SUTTY).crt" # Limpiar los archivos de testeo clean: @@ -73,15 +73,10 @@ dirs := $(patsubst %,root/%,data sites deploy public) $(dirs): mkdir -p $@ -test-container: $(dirs) - docker run -v $(PWD)/root/data:/srv/http/data \ - -v $(PWD)/root/sites:/srv/http/_sites \ - -v $(PWD)/root/deploy:/srv/http/_deploy \ - -v $(PWD)/root/public:/srv/http/_public \ - -v $(PWD)/config/credentials.yml.enc:/srv/http/config/credentials.yml.enc \ - -e RAILS_MASTER_KEY=`cat config/master.key` \ - -e RAILS_ENV=production \ - -it \ - --rm \ - --name=sutty \ - sutty/sutty /bin/sh +/etc/hosts: always + @echo "Chequeando si es necesario agregar el dominio local $(SUTTY)" + @grep -q " $(SUTTY)$$" $@ || echo -e "127.0.0.1 $(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@ + @grep -q " api.$(SUTTY)$$" $@ || echo -e "127.0.0.1 api.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@ + @grep -q " panel.$(SUTTY)$$" $@ || echo -e "127.0.0.1 panel.$(SUTTY)\n::1 $(SUTTY)" | sudo tee -a $@ + +.PHONY: always