dragonfly_mozjpeg 0.0.3 → 0.0.4

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: 6d468ba2333255bcfc499ebcf4a5c7a6a2ec49c5
4
- data.tar.gz: 8e7f6c067215c6a86b825f616e8ce8ecd0664fbe
3
+ metadata.gz: 6edfe70e748b79bc54a135c9871d1c1de711df42
4
+ data.tar.gz: 4854a0cec1c1586434f315ecbd1d15c7ab4119da
5
5
  SHA512:
6
- metadata.gz: 7c97d1ef83964ab70e5492aa22e83cb98bf02712e8cc741a0e49f0dd9d459c24b5fea857703ff9941183aa0c7b114aaa9c3ed4e9695db0c3f5afc1a9b4ca99ac
7
- data.tar.gz: 8421b4d3b0ab4e0d69efb22d9eeec4800e325b8cfc47cae5929e0446d705886514835de08b5a3c47c66410bcdfe561d1d74ad62dc4420947ea0970c0f199a02d
6
+ metadata.gz: 60bddc9150f9d3d3585b7e76835d3fd358c855045cbd48876ad3f826e24c03a6b484f029b8e869de1357e796a19df17b66d61b9fb798ea25dfe29c89bfa999d7
7
+ data.tar.gz: a0e2eaf4fff3f7b682278e2ce24b7c9bf90c8c6ea989ef6e713c2e22eff61c6f79cf546d339f6e114cb4c09f3069ad52cb1d2921a11770fd7a454865ac19ca58
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.0.4
4
+
5
+ * adjust bad handling of default plugin options
6
+
3
7
  ## 0.0.3
4
8
 
5
9
  * change project description
@@ -5,10 +5,8 @@ require 'dragonfly_mozjpeg/utils'
5
5
  module DragonflyMozjpeg
6
6
  class Plugin
7
7
 
8
- BASE_PATH = File.expand_path(File.join(__dir__, '../../vendor/mozjpeg'))
9
-
10
8
  def call(app, options = {})
11
- app.env[:cjpeg] = Utils.check_binary(options[:cjpeg], 'cjpeg')
9
+ app.env[:cjpeg] = Utils.check_binary(options[:cjpeg], 'cjpeg')
12
10
  app.env[:jpegtran] = Utils.check_binary(options[:jpegtran], 'jpegtran')
13
11
 
14
12
  app.add_processor :lossy, Processors::Lossy.new
@@ -3,6 +3,8 @@ require 'os'
3
3
  module DragonflyMozjpeg
4
4
  module Utils
5
5
 
6
+ BASE_PATH = File.expand_path(File.join(__dir__, '../../vendor/mozjpeg'))
7
+
6
8
  module_function
7
9
 
8
10
  def logger
@@ -12,7 +14,7 @@ module DragonflyMozjpeg
12
14
  end
13
15
 
14
16
  def check_binary(current, file)
15
- if File.exists?(current)
17
+ if current && File.exists?(current)
16
18
  current
17
19
  elsif OS.linux? && OS.bits == 64
18
20
  File.join(BASE_PATH, "linux/#{file}")
@@ -1,3 +1,3 @@
1
1
  module DragonflyMozjpeg
2
- VERSION = '0.0.3'.freeze
2
+ VERSION = '0.0.4'.freeze
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dragonfly_mozjpeg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jurema