From 580411df4fdbd833ea59c8be4da35bd122d25922 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 14:43:17 +0930 Subject: [PATCH 1/8] fix: use rvm installer remove workaround for rvm/issues/4068 as this issue was fixed in Aug 28, 2017 --- Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index 79deada5f2d..3d01ff58c97 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,8 +59,8 @@ ENV LANGUAGE en_US.UTF-8 WORKDIR $HOME RUN gpg2 --keyserver hkp://keys.gnupg.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 -# workaround for https://github.com/rvm/rvm/issues/4068 -RUN curl -sSL https://raw.githubusercontent.com/wayneeseguin/rvm/stable/binscripts/rvm-installer | /bin/bash -s stable --ruby=$RUBY_VERSION +RUN gpg2 --keyserver hkp://pool.sks-keyservers.net --recv-keys 409B6B1796C275462A1703113804BB82D39DC0E3 7D2BAF1CF37B13E2069D6956105BD0E739499BDB +RUN curl -sSL https://get.rvm.io | bash -s stable --ruby=$RUBY_VERSION RUN bash -l -c "rvm use $RUBY_VERSION" RUN bash -l -c "rvm cleanup all" # Install Rake and Bundler for driving the Awestruct build & site From b21bb74839702b5708033329b89de6eedd5970be Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 15:06:39 +0930 Subject: [PATCH 2/8] fix: use released version of awestruct --- Dockerfile | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) diff --git a/Dockerfile b/Dockerfile index 3d01ff58c97..71adb4b5f7b 100644 --- a/Dockerfile +++ b/Dockerfile @@ -41,15 +41,9 @@ USER dev # Environment variables ENV HOME /home/dev -ENV RUBY_VERSION 2.3.1 +ENV RUBY_VERSION 2.4.3 -### Not released yet - but keeping it here for further simplification -ENV AWESTRUCT_VERSION 0.6.0 - -# Used for custom build -ENV AWESTRUCT_REPO https://github.com/awestruct/awestruct.git -ENV AWESTRUCT_REPO_DIR $HOME/awestruct -ENV AWESTRUCT_COMMIT 00a88d44efcfad33cdec8b09f0d8cd9bd4650e06 +ENV AWESTRUCT_VERSION 0.6.0 # Fix encoding ENV LANG en_US.UTF-8 @@ -65,16 +59,7 @@ RUN bash -l -c "rvm use $RUBY_VERSION" RUN bash -l -c "rvm cleanup all" # Install Rake and Bundler for driving the Awestruct build & site RUN bash -l -c "gem install -N bundler rake" - -# Run custom Awestuct build until v0.6.0 is released -RUN bash -l -c "git clone $AWESTRUCT_REPO $AWESTRUCT_REPO_DIR" -RUN bash -l -c "cd $AWESTRUCT_REPO_DIR && git checkout $AWESTRUCT_COMMIT && gem build awestruct.gemspec" -RUN bash -l -c "gem install $AWESTRUCT_REPO_DIR/awestruct-0.6.0.alpha.gem --no-rdoc --no-ri" - -RUN echo 'alias install-gems="bundle install -j 10 --path ./.gems"' >> $HOME/.bashrc -RUN source $HOME/.bashrc - -# Once released +# Install Awestruct # RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION --no-rdoc --no-ri" EXPOSE 4242 From 007cfe199317bfd6d6da12f31a72299999cb99a1 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 15:28:48 +0930 Subject: [PATCH 3/8] fix: install awestruct gem Forgot to uncomment line --- Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 71adb4b5f7b..2ae5241ccce 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,7 @@ RUN bash -l -c "rvm cleanup all" # Install Rake and Bundler for driving the Awestruct build & site RUN bash -l -c "gem install -N bundler rake" # Install Awestruct -# RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION --no-rdoc --no-ri" +RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION" EXPOSE 4242 From 21a2aea04fd54ab0f8c515faa14110864fb784f4 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 15:29:30 +0930 Subject: [PATCH 4/8] fix: add back in alias for install-gems incorrectly removed while cleaning up using released version of awestruck --- Dockerfile | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Dockerfile b/Dockerfile index 2ae5241ccce..79a2b463698 100644 --- a/Dockerfile +++ b/Dockerfile @@ -59,6 +59,10 @@ RUN bash -l -c "rvm use $RUBY_VERSION" RUN bash -l -c "rvm cleanup all" # Install Rake and Bundler for driving the Awestruct build & site RUN bash -l -c "gem install -N bundler rake" + +RUN echo 'alias install-gems="bundle install -j 10 --path ./.gems"' >> $HOME/.bashrc +RUN source $HOME/.bashrc + # Install Awestruct RUN bash -l -c "gem install awestruct -v $AWESTRUCT_VERSION" From 23f504e2300a80f4c57c86d6be88e140c2ea00ea Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 15:30:29 +0930 Subject: [PATCH 5/8] fix: use released version of awestruct in Gemfile --- Gemfile | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/Gemfile b/Gemfile index 47d78fa39d1..839bcdd2273 100644 --- a/Gemfile +++ b/Gemfile @@ -29,9 +29,7 @@ source 'https://rubygems.org' -#gem 'awestruct', '0.5.7' -gem 'awestruct', :path => '../awestruct' -#gem 'awestruct', :git => 'git@github.com:awestruct/awestruct.git' +gem 'awestruct', '0.6.0' gem 'git', '1.2.9.1' # newer version incorrectly reads UTF-8 enconded commits (authors for example) gem 'asciidoctor' gem 'haml-contrib' From 1f0929cf4879511819a33a302991aa9f8c261d69 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 17:12:18 +0930 Subject: [PATCH 6/8] fix: use bundle config to set path the --path option to bundle has been deprecated --- Dockerfile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Dockerfile b/Dockerfile index 79a2b463698..cf0533a0cb9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -60,7 +60,8 @@ RUN bash -l -c "rvm cleanup all" # Install Rake and Bundler for driving the Awestruct build & site RUN bash -l -c "gem install -N bundler rake" -RUN echo 'alias install-gems="bundle install -j 10 --path ./.gems"' >> $HOME/.bashrc +RUN bundle config set path './.gems' +RUN echo 'alias install-gems="bundle install -j 10"' >> $HOME/.bashrc RUN source $HOME/.bashrc # Install Awestruct From 4e2ec4171967f5332d66f447f559ffc67d88cde7 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 17:13:56 +0930 Subject: [PATCH 7/8] chore: upgrade awestruct version to 0.6.1 --- Dockerfile | 2 +- Gemfile | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Dockerfile b/Dockerfile index cf0533a0cb9..f57b8597030 100644 --- a/Dockerfile +++ b/Dockerfile @@ -43,7 +43,7 @@ USER dev ENV HOME /home/dev ENV RUBY_VERSION 2.4.3 -ENV AWESTRUCT_VERSION 0.6.0 +ENV AWESTRUCT_VERSION 0.6.1 # Fix encoding ENV LANG en_US.UTF-8 diff --git a/Gemfile b/Gemfile index 839bcdd2273..1561fe06526 100644 --- a/Gemfile +++ b/Gemfile @@ -29,7 +29,7 @@ source 'https://rubygems.org' -gem 'awestruct', '0.6.0' +gem 'awestruct', '0.6.1' gem 'git', '1.2.9.1' # newer version incorrectly reads UTF-8 enconded commits (authors for example) gem 'asciidoctor' gem 'haml-contrib' From 006a8883885f6ac0360b660dc8277ec560b15c40 Mon Sep 17 00:00:00 2001 From: Barrie Treloar Date: Thu, 24 Sep 2020 17:14:48 +0930 Subject: [PATCH 8/8] fix: disable unknown Minify awestruct extension --- _ext/pipeline.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/_ext/pipeline.rb b/_ext/pipeline.rb index 9b4d184523c..13cb583c503 100644 --- a/_ext/pipeline.rb +++ b/_ext/pipeline.rb @@ -116,7 +116,7 @@ extension Awestruct::Extensions::Identities::Cache.new # Transformers - transformer Awestruct::Extensions::Minify.new([:js]) + #transformer Awestruct::Extensions::Minify.new([:js]) transformer Awestruct::Extensions::Guide::WrapHeaderAndAssignHeadingIds.new # Helpers