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 +1 -1
- data/lib/thumbkit/processor.rb +9 -1
- data/lib/thumbkit/version.rb +1 -1
- data/lib/thumbkit.rb +5 -1
- metadata +2 -2
data/Gemfile.lock
CHANGED
data/lib/thumbkit/processor.rb
CHANGED
@@ -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 =
|
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
|
data/lib/thumbkit/version.rb
CHANGED
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: '
|
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.
|
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-
|
12
|
+
date: 2012-06-07 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Thumbkit makes thumbnails!
|
15
15
|
email:
|