hylafax 0.2.1 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/hylafax/send_fax.rb +28 -1
- data/lib/hylafax/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c025aea7a799e9a17cc018bc3a1ec3a1589a07f6
|
4
|
+
data.tar.gz: 5b5693fc95fa5a8b02146e3409cbd48849fae4f1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 029d72f4d2d7baae9faee2c245ab21396138d0aca8ce1a268e69ce235423eb631c7d9cd48fb32147d784c388d55a9fd3586b385a9e0daba942881147838807f1
|
7
|
+
data.tar.gz: 348fc2127a4c00e9790ccf75cee55cb8d61dbd6fd958aa40b400167c4bcade21adff83e2d0f7ce7146f83c697b5d8a35a1e84082f2062a8d83c481af2a3f75e5
|
data/lib/hylafax/send_fax.rb
CHANGED
@@ -1,15 +1,22 @@
|
|
1
1
|
module HylaFAX
|
2
2
|
class SendFax < Command
|
3
3
|
DEFAULT_TMP_DIR = 'tmp'
|
4
|
+
DEFAULT_PAGEWIDTH = 209
|
5
|
+
DEFAULT_PAGELENGTH = 296
|
6
|
+
DEFAULT_PAGECHOP = "default"
|
7
|
+
DEFAULT_CHOPTHRESHOLD = 3
|
4
8
|
DOCUMENT_PREFIX = 'doc.'
|
5
9
|
|
6
|
-
attr_reader :dialstring, :document, :tmp_dir, :job_id
|
10
|
+
attr_reader :dialstring, :document, :tmp_dir, :job_id, :pagewidth,
|
11
|
+
:pagelength
|
7
12
|
|
8
13
|
def initialize(opts = {})
|
9
14
|
super
|
10
15
|
@tmp_dir = opts.fetch(:tmp_dir) { DEFAULT_TMP_DIR }
|
11
16
|
@dialstring = opts.fetch(:dialstring)
|
12
17
|
@document = opts.fetch(:document)
|
18
|
+
@pagewidth = opts.fetch(:pagewidth) { DEFAULT_PAGEWIDTH }
|
19
|
+
@pagelength = opts.fetch(:pagelength) { DEFAULT_PAGELENGTH }
|
13
20
|
@job_id = nil
|
14
21
|
end
|
15
22
|
|
@@ -20,6 +27,10 @@ module HylaFAX
|
|
20
27
|
create_new_job
|
21
28
|
set_lasttime
|
22
29
|
set_dialstring
|
30
|
+
set_pagewidth
|
31
|
+
set_pagelength
|
32
|
+
set_pagechop
|
33
|
+
set_chopthreshold
|
23
34
|
set_document
|
24
35
|
submit_job
|
25
36
|
job_id
|
@@ -57,6 +68,22 @@ module HylaFAX
|
|
57
68
|
ftp.sendcmd("JPARM DIALSTRING \"#{dialstring}\"")
|
58
69
|
end
|
59
70
|
|
71
|
+
def set_pagewidth
|
72
|
+
ftp.sendcmd(%Q{JPARM PAGEWIDTH #{pagewidth}})
|
73
|
+
end
|
74
|
+
|
75
|
+
def set_pagelength
|
76
|
+
ftp.sendcmd(%Q{JPARM PAGELENGTH #{pagelength}})
|
77
|
+
end
|
78
|
+
|
79
|
+
def set_pagechop
|
80
|
+
ftp.sendcmd(%Q{JPARM PAGECHOP "#{DEFAULT_PAGECHOP}"})
|
81
|
+
end
|
82
|
+
|
83
|
+
def set_chopthreshold
|
84
|
+
ftp.sendcmd(%Q{JPARM CHOPTHRESHOLD #{DEFAULT_CHOPTHRESHOLD}})
|
85
|
+
end
|
86
|
+
|
60
87
|
def set_document
|
61
88
|
ftp.sendcmd("JPARM DOCUMENT \"#{remote_document}\"")
|
62
89
|
end
|
data/lib/hylafax/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hylafax
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Björn Albers
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-10-
|
11
|
+
date: 2017-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -98,5 +98,5 @@ rubyforge_project:
|
|
98
98
|
rubygems_version: 2.6.10
|
99
99
|
signing_key:
|
100
100
|
specification_version: 4
|
101
|
-
summary: hylafax-0.
|
101
|
+
summary: hylafax-0.3.0
|
102
102
|
test_files: []
|