jekyll-imgix 0.1.1 → 1.0.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
  SHA1:
3
- metadata.gz: b4b43cf8ec85de2c8741818dce27adde69957791
4
- data.tar.gz: 345b4b4565d13e07e60f15d58eaa293018dfd103
3
+ metadata.gz: 8964455ec9a378a4120026340a96117adff9fe93
4
+ data.tar.gz: 50aadc8c8e8f0a9187e7a64c7010a598ff4be73c
5
5
  SHA512:
6
- metadata.gz: 7c51f8606a3a85879337f68a29ebf23cf347ec8d2382cc390cb541f1a5ac0bc97170b22630c0d0e89023852145dea8eeb21008952e4086145bc33d7156582720
7
- data.tar.gz: 00e9912c5767006f1521aad16c5b0e2711c3692dca312d0e503f41358473a3cff550c263760ec74f56f044f7da13635728dfc922866bc9009224a90db4a21b10
6
+ metadata.gz: 23cfb618e81919c3a34c013f49b58782598578ea3269323bca3fdc8aaf4140075351623c4feeabd6a0008965d79ba9af6e0810ae0b008b05dbee31b51373d9ce
7
+ data.tar.gz: 9efc6ad8e08f28482f806a48981bb80e373f478b3db23e894c1522bdca935e3be6c92232a614936d0431ef6d6004a9e8d227bea54d0a7ead7725dc5e3a3b1de3
data/README.md CHANGED
@@ -4,26 +4,21 @@ A simple Jekyll plugin for rolling imgix functionality into your Jekyll site.
4
4
 
5
5
  ## Installation
6
6
 
7
- There are a handful of ways to install Jekyll plugins.
8
-
9
- ## Rubygems
10
-
11
- ```
12
- $ gem install jekyll-imgix
7
+ First, add `liquid` and `jekyll-imgix` to the `:jekyll_plugins` group in your Gemfile:
8
+
9
+ ``` ruby
10
+ group :jekyll_plugins do
11
+ gem 'rouge'
12
+ gem 'kramdown'
13
+ gem 'liquid'
14
+ gem 'jekyll-imgix'
15
+ end
13
16
  ```
14
17
 
15
18
  Then include `jekyll-imgix` in the `gems:` section of your `_config.yml` file:
16
19
 
17
- ```yaml
18
- gems: [jekyll-other-plugin, jekyll-imgix]
19
- ```
20
-
21
- ## Bundler
22
-
23
- Include the following in your `Gemfile`:
24
-
25
- ```ruby
26
- gem 'jekyll-imgix'
20
+ ``` yaml
21
+ gems: [jekyll/imgix]
27
22
  ```
28
23
 
29
24
  ## Usage
@@ -55,7 +50,7 @@ You can also pass parameters to the `imgix_url` helper like so:
55
50
  Which would result in the following HTML:
56
51
 
57
52
  ```html
58
- <img src="https://assets.imgix.net/images/bear.jpg?w=400&h300" />
53
+ <img src="https://assets.imgix.net/images/bear.jpg?w=400&h=300" />
59
54
  ```
60
55
 
61
56
  ### Configuration
data/jekyll-imgix.gemspec CHANGED
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
18
18
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
19
19
  spec.require_paths = ["lib"]
20
20
 
21
- spec.add_dependency "imgix"
21
+ spec.add_dependency "imgix", "~> 1.0.0"
22
22
 
23
23
  spec.add_development_dependency "liquid", "~> 3.0"
24
24
  spec.add_development_dependency "bundler", "~> 1.10"
data/lib/jekyll/imgix.rb CHANGED
@@ -22,7 +22,8 @@ module Jekyll
22
22
  return @client if @client
23
23
 
24
24
  opts = default_opts.dup
25
- opts[:token] = token if token
25
+ opts[:secure_url_token] = secure_url_token if secure_url_token
26
+ opts[:include_library_param] = include_library_param?
26
27
  @client = ::Imgix::Client.new(opts)
27
28
  end
28
29
 
@@ -31,7 +32,7 @@ module Jekyll
31
32
  host: source,
32
33
  library_param: "jekyll",
33
34
  library_version: VERSION,
34
- secure: true
35
+ use_https: true
35
36
  }
36
37
  end
37
38
 
@@ -43,12 +44,20 @@ module Jekyll
43
44
  !production?
44
45
  end
45
46
 
47
+ def ix_config
48
+ @context.registers[:site].config.fetch('imgix', {})
49
+ end
50
+
46
51
  def source
47
- @context.registers[:site].config.fetch('imgix', {}).fetch('source', nil)
52
+ ix_config.fetch('source', nil)
53
+ end
54
+
55
+ def secure_url_token
56
+ ix_config.fetch('secure_url_token', nil)
48
57
  end
49
58
 
50
- def token
51
- @context.registers[:site].config.fetch('imgix', {}).fetch('secure_url_token', nil)
59
+ def include_library_param?
60
+ ix_config.fetch('include_library_param', true)
52
61
  end
53
62
  end
54
63
  end
@@ -1,5 +1,5 @@
1
1
  module Jekyll
2
2
  module Imgix
3
- VERSION = "0.1.1"
3
+ VERSION = "1.0.0"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,29 +1,29 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll-imgix
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 1.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - kellysutton
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2015-10-21 00:00:00.000000000 Z
11
+ date: 2016-02-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: imgix
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '0'
19
+ version: 1.0.0
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ">="
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: '0'
26
+ version: 1.0.0
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: liquid
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.7
122
+ rubygems_version: 2.4.5.1
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: A simple Ruby gem to bring imgix to your Jekyll site.