universign 0.3.0 → 0.4.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: 06d99d10a1207472f97aee7c68f66795ade1c92e
4
- data.tar.gz: bf1cac38757c8156067bbae76b61eada9cc88b7a
3
+ metadata.gz: d93420ddd5c5795c5e84330f8781dfe15e5257db
4
+ data.tar.gz: a5515629cb3bf50fba78f54d231fd50a3efae079
5
5
  SHA512:
6
- metadata.gz: 6315727fd3e8944a698d0fbccc1470cbb537989e54d96ebaf04a5b21e8ac54fa9de47ae091d40f32ba6d344bb5857fec09a0b7c3ecf5c5243600f8c4c49373fa
7
- data.tar.gz: 79361ed919e8abf78ba9a5c6f754a5fb6b49f9ac9fc409fece5ffba842159e285d542a84aa7cfae2fa7e0beb7fc96b6397cde562fe18ec7ec5ed491abf482af8
6
+ metadata.gz: aba5bdb8cebf7f98019b2bee47e1120bb0183912405c0e817c0395dddf86e2f43d13fa087fdda61069024460279314957402c0e16354d4693c7e99690813e017
7
+ data.tar.gz: 4f71305ef57230b411bc165c803e7aa41e04d82ec417e5152a414f835f98b540194b64ceaadf842bc6feabb6f6edc1db0004facc1d98a83eedc8391ece00ff72
@@ -29,6 +29,16 @@ module Universign
29
29
  end
30
30
 
31
31
  module Sign
32
+
33
+ module Status
34
+ READY = 0
35
+ EXPIRED = 1
36
+ COMPLETED = 2
37
+ CANCELED = 3
38
+ FAILED = 4
39
+ PENDING_RA_VALIDATION = 5
40
+ end
41
+
32
42
  class << self
33
43
  SANDBOX_URL = 'sign.test.cryptolog.com'.freeze
34
44
  PROD_URL = 'ws.universign.eu'.freeze
@@ -55,6 +65,25 @@ module Universign
55
65
  { content: XMLRPC::Base64.new(content), name: name }.merge options
56
66
  end
57
67
 
68
+ def list_transactions(
69
+ status: Universign::Sign::Status::COMPLETED,
70
+ not_before: nil, not_after: nil, start_range: 0, res: []
71
+ )
72
+ options = { status: status, startRange: start_range }
73
+ options[:notBefore] = not_before if not_before.is_a? Date
74
+ options[:notAfter] = not_after if not_after.is_a? Date
75
+ r = client.call('requester.listTransactions', options)
76
+ return res unless r.count > 0
77
+ res += r
78
+ list_transactions(
79
+ status: status,
80
+ not_before: not_before,
81
+ not_after: not_after,
82
+ start_range: start_range + r.count,
83
+ res: res
84
+ )
85
+ end
86
+
58
87
  private
59
88
 
60
89
  def validate_transaction_signer_argument(options)
@@ -1,3 +1,3 @@
1
1
  module Universign
2
- VERSION = '0.3.0'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -12,7 +12,7 @@ Gem::Specification.new do |spec|
12
12
  spec.summary = %q{A ruby client for the Universign XML-RPC api}
13
13
  spec.description = <<-EOF
14
14
  A ruby client for the Universign XML-RPC api.
15
- Based on Universign documentation Version: 8.2.5
15
+ Based on Universign documentation v8.2.5
16
16
  EOF
17
17
  spec.homepage = 'https://www.github.com/mgtf/universign'
18
18
  spec.license = 'MIT'
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: universign
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Matthieu Foillard
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-04-03 00:00:00.000000000 Z
11
+ date: 2018-12-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -68,7 +68,7 @@ dependencies:
68
68
  version: 0.52.0
69
69
  description: |2
70
70
  A ruby client for the Universign XML-RPC api.
71
- Based on Universign documentation Version: 8.2.5
71
+ Based on Universign documentation v8.2.5
72
72
  email:
73
73
  - mgf@iotanet.net
74
74
  executables: []
@@ -109,7 +109,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
109
109
  version: '0'
110
110
  requirements: []
111
111
  rubyforge_project:
112
- rubygems_version: 2.5.2
112
+ rubygems_version: 2.6.11
113
113
  signing_key:
114
114
  specification_version: 4
115
115
  summary: A ruby client for the Universign XML-RPC api