jekyll-lazy-load-image 0.3.2 → 0.3.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/.github/dependabot.yml +12 -0
- data/.github/workflows/ci.yml +41 -0
- data/.github/workflows/publish.yml +105 -0
- data/Gemfile +2 -2
- data/README.md +13 -8
- data/Rakefile +14 -0
- data/lib/jekyll-lazy-load-image/version.rb +1 -1
- metadata +6 -4
- data/.travis.yml +0 -29
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 015f44f3c7da3bcea4c9a3708776f1963c55e8c71cfc935cf5d90d63b599dee1
|
4
|
+
data.tar.gz: 26d1b442cc72a9313442eee304dafde45afe53033e7a7c5ff235dcd87d46c988
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8567dfc004fa09a664bb94e4c89610365d0617006b3bdb1b107d0cc08b66d148eb4d0c14766c221affdd0404eace829ca190b6835aa30369309221adb18b2127
|
7
|
+
data.tar.gz: 337768cf0d90471da3ea433a8e76ed182e0a9d918bc5517656edbcd891b1484e3c65d8d9742f640e4b4b559b85d8cfbbd19d3894bc2f1941593db550134e3257
|
@@ -0,0 +1,41 @@
|
|
1
|
+
name: CI
|
2
|
+
on:
|
3
|
+
pull_request:
|
4
|
+
schedule:
|
5
|
+
- cron: '0 0 * * *'
|
6
|
+
|
7
|
+
env:
|
8
|
+
BUNDLE_RETRY: 3
|
9
|
+
BUNDLE_PATH: vendor/bundle
|
10
|
+
|
11
|
+
jobs:
|
12
|
+
build:
|
13
|
+
strategy:
|
14
|
+
matrix:
|
15
|
+
ruby-version: ["2.6", "2.7", "3.0"]
|
16
|
+
os: [ubuntu-latest, macos-latest, windows-latest]
|
17
|
+
runs-on: ${{ matrix.os }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: kenchan0130/actions-system-info@v1.0.0
|
21
|
+
id: system-info
|
22
|
+
- name: Cache Ruby dependencies
|
23
|
+
uses: actions/cache@v2.1.4
|
24
|
+
with:
|
25
|
+
path: ${{ env.BUNDLE_PATH }}
|
26
|
+
key: cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.release }}-${{ matrix.ruby }}-${{ github.sha }}
|
27
|
+
restore-keys: |
|
28
|
+
cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ steps.system-info.outputs.release }}-${{ matrix.ruby }}-
|
29
|
+
- name: Setup Ruby ${{ matrix.ruby-version }}
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ matrix.ruby-version }}
|
33
|
+
- name: Install ruby gems
|
34
|
+
run: |
|
35
|
+
bundle install --jobs=${{ steps.system-info.outputs.cpu-core }}
|
36
|
+
- name: Run lint
|
37
|
+
run: |
|
38
|
+
bundle exec rubocop
|
39
|
+
- name: Run test
|
40
|
+
run: |
|
41
|
+
bundle exec rake spec
|
@@ -0,0 +1,105 @@
|
|
1
|
+
name: Publish
|
2
|
+
on:
|
3
|
+
push:
|
4
|
+
branches:
|
5
|
+
- master
|
6
|
+
workflow_dispatch:
|
7
|
+
|
8
|
+
env:
|
9
|
+
BUNDLE_RETRY: 3
|
10
|
+
BUNDLE_PATH: vendor/bundle
|
11
|
+
PUBLISH_RUBY_VERSION: "2.6"
|
12
|
+
|
13
|
+
jobs:
|
14
|
+
build:
|
15
|
+
runs-on: ubuntu-latest
|
16
|
+
outputs:
|
17
|
+
publish: ${{ ! steps.publish.outputs.skip }}
|
18
|
+
steps:
|
19
|
+
- uses: actions/checkout@v2
|
20
|
+
- uses: kenchan0130/actions-system-info@v1.0.0
|
21
|
+
id: system-info
|
22
|
+
- name: Cache Ruby dependencies
|
23
|
+
uses: actions/cache@v2.1.4
|
24
|
+
with:
|
25
|
+
path: ${{ env.BUNDLE_PATH }}
|
26
|
+
key: cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ env.PUBLISH_RUBY_VERSION }}-${{ github.sha }}
|
27
|
+
restore-keys: |
|
28
|
+
cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ env.PUBLISH_RUBY_VERSION }}-
|
29
|
+
- name: Setup Ruby ${{ env.PUBLISH_RUBY_VERSION }}
|
30
|
+
uses: ruby/setup-ruby@v1
|
31
|
+
with:
|
32
|
+
ruby-version: ${{ env.PUBLISH_RUBY_VERSION }}
|
33
|
+
- name: Install ruby gems
|
34
|
+
run: |
|
35
|
+
bundle install --jobs=${{ steps.system-info.outputs.cpu-core }}
|
36
|
+
- name: Run lint
|
37
|
+
run: |
|
38
|
+
bundle exec rubocop
|
39
|
+
- name: Run test
|
40
|
+
run: |
|
41
|
+
bundle exec rake spec
|
42
|
+
- name: Get latest tag
|
43
|
+
id: latest-tag
|
44
|
+
uses: oprypin/find-latest-tag@v1
|
45
|
+
with:
|
46
|
+
repository: ${{ github.repository }}
|
47
|
+
- name: Check to skip publish
|
48
|
+
id: publish
|
49
|
+
run: |
|
50
|
+
if [[ "${{ steps.latest-tag.outputs.tag }}" = "v$(bundle exec rake version)" ]]; then
|
51
|
+
echo "::set-output name=skip::true"
|
52
|
+
else
|
53
|
+
echo "::set-output name=skip::false"
|
54
|
+
fi
|
55
|
+
|
56
|
+
publish:
|
57
|
+
needs: build
|
58
|
+
if: ${{ needs.build.outputs.publish }}
|
59
|
+
runs-on: ubuntu-latest
|
60
|
+
steps:
|
61
|
+
- uses: actions/checkout@v2
|
62
|
+
- uses: kenchan0130/actions-system-info@v1.0.0
|
63
|
+
id: system-info
|
64
|
+
- name: Cache Ruby dependencies
|
65
|
+
uses: actions/cache@v2.1.4
|
66
|
+
with:
|
67
|
+
path: ${{ env.BUNDLE_PATH }}
|
68
|
+
key: cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ env.PUBLISH_RUBY_VERSION }}-${{ github.sha }}
|
69
|
+
restore-keys: |
|
70
|
+
cache-${{ runner.os }}-${{ steps.system-info.outputs.release }}-${{ env.PUBLISH_RUBY_VERSION }}-
|
71
|
+
- name: Setup Ruby ${{ env.PUBLISH_RUBY_VERSION }}
|
72
|
+
uses: ruby/setup-ruby@v1
|
73
|
+
with:
|
74
|
+
ruby-version: ${{ env.PUBLISH_RUBY_VERSION }}
|
75
|
+
- name: Install ruby gems
|
76
|
+
run: |
|
77
|
+
bundle install --jobs=${{ steps.system-info.outputs.cpu-core }}
|
78
|
+
- name: Set committer identity
|
79
|
+
run: |
|
80
|
+
git config --local user.name "${GITHUB_ACTOR}"
|
81
|
+
git config --local user.email "${GITHUB_ACTOR}@users.noreply.github.com"
|
82
|
+
- name: Create tag
|
83
|
+
run: |
|
84
|
+
bundle exec rake tag
|
85
|
+
- name: Publish to GPR
|
86
|
+
run: |
|
87
|
+
mkdir -p $HOME/.gem
|
88
|
+
touch $HOME/.gem/credentials
|
89
|
+
chmod 0600 $HOME/.gem/credentials
|
90
|
+
printf -- "---\n:github: Bearer ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
91
|
+
gem build *.gemspec
|
92
|
+
gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
|
93
|
+
env:
|
94
|
+
GEM_HOST_API_KEY: ${{ secrets.GPR_AUTH_TOKEN }}
|
95
|
+
OWNER: kenchan0130
|
96
|
+
- name: Publish gem to rubygems
|
97
|
+
run: |
|
98
|
+
mkdir -p $HOME/.gem
|
99
|
+
touch $HOME/.gem/credentials
|
100
|
+
chmod 0600 $HOME/.gem/credentials
|
101
|
+
printf -- "---\n:rubygems_api_key: ${RUBYGEMS_API_KEY}\n" > $HOME/.gem/credentials
|
102
|
+
gem build *.gemspec
|
103
|
+
gem push *.gem
|
104
|
+
env:
|
105
|
+
RUBYGEMS_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
|
data/Gemfile
CHANGED
data/README.md
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
# Jekyll Lazy Load Image
|
1
|
+
# Jekyll Lazy Load Image
|
2
2
|
|
3
|
-
|
3
|
+
[](https://github.com/kenchan0130/jekyll-lazy-load-image/actions/workflows/ci.yml)
|
4
|
+
|
5
|
+
Edit img tag optimized lazy load images for your Jekyll site
|
4
6
|
|
5
7
|
## Usage
|
8
|
+
|
6
9
|
### `Gemfile`
|
7
10
|
|
8
11
|
Add the following to your site's `Gemfile`:
|
@@ -29,23 +32,25 @@ lazy_load_image:
|
|
29
32
|
- ".ignore-lazy-image-load"
|
30
33
|
- "/*[@class='ignore-lazy-image-load']"
|
31
34
|
additional_attrs: # [optional] if you want to add attributes, please add key value
|
32
|
-
"data-size": auto
|
35
|
+
"data-size": auto
|
33
36
|
```
|
34
37
|
|
35
38
|
### Select lazy load library
|
36
39
|
|
37
40
|
Select your favorite library and add your site. For example:
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
41
|
+
|
42
|
+
* [lazysizes](https://github.com/aFarkas/lazysizes) [Recommend]
|
43
|
+
* [Echo.js](https://github.com/toddmotto/echo)
|
44
|
+
* [TADA](https://github.com/fallroot/tada)
|
45
|
+
|
42
46
|
## Custom
|
47
|
+
|
43
48
|
### Customize container
|
44
49
|
|
45
50
|
You can change applying jekyll hook container.
|
46
51
|
This library is `:posts` by default.
|
47
52
|
|
48
|
-
See also: https://jekyllrb.com/docs/plugins/#hooks
|
53
|
+
See also: [https://jekyllrb.com/docs/plugins/#hooks](https://jekyllrb.com/docs/plugins/#hooks)
|
49
54
|
|
50
55
|
#### `Gemfile`
|
51
56
|
|
data/Rakefile
CHANGED
@@ -1,8 +1,22 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
require "bundler/gem_tasks"
|
4
|
+
require "bundler/gem_helper"
|
4
5
|
require "rspec/core/rake_task"
|
6
|
+
require "jekyll-lazy-load-image/version"
|
5
7
|
|
6
8
|
RSpec::Core::RakeTask.new(:spec)
|
7
9
|
|
10
|
+
t = Bundler::GemHelper.new
|
11
|
+
|
12
|
+
desc "Display this gemspec version"
|
13
|
+
task :version do
|
14
|
+
puts JekyllLazyLoadImage::VERSION
|
15
|
+
end
|
16
|
+
|
17
|
+
desc "Create tag #{t.send(:version_tag)}"
|
18
|
+
task :tag do
|
19
|
+
t.send(:tag_version) { t.send(:git_push) } unless t.send(:already_tagged?)
|
20
|
+
end
|
21
|
+
|
8
22
|
task default: :spec
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-lazy-load-image
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tadayuki Onishi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-28 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|
@@ -59,10 +59,12 @@ executables: []
|
|
59
59
|
extensions: []
|
60
60
|
extra_rdoc_files: []
|
61
61
|
files:
|
62
|
+
- ".github/dependabot.yml"
|
63
|
+
- ".github/workflows/ci.yml"
|
64
|
+
- ".github/workflows/publish.yml"
|
62
65
|
- ".gitignore"
|
63
66
|
- ".rspec"
|
64
67
|
- ".rubocop.yml"
|
65
|
-
- ".travis.yml"
|
66
68
|
- CHANGELOG.md
|
67
69
|
- Gemfile
|
68
70
|
- LICENSE.txt
|
@@ -96,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
96
98
|
- !ruby/object:Gem::Version
|
97
99
|
version: '0'
|
98
100
|
requirements: []
|
99
|
-
rubygems_version: 3.0.
|
101
|
+
rubygems_version: 3.0.3
|
100
102
|
signing_key:
|
101
103
|
specification_version: 4
|
102
104
|
summary: Edit img tag optimized lazy load images for your Jekyll site
|
data/.travis.yml
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
---
|
2
|
-
language: ruby
|
3
|
-
sudo: false
|
4
|
-
cache: bundler
|
5
|
-
before_install:
|
6
|
-
- gem update bundler
|
7
|
-
jobs:
|
8
|
-
include:
|
9
|
-
- &test
|
10
|
-
stage: test
|
11
|
-
rvm: 2.4.9
|
12
|
-
script:
|
13
|
-
- bundle exec rubocop
|
14
|
-
- bundle exec rake spec
|
15
|
-
if: tag IS blank
|
16
|
-
- <<: *test
|
17
|
-
rvm: 2.5.7
|
18
|
-
- <<: *test
|
19
|
-
rvm: 2.6.5
|
20
|
-
- stage: deploy
|
21
|
-
rvm: 2.4.9
|
22
|
-
deploy:
|
23
|
-
provider: rubygems
|
24
|
-
skip_cleanup: true
|
25
|
-
api_key: $RUBYGEMS_API_KEY
|
26
|
-
on:
|
27
|
-
tags: true
|
28
|
-
branch: master
|
29
|
-
if: tag IS present
|