next_gen_images 1.0.0 → 1.1.0

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
  SHA256:
3
- metadata.gz: 3139a7966f459941dc8dd6112372fd4e501b12f5e48e4f666581081fde448c00
4
- data.tar.gz: ad79b7bbba5c90f31b8522d43b5e202a6d90c9ec1ccc1f2e45a1da70af50514a
3
+ metadata.gz: 1d9ba63a5eb1dc12bfbdd8e5604144dff1ed7c93c9643401b9d144847b5ffb01
4
+ data.tar.gz: ceada02f709811e4e9cb87c6014e1c6dcd1d8a049ac6e861b19441651e020f49
5
5
  SHA512:
6
- metadata.gz: 3170d74f1a320e279c32191c822e820b020764fea84008fa60171a689d74b9e0c74d416bd566d85335302a1b6829d1763132dfa455625f388774e7b6a4bc7afe
7
- data.tar.gz: 458bb3edcebd5199985ca28bdaea30b00800fec1e16550db30355c5d85f18c36b05b65b7f298b5d2f43ef3b441d64fec725031441a5fbcc9adf19bbd4d651b3b
6
+ metadata.gz: 1ff61bf7de48a53620dfce5146f6df612078981c769622601040ca4a2af288cd4d6b1700eac74cb91e5e41297b7886a9331a45ed39d6127f64362ce307c9260a
7
+ data.tar.gz: 68645e21ab7e37e1b766f0e914c679732791c6db9474b8bfd82b4609f48b92952e761e2426f5157264b52bac4a50163995eff5340467d782d0ac99f2d2bc5bca
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- next_gen_images (1.0.0)
4
+ next_gen_images (1.1.0)
5
5
  rails (>= 3.1)
6
6
  webp-ffi (~> 0.3.1)
7
7
 
@@ -102,9 +102,9 @@ GEM
102
102
  mini_magick (>= 4.9.5, < 5)
103
103
  ruby-vips (>= 2.0.17, < 3)
104
104
  json (2.6.2)
105
- loofah (2.20.0)
105
+ loofah (2.21.3)
106
106
  crass (~> 1.0.2)
107
- nokogiri (>= 1.5.9)
107
+ nokogiri (>= 1.12.0)
108
108
  mail (2.8.1)
109
109
  mini_mime (>= 0.1.1)
110
110
  net-imap
@@ -125,16 +125,14 @@ GEM
125
125
  net-smtp (0.3.3)
126
126
  net-protocol
127
127
  nio4r (2.5.9)
128
- nokogiri (1.14.3-arm64-darwin)
129
- racc (~> 1.4)
130
- nokogiri (1.14.3-x86_64-linux)
128
+ nokogiri (1.15.2-arm64-darwin)
131
129
  racc (~> 1.4)
132
130
  parallel (1.22.1)
133
131
  parser (3.1.2.1)
134
132
  ast (~> 2.4.1)
135
133
  public_suffix (5.0.1)
136
134
  racc (1.6.2)
137
- rack (2.2.6.4)
135
+ rack (2.2.7)
138
136
  rack-test (2.1.0)
139
137
  rack (>= 1.3)
140
138
  rails (7.0.4)
@@ -198,7 +196,7 @@ GEM
198
196
  ruby-vips (2.1.4)
199
197
  ffi (~> 1.12)
200
198
  ssrf_filter (1.1.1)
201
- thor (1.2.1)
199
+ thor (1.2.2)
202
200
  timeout (0.3.2)
203
201
  tzinfo (2.0.5)
204
202
  concurrent-ruby (~> 1.0)
@@ -209,7 +207,7 @@ GEM
209
207
  websocket-driver (0.7.5)
210
208
  websocket-extensions (>= 0.1.0)
211
209
  websocket-extensions (0.1.5)
212
- zeitwerk (2.6.7)
210
+ zeitwerk (2.6.8)
213
211
 
214
212
  PLATFORMS
215
213
  arm64-darwin-21
data/README.md CHANGED
@@ -152,7 +152,7 @@ Example Uploader class:
152
152
  class ImageUploader < CarrierWave::Uploader::Base
153
153
  include NextGenImages::CarrierwaveHelpers
154
154
 
155
- version :small, from_version: :medium do
155
+ version :small do
156
156
  process resize_to_fit: [400, 400]
157
157
  end
158
158
 
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NextGenImages
4
- VERSION = '1.0.0'
4
+ VERSION = '1.1.0'
5
5
  end
@@ -31,13 +31,13 @@ module NextGenImages
31
31
 
32
32
  content = ''.html_safe
33
33
  if block.present?
34
- content += capture(&block).html_safe
34
+ content << capture(&block).html_safe
35
35
  else
36
36
  [source].flatten.each do |img_src|
37
- content += build_source_from_img(image_path(img_src), add_webp)
37
+ content << build_source_from_img(image_path(img_src), add_webp)
38
38
  end
39
39
  end
40
- content += tag('img', image_options)
40
+ content << tag('img', image_options)
41
41
  end
42
42
 
43
43
  def build_img_src(source)
@@ -56,7 +56,7 @@ module NextGenImages
56
56
  webp_path = "#{img_path}.webp"
57
57
  # order of source tags matters
58
58
  if add_webp && file_exist_in_public_path?(webp_path)
59
- source_tags += source_tag(srcset: webp_path, type: 'image/webp')
59
+ source_tags << source_tag(srcset: webp_path, type: 'image/webp')
60
60
  end
61
61
  source_tags + source_tag(
62
62
  srcset: img_path,
@@ -1,4 +1,5 @@
1
1
  # frozen_string_literal: true
2
+ require 'webp-ffi'
2
3
 
3
4
  require_relative 'next_gen_images/version'
4
5
  require_relative 'next_gen_images/railtie' if defined?(Rails)
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative 'lib/next_gen_images/version'
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = 'next_gen_images'
7
+ spec.version = NextGenImages::VERSION
8
+ spec.authors = ['JP Balarini']
9
+ spec.email = ['jp@eagerworks.com']
10
+
11
+ spec.summary = 'Handle next-gen image formats in your Ruby on Rails project. WebP is currently supported'
12
+ spec.description = 'Adds support for a picture_tag and several utilities to automatically convert images to WebP'
13
+ spec.homepage = 'https://eagerworks.com'
14
+ spec.license = 'MIT'
15
+ spec.required_ruby_version = '>= 2.6.0'
16
+
17
+ spec.metadata['allowed_push_host'] = 'https://rubygems.org'
18
+
19
+ spec.metadata['homepage_uri'] = spec.homepage
20
+ spec.metadata['source_code_uri'] = 'https://github.com/eagerworks/next_gen_images'
21
+ spec.metadata['rubygems_mfa_required'] = 'true'
22
+
23
+ # Specify which files should be added to the gem when it is released.
24
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
25
+ spec.files = Dir.chdir(__dir__) do
26
+ `git ls-files -z`.split("\x0").reject do |f|
27
+ (f == __FILE__) || f.match(%r{\A(?:(?:bin|test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
28
+ end
29
+ end
30
+ spec.bindir = 'exe'
31
+ spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
32
+ spec.require_paths = ['lib']
33
+
34
+ spec.add_runtime_dependency 'rails', '>= 3.1'
35
+ spec.add_runtime_dependency 'webp-ffi', '~> 0.3.1'
36
+ spec.add_development_dependency 'bundler'
37
+ spec.add_development_dependency 'carrierwave', '>= 2.0'
38
+ spec.add_development_dependency 'rspec', '~> 3.12.0'
39
+ spec.add_development_dependency 'rubocop-rspec', '~> 2.17.1'
40
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: next_gen_images
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Balarini
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2023-04-23 00:00:00.000000000 Z
11
+ date: 2023-07-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -116,6 +116,7 @@ files:
116
116
  - lib/next_gen_images/tasks/assets/webp.rake
117
117
  - lib/next_gen_images/version.rb
118
118
  - lib/next_gen_images/view_helpers.rb
119
+ - next_gen_images.gemspec
119
120
  - sig/next_gen_images.rbs
120
121
  homepage: https://eagerworks.com
121
122
  licenses: