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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5066fe24599bf4bee31ecf17ad8f087243455cc9
4
- data.tar.gz: f367ab72c66e8797b78c097d6d6c7b2358675644
3
+ metadata.gz: c025aea7a799e9a17cc018bc3a1ec3a1589a07f6
4
+ data.tar.gz: 5b5693fc95fa5a8b02146e3409cbd48849fae4f1
5
5
  SHA512:
6
- metadata.gz: e4c888f7b3cd9aa97e054bc54771f7bb839802a1fa198a94a3b50a013d6d71e3974f0646170cf0a4a19bf1524103d9224f16837498f76b487a66155efb8d0fdc
7
- data.tar.gz: 535c81b39e1afc2e4c53032efe681755beadbc4511117d66c69aaf6cc97f0c759fd9d1ca27351e159ce035679ad4cb34893014691471979cfd557c526f509224
6
+ metadata.gz: 029d72f4d2d7baae9faee2c245ab21396138d0aca8ce1a268e69ce235423eb631c7d9cd48fb32147d784c388d55a9fd3586b385a9e0daba942881147838807f1
7
+ data.tar.gz: 348fc2127a4c00e9790ccf75cee55cb8d61dbd6fd958aa40b400167c4bcade21adff83e2d0f7ce7146f83c697b5d8a35a1e84082f2062a8d83c481af2a3f75e5
@@ -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
@@ -1,3 +1,3 @@
1
1
  module HylaFAX
2
- VERSION = '0.2.1'
2
+ VERSION = '0.3.0'
3
3
  end
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.2.1
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-18 00:00:00.000000000 Z
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.2.1
101
+ summary: hylafax-0.3.0
102
102
  test_files: []