cupsffi 0.0.4 → 0.0.5
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/cupsffi/printer.rb +3 -1
- data/lib/cupsffi/version.rb +1 -1
- metadata +2 -2
data/lib/cupsffi/printer.rb
CHANGED
@@ -153,7 +153,9 @@ class CupsPrinter
|
|
153
153
|
options.each do |key,value|
|
154
154
|
raise "Invalid option #{key} for printer #{@name}" if ppd_options[key].nil?
|
155
155
|
choices = ppd_options[key][:choices].map{|c| c[:choice]}
|
156
|
-
|
156
|
+
# Treat 'Custom.WIDTHxHEIGHT' as just 'Custom'
|
157
|
+
base_value = (value =~ /^Custom\./ && %w{PageRegion PageSize}.include?(key)) ? 'Custom' : value
|
158
|
+
raise "Invalid value #{value} for option #{key}" unless choices.include?(base_value)
|
157
159
|
end
|
158
160
|
end
|
159
161
|
end
|
data/lib/cupsffi/version.rb
CHANGED
metadata
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
name: cupsffi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
4
|
prerelease:
|
5
|
-
version: 0.0.
|
5
|
+
version: 0.0.5
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Nathan Ehresman
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2011-05-
|
13
|
+
date: 2011-05-27 00:00:00 -04:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|