middleman-imgix 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: fbba5297726c9a3e3a325bfba635f9e3cd060bb3
4
- data.tar.gz: 77c58e86e08c9ce123ee8d9b37082c92b996ba53
3
+ metadata.gz: 40e02fb17c11022299d5772a0f4ed95798f75113
4
+ data.tar.gz: 2ea22cee448d890cf52708fca022f64fdc5beb69
5
5
  SHA512:
6
- metadata.gz: dbd10bdb03066aa4b3d7d07d0be3a70171709d71c38503f36f771eeeb000a432e60c918c61e404b76ee8a214971641770440bac6e02ed6b6c1c8cbb7893b7d09
7
- data.tar.gz: be4c53177182f57dfa062f919e30c40b0d112307c8438de2fea082b37eb06fc488cc5e1ac0813bab8eebe1083be667272cd45c7f9d7362c1fdf831a6c1208fc5
6
+ metadata.gz: eb8b1efec59bb40c2ddf376d7ab7e81338954190dec756f2998242e724c390178c7e63eab8f9a75db3800bda70b1a922882c682b86058415d82ffe910f9abcba
7
+ data.tar.gz: 8451d2a1a9e9ca5127e83058399be6bab909f175a2f0559c991e03c9e095a549d5510992edc4c8b205caa38d4bacdb913aa64c326070b8a97f6f2c06b5ad5a57
data/.gitignore CHANGED
@@ -3,3 +3,6 @@
3
3
 
4
4
  # Ignore pkg folder
5
5
  /pkg
6
+
7
+ # Ignore gems
8
+ *.gem
data/.travis.yml CHANGED
@@ -5,6 +5,5 @@ rvm:
5
5
  - 2.0
6
6
  - 2.1
7
7
  - 2.2
8
- - 2.3.1
9
8
  notifications:
10
9
  email: false
data/LICENSE.md ADDED
@@ -0,0 +1,9 @@
1
+ Copyright (c) 2016 Big Cartel, LLC
2
+
3
+ # MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
+
7
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
+
9
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,70 @@
1
+ # middleman-imgix [![Build Status](https://travis-ci.org/bigcartel/middleman-imgix.svg?branch=master)](https://travis-ci.org/bigcartel/middleman-imgix) [![Gem Version](https://badge.fury.io/rb/middleman-imgix.svg)](https://badge.fury.io/rb/middleman-imgix)
2
+
3
+ `middleman-imgix` is an extension for the [Middleman](https://middlemanapp.com) static site generator that allows you to run all of your images (or only some) through [imgix](https://www.imgix.com) for all sorts of fun features.
4
+
5
+ ## Installation
6
+
7
+ From inside the Gemfile of your Middleman project | add:
8
+
9
+ ```
10
+ gem 'middleman-imgix'
11
+ ```
12
+
13
+ Then run `bundle install`
14
+
15
+ ## Configuration
16
+
17
+ Activate the extension in your `config.rb` file, and supply your required imgix host:
18
+
19
+ ```
20
+ activate :imgix, host: 'your-subdomain.imgix.net'
21
+ ```
22
+
23
+ A number of other options are supported as well (see the [imgix gem](https://github.com/imgix/imgix-rb) for more info):
24
+
25
+ ```
26
+ activate :imgix, host: 'your-subdomain.imgix.net', secure_url_token: 'your-token', shard_strategy: :cycle
27
+ ```
28
+
29
+ Here's a list of all available options:
30
+
31
+ | Option | Default | Description |
32
+ | ------------- | ------------- | ------------- |
33
+ | `host` (required) | `nil` | A string or array of your imgix hosts. |
34
+ | `secure_url_token` | `nil` | Your imgix [secure_url_token](https://docs.imgix.com/setup/securing-images). |
35
+ | `use_https` | `true` | Whether to use http or https for imgix. |
36
+ | `shard_strategy` | `:crc` | Your imgix [shard strategy](https://github.com/imgix/imgix-rb#domain-sharded-urls). |
37
+ | `include_library_param` | `true` | Include the imgix [library param](https://github.com/imgix/imgix-rb#what-is-the-ixlib-param-on-every-request) in each URL. |
38
+ | `default_params` | `{ auto: 'format' }` | Default [imgix params](https://docs.imgix.com/apis/url) to use on all images. |
39
+ | `imgix_js_version` | `nil` | Converts `image_tag`s to support [imgix.js](https://www.imgix.com/imgix-js) version [2](https://github.com/imgix/imgix.js/tree/master-2.x) or [3](https://github.com/imgix/imgix.js). |
40
+ | `exts` | `%w(.png .jpg .jpeg)` | List of file extensions that get converted to imgix URLs. |
41
+ | `sources` | `%w(.css .htm .html .js .php .xhtml)` | List of source extensions that are searched for imgix images. |
42
+ | `ignore` | `[]` | Regexes of filenames to skip adding imgix to. |
43
+ | `rewrite_ignore` | `[]` | Regexes of filenames to skip processing for path rewrites. |
44
+
45
+ ## Usage
46
+
47
+ After activating the extension, all applicable image URLs throughout your site (HTML, CSS, etc.) will begin pointing to imgix. For example...
48
+
49
+ ```ruby
50
+ image_tag 'example.png'
51
+ #=> <img src="https://your-subdomain.imgix.net/images/example.png?ixlib=rb-1.1.0&auto=format" />
52
+ ```
53
+
54
+ ### imgix.js
55
+
56
+ If you're using [imgix.js](https://www.imgix.com/imgix-js) for responsive images (you still need to include that JS file yourself), you can [configure](#configuration) the `imgix_js_version` option to have the output from `image_tag` generate specific markup for your imgix.js version.
57
+
58
+ #### imgix_js_version: 3
59
+
60
+ ```ruby
61
+ image_tag 'example.png'
62
+ #=> <img ix-src="https://your-subdomain.imgix.net/images/example.png?ixlib=rb-1.1.0&auto=format" />
63
+ ```
64
+
65
+ #### imgix_js_version: 2
66
+
67
+ ```ruby
68
+ image_tag 'example.png'
69
+ #=> <img data-src="https://your-subdomain.imgix.net/images/example.png?ixlib=rb-1.1.0&auto=format" class="imgix-fluid" />
70
+ ```
@@ -2,7 +2,7 @@
2
2
 
3
3
  Gem::Specification.new do |gem|
4
4
  gem.name = 'middleman-imgix'
5
- gem.version = '1.0.1'
5
+ gem.version = '1.0.2'
6
6
  gem.licenses = ['MIT']
7
7
  gem.authors = ['Big Cartel']
8
8
  gem.email = ['dev@bigcartel.com']
@@ -13,6 +13,6 @@ Gem::Specification.new do |gem|
13
13
  gem.files = `git ls-files`.split($/)
14
14
  gem.require_paths = ['lib']
15
15
 
16
- gem.add_runtime_dependency 'middleman-core', '~> 4.1', '>= 4.1.8'
17
- gem.add_runtime_dependency 'imgix', '~> 1.1', '>= 1.1.0'
16
+ gem.add_runtime_dependency 'middleman-core', '>= 4.1'
17
+ gem.add_runtime_dependency 'imgix', '>= 1.1'
18
18
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: middleman-imgix
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Big Cartel
@@ -14,42 +14,30 @@ dependencies:
14
14
  name: middleman-core
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
18
- - !ruby/object:Gem::Version
19
- version: '4.1'
20
17
  - - '>='
21
18
  - !ruby/object:Gem::Version
22
- version: 4.1.8
19
+ version: '4.1'
23
20
  type: :runtime
24
21
  prerelease: false
25
22
  version_requirements: !ruby/object:Gem::Requirement
26
23
  requirements:
27
- - - ~>
28
- - !ruby/object:Gem::Version
29
- version: '4.1'
30
24
  - - '>='
31
25
  - !ruby/object:Gem::Version
32
- version: 4.1.8
26
+ version: '4.1'
33
27
  - !ruby/object:Gem::Dependency
34
28
  name: imgix
35
29
  requirement: !ruby/object:Gem::Requirement
36
30
  requirements:
37
- - - ~>
38
- - !ruby/object:Gem::Version
39
- version: '1.1'
40
31
  - - '>='
41
32
  - !ruby/object:Gem::Version
42
- version: 1.1.0
33
+ version: '1.1'
43
34
  type: :runtime
44
35
  prerelease: false
45
36
  version_requirements: !ruby/object:Gem::Requirement
46
37
  requirements:
47
- - - ~>
48
- - !ruby/object:Gem::Version
49
- version: '1.1'
50
38
  - - '>='
51
39
  - !ruby/object:Gem::Version
52
- version: 1.1.0
40
+ version: '1.1'
53
41
  description: Use imgix images in your Middleman site.
54
42
  email:
55
43
  - dev@bigcartel.com
@@ -60,6 +48,8 @@ files:
60
48
  - .gitignore
61
49
  - .travis.yml
62
50
  - Gemfile
51
+ - LICENSE.md
52
+ - README.md
63
53
  - Rakefile
64
54
  - lib/middleman-imgix.rb
65
55
  - lib/middleman-imgix/extension.rb