thumbkit 0.1.1 → 0.1.2

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.
data/Gemfile.lock CHANGED
@@ -10,7 +10,7 @@ GIT
10
10
  PATH
11
11
  remote: .
12
12
  specs:
13
- thumbkit (0.1.0)
13
+ thumbkit (0.1.1)
14
14
 
15
15
  GEM
16
16
  remote: https://rubygems.org/
@@ -48,7 +48,15 @@ class Thumbkit::Processor
48
48
  def initialize(path, outfile, options)
49
49
  @path = path
50
50
  @outfile = outfile || determine_outfile
51
- @options = Thumbkit.defaults + options
51
+ @options = default_options + options + options.fetch(processor_name, {})
52
+ end
53
+
54
+ def processor_name
55
+ self.class.name.split('::').last.to_sym
56
+ end
57
+
58
+ def default_options
59
+ Thumbkit.defaults + Thumbkit.defaults.fetch(processor_name, {})
52
60
  end
53
61
 
54
62
  def determine_outfile
@@ -1,3 +1,3 @@
1
1
  class Thumbkit
2
- VERSION = "0.1.1"
2
+ VERSION = "0.1.2"
3
3
  end
data/lib/thumbkit.rb CHANGED
@@ -21,7 +21,7 @@ class Thumbkit
21
21
  },
22
22
  font: {
23
23
  # Run `identify -list Font` for available font options
24
- family: 'Arial-Regular',
24
+ family: 'Helvetica',
25
25
  size: '18', # In points
26
26
  direction: :auto, # nil, :auto, 'right-to-left', or 'left-to-right'
27
27
  },
@@ -32,6 +32,10 @@ class Thumbkit
32
32
  @defaults = defaults + options
33
33
  end
34
34
 
35
+ def self.reset_defaults!
36
+ @defaults = nil
37
+ end
38
+
35
39
  def self.processors
36
40
  Thumbkit::Processor.processors
37
41
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thumbkit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.1.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-05 00:00:00.000000000 Z
12
+ date: 2012-06-07 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Thumbkit makes thumbnails!
15
15
  email: