bridgetown-minify-html 0.2.0 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/gempush.yml +4 -15
- data/.github/workflows/rspec.yml +14 -14
- data/.github/workflows/rubocop.yml +30 -0
- data/.github/workflows/spelling.yml +22 -0
- data/.rubocop.yml +1 -2
- data/CHANGELOG.md +16 -1
- data/README.md +3 -0
- data/bridgetown-minify-html.gemspec +10 -1
- data/lib/bridgetown-minify-html/minifier.rb +2 -2
- data/lib/bridgetown-minify-html/version.rb +1 -1
- metadata +13 -8
- data/.github/FUNDING.yml +0 -2
- data/Dockerfile +0 -39
- data/docker-compose.yml +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 67060957dc8dfb1ade8db1fef38e38b6b451227d29f4bcb0e852768c652ce36c
|
4
|
+
data.tar.gz: ec347028603a43a02038e8f9b6666650a44af33fdefa9c8c53caa71fd2648744
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f5b439b1b28a547cfe88fce7dd538f707c3b92ca14a58c5d2217e47879ecdec232c27dea04a82a064d813ab0cff4ee2571b6e17dc94fd50d7ba26cc5a18180e8
|
7
|
+
data.tar.gz: e5be065ed2c109061a3834b51a5f9b579f65a837947fae6578b2ec2d9593a87ad4689f084b0aff6ab1a894ce0423e4e79852a32c802af2c634fe21df55b64156
|
@@ -11,19 +11,8 @@ jobs:
|
|
11
11
|
|
12
12
|
steps:
|
13
13
|
- uses: actions/checkout@v2
|
14
|
-
- name:
|
15
|
-
uses:
|
14
|
+
- name: Publish to GitHub Packages
|
15
|
+
uses: jstastny/publish-gem-to-github@master
|
16
16
|
with:
|
17
|
-
|
18
|
-
|
19
|
-
- name: Publish to GPR
|
20
|
-
run: |
|
21
|
-
mkdir -p $HOME/.gem
|
22
|
-
touch $HOME/.gem/credentials
|
23
|
-
chmod 0600 $HOME/.gem/credentials
|
24
|
-
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
25
|
-
gem build *.gemspec
|
26
|
-
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
27
|
-
env:
|
28
|
-
GEM_HOST_API_KEY: ${{secrets.GPR_AUTH_TOKEN}}
|
29
|
-
OWNER: MikeRogers0
|
17
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
18
|
+
owner: MikeRogers0
|
data/.github/workflows/rspec.yml
CHANGED
@@ -5,29 +5,29 @@ on:
|
|
5
5
|
push:
|
6
6
|
branches: [ master ]
|
7
7
|
pull_request:
|
8
|
-
branches: [ master ]
|
9
8
|
|
10
9
|
jobs:
|
11
|
-
|
10
|
+
test:
|
11
|
+
strategy:
|
12
|
+
fail-fast: false
|
13
|
+
matrix:
|
14
|
+
ruby: [2.6, 2.7, head]
|
12
15
|
runs-on: ubuntu-latest
|
16
|
+
name: Test against Ruby ${{ matrix.ruby }}
|
13
17
|
|
14
18
|
steps:
|
15
|
-
- uses: actions/checkout@
|
16
|
-
|
17
|
-
- name: Set up Ruby 2.7
|
18
|
-
uses: ruby/setup-ruby@v1
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: ruby/setup-ruby@v1
|
19
21
|
with:
|
20
|
-
ruby-version:
|
21
|
-
|
22
|
-
|
22
|
+
ruby-version: ${{ matrix.ruby }}
|
23
|
+
- name: Cache gems
|
24
|
+
uses: actions/cache@v2.1.2
|
23
25
|
with:
|
24
26
|
path: vendor/bundle
|
25
|
-
key: ${{ runner.os }}-
|
27
|
+
key: ${{ runner.os }}-ruby-${{ matrix.ruby }}-${{ hashFiles('**/Gemfile.lock') }}
|
26
28
|
restore-keys: |
|
27
|
-
${{ runner.os }}-
|
28
|
-
- name:
|
29
|
-
env:
|
30
|
-
RAILS_ENV: test
|
29
|
+
${{ runner.os }}-ruby-${{ matrix.ruby }}
|
30
|
+
- name: Install Gems
|
31
31
|
run: |
|
32
32
|
gem install bundler
|
33
33
|
bundle config path vendor/bundle
|
@@ -0,0 +1,30 @@
|
|
1
|
+
name: RuboCop
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
jobs:
|
9
|
+
build:
|
10
|
+
runs-on: ubuntu-latest
|
11
|
+
|
12
|
+
steps:
|
13
|
+
- uses: actions/checkout@v2
|
14
|
+
- name: Set up Ruby 2.7
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 2.7
|
18
|
+
- name: Cache gems
|
19
|
+
uses: actions/cache@v2.1.1
|
20
|
+
with:
|
21
|
+
path: vendor/bundle
|
22
|
+
key: ${{ runner.os }}-rubocop-${{ hashFiles('**/Gemfile.lock') }}
|
23
|
+
restore-keys: |
|
24
|
+
${{ runner.os }}-rubocop-
|
25
|
+
- name: Install gems
|
26
|
+
run: |
|
27
|
+
bundle config path vendor/bundle
|
28
|
+
bundle install --jobs 4 --retry 3
|
29
|
+
- name: Run RuboCop
|
30
|
+
run: bundle exec rubocop --parallel
|
@@ -0,0 +1,22 @@
|
|
1
|
+
name: Typo CI
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- master
|
7
|
+
pull_request:
|
8
|
+
jobs:
|
9
|
+
spellcheck:
|
10
|
+
name: Typo CI (GitHub Action)
|
11
|
+
runs-on: ubuntu-latest
|
12
|
+
timeout-minutes: 4
|
13
|
+
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
14
|
+
steps:
|
15
|
+
- name: TypoCheck
|
16
|
+
uses: typoci/spellcheck-action@master
|
17
|
+
# with:
|
18
|
+
# A license can be purchased via:
|
19
|
+
# https://gumroad.com/l/MvvBE
|
20
|
+
# typo_ci_license_key: ${{ secrets.TYPO_CI_LICENSE_KEY }}
|
21
|
+
env:
|
22
|
+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,7 +2,22 @@
|
|
2
2
|
|
3
3
|
## [Unreleased](https://github.com/MikeRogers0/bridgetown-minify-html/tree/HEAD)
|
4
4
|
|
5
|
-
[Full Changelog](https://github.com/MikeRogers0/bridgetown-minify-html/compare/v0.
|
5
|
+
[Full Changelog](https://github.com/MikeRogers0/bridgetown-minify-html/compare/v0.2.0...HEAD)
|
6
|
+
|
7
|
+
**Merged pull requests:**
|
8
|
+
|
9
|
+
- Bumping to 1.0.0 [\#16](https://github.com/MikeRogers0/bridgetown-minify-html/pull/16) ([MikeRogers0](https://github.com/MikeRogers0))
|
10
|
+
- Using GitHub Action by @jstastny for gempush [\#15](https://github.com/MikeRogers0/bridgetown-minify-html/pull/15) ([MikeRogers0](https://github.com/MikeRogers0))
|
11
|
+
- Testing against multiple ruby versions [\#14](https://github.com/MikeRogers0/bridgetown-minify-html/pull/14) ([MikeRogers0](https://github.com/MikeRogers0))
|
12
|
+
- Adding funding\_uri & metadata in [\#13](https://github.com/MikeRogers0/bridgetown-minify-html/pull/13) ([MikeRogers0](https://github.com/MikeRogers0))
|
13
|
+
- Adding new badges to the readme [\#12](https://github.com/MikeRogers0/bridgetown-minify-html/pull/12) ([MikeRogers0](https://github.com/MikeRogers0))
|
14
|
+
- Cleaning up GitHub Actions [\#11](https://github.com/MikeRogers0/bridgetown-minify-html/pull/11) ([MikeRogers0](https://github.com/MikeRogers0))
|
15
|
+
- Ditching docker [\#10](https://github.com/MikeRogers0/bridgetown-minify-html/pull/10) ([MikeRogers0](https://github.com/MikeRogers0))
|
16
|
+
- Bump actions/setup-ruby from v1.1.1 to v1.1.2 [\#9](https://github.com/MikeRogers0/bridgetown-minify-html/pull/9) ([dependabot[bot]](https://github.com/apps/dependabot))
|
17
|
+
|
18
|
+
## [v0.2.0](https://github.com/MikeRogers0/bridgetown-minify-html/tree/v0.2.0) (2020-07-22)
|
19
|
+
|
20
|
+
[Full Changelog](https://github.com/MikeRogers0/bridgetown-minify-html/compare/v0.1.0...v0.2.0)
|
6
21
|
|
7
22
|
**Fixed bugs:**
|
8
23
|
|
data/README.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
[![Twitter Follow](https://img.shields.io/twitter/follow/MikeRogers0?label=Follow%20%40MikeRogers0%20For%20Updates&style=social)](https://twitter.com/MikeRogers0)
|
2
|
+
![RSpec](https://github.com/MikeRogers0/bridgetown-minify-html/workflows/RSpec/badge.svg)
|
3
|
+
![RuboCop](https://github.com/MikeRogers0/bridgetown-minify-html/workflows/RuboCop/badge.svg)
|
1
4
|
[![Gem Version](https://badge.fury.io/rb/bridgetown-minify-html.svg)](https://badge.fury.io/rb/bridgetown-minify-html)
|
2
5
|
|
3
6
|
# Bridgetown Minify HTML
|
@@ -11,11 +11,20 @@ Gem::Specification.new do |spec|
|
|
11
11
|
spec.homepage = "https://github.com/MikeRogers0/bridgetown-minify-html"
|
12
12
|
spec.license = "MIT"
|
13
13
|
|
14
|
+
spec.metadata = {
|
15
|
+
'bug_tracker_uri' => "#{spec.homepage}/issues",
|
16
|
+
'changelog_uri' => "#{spec.homepage}/blob/master/CHANGELOG.md",
|
17
|
+
'documentation_uri' => spec.homepage,
|
18
|
+
'homepage_uri' => spec.homepage,
|
19
|
+
'source_code_uri' => spec.homepage,
|
20
|
+
'funding_uri' => 'https://www.buymeacoffee.com/MikeRogers0'
|
21
|
+
}
|
22
|
+
|
14
23
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
|
15
24
|
spec.test_files = spec.files.grep(%r!^spec/!)
|
16
25
|
spec.require_paths = ["lib"]
|
17
26
|
|
18
|
-
spec.required_ruby_version = ">= 2.
|
27
|
+
spec.required_ruby_version = ">= 2.6"
|
19
28
|
|
20
29
|
spec.add_dependency "bridgetown", ">= 0.15", "< 2.0"
|
21
30
|
spec.add_dependency "htmlcompressor", ">= 0.4", "< 1.0"
|
@@ -1,7 +1,7 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
# This actually does the Minification. It gets passed the site object,
|
4
|
-
# and documents.
|
3
|
+
# This actually does the Minification. It gets passed the site object,
|
4
|
+
# then it'll just loop through all the pages and documents.
|
5
5
|
module BridgetownMinifyHtml
|
6
6
|
class Minifier
|
7
7
|
DEFAULT_OPTIONS = {
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-minify-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 1.0.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Rogers
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-10-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bridgetown
|
@@ -126,23 +126,22 @@ executables: []
|
|
126
126
|
extensions: []
|
127
127
|
extra_rdoc_files: []
|
128
128
|
files:
|
129
|
-
- ".github/FUNDING.yml"
|
130
129
|
- ".github/dependabot.yml"
|
131
130
|
- ".github/workflows/changelog.yml"
|
132
131
|
- ".github/workflows/gempush.yml"
|
133
132
|
- ".github/workflows/rspec.yml"
|
133
|
+
- ".github/workflows/rubocop.yml"
|
134
|
+
- ".github/workflows/spelling.yml"
|
134
135
|
- ".gitignore"
|
135
136
|
- ".rspec"
|
136
137
|
- ".rubocop.yml"
|
137
138
|
- CHANGELOG.md
|
138
139
|
- CODE_OF_CONDUCT.md
|
139
|
-
- Dockerfile
|
140
140
|
- Gemfile
|
141
141
|
- LICENSE
|
142
142
|
- README.md
|
143
143
|
- Rakefile
|
144
144
|
- bridgetown-minify-html.gemspec
|
145
|
-
- docker-compose.yml
|
146
145
|
- lib/bridgetown-minify-html.rb
|
147
146
|
- lib/bridgetown-minify-html/builder.rb
|
148
147
|
- lib/bridgetown-minify-html/minifier.rb
|
@@ -150,7 +149,13 @@ files:
|
|
150
149
|
homepage: https://github.com/MikeRogers0/bridgetown-minify-html
|
151
150
|
licenses:
|
152
151
|
- MIT
|
153
|
-
metadata:
|
152
|
+
metadata:
|
153
|
+
bug_tracker_uri: https://github.com/MikeRogers0/bridgetown-minify-html/issues
|
154
|
+
changelog_uri: https://github.com/MikeRogers0/bridgetown-minify-html/blob/master/CHANGELOG.md
|
155
|
+
documentation_uri: https://github.com/MikeRogers0/bridgetown-minify-html
|
156
|
+
homepage_uri: https://github.com/MikeRogers0/bridgetown-minify-html
|
157
|
+
source_code_uri: https://github.com/MikeRogers0/bridgetown-minify-html
|
158
|
+
funding_uri: https://www.buymeacoffee.com/MikeRogers0
|
154
159
|
post_install_message:
|
155
160
|
rdoc_options: []
|
156
161
|
require_paths:
|
@@ -159,14 +164,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
164
|
requirements:
|
160
165
|
- - ">="
|
161
166
|
- !ruby/object:Gem::Version
|
162
|
-
version: 2.
|
167
|
+
version: '2.6'
|
163
168
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
169
|
requirements:
|
165
170
|
- - ">="
|
166
171
|
- !ruby/object:Gem::Version
|
167
172
|
version: '0'
|
168
173
|
requirements: []
|
169
|
-
rubygems_version: 3.1.
|
174
|
+
rubygems_version: 3.1.4
|
170
175
|
signing_key:
|
171
176
|
specification_version: 4
|
172
177
|
summary: Minify Outputted HTML in Bridgetown
|
data/.github/FUNDING.yml
DELETED
data/Dockerfile
DELETED
@@ -1,39 +0,0 @@
|
|
1
|
-
FROM ruby:2.7.1-alpine AS builder
|
2
|
-
|
3
|
-
LABEL maintainer="Mike Rogers <me@mikerogers.io>"
|
4
|
-
|
5
|
-
RUN apk add --no-cache \
|
6
|
-
#
|
7
|
-
# required
|
8
|
-
build-base libffi-dev \
|
9
|
-
nodejs-dev yarn tzdata \
|
10
|
-
zlib-dev libxml2-dev libxslt-dev readline-dev bash \
|
11
|
-
# Nice to haves
|
12
|
-
git vim \
|
13
|
-
#
|
14
|
-
# Fixes watch file issues with things like HMR
|
15
|
-
libnotify-dev
|
16
|
-
|
17
|
-
FROM builder as development
|
18
|
-
|
19
|
-
# Add the current apps files into docker image
|
20
|
-
RUN mkdir -p /usr/src/app
|
21
|
-
WORKDIR /usr/src/app
|
22
|
-
|
23
|
-
ENV PATH /usr/src/app/bin:$PATH
|
24
|
-
|
25
|
-
# Install latest bundler
|
26
|
-
RUN bundle config --global silence_root_warning 1
|
27
|
-
|
28
|
-
EXPOSE 4000
|
29
|
-
CMD ["rspec"]
|
30
|
-
|
31
|
-
FROM development AS production
|
32
|
-
|
33
|
-
# Install Ruby Gems
|
34
|
-
COPY Gemfile /usr/src/app
|
35
|
-
COPY Gemfile.lock /usr/src/app
|
36
|
-
RUN bundle check || bundle install --jobs=$(nproc)
|
37
|
-
|
38
|
-
# Copy the rest of the app
|
39
|
-
COPY . /usr/src/app
|
data/docker-compose.yml
DELETED
@@ -1,24 +0,0 @@
|
|
1
|
-
---
|
2
|
-
# Docker Compose 2.4 is for local development
|
3
|
-
# https://www.heroku.com/podcasts/codeish/57-discussing-docker-containers-and-kubernetes-with-a-docker-captain - Source on that.
|
4
|
-
version: '2.4'
|
5
|
-
|
6
|
-
x-app: &app
|
7
|
-
image: bridetown-minify-html:latest
|
8
|
-
mem_limit: 512m
|
9
|
-
build:
|
10
|
-
context: .
|
11
|
-
dockerfile: Dockerfile
|
12
|
-
target: development
|
13
|
-
volumes:
|
14
|
-
- .:/usr/src/app:cached
|
15
|
-
- bundler:/usr/local/bundle:delegated
|
16
|
-
|
17
|
-
services:
|
18
|
-
web:
|
19
|
-
<<: *app
|
20
|
-
command: >
|
21
|
-
bash -c "bundle check || bundle install &&
|
22
|
-
rspec"
|
23
|
-
volumes:
|
24
|
-
bundler:
|