jekyll-imgproxy-tag 0.3.0 → 0.4.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7d6db81d734a01fc93f4e3aaf4652148ceb73a84b48d063cda2ab2de3bf27332
4
- data.tar.gz: 15c06ff92fcd7701a21767f14e9d3a68a6f3991ace21b6ba549c1a57198b493a
3
+ metadata.gz: acbe39a4ae228887043a40c257606c034bd8a90a9d0c33c2c4db48262dfd8806
4
+ data.tar.gz: f7f38a3f4380808ed81c2e7799271b0913cd1e0254e374ff96dec3164e9a9838
5
5
  SHA512:
6
- metadata.gz: 1cc1ab693b8c0f89fecb7cca0bea89e8ccb13c4b743db0aa82bee0af9f9b49385d97deda4901c02a64dee4012f167b9f1b4c687466581977c2ccae11c97bd343
7
- data.tar.gz: 7e64901563f45301caba569cb7d2dd9ccf261e01b98c212b81fcc49d1926033fd5dfbcced562598a4899f9bf4cdd695737de0aae87f59a07f7c4abeeedee2ebc
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
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jekyll-imgproxy-tag (0.3.0)
4
+ jekyll-imgproxy-tag (0.4.0)
5
5
  jekyll
6
6
 
7
7
  GEM
@@ -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
@@ -3,7 +3,7 @@
3
3
  module Jekyll
4
4
  module Imgproxy
5
5
  class Tag < ::Liquid::Tag
6
- VERSION = '0.3.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(_context)
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.3.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-18 00:00:00.000000000 Z
11
+ date: 2022-06-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jekyll