jekyll_picture_tag 1.13.0 → 2.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (91) hide show
  1. checksums.yaml +4 -4
  2. data/.envrc +4 -0
  3. data/.github/workflows/code-checks.yml +33 -0
  4. data/.gitignore +3 -0
  5. data/.rubocop.yml +29 -76
  6. data/.ruby-version +1 -1
  7. data/docs/.envrc +2 -0
  8. data/docs/devs/contributing/code.md +14 -4
  9. data/docs/devs/contributing/docs.md +24 -6
  10. data/docs/devs/contributing/setup.md +21 -1
  11. data/docs/devs/contributing/testing.md +19 -37
  12. data/docs/devs/releases.md +45 -4
  13. data/docs/index.md +43 -18
  14. data/docs/logo.png +0 -0
  15. data/docs/logo.svg +880 -0
  16. data/docs/users/configuration/disable.md +1 -1
  17. data/docs/users/configuration/ignore_missing.md +1 -1
  18. data/docs/users/configuration/kramdown_fix.md +1 -1
  19. data/docs/users/configuration/suppress_warnings.md +1 -1
  20. data/docs/users/configuration/urls.md +69 -0
  21. data/docs/users/deployment.md +49 -0
  22. data/docs/users/getting_started.md +55 -0
  23. data/docs/users/installation.md +18 -38
  24. data/docs/users/liquid_tag/argument_reference/crop.md +21 -36
  25. data/docs/users/liquid_tag/examples.md +13 -25
  26. data/docs/users/liquid_tag/index.md +1 -1
  27. data/docs/users/notes/{migration.md → migration_1.md} +1 -1
  28. data/docs/users/notes/migration_2.md +99 -0
  29. data/docs/users/presets/cropping.md +21 -22
  30. data/docs/users/presets/default.md +11 -2
  31. data/docs/users/presets/examples.md +77 -45
  32. data/docs/users/presets/fallback_image.md +1 -1
  33. data/docs/users/presets/html_attributes.md +1 -1
  34. data/docs/users/presets/image_formats.md +3 -3
  35. data/docs/users/presets/image_quality.md +71 -56
  36. data/docs/users/presets/index.md +19 -45
  37. data/docs/users/presets/link_source.md +1 -1
  38. data/docs/users/presets/media_queries.md +1 -1
  39. data/docs/users/presets/nomarkdown_override.md +1 -1
  40. data/docs/users/presets/pixel_ratio_srcsets.md +1 -1
  41. data/docs/users/presets/width_height_attributes.md +1 -1
  42. data/docs/users/presets/width_srcsets.md +61 -23
  43. data/docs/users/presets/writing_presets.md +65 -0
  44. data/docs/users/tutorial.md +97 -0
  45. data/jekyll_picture_tag.gemspec +38 -23
  46. data/lib/jekyll_picture_tag.rb +8 -5
  47. data/lib/jekyll_picture_tag/cache.rb +64 -3
  48. data/lib/jekyll_picture_tag/defaults/global.rb +18 -0
  49. data/lib/jekyll_picture_tag/defaults/presets.rb +57 -0
  50. data/lib/jekyll_picture_tag/images.rb +1 -0
  51. data/lib/jekyll_picture_tag/images/generated_image.rb +25 -60
  52. data/lib/jekyll_picture_tag/images/image_file.rb +105 -0
  53. data/lib/jekyll_picture_tag/images/img_uri.rb +3 -10
  54. data/lib/jekyll_picture_tag/images/source_image.rb +44 -9
  55. data/lib/jekyll_picture_tag/instructions.rb +70 -6
  56. data/lib/jekyll_picture_tag/instructions/children/config.rb +128 -0
  57. data/lib/jekyll_picture_tag/instructions/children/context.rb +24 -0
  58. data/lib/jekyll_picture_tag/instructions/children/params.rb +90 -0
  59. data/lib/jekyll_picture_tag/instructions/children/parsers.rb +48 -0
  60. data/lib/jekyll_picture_tag/instructions/children/preset.rb +182 -0
  61. data/lib/jekyll_picture_tag/instructions/parents/conditional_instruction.rb +69 -0
  62. data/lib/jekyll_picture_tag/instructions/parents/env_instruction.rb +29 -0
  63. data/lib/jekyll_picture_tag/output_formats/basic.rb +5 -17
  64. data/lib/jekyll_picture_tag/parsers.rb +6 -0
  65. data/lib/jekyll_picture_tag/{instructions → parsers}/arg_splitter.rb +1 -1
  66. data/lib/jekyll_picture_tag/parsers/configuration.rb +28 -0
  67. data/lib/jekyll_picture_tag/{instructions → parsers}/html_attributes.rb +1 -1
  68. data/lib/jekyll_picture_tag/parsers/image_backend.rb +33 -0
  69. data/lib/jekyll_picture_tag/parsers/preset.rb +43 -0
  70. data/lib/jekyll_picture_tag/{instructions → parsers}/tag_parser.rb +15 -12
  71. data/lib/jekyll_picture_tag/router.rb +35 -93
  72. data/lib/jekyll_picture_tag/srcsets/basic.rb +4 -10
  73. data/lib/jekyll_picture_tag/utils.rb +10 -20
  74. data/lib/jekyll_picture_tag/version.rb +1 -1
  75. data/readme.md +48 -9
  76. metadata +161 -80
  77. data/.travis.yml +0 -8
  78. data/Dockerfile +0 -9
  79. data/docs/users/configuration/cdn.md +0 -35
  80. data/docs/users/configuration/relative_urls.md +0 -15
  81. data/docs/users/notes/input_checking.md +0 -6
  82. data/jekyll-picture-tag.gemspec +0 -52
  83. data/lib/jekyll-picture-tag.rb +0 -25
  84. data/lib/jekyll_picture_tag/cache/base.rb +0 -59
  85. data/lib/jekyll_picture_tag/cache/generated.rb +0 -20
  86. data/lib/jekyll_picture_tag/cache/source.rb +0 -19
  87. data/lib/jekyll_picture_tag/defaults/global.yml +0 -11
  88. data/lib/jekyll_picture_tag/defaults/presets.yml +0 -11
  89. data/lib/jekyll_picture_tag/instructions/configuration.rb +0 -121
  90. data/lib/jekyll_picture_tag/instructions/preset.rb +0 -122
  91. data/lib/jekyll_picture_tag/instructions/set.rb +0 -75
@@ -1,5 +1,5 @@
1
1
  module PictureTag
2
- module Instructions
2
+ module Parsers
3
3
  # Tag Parsing Responsibilities:
4
4
  #
5
5
  # {% picture mypreset a.jpg 3:2 mobile: b.jpg --alt "Alt" --link "/" %}
@@ -9,17 +9,16 @@ module PictureTag
9
9
  # string), hands them to ArgSplitter (which breaks them up into an array of
10
10
  # words), extracts the preset name (if present), source image name(s),
11
11
  # associated media queries (if present), and image-related arguments such as
12
- # crop and gravity. HTML attributes are handed off to its respective class
12
+ # crop and keep. HTML attributes are handed off to its respective class
13
13
  # (as 'leftovers')
14
14
  #
15
15
  # Media presets and source names are stored as arrays in their correct
16
- # orders. Gravities and geometries are stored in a hash, keyed by their
16
+ # orders. Crop settings are stored in a hash, keyed by their
17
17
  # relevant media presets. Note that the base image will have a media preset
18
18
  # of nil, which is a perfectly fine hash key.
19
- #
20
19
  class TagParser
21
- attr_reader :preset_name, :source_names, :media_presets, :gravities,
22
- :geometries, :leftovers
20
+ attr_reader :preset_name, :source_names, :media_presets, :keep,
21
+ :crop, :leftovers
23
22
 
24
23
  def initialize(raw_params)
25
24
  @raw_params = raw_params
@@ -27,8 +26,8 @@ module PictureTag
27
26
 
28
27
  @media_presets = []
29
28
  @source_names = []
30
- @geometries = {}
31
- @gravities = {}
29
+ @keep = {}
30
+ @crop = {}
32
31
 
33
32
  parse_params
34
33
  end
@@ -51,14 +50,18 @@ module PictureTag
51
50
  end
52
51
 
53
52
  def parse_param(param)
53
+ # Media query, i.e. 'mobile:'
54
54
  if param.match?(/[\w\-]+:$/)
55
55
  add_media_source
56
56
 
57
- elsif Utils::GRAVITIES.include?(param.downcase)
58
- @gravities[@media_presets.last] = @params.shift
57
+ # Smartcrop interestingness setting. We label it 'keep', since it
58
+ # determines what to keep when cropping.
59
+ elsif %w[none centre center entropy attention].include?(param.downcase)
60
+ @keep[@media_presets.last] = @params.shift
59
61
 
60
- elsif param.match?(Utils::GEOMETRY_REGEX)
61
- @geometries[@media_presets.last] = @params.shift
62
+ # Aspect ratio, i.e. '16:9'
63
+ elsif param.match?(/\A\d+:\d+\z/)
64
+ @crop[@media_presets.last] = @params.shift
62
65
 
63
66
  else
64
67
  raise_error(param)
@@ -1,115 +1,57 @@
1
1
  module PictureTag
2
2
  # The rest of the application doesn't care where the instruction logic
3
- # resides. The following module 'routes' method calls to the right place, so
4
- # the rest of the application can just call 'PictureTag.(some method)'
5
-
6
- # At first I thought I'd do some sweet dynamic metaprogramming here, but it
7
- # ended up complicated and clever, rather than convenient and understandable.
8
- # This way is not strictly DRY, but it's straightforward and readable. If it
9
- # gets big, I'll refactor.
3
+ # resides. This module 'routes' method calls to the right place, so
4
+ # information consumers can just call 'PictureTag.(some method)'
5
+ #
6
+ # This is accomplished with a bit of metaprogramming, which is hopefully not
7
+ # unnecessarily clever or complicated. Missing methods are converted to class
8
+ # names, which are looked up under the Instructions module namespace.
9
+ #
10
+ # Instantiated Instructions are stored in a hash, keyed by method name.
10
11
  module Router
11
- attr_accessor :instructions, :context
12
-
13
- # Context forwarding
14
-
15
- # Global site data
16
- def site
17
- @context.registers[:site]
18
- end
19
-
20
- # Page which tag is called from
21
- def page
22
- @context.registers[:page]
23
- end
24
-
25
- # Instructions forwarding
26
-
27
- def config
28
- @instructions.config
29
- end
30
-
31
- def preset
32
- @instructions.preset
33
- end
34
-
35
- def media_presets
36
- @instructions.media_presets
37
- end
38
-
39
- def html_attributes
40
- @instructions.html_attributes
41
- end
42
-
43
- def output_class
44
- @instructions.output_class
45
- end
12
+ # These two attributes encompass everything passed in by Jekyll.
13
+ attr_accessor :raw_params, :context
46
14
 
47
- def source_images
48
- @instructions.source_images
15
+ def method_missing(method_name, *args)
16
+ if instruction_exists?(method_name)
17
+ instruction(method_name).value(*args)
18
+ else
19
+ super
20
+ end
49
21
  end
50
22
 
51
- def crop(media = nil)
52
- @instructions.crop(media)
23
+ def respond_to_missing?(method_name, *args)
24
+ instruction_exists?(method_name) || super
53
25
  end
54
26
 
55
- def gravity(media = nil)
56
- @instructions.gravity(media)
27
+ # Required at least for testing; instructions are persisted between tags
28
+ # otherwise.
29
+ def clear_instructions
30
+ instructions.clear
57
31
  end
58
32
 
59
- # Config Forwarding
60
-
61
- def source_dir
62
- config.source_dir
63
- end
64
-
65
- def dest_dir
66
- config.dest_dir
67
- end
68
-
69
- def continue_on_missing?
70
- config.continue_on_missing?
71
- end
72
-
73
- def cdn?
74
- config.cdn?
75
- end
76
-
77
- def pconfig
78
- config.pconfig
79
- end
80
-
81
- def disabled?
82
- config.disabled?
83
- end
84
-
85
- def fast_build?
86
- config.fast_build?
87
- end
88
-
89
- # Preset forwarding
90
-
91
- def widths(media)
92
- preset.widths(media)
93
- end
33
+ private
94
34
 
95
- def formats
96
- preset.formats
35
+ def instruction(method_name)
36
+ instructions[method_name] ||= instruction_class(method_name).new
97
37
  end
98
38
 
99
- def fallback_format
100
- preset.fallback_format
39
+ def instructions
40
+ @instructions ||= {}
101
41
  end
102
42
 
103
- def fallback_width
104
- preset.fallback_width
43
+ def instruction_exists?(method_name)
44
+ Object.const_defined? instruction_class_name(method_name.to_sym)
105
45
  end
106
46
 
107
- def nomarkdown?
108
- preset.nomarkdown?
47
+ # Class names can't contain question marks, so we strip them.
48
+ def instruction_class(method_name)
49
+ Object.const_get instruction_class_name(method_name)
109
50
  end
110
51
 
111
- def quality(format, width)
112
- preset.quality(format, width)
52
+ def instruction_class_name(method_name)
53
+ 'PictureTag::Instructions::' +
54
+ Utils.titleize(method_name.to_s.delete_suffix('?'))
113
55
  end
114
56
  end
115
57
  end
@@ -53,11 +53,11 @@ module PictureTag
53
53
  end
54
54
 
55
55
  def width_attribute
56
- files.first.source_width.to_s
56
+ source_image.width.to_s
57
57
  end
58
58
 
59
59
  def height_attribute
60
- files.first.source_height.to_s
60
+ source_image.height.to_s
61
61
  end
62
62
 
63
63
  private
@@ -86,11 +86,7 @@ module PictureTag
86
86
  end
87
87
 
88
88
  def source_width
89
- @source_width ||= if PictureTag.crop(@media)
90
- target_files.first.source_width
91
- else
92
- @source_image.width
93
- end
89
+ source_image.width
94
90
  end
95
91
 
96
92
  def target_files
@@ -112,9 +108,7 @@ module PictureTag
112
108
  GeneratedImage.new(
113
109
  source_file: @source_image,
114
110
  width: width,
115
- format: @input_format,
116
- crop: PictureTag.crop(@media),
117
- gravity: PictureTag.gravity(@media)
111
+ format: @input_format
118
112
  )
119
113
  end
120
114
  end
@@ -2,28 +2,10 @@ module PictureTag
2
2
  # This is a little module to hold logic that doesn't fit other places. If it
3
3
  # starts getting big, refactor.
4
4
  module Utils
5
- # These are valid ImageMagick gravity arguments (relevant to our use
6
- # case):
7
- GRAVITIES =
8
- %w[center
9
- north
10
- northeast
11
- east
12
- southeast
13
- south
14
- southwest
15
- west
16
- northwest].freeze
17
-
18
- # This is an attempt to recognize valid imagemagick geometry arguments
19
- # with regex. It only tries to match values which don't preserve aspect
20
- # ratio, as they're the ones people might actually need here.
21
- GEOMETRY_REGEX = /\A\d*%?[x:]?\d*[%!]?([+-]\d+){,2}\Z/i.freeze
22
-
23
5
  class << self
24
6
  # Configure Jekyll to keep our generated files
25
7
  def keep_files
26
- dest_dir = PictureTag.config['picture']['output']
8
+ dest_dir = PictureTag.pconfig['output']
27
9
 
28
10
  # Chop a slash off the end, if it's there. Doesn't work otherwise.
29
11
  dest_dir = dest_dir[0..-2] if dest_dir =~ %r{/\z}
@@ -35,7 +17,7 @@ module PictureTag
35
17
 
36
18
  # Print a warning to the console
37
19
  def warning(message)
38
- return if PictureTag.config['picture']['suppress_warnings']
20
+ return if PictureTag.pconfig['suppress_warnings']
39
21
 
40
22
  warn 'Jekyll Picture Tag Warning: '.yellow + message
41
23
  end
@@ -64,6 +46,10 @@ module PictureTag
64
46
  input.split('_').map(&:capitalize).join
65
47
  end
66
48
 
49
+ def snakeize(input)
50
+ input.scan(/[A-Z][a-z]+/).map(&:downcase).join('_')
51
+ end
52
+
67
53
  # Linear interpolator. Pass it 2 values in the x array, 2 values
68
54
  # in the y array, and an x value, returns a y value.
69
55
  def interpolate(xvals, yvals, xval)
@@ -77,6 +63,10 @@ module PictureTag
77
63
  # y = mx + b
78
64
  (m * xval) + b
79
65
  end
66
+
67
+ def aspect_float(width, height)
68
+ width.to_f / height
69
+ end
80
70
  end
81
71
  end
82
72
  end
@@ -1,3 +1,3 @@
1
1
  module PictureTag
2
- VERSION = '1.13.0'.freeze
2
+ VERSION = '2.0.2'.freeze
3
3
  end
data/readme.md CHANGED
@@ -1,5 +1,9 @@
1
+ ![Logo](docs/logo.svg)
2
+
1
3
  # Jekyll Picture Tag
2
4
 
5
+ ![Tests & Formatting](https://github.com/rbuchberger/jekyll_picture_tag/workflows/Tests%20&%20Formatting/badge.svg)
6
+
3
7
  **Responsive Images done correctly.**
4
8
 
5
9
  It's simple to throw a photo on a page and call it a day, but doing justice to users on all
@@ -24,7 +28,7 @@ different image entirely.
24
28
 
25
29
  **Developer Sanity:** If you want to serve multiple images in multiple formats and resolutions, you
26
30
  have a litany of markup to write and a big pile of images to generate and organize. Jekyll Picture
27
- Tag is your responsive images minion - give it simple instructions and it'll handle the rest.
31
+ Tag is your responsive images minion - give it simple instructions and it'll handle the rest.
28
32
 
29
33
  ## Features
30
34
 
@@ -41,14 +45,49 @@ https://rbuchberger.github.io/jekyll_picture_tag/
41
45
 
42
46
  https://rbuchberger.github.io/jekyll_picture_tag/devs/releases
43
47
 
44
- Latest versions:
45
-
46
- * 1.13.0 November 23, 2020
47
- * Add image quality interpolation; allows for variable image quality based on image size.
48
- * Bugfix: Perform format, resize, and quality changes simultaneously rather than individually.
49
- * Allows for actual lossless webp: simply set quality to 100.
50
- * Improves fresh (no cached images) build times by ~15%
51
- * Fix problems with poor image quality.
48
+ Recent releases:
49
+
50
+ * 2.0.2 March 31, 2021
51
+ * Do not pass a quality argument when generating PNG files.
52
+ * It only works on newer versions of vips, breaking builds when using older
53
+ versions (such as when deploying to netlify.)
54
+ * It's not remarkably useful in the first place.
55
+ * 2.0.1 March 31, 2021
56
+ * Select imagemagick deliberately when appropriate, rather than simply rescuing all vips errors
57
+ and trying again. This will stop JPT from suppressing useful vips errors.
58
+ * **2.0** March 25, 2021 - [Migration guide](https://rbuchberger.github.io/jekyll_picture_tag/users/notes/migration_2)
59
+ * Switch from ImageMagick to libvips.
60
+ * 🚀🔥🔥**MUCH MORE FASTER**🔥🔥🚀
61
+ * Will still attempt to use imagemagick if libvips cannot handle a
62
+ particular image format.
63
+ * Eliminate the ImageMagick v7 on Ubuntu pain we've been dealing with for so
64
+ long.
65
+ * Require Ruby >= 2.6, support Ruby 3.0
66
+ * Require Jekyll >= 4.0
67
+ * Cropping is changing.
68
+ * We now use the libvips
69
+ [smartcrop function](https://www.rubydoc.info/gems/ruby-vips/Vips/Image#smartcrop-instance_method),
70
+ which does some magic to keep the most useful part of the image.
71
+ * Geometry is renamed to 'crop', and reduced to simple aspect ratios only. (`width:height`)
72
+ * Gravity is gone, replaced by 'keep' which is translated to a libvips
73
+ [interestingness](https://www.rubydoc.info/gems/ruby-vips/Vips/Interesting) setting.
74
+ * Add stock presets and media queries, under the `jpt-` prefix.
75
+ * Add `format_quality` default settings for webp, avif, and jp2.
76
+ * Add image-format-specific write options.
77
+ * Overhaul user input handling; we can now validate inputs and give error
78
+ messages which are less useless. Stronger validation and nicer errors will be added in future
79
+ releases.
80
+ * Drop support for `markup_presets` and `media_presets`. They are now
81
+ officially and only `presets` and `media_queries`.
82
+ * Improve docs with an introductory tutorial and 'how-to' flow.
83
+
84
+ * 1.14.0 January 10, 2021
85
+ * Gracefully handle empty tag arguments.
86
+ * Re-add metadata stripping. I removed it inadvertently when refactoring; now
87
+ there's a test and a setting to turn it off.
88
+ * Respect Jekyll's `--disable-disk-cache` argument.
89
+ * Add baseurl configuration, allowing increased plugin support (such as I18n via `jekyll-multiple-languages-plugin`)
90
+ * Tooling & test suite maintenance and improvements.
52
91
 
53
92
  ## Help Wanted
54
93
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jekyll_picture_tag
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.13.0
4
+ version: 2.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Robert Wierzbowski
@@ -10,66 +10,122 @@ authors:
10
10
  autorequire:
11
11
  bindir: bin
12
12
  cert_chain: []
13
- date: 2020-11-23 00:00:00.000000000 Z
13
+ date: 2021-03-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
- name: bundler
16
+ name: addressable
17
17
  requirement: !ruby/object:Gem::Requirement
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: '2.0'
22
- type: :development
21
+ version: '2.6'
22
+ type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: '2.0'
28
+ version: '2.6'
29
29
  - !ruby/object:Gem::Dependency
30
- name: minitest
30
+ name: jekyll
31
31
  requirement: !ruby/object:Gem::Requirement
32
32
  requirements:
33
33
  - - "~>"
34
34
  - !ruby/object:Gem::Version
35
- version: '5.11'
36
- type: :development
35
+ version: '4.0'
36
+ type: :runtime
37
37
  prerelease: false
38
38
  version_requirements: !ruby/object:Gem::Requirement
39
39
  requirements:
40
40
  - - "~>"
41
41
  - !ruby/object:Gem::Version
42
- version: '5.11'
42
+ version: '4.0'
43
43
  - !ruby/object:Gem::Dependency
44
- name: mocha
44
+ name: mime-types
45
45
  requirement: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '1.9'
49
+ version: '3.0'
50
+ type: :runtime
51
+ prerelease: false
52
+ version_requirements: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - "~>"
55
+ - !ruby/object:Gem::Version
56
+ version: '3.0'
57
+ - !ruby/object:Gem::Dependency
58
+ name: objective_elements
59
+ requirement: !ruby/object:Gem::Requirement
60
+ requirements:
61
+ - - "~>"
62
+ - !ruby/object:Gem::Version
63
+ version: '1.1'
64
+ type: :runtime
65
+ prerelease: false
66
+ version_requirements: !ruby/object:Gem::Requirement
67
+ requirements:
68
+ - - "~>"
69
+ - !ruby/object:Gem::Version
70
+ version: '1.1'
71
+ - !ruby/object:Gem::Dependency
72
+ name: rainbow
73
+ requirement: !ruby/object:Gem::Requirement
74
+ requirements:
75
+ - - "~>"
76
+ - !ruby/object:Gem::Version
77
+ version: '3.0'
78
+ type: :runtime
79
+ prerelease: false
80
+ version_requirements: !ruby/object:Gem::Requirement
81
+ requirements:
82
+ - - "~>"
83
+ - !ruby/object:Gem::Version
84
+ version: '3.0'
85
+ - !ruby/object:Gem::Dependency
86
+ name: ruby-vips
87
+ requirement: !ruby/object:Gem::Requirement
88
+ requirements:
89
+ - - "~>"
90
+ - !ruby/object:Gem::Version
91
+ version: 2.0.17
92
+ type: :runtime
93
+ prerelease: false
94
+ version_requirements: !ruby/object:Gem::Requirement
95
+ requirements:
96
+ - - "~>"
97
+ - !ruby/object:Gem::Version
98
+ version: 2.0.17
99
+ - !ruby/object:Gem::Dependency
100
+ name: bundler
101
+ requirement: !ruby/object:Gem::Requirement
102
+ requirements:
103
+ - - "~>"
104
+ - !ruby/object:Gem::Version
105
+ version: '2.0'
50
106
  type: :development
51
107
  prerelease: false
52
108
  version_requirements: !ruby/object:Gem::Requirement
53
109
  requirements:
54
110
  - - "~>"
55
111
  - !ruby/object:Gem::Version
56
- version: '1.9'
112
+ version: '2.0'
57
113
  - !ruby/object:Gem::Dependency
58
- name: nokogiri
114
+ name: minitest
59
115
  requirement: !ruby/object:Gem::Requirement
60
116
  requirements:
61
117
  - - "~>"
62
118
  - !ruby/object:Gem::Version
63
- version: '1.10'
119
+ version: '5.14'
64
120
  type: :development
65
121
  prerelease: false
66
122
  version_requirements: !ruby/object:Gem::Requirement
67
123
  requirements:
68
124
  - - "~>"
69
125
  - !ruby/object:Gem::Version
70
- version: '1.10'
126
+ version: '5.14'
71
127
  - !ruby/object:Gem::Dependency
72
- name: pry
128
+ name: minitest-rg
73
129
  requirement: !ruby/object:Gem::Requirement
74
130
  requirements:
75
131
  - - ">="
@@ -83,35 +139,35 @@ dependencies:
83
139
  - !ruby/object:Gem::Version
84
140
  version: '0'
85
141
  - !ruby/object:Gem::Dependency
86
- name: rake
142
+ name: mocha
87
143
  requirement: !ruby/object:Gem::Requirement
88
144
  requirements:
89
145
  - - "~>"
90
146
  - !ruby/object:Gem::Version
91
- version: '12.3'
147
+ version: '1.9'
92
148
  type: :development
93
149
  prerelease: false
94
150
  version_requirements: !ruby/object:Gem::Requirement
95
151
  requirements:
96
152
  - - "~>"
97
153
  - !ruby/object:Gem::Version
98
- version: '12.3'
154
+ version: '1.9'
99
155
  - !ruby/object:Gem::Dependency
100
- name: rubocop
156
+ name: nokogiri
101
157
  requirement: !ruby/object:Gem::Requirement
102
158
  requirements:
103
159
  - - "~>"
104
160
  - !ruby/object:Gem::Version
105
- version: '0.8'
161
+ version: '1.1'
106
162
  type: :development
107
163
  prerelease: false
108
164
  version_requirements: !ruby/object:Gem::Requirement
109
165
  requirements:
110
166
  - - "~>"
111
167
  - !ruby/object:Gem::Version
112
- version: '0.8'
168
+ version: '1.1'
113
169
  - !ruby/object:Gem::Dependency
114
- name: simplecov
170
+ name: pry
115
171
  requirement: !ruby/object:Gem::Requirement
116
172
  requirements:
117
173
  - - ">="
@@ -125,110 +181,124 @@ dependencies:
125
181
  - !ruby/object:Gem::Version
126
182
  version: '0'
127
183
  - !ruby/object:Gem::Dependency
128
- name: solargraph
184
+ name: rake
129
185
  requirement: !ruby/object:Gem::Requirement
130
186
  requirements:
131
- - - ">="
187
+ - - "~>"
132
188
  - !ruby/object:Gem::Version
133
- version: '0'
189
+ version: '12.3'
134
190
  type: :development
135
191
  prerelease: false
136
192
  version_requirements: !ruby/object:Gem::Requirement
137
193
  requirements:
138
- - - ">="
194
+ - - "~>"
139
195
  - !ruby/object:Gem::Version
140
- version: '0'
196
+ version: '12.3'
141
197
  - !ruby/object:Gem::Dependency
142
- name: addressable
198
+ name: rubocop
143
199
  requirement: !ruby/object:Gem::Requirement
144
200
  requirements:
145
201
  - - "~>"
146
202
  - !ruby/object:Gem::Version
147
- version: '2.6'
148
- type: :runtime
203
+ version: 1.7.0
204
+ type: :development
149
205
  prerelease: false
150
206
  version_requirements: !ruby/object:Gem::Requirement
151
207
  requirements:
152
208
  - - "~>"
153
209
  - !ruby/object:Gem::Version
154
- version: '2.6'
210
+ version: 1.7.0
155
211
  - !ruby/object:Gem::Dependency
156
- name: mime-types
212
+ name: rubocop-minitest
157
213
  requirement: !ruby/object:Gem::Requirement
158
214
  requirements:
159
215
  - - "~>"
160
216
  - !ruby/object:Gem::Version
161
- version: '3.0'
162
- type: :runtime
217
+ version: 0.10.0
218
+ type: :development
163
219
  prerelease: false
164
220
  version_requirements: !ruby/object:Gem::Requirement
165
221
  requirements:
166
222
  - - "~>"
167
223
  - !ruby/object:Gem::Version
168
- version: '3.0'
224
+ version: 0.10.0
169
225
  - !ruby/object:Gem::Dependency
170
- name: mini_magick
226
+ name: rubocop-performance
171
227
  requirement: !ruby/object:Gem::Requirement
172
228
  requirements:
173
229
  - - "~>"
174
230
  - !ruby/object:Gem::Version
175
- version: '4.0'
176
- type: :runtime
231
+ version: 1.9.0
232
+ type: :development
177
233
  prerelease: false
178
234
  version_requirements: !ruby/object:Gem::Requirement
179
235
  requirements:
180
236
  - - "~>"
181
237
  - !ruby/object:Gem::Version
182
- version: '4.0'
238
+ version: 1.9.0
183
239
  - !ruby/object:Gem::Dependency
184
- name: objective_elements
240
+ name: rubocop-rake
185
241
  requirement: !ruby/object:Gem::Requirement
186
242
  requirements:
187
243
  - - "~>"
188
244
  - !ruby/object:Gem::Version
189
- version: '1.1'
190
- type: :runtime
245
+ version: 0.5.0
246
+ type: :development
191
247
  prerelease: false
192
248
  version_requirements: !ruby/object:Gem::Requirement
193
249
  requirements:
194
250
  - - "~>"
195
251
  - !ruby/object:Gem::Version
196
- version: '1.1'
252
+ version: 0.5.0
197
253
  - !ruby/object:Gem::Dependency
198
- name: jekyll
254
+ name: simplecov
255
+ requirement: !ruby/object:Gem::Requirement
256
+ requirements:
257
+ - - "~>"
258
+ - !ruby/object:Gem::Version
259
+ version: 0.20.0
260
+ type: :development
261
+ prerelease: false
262
+ version_requirements: !ruby/object:Gem::Requirement
263
+ requirements:
264
+ - - "~>"
265
+ - !ruby/object:Gem::Version
266
+ version: 0.20.0
267
+ - !ruby/object:Gem::Dependency
268
+ name: solargraph
199
269
  requirement: !ruby/object:Gem::Requirement
200
270
  requirements:
201
- - - "<"
271
+ - - ">="
202
272
  - !ruby/object:Gem::Version
203
- version: '5'
204
- type: :runtime
273
+ version: '0'
274
+ type: :development
205
275
  prerelease: false
206
276
  version_requirements: !ruby/object:Gem::Requirement
207
277
  requirements:
208
- - - "<"
278
+ - - ">="
209
279
  - !ruby/object:Gem::Version
210
- version: '5'
280
+ version: '0'
211
281
  description: |2
212
- Jekyll Picture Tag is a liquid tag that adds responsive images to your
213
- Jekyll static site.Jekyll Picture Tag automatically creates resized source
214
- images, is fully configurable, and covers all use cases including art
215
- direction and resolution switching — with a little YAML configuration and a
216
- simple template tag.
282
+ Jekyll Picture Tag adds responsive images to your Jekyll static site. It
283
+ automatically creates resized source images, is fully configurable, and
284
+ covers all use cases, including art direction and resolution switching, with
285
+ a little YAML configuration and a simple template tag.
217
286
  email:
218
287
  - robert@buchberger.cc
219
288
  executables: []
220
289
  extensions: []
221
290
  extra_rdoc_files: []
222
291
  files:
292
+ - ".envrc"
293
+ - ".github/workflows/code-checks.yml"
223
294
  - ".gitignore"
224
295
  - ".rubocop.yml"
225
296
  - ".ruby-version"
226
297
  - ".solargraph.yml"
227
- - ".travis.yml"
228
- - Dockerfile
229
298
  - Gemfile
230
299
  - LICENSE.txt
231
300
  - Rakefile
301
+ - docs/.envrc
232
302
  - docs/Gemfile
233
303
  - docs/Gemfile.lock
234
304
  - docs/_config.yml
@@ -240,15 +310,18 @@ files:
240
310
  - docs/devs/index.md
241
311
  - docs/devs/releases.md
242
312
  - docs/index.md
243
- - docs/users/configuration/cdn.md
313
+ - docs/logo.png
314
+ - docs/logo.svg
244
315
  - docs/users/configuration/directories.md
245
316
  - docs/users/configuration/disable.md
246
317
  - docs/users/configuration/fast_build.md
247
318
  - docs/users/configuration/ignore_missing.md
248
319
  - docs/users/configuration/index.md
249
320
  - docs/users/configuration/kramdown_fix.md
250
- - docs/users/configuration/relative_urls.md
251
321
  - docs/users/configuration/suppress_warnings.md
322
+ - docs/users/configuration/urls.md
323
+ - docs/users/deployment.md
324
+ - docs/users/getting_started.md
252
325
  - docs/users/index.md
253
326
  - docs/users/installation.md
254
327
  - docs/users/liquid_tag/argument_reference/alternate_images.md
@@ -264,10 +337,10 @@ files:
264
337
  - docs/users/notes/github_pages.md
265
338
  - docs/users/notes/html_attributes.md
266
339
  - docs/users/notes/index.md
267
- - docs/users/notes/input_checking.md
268
340
  - docs/users/notes/kramdown_bug.md
269
341
  - docs/users/notes/managing_images.md
270
- - docs/users/notes/migration.md
342
+ - docs/users/notes/migration_1.md
343
+ - docs/users/notes/migration_2.md
271
344
  - docs/users/presets/cropping.md
272
345
  - docs/users/presets/default.md
273
346
  - docs/users/presets/examples.md
@@ -287,27 +360,26 @@ files:
287
360
  - docs/users/presets/quality_width_graph.png
288
361
  - docs/users/presets/width_height_attributes.md
289
362
  - docs/users/presets/width_srcsets.md
290
- - jekyll-picture-tag.gemspec
363
+ - docs/users/presets/writing_presets.md
364
+ - docs/users/tutorial.md
291
365
  - jekyll_picture_tag.gemspec
292
- - lib/jekyll-picture-tag.rb
293
366
  - lib/jekyll_picture_tag.rb
294
367
  - lib/jekyll_picture_tag/cache.rb
295
- - lib/jekyll_picture_tag/cache/base.rb
296
- - lib/jekyll_picture_tag/cache/generated.rb
297
- - lib/jekyll_picture_tag/cache/source.rb
298
- - lib/jekyll_picture_tag/defaults/global.yml
299
- - lib/jekyll_picture_tag/defaults/presets.yml
368
+ - lib/jekyll_picture_tag/defaults/global.rb
369
+ - lib/jekyll_picture_tag/defaults/presets.rb
300
370
  - lib/jekyll_picture_tag/images.rb
301
371
  - lib/jekyll_picture_tag/images/generated_image.rb
372
+ - lib/jekyll_picture_tag/images/image_file.rb
302
373
  - lib/jekyll_picture_tag/images/img_uri.rb
303
374
  - lib/jekyll_picture_tag/images/source_image.rb
304
375
  - lib/jekyll_picture_tag/instructions.rb
305
- - lib/jekyll_picture_tag/instructions/arg_splitter.rb
306
- - lib/jekyll_picture_tag/instructions/configuration.rb
307
- - lib/jekyll_picture_tag/instructions/html_attributes.rb
308
- - lib/jekyll_picture_tag/instructions/preset.rb
309
- - lib/jekyll_picture_tag/instructions/set.rb
310
- - lib/jekyll_picture_tag/instructions/tag_parser.rb
376
+ - lib/jekyll_picture_tag/instructions/children/config.rb
377
+ - lib/jekyll_picture_tag/instructions/children/context.rb
378
+ - lib/jekyll_picture_tag/instructions/children/params.rb
379
+ - lib/jekyll_picture_tag/instructions/children/parsers.rb
380
+ - lib/jekyll_picture_tag/instructions/children/preset.rb
381
+ - lib/jekyll_picture_tag/instructions/parents/conditional_instruction.rb
382
+ - lib/jekyll_picture_tag/instructions/parents/env_instruction.rb
311
383
  - lib/jekyll_picture_tag/output_formats.rb
312
384
  - lib/jekyll_picture_tag/output_formats/auto.rb
313
385
  - lib/jekyll_picture_tag/output_formats/basic.rb
@@ -320,6 +392,13 @@ files:
320
392
  - lib/jekyll_picture_tag/output_formats/naked_srcset.rb
321
393
  - lib/jekyll_picture_tag/output_formats/picture.rb
322
394
  - lib/jekyll_picture_tag/output_formats/readme.md
395
+ - lib/jekyll_picture_tag/parsers.rb
396
+ - lib/jekyll_picture_tag/parsers/arg_splitter.rb
397
+ - lib/jekyll_picture_tag/parsers/configuration.rb
398
+ - lib/jekyll_picture_tag/parsers/html_attributes.rb
399
+ - lib/jekyll_picture_tag/parsers/image_backend.rb
400
+ - lib/jekyll_picture_tag/parsers/preset.rb
401
+ - lib/jekyll_picture_tag/parsers/tag_parser.rb
323
402
  - lib/jekyll_picture_tag/router.rb
324
403
  - lib/jekyll_picture_tag/srcsets.rb
325
404
  - lib/jekyll_picture_tag/srcsets/basic.rb
@@ -331,7 +410,8 @@ files:
331
410
  homepage: https://github.com/rbuchberger/jekyll_picture_tag
332
411
  licenses:
333
412
  - BSD-3-Clause
334
- metadata: {}
413
+ metadata:
414
+ documentation_uri: https://rbuchberger.github.io/jekyll_picture_tag/
335
415
  post_install_message:
336
416
  rdoc_options: []
337
417
  require_paths:
@@ -340,17 +420,18 @@ required_ruby_version: !ruby/object:Gem::Requirement
340
420
  requirements:
341
421
  - - ">="
342
422
  - !ruby/object:Gem::Version
343
- version: '2.5'
423
+ version: '2.6'
344
424
  - - "<"
345
425
  - !ruby/object:Gem::Version
346
- version: '3'
426
+ version: '4.0'
347
427
  required_rubygems_version: !ruby/object:Gem::Requirement
348
428
  requirements:
349
429
  - - ">="
350
430
  - !ruby/object:Gem::Version
351
431
  version: '0'
352
- requirements: []
353
- rubygems_version: 3.1.4
432
+ requirements:
433
+ - libvips
434
+ rubygems_version: 3.2.3
354
435
  signing_key:
355
436
  specification_version: 4
356
437
  summary: Easy responsive images for Jekyll.