acbaker 0.0.8 → 0.0.9

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: 2addf8779a1ba8dda726042891ff5ed78ff92ead
4
- data.tar.gz: 82fc094482817ceff0be7435718e2f45f54de2d0
3
+ metadata.gz: e9ae87d8d0116132643efd054dd902f11f7415dd
4
+ data.tar.gz: 4caa61508232fa88cfefc656a6ff7df2030d14f7
5
5
  SHA512:
6
- metadata.gz: b62cb0ac49dbe7c9ab7afdbdcc7635ef98985642c073d90245f4432369de7cee2d47a3dbc5e867d1f21a4e5918de506b681f04e6e288ad1f105996da0f4bbf4b
7
- data.tar.gz: 4f1b0840193f2f06ac7bcf5778f6639b2d33755d34e9d260db31e8ec8fa82927f0f9003327542ba82d8afe4eb1abe92bede2cf97280342c88582e7f693dca004
6
+ metadata.gz: 320faf834aa04eebed124a329f5e6081cf194735ea7e9653c8e8081e4b824cb0c3e51455e6900011430a2eea1f687e5e5102ae0f23b3282d033a28a7fe6bf2cd
7
+ data.tar.gz: 0f67714166dbdd5642d293f41b32f32cd6a1f61442ac231fda37625b05e9e4a8b79ef1d7dd30b494081e79823d80783b82c67fe5265221a0fe942b5cf42458d1
data/README.md CHANGED
@@ -20,6 +20,9 @@ USAGE
20
20
  CHANGELOG
21
21
  ---------
22
22
 
23
+ * **0.0.9**
24
+ * Added Constraint Filter
25
+
23
26
  * **0.0.7**
24
27
  * Implemented processors (advanced image manipulations)
25
28
  * Added "center" strategy (align image in center with relative or absolute width constraints)
@@ -2,11 +2,10 @@ module Acbaker
2
2
  module Processors
3
3
  class Base
4
4
  attr_accessor :asset_pack, :options
5
- @@defaults = {}
6
5
 
7
6
  def initialize(asset_pack, options={})
8
7
  @asset_pack = asset_pack
9
- @options = options ? @@defaults.merge(options) : @@defaults
8
+ @options = options ? defaults.merge(options) : defaults
10
9
  end
11
10
 
12
11
  def run(image, image_spec, width=nil, height=nil)
@@ -1,7 +1,10 @@
1
1
  module Acbaker
2
2
  module Processors
3
3
  class Center < Base
4
- @@defaults = {"max-width" => "50%", "background-color" => "#FFFFFF", "gravity" => "Center"}
4
+
5
+ def defaults
6
+ {"max-width" => "50%", "background-color" => "#FFFFFF", "gravity" => "Center"}
7
+ end
5
8
 
6
9
  def run(image, image_spec, width=nil, height=nil)
7
10
  transform_width = width.to_f
@@ -1,7 +1,6 @@
1
1
  module Acbaker
2
2
  module Processors
3
3
  class Constraint < Base
4
- @@defaults = {}
5
4
 
6
5
  def run(image, image_spec, width=nil, height=nil)
7
6
  # resize image
@@ -1,7 +1,10 @@
1
1
  module Acbaker
2
2
  module Processors
3
3
  class Contain < Base
4
- @@defaults = {"background-color" => "#FFFFFF", "gravity" => "Center"}
4
+
5
+ def defaults
6
+ {"background-color" => "#FFFFFF", "gravity" => "Center"}
7
+ end
5
8
 
6
9
  def run(image, image_spec, width=nil, height=nil)
7
10
  # resize image
@@ -1,7 +1,10 @@
1
1
  module Acbaker
2
2
  module Processors
3
3
  class Cover < Base
4
- @@defaults = {"background-color" => "#FFFFFF", "gravity" => "Center"}
4
+
5
+ def defaults
6
+ {"background-color" => "#FFFFFF", "gravity" => "Center"}
7
+ end
5
8
 
6
9
  def run(image, image_spec, width=nil, height=nil)
7
10
  # resize image
@@ -1,3 +1,3 @@
1
1
  module Acbaker
2
- VERSION = "0.0.8"
2
+ VERSION = "0.0.9"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: acbaker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tobias Strebitzer