jekyll-imgproxy-tag 0.3.0 → 0.4.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +5 -0
- data/Gemfile.lock +1 -1
- data/lib/jekyll/imgproxy/tag/imgproxy_config.rb +7 -7
- data/lib/jekyll/imgproxy/tag.rb +3 -3
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: acbe39a4ae228887043a40c257606c034bd8a90a9d0c33c2c4db48262dfd8806
|
4
|
+
data.tar.gz: f7f38a3f4380808ed81c2e7799271b0913cd1e0254e374ff96dec3164e9a9838
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24f9d88c21c0b98cbd95cea884b7102cbb545a95f0feb5aa9b82d4279a6692497a1d65e1c56d0ce1c84d84d56689db9ee3ffe9582c4cec7db1779f2ac7884144
|
7
|
+
data.tar.gz: 6b138902223e9a28c909eb5c62a1f42e37f955d1192360ca361f039e2c3226b59cdf36fe4dcf6a0211793e60cde3f771461e22f68c1347f171e571503634f91a
|
data/CHANGELOG
CHANGED
@@ -7,6 +7,11 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|
7
7
|
|
8
8
|
## [Unreleased]
|
9
9
|
|
10
|
+
## [0.4.0] - 2022-06-27
|
11
|
+
|
12
|
+
- Use passed in page context to access Jekyll's config instead of accessing
|
13
|
+
`Jekyll.configuration`.
|
14
|
+
|
10
15
|
## [0.3.0] - 2022-06-18
|
11
16
|
|
12
17
|
- Refactored the config class to access the Jekyll configuration object only
|
data/Gemfile.lock
CHANGED
@@ -6,19 +6,15 @@ module Jekyll
|
|
6
6
|
class ImgproxyConfig
|
7
7
|
extend Forwardable
|
8
8
|
|
9
|
-
def_delegators :'self.class', :imgproxy_config
|
10
|
-
|
11
|
-
def self.imgproxy_config
|
12
|
-
@@imgproxy_config ||= Jekyll.configuration['imgproxy']
|
13
|
-
end
|
14
|
-
|
15
9
|
attr_reader \
|
10
|
+
:context,
|
16
11
|
:base_url,
|
17
12
|
:key,
|
18
13
|
:salt,
|
19
14
|
:aws_bucket
|
20
15
|
|
21
|
-
def initialize
|
16
|
+
def initialize(context)
|
17
|
+
@context = context
|
22
18
|
@base_url = fetch_config(:base_url)
|
23
19
|
@key = fetch_config(:key)
|
24
20
|
@salt = fetch_config(:salt)
|
@@ -42,6 +38,10 @@ module Jekyll
|
|
42
38
|
raise Jekyll::Imgproxy::Tag::Errors::KeyNotSet if imgproxy_config['key'].nil?
|
43
39
|
raise Jekyll::Imgproxy::Tag::Errors::BaseUrlNotSet if imgproxy_config['base_url'].nil?
|
44
40
|
end
|
41
|
+
|
42
|
+
def imgproxy_config
|
43
|
+
context['site']['imgproxy']
|
44
|
+
end
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/lib/jekyll/imgproxy/tag.rb
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
module Jekyll
|
4
4
|
module Imgproxy
|
5
5
|
class Tag < ::Liquid::Tag
|
6
|
-
VERSION = '0.
|
6
|
+
VERSION = '0.4.0'
|
7
7
|
|
8
8
|
def initialize(tag_name, raw_options, tokens)
|
9
9
|
super
|
@@ -15,8 +15,8 @@ module Jekyll
|
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
18
|
-
def render(
|
19
|
-
imgproxy_config = ImgproxyConfig.new
|
18
|
+
def render(context)
|
19
|
+
imgproxy_config = ImgproxyConfig.new(context)
|
20
20
|
UrlGenerator.new(imgproxy_config, options).url
|
21
21
|
end
|
22
22
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-imgproxy-tag
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Joel Oliveira
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-06-
|
11
|
+
date: 2022-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jekyll
|