bridgetown-minify-html 0.1.0 → 2.0.0.beta1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/release.yml +43 -0
- data/.github/workflows/rspec.yml +14 -22
- data/.github/workflows/rubocop.yml +20 -0
- data/.rubocop.yml +1 -2
- data/CHANGELOG.md +64 -3
- data/CODE_OF_CONDUCT.md +1 -1
- data/Gemfile +5 -0
- data/LICENSE +1 -1
- data/README.md +23 -3
- data/bridgetown-minify-html.gemspec +13 -5
- data/lib/bridgetown-minify-html/minifier.rb +7 -6
- data/lib/bridgetown-minify-html/version.rb +1 -1
- metadata +23 -21
- data/.github/FUNDING.yml +0 -2
- data/.github/dependabot.yml +0 -21
- data/.github/workflows/changelog.yml +0 -38
- data/.github/workflows/gempush.yml +0 -29
- 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: 8d5cafe8da5e5446eff77b983e5510729b8ac8bf7cc92b803ca36965788af160
|
4
|
+
data.tar.gz: 8a46015830d35dee9bdfaf5df9eb479008961fee97085b723de7cf7e5cfa572b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: aa26f8c0e5ba918e2abc1a949f66851154a759687ff664d8b247c120d8ce034db2b8978e07fff7cd6e2e8ac03f4b66e4434a5711f7490250235d9b4718ad644c
|
7
|
+
data.tar.gz: 3e60282940f5e72f3dfe6276daec65887bacb0f36face06147dc75a9cfb5ee1d8b5d96821581e226abfb7706548fb1937f465caca9400fb576d0091f2b932aa8
|
@@ -0,0 +1,43 @@
|
|
1
|
+
name: Release
|
2
|
+
|
3
|
+
env:
|
4
|
+
BRIDGETOWN_VERSION: 1.0.0.beta2
|
5
|
+
|
6
|
+
on:
|
7
|
+
push:
|
8
|
+
branches:
|
9
|
+
- main
|
10
|
+
jobs:
|
11
|
+
release-please:
|
12
|
+
runs-on: ubuntu-latest
|
13
|
+
steps:
|
14
|
+
- uses: GoogleCloudPlatform/release-please-action@v3
|
15
|
+
id: release
|
16
|
+
with:
|
17
|
+
token: ${{ secrets.GITHUB_TOKEN }}
|
18
|
+
release-type: ruby
|
19
|
+
package-name: bridgetown-minify-html
|
20
|
+
bump-minor-pre-major: true
|
21
|
+
version-file: "lib/bridgetown-minify-html/version.rb"
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
if: ${{ steps.release.outputs.release_created }}
|
24
|
+
- uses: ruby/setup-ruby@v1
|
25
|
+
with:
|
26
|
+
ruby-version: 3.0.0
|
27
|
+
if: ${{ steps.release.outputs.release_created }}
|
28
|
+
- run: |
|
29
|
+
gem install bundler -v 2.2.16
|
30
|
+
bundle install
|
31
|
+
bundle exec rake
|
32
|
+
if: ${{ steps.release.outputs.release_created }}
|
33
|
+
- name: release gem
|
34
|
+
run: |
|
35
|
+
mkdir -p $HOME/.gem
|
36
|
+
touch $HOME/.gem/credentials
|
37
|
+
chmod 0600 $HOME/.gem/credentials
|
38
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
39
|
+
gem build *.gemspec
|
40
|
+
gem push *.gem
|
41
|
+
env:
|
42
|
+
GEM_HOST_API_KEY: "${{secrets.GEM_HOST_API_KEY}}"
|
43
|
+
if: ${{ steps.release.outputs.release_created }}
|
data/.github/workflows/rspec.yml
CHANGED
@@ -1,37 +1,29 @@
|
|
1
1
|
---
|
2
2
|
name: RSpec
|
3
3
|
|
4
|
+
env:
|
5
|
+
BRIDGETOWN_VERSION: 1.0.0.beta2
|
6
|
+
|
4
7
|
on:
|
5
8
|
push:
|
6
|
-
branches: [
|
9
|
+
branches: [ main ]
|
7
10
|
pull_request:
|
8
|
-
branches: [ master ]
|
9
11
|
|
10
12
|
jobs:
|
11
|
-
|
13
|
+
test:
|
14
|
+
strategy:
|
15
|
+
fail-fast: false
|
16
|
+
matrix:
|
17
|
+
ruby: [2.7, 3.0, head]
|
12
18
|
runs-on: ubuntu-latest
|
19
|
+
name: Test against Ruby ${{ matrix.ruby }}
|
13
20
|
|
14
21
|
steps:
|
15
|
-
- uses: actions/checkout@
|
16
|
-
|
17
|
-
- name: Set up Ruby 2.7
|
18
|
-
uses: ruby/setup-ruby@v1
|
22
|
+
- uses: actions/checkout@v2
|
23
|
+
- uses: ruby/setup-ruby@v1
|
19
24
|
with:
|
20
|
-
ruby-version:
|
21
|
-
|
22
|
-
- uses: actions/cache@v1
|
23
|
-
with:
|
24
|
-
path: vendor/bundle
|
25
|
-
key: ${{ runner.os }}-gems-${{ hashFiles('**/Gemfile.lock') }}
|
26
|
-
restore-keys: |
|
27
|
-
${{ runner.os }}-gems-
|
28
|
-
- name: Build
|
29
|
-
env:
|
30
|
-
RAILS_ENV: test
|
31
|
-
run: |
|
32
|
-
gem install bundler
|
33
|
-
bundle config path vendor/bundle
|
34
|
-
bundle install --jobs 4 --retry 3
|
25
|
+
ruby-version: ${{ matrix.ruby }}
|
26
|
+
bundler-cache: true
|
35
27
|
- name: Run tests
|
36
28
|
run: |
|
37
29
|
bundle exec rake spec
|
@@ -0,0 +1,20 @@
|
|
1
|
+
name: RuboCop
|
2
|
+
|
3
|
+
on:
|
4
|
+
push:
|
5
|
+
branches:
|
6
|
+
- main
|
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 3.0
|
15
|
+
uses: ruby/setup-ruby@v1
|
16
|
+
with:
|
17
|
+
ruby-version: 3.0
|
18
|
+
bundler-cache: true
|
19
|
+
- name: Run RuboCop
|
20
|
+
run: bundle exec rubocop --parallel
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,12 +1,73 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
-
## [
|
3
|
+
## [2.0.0.beta1](https://github.com/bt-rb/bridgetown-minify-html/compare/v1.0.1...v2.0.0.beta1) (2022-01-28)
|
4
4
|
|
5
|
-
|
5
|
+
|
6
|
+
### ⚠ BREAKING CHANGES
|
7
|
+
|
8
|
+
* Upgrade to account for changes to @site.pages and @site.documents (#25)
|
9
|
+
|
10
|
+
### Bug Fixes
|
11
|
+
|
12
|
+
* Changelog was pushing to main not master ([#19](https://github.com/bt-rb/bridgetown-minify-html/issues/19)) ([5483b12](https://github.com/bt-rb/bridgetown-minify-html/commit/5483b1250b3c0035600ed8a3bab6d7512cc17a97))
|
13
|
+
* set required reuby version to >= 2.7 ([7171051](https://github.com/bt-rb/bridgetown-minify-html/commit/717105125bad53f0b574044cdda81d2ffa96038d))
|
14
|
+
* Upgrade to account for changes to [@site](https://github.com/site).pages and [@site](https://github.com/site).documents ([#25](https://github.com/bt-rb/bridgetown-minify-html/issues/25)) ([ed63a53](https://github.com/bt-rb/bridgetown-minify-html/commit/ed63a53686abc0b15298d6d84f70cfeff67e9287))
|
15
|
+
|
16
|
+
### Legacy
|
17
|
+
|
18
|
+
- Adjust Readme to center title & subtitle [\#23](https://github.com/bt-rb/bridgetown-minify-html/pull/23) ([MikeRogers0](https://github.com/MikeRogers0))
|
19
|
+
- Adding GitHub Action to autorelease when GitHub changes [\#22](https://github.com/bt-rb/bridgetown-minify-html/pull/22) ([MikeRogers0](https://github.com/MikeRogers0))
|
20
|
+
- Adding support for Ruby 3.0 [\#20](https://github.com/bt-rb/bridgetown-minify-html/pull/20) ([MikeRogers0](https://github.com/MikeRogers0))
|
21
|
+
- Fix: Changelog was pushing to main not master [\#19](https://github.com/bt-rb/bridgetown-minify-html/pull/19) ([MikeRogers0](https://github.com/MikeRogers0))
|
22
|
+
|
23
|
+
## [v1.0.1](https://github.com/bt-rb/bridgetown-minify-html/tree/v1.0.1) (2020-12-02)
|
24
|
+
|
25
|
+
[Full Changelog](https://github.com/bt-rb/bridgetown-minify-html/compare/v1.0.0...v1.0.1)
|
26
|
+
|
27
|
+
**Merged pull requests:**
|
28
|
+
|
29
|
+
- Updating owner references [\#18](https://github.com/bt-rb/bridgetown-minify-html/pull/18) ([MikeRogers0](https://github.com/MikeRogers0))
|
30
|
+
- Removing docker from Dependabot checks [\#17](https://github.com/bt-rb/bridgetown-minify-html/pull/17) ([MikeRogers0](https://github.com/MikeRogers0))
|
31
|
+
|
32
|
+
## [v1.0.0](https://github.com/bt-rb/bridgetown-minify-html/tree/v1.0.0) (2020-10-22)
|
33
|
+
|
34
|
+
[Full Changelog](https://github.com/bt-rb/bridgetown-minify-html/compare/v0.2.0...v1.0.0)
|
35
|
+
|
36
|
+
**Merged pull requests:**
|
37
|
+
|
38
|
+
- Bumping to 1.0.0 [\#16](https://github.com/bt-rb/bridgetown-minify-html/pull/16) ([MikeRogers0](https://github.com/MikeRogers0))
|
39
|
+
- Using GitHub Action by @jstastny for gempush [\#15](https://github.com/bt-rb/bridgetown-minify-html/pull/15) ([MikeRogers0](https://github.com/MikeRogers0))
|
40
|
+
- Testing against multiple ruby versions [\#14](https://github.com/bt-rb/bridgetown-minify-html/pull/14) ([MikeRogers0](https://github.com/MikeRogers0))
|
41
|
+
- Adding funding\_uri & metadata in [\#13](https://github.com/bt-rb/bridgetown-minify-html/pull/13) ([MikeRogers0](https://github.com/MikeRogers0))
|
42
|
+
- Adding new badges to the readme [\#12](https://github.com/bt-rb/bridgetown-minify-html/pull/12) ([MikeRogers0](https://github.com/MikeRogers0))
|
43
|
+
- Cleaning up GitHub Actions [\#11](https://github.com/bt-rb/bridgetown-minify-html/pull/11) ([MikeRogers0](https://github.com/MikeRogers0))
|
44
|
+
- Ditching docker [\#10](https://github.com/bt-rb/bridgetown-minify-html/pull/10) ([MikeRogers0](https://github.com/MikeRogers0))
|
45
|
+
- Bump actions/setup-ruby from v1.1.1 to v1.1.2 [\#9](https://github.com/bt-rb/bridgetown-minify-html/pull/9) ([dependabot[bot]](https://github.com/apps/dependabot))
|
46
|
+
|
47
|
+
## [v0.2.0](https://github.com/bt-rb/bridgetown-minify-html/tree/v0.2.0) (2020-07-22)
|
48
|
+
|
49
|
+
[Full Changelog](https://github.com/bt-rb/bridgetown-minify-html/compare/v0.1.0...v0.2.0)
|
50
|
+
|
51
|
+
**Fixed bugs:**
|
52
|
+
|
53
|
+
- bug: undefined local variable or method extension [\#8](https://github.com/bt-rb/bridgetown-minify-html/pull/8) ([MikeRogers0](https://github.com/MikeRogers0))
|
54
|
+
- bug: Bridgetown::StaticFile don't have output\_ext - so ignoring them [\#7](https://github.com/bt-rb/bridgetown-minify-html/pull/7) ([MikeRogers0](https://github.com/MikeRogers0))
|
55
|
+
- fix: Making sure changelog is regenerated on release [\#4](https://github.com/bt-rb/bridgetown-minify-html/pull/4) ([MikeRogers0](https://github.com/MikeRogers0))
|
56
|
+
|
57
|
+
**Merged pull requests:**
|
58
|
+
|
59
|
+
- feat: Rewording test titles [\#6](https://github.com/bt-rb/bridgetown-minify-html/pull/6) ([MikeRogers0](https://github.com/MikeRogers0))
|
60
|
+
- chores: Adding rubygems badge in [\#5](https://github.com/bt-rb/bridgetown-minify-html/pull/5) ([MikeRogers0](https://github.com/MikeRogers0))
|
61
|
+
- Update rake requirement from ~\> 12.0 to ~\> 13.0 [\#2](https://github.com/bt-rb/bridgetown-minify-html/pull/2) ([dependabot[bot]](https://github.com/apps/dependabot))
|
62
|
+
- Bump actions/setup-ruby from v1 to v1.1.1 [\#1](https://github.com/bt-rb/bridgetown-minify-html/pull/1) ([dependabot[bot]](https://github.com/apps/dependabot))
|
63
|
+
|
64
|
+
## [v0.1.0](https://github.com/bt-rb/bridgetown-minify-html/tree/v0.1.0) (2020-07-20)
|
65
|
+
|
66
|
+
[Full Changelog](https://github.com/bt-rb/bridgetown-minify-html/compare/5ce9f22631f178ecf164501e7d28d6dee902ce9c...v0.1.0)
|
6
67
|
|
7
68
|
**Implemented enhancements:**
|
8
69
|
|
9
|
-
- Preparing for 0.1.0 release [\#3](https://github.com/
|
70
|
+
- Preparing for 0.1.0 release [\#3](https://github.com/bt-rb/bridgetown-minify-html/pull/3) ([MikeRogers0](https://github.com/MikeRogers0))
|
10
71
|
|
11
72
|
|
12
73
|
|
data/CODE_OF_CONDUCT.md
CHANGED
@@ -55,7 +55,7 @@ further defined and clarified by project maintainers.
|
|
55
55
|
## Enforcement
|
56
56
|
|
57
57
|
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
-
reported by contacting the project team at
|
58
|
+
reported by contacting the project team at support@andrewm.codes. All
|
59
59
|
complaints will be reviewed and investigated and will result in a response that
|
60
60
|
is deemed necessary and appropriate to the circumstances. The project team is
|
61
61
|
obligated to maintain confidentiality with regard to the reporter of an incident.
|
data/Gemfile
CHANGED
data/LICENSE
CHANGED
data/README.md
CHANGED
@@ -1,6 +1,22 @@
|
|
1
|
-
|
1
|
+
<h1 align="center">
|
2
|
+
Bridgetown Minify HTML
|
3
|
+
</h1>
|
2
4
|
|
3
|
-
|
5
|
+
<p align="center">
|
6
|
+
<a target="_blank" rel="noopener noreferrer" href="https://badge.fury.io/rb/bridgetown-minify-html">
|
7
|
+
<img src="https://badge.fury.io/rb/bridgetown-minify-html.svg" alt="Gem Version" style="max-width:100%;">
|
8
|
+
</a>
|
9
|
+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/bt-rb/bridgetown-minify-html/workflows/RSpec/badge.svg">
|
10
|
+
<img src="https://github.com/bt-rb/bridgetown-minify-html/workflows/RSpec/badge.svg" alt="RSpec" style="max-width:100%;">
|
11
|
+
</a>
|
12
|
+
<a target="_blank" rel="noopener noreferrer" href="https://github.com/bt-rb/bridgetown-minify-html/workflows/RuboCop/badge.svg">
|
13
|
+
<img src="https://github.com/bt-rb/bridgetown-minify-html/workflows/RuboCop/badge.svg" alt="RuboCop" style="max-width:100%;">
|
14
|
+
</a>
|
15
|
+
</p>
|
16
|
+
|
17
|
+
<p align="center">
|
18
|
+
A Bridgetown plugin to Minify your outputted HTML.
|
19
|
+
</p>
|
4
20
|
|
5
21
|
## Installation
|
6
22
|
|
@@ -47,9 +63,13 @@ minify_html:
|
|
47
63
|
|
48
64
|
## Contributing
|
49
65
|
|
50
|
-
1. Fork it (https://github.com/
|
66
|
+
1. Fork it (https://github.com/bt-rb/bridgetown-minify-html/fork)
|
51
67
|
2. Clone the fork using `git clone` to your local development machine.
|
52
68
|
3. Create your feature branch (`git checkout -b feature/my-new-feature`)
|
53
69
|
4. Commit your changes (`git commit -am 'Add some feature'`)
|
54
70
|
5. Push to the branch (`git push origin my-new-feature`)
|
55
71
|
6. Create a new Pull Request
|
72
|
+
|
73
|
+
## 💌 In Loving Memory of Mike Rogers
|
74
|
+
|
75
|
+
[Mike Rogers](https://github.com/MikeRogers0) was the creator of `bridgetown-minify-html` and participated in the project from July 2020 until his passing in November 2021. This project is maintained by [@andrewmcodes](https://github.com/andrewmcodes) in his honor. You can find Mike's obituary [here if you'd like to leave a message.](https://www.mykeeper.com/profile/MikeRogers/)
|
@@ -5,24 +5,32 @@ require_relative "lib/bridgetown-minify-html/version"
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = "bridgetown-minify-html"
|
7
7
|
spec.version = BridgetownMinifyHtml::VERSION
|
8
|
-
spec.
|
9
|
-
spec.email = "
|
8
|
+
spec.authors = ["Mike Rogers", "Andrew Mason"]
|
9
|
+
spec.email = "support@andrewm.codes"
|
10
10
|
spec.summary = "Minify Outputted HTML in Bridgetown"
|
11
|
-
spec.homepage = "https://github.com/
|
11
|
+
spec.homepage = "https://github.com/bt-rb/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/main/CHANGELOG.md",
|
17
|
+
'documentation_uri' => spec.homepage,
|
18
|
+
'homepage_uri' => spec.homepage,
|
19
|
+
"source_code_uri" => spec.homepage
|
20
|
+
}
|
21
|
+
|
14
22
|
spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r!^(test|script|spec|features|frontend)/!) }
|
15
23
|
spec.test_files = spec.files.grep(%r!^spec/!)
|
16
24
|
spec.require_paths = ["lib"]
|
17
25
|
|
18
|
-
spec.required_ruby_version = ">= 2.
|
26
|
+
spec.required_ruby_version = ">= 2.7"
|
19
27
|
|
20
28
|
spec.add_dependency "bridgetown", ">= 0.15", "< 2.0"
|
21
29
|
spec.add_dependency "htmlcompressor", ">= 0.4", "< 1.0"
|
22
30
|
|
23
31
|
spec.add_development_dependency "bundler"
|
24
32
|
spec.add_development_dependency "nokogiri", "~> 1.6"
|
25
|
-
spec.add_development_dependency "rake", "~>
|
33
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
26
34
|
spec.add_development_dependency "rspec", "~> 3.0"
|
27
35
|
spec.add_development_dependency "rubocop-bridgetown", "~> 0.2"
|
28
36
|
end
|
@@ -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 = {
|
@@ -31,7 +31,7 @@ module BridgetownMinifyHtml
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def call!
|
34
|
-
|
34
|
+
@site.resources.each do |page|
|
35
35
|
minify_page(page)
|
36
36
|
end
|
37
37
|
|
@@ -41,14 +41,15 @@ module BridgetownMinifyHtml
|
|
41
41
|
private
|
42
42
|
|
43
43
|
def minify_page(page)
|
44
|
-
return unless compressible?(page.
|
44
|
+
return unless compressible?(page.destination)
|
45
45
|
|
46
46
|
page.output = compressor.compress(page.output)
|
47
47
|
@minified_count += 1
|
48
48
|
end
|
49
49
|
|
50
|
-
def compressible?(
|
51
|
-
|
50
|
+
def compressible?(destination)
|
51
|
+
destination.respond_to?(:output_ext) &&
|
52
|
+
[".html", ".svg", ".xml"].include?(destination.output_ext)
|
52
53
|
end
|
53
54
|
|
54
55
|
def compressor
|
metadata
CHANGED
@@ -1,14 +1,15 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bridgetown-minify-html
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 2.0.0.beta1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Mike Rogers
|
8
|
-
|
8
|
+
- Andrew Mason
|
9
|
+
autorequire:
|
9
10
|
bindir: bin
|
10
11
|
cert_chain: []
|
11
|
-
date:
|
12
|
+
date: 2022-01-28 00:00:00.000000000 Z
|
12
13
|
dependencies:
|
13
14
|
- !ruby/object:Gem::Dependency
|
14
15
|
name: bridgetown
|
@@ -84,14 +85,14 @@ dependencies:
|
|
84
85
|
requirements:
|
85
86
|
- - "~>"
|
86
87
|
- !ruby/object:Gem::Version
|
87
|
-
version: '
|
88
|
+
version: '13.0'
|
88
89
|
type: :development
|
89
90
|
prerelease: false
|
90
91
|
version_requirements: !ruby/object:Gem::Requirement
|
91
92
|
requirements:
|
92
93
|
- - "~>"
|
93
94
|
- !ruby/object:Gem::Version
|
94
|
-
version: '
|
95
|
+
version: '13.0'
|
95
96
|
- !ruby/object:Gem::Dependency
|
96
97
|
name: rspec
|
97
98
|
requirement: !ruby/object:Gem::Requirement
|
@@ -120,38 +121,39 @@ dependencies:
|
|
120
121
|
- - "~>"
|
121
122
|
- !ruby/object:Gem::Version
|
122
123
|
version: '0.2'
|
123
|
-
description:
|
124
|
-
email:
|
124
|
+
description:
|
125
|
+
email: support@andrewm.codes
|
125
126
|
executables: []
|
126
127
|
extensions: []
|
127
128
|
extra_rdoc_files: []
|
128
129
|
files:
|
129
|
-
- ".github/
|
130
|
-
- ".github/dependabot.yml"
|
131
|
-
- ".github/workflows/changelog.yml"
|
132
|
-
- ".github/workflows/gempush.yml"
|
130
|
+
- ".github/workflows/release.yml"
|
133
131
|
- ".github/workflows/rspec.yml"
|
132
|
+
- ".github/workflows/rubocop.yml"
|
134
133
|
- ".gitignore"
|
135
134
|
- ".rspec"
|
136
135
|
- ".rubocop.yml"
|
137
136
|
- CHANGELOG.md
|
138
137
|
- CODE_OF_CONDUCT.md
|
139
|
-
- Dockerfile
|
140
138
|
- Gemfile
|
141
139
|
- LICENSE
|
142
140
|
- README.md
|
143
141
|
- Rakefile
|
144
142
|
- bridgetown-minify-html.gemspec
|
145
|
-
- docker-compose.yml
|
146
143
|
- lib/bridgetown-minify-html.rb
|
147
144
|
- lib/bridgetown-minify-html/builder.rb
|
148
145
|
- lib/bridgetown-minify-html/minifier.rb
|
149
146
|
- lib/bridgetown-minify-html/version.rb
|
150
|
-
homepage: https://github.com/
|
147
|
+
homepage: https://github.com/bt-rb/bridgetown-minify-html
|
151
148
|
licenses:
|
152
149
|
- MIT
|
153
|
-
metadata:
|
154
|
-
|
150
|
+
metadata:
|
151
|
+
bug_tracker_uri: https://github.com/bt-rb/bridgetown-minify-html/issues
|
152
|
+
changelog_uri: https://github.com/bt-rb/bridgetown-minify-html/blob/main/CHANGELOG.md
|
153
|
+
documentation_uri: https://github.com/bt-rb/bridgetown-minify-html
|
154
|
+
homepage_uri: https://github.com/bt-rb/bridgetown-minify-html
|
155
|
+
source_code_uri: https://github.com/bt-rb/bridgetown-minify-html
|
156
|
+
post_install_message:
|
155
157
|
rdoc_options: []
|
156
158
|
require_paths:
|
157
159
|
- lib
|
@@ -159,15 +161,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
159
161
|
requirements:
|
160
162
|
- - ">="
|
161
163
|
- !ruby/object:Gem::Version
|
162
|
-
version: 2.
|
164
|
+
version: '2.7'
|
163
165
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
164
166
|
requirements:
|
165
|
-
- - "
|
167
|
+
- - ">"
|
166
168
|
- !ruby/object:Gem::Version
|
167
|
-
version:
|
169
|
+
version: 1.3.1
|
168
170
|
requirements: []
|
169
|
-
rubygems_version: 3.
|
170
|
-
signing_key:
|
171
|
+
rubygems_version: 3.2.3
|
172
|
+
signing_key:
|
171
173
|
specification_version: 4
|
172
174
|
summary: Minify Outputted HTML in Bridgetown
|
173
175
|
test_files: []
|
data/.github/FUNDING.yml
DELETED
data/.github/dependabot.yml
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
version: 2
|
2
|
-
|
3
|
-
updates:
|
4
|
-
|
5
|
-
# Maintain dependencies for GitHub Actions
|
6
|
-
- package-ecosystem: "github-actions"
|
7
|
-
directory: "/"
|
8
|
-
schedule:
|
9
|
-
interval: "daily"
|
10
|
-
|
11
|
-
# Maintain dependencies for Bundler
|
12
|
-
- package-ecosystem: "bundler"
|
13
|
-
directory: "/"
|
14
|
-
schedule:
|
15
|
-
interval: "daily"
|
16
|
-
|
17
|
-
# Maintain dependencies for Docker
|
18
|
-
- package-ecosystem: "docker"
|
19
|
-
directory: "/"
|
20
|
-
schedule:
|
21
|
-
interval: "daily"
|
@@ -1,38 +0,0 @@
|
|
1
|
-
# From: https://github.com/hopsoft/stimulus_reflex/blob/master/.github/workflows/changelog.yml
|
2
|
-
name: Changelog
|
3
|
-
|
4
|
-
on:
|
5
|
-
push:
|
6
|
-
branches:
|
7
|
-
- master
|
8
|
-
|
9
|
-
jobs:
|
10
|
-
build:
|
11
|
-
runs-on: ubuntu-latest
|
12
|
-
timeout-minutes: 4
|
13
|
-
if: "!contains(github.event.head_commit.message, '[nodoc]')"
|
14
|
-
steps:
|
15
|
-
- uses: actions/checkout@master
|
16
|
-
- name: Set up Ruby 2.7
|
17
|
-
uses: ruby/setup-ruby@v1
|
18
|
-
with:
|
19
|
-
ruby-version: 2.7.1
|
20
|
-
- uses: actions/cache@v2
|
21
|
-
with:
|
22
|
-
path: vendor/bundle
|
23
|
-
key: ${{ runner.os }}-gem-${{ hashFiles('**/Gemfile.lock') }}
|
24
|
-
restore-keys: |
|
25
|
-
${{ runner.os }}-gem-
|
26
|
-
- name: Create local changes
|
27
|
-
run: |
|
28
|
-
gem install github_changelog_generator
|
29
|
-
github_changelog_generator -u MikeRogers0 -p bridgetown-minify-html --token ${{ secrets.GITHUB_TOKEN }} --exclude-labels duplicate,question,invalid,wontfix,nodoc
|
30
|
-
- name: Commit files
|
31
|
-
run: |
|
32
|
-
git config --local user.email "github-actions@example.com"
|
33
|
-
git config --local user.name "GitHub Actions"
|
34
|
-
git commit -am "[nodoc] Update Changelog" || echo "No changes to commit"
|
35
|
-
- name: Push changes
|
36
|
-
uses: ad-m/github-push-action@master
|
37
|
-
with:
|
38
|
-
github_token: ${{ secrets.GITHUB_TOKEN }}
|
@@ -1,29 +0,0 @@
|
|
1
|
-
name: Build & Publish Ruby Gem
|
2
|
-
|
3
|
-
on:
|
4
|
-
release:
|
5
|
-
types: [created]
|
6
|
-
|
7
|
-
jobs:
|
8
|
-
build:
|
9
|
-
name: Build + Publish
|
10
|
-
runs-on: ubuntu-latest
|
11
|
-
|
12
|
-
steps:
|
13
|
-
- uses: actions/checkout@v2
|
14
|
-
- name: Set up Ruby 2.6
|
15
|
-
uses: actions/setup-ruby@v1
|
16
|
-
with:
|
17
|
-
ruby-version: 2.6.x
|
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
|
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:
|