RCups 0.1.0 → 0.2.0

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.
Files changed (2) hide show
  1. data/lib/cups.rb +3 -2
  2. metadata +2 -2
@@ -9,11 +9,12 @@ class Cups
9
9
  @prmt_print_name = @print ? " -P "+@print+" " : ""
10
10
  end
11
11
 
12
- def print_file(path_file, user = nil,priority = 50)
12
+ #sizes = "a4", "letter", and "legal"
13
+ def print_file(path_file, size='letter',user = nil,priority = 50)
13
14
  prmt_print_name_ex = @prmt_print_name.size != 0 ? " -d "+@print+" " : ""
14
15
  @user = user
15
16
  user_option = @user ? " -U #{@user}":""
16
- str_result = `lp #{path_file} -h #{@print_url} #{user_option} -p #{priority} #{prmt_print_name_ex}`
17
+ str_result = `lp #{path_file} -h #{@print_url} -o media=#{size} #{user_option} -p #{priority} #{prmt_print_name_ex}`
17
18
  if str_result.include?(@print)
18
19
  @id = str_result.sub("la id solicitada es ","").split(" ")[0]
19
20
  return true
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RCups
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
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: 2011-05-17 00:00:00.000000000 Z
12
+ date: 2012-04-23 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: Library for printing with CUPS
15
15
  email: blassoto@gmail.com