symgate 0.4.0 → 0.4.2
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.
- checksums.yaml +4 -4
- data/.gitmodules +1 -1
- data/.ruby-version +1 -1
- data/.travis.yml +2 -1
- data/CHANGELOG.md +17 -0
- data/README.md +3 -2
- data/lib/symgate/client.rb +26 -10
- data/lib/symgate/error.rb +1 -1
- data/lib/symgate/version.rb +1 -1
- data/symgate-gem.gemspec +4 -3
- metadata +14 -14
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 89c70c14f5be730c3303f7954190bd2877239f4cd10e41934e6ce9f53e72bac5
|
|
4
|
+
data.tar.gz: e7661ee6e32d04987a4623d0cb1fb00c3f643f9c5c79fe53aa4f13aad0a030d0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: db98f0a5322bef320898c03d593650c7116c0a4c511ab621f43c6b6d919afee271aa924afbee4ccdc3ee38363ce5aed1c00b40e92ff56f734c7f13e074a41ea0
|
|
7
|
+
data.tar.gz: '028af3b3756599ee21bbc60e0074e93e787ee72d737ecd79a3908236d99732224105d46cc6226d50a45aa8c785e62395347f13d846163ac384c8ff1ac64e193d'
|
data/.gitmodules
CHANGED
data/.ruby-version
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
|
|
1
|
+
3.0.2
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
|
@@ -1,3 +1,20 @@
|
|
|
1
|
+
## 0.4.2 (2025-12-01)
|
|
2
|
+
|
|
3
|
+
Update Savon gem to 2.15.1 to allow compatibility with newer Rails versions
|
|
4
|
+
Move symboliser-vagrant submodule to new Widgit bitbucket
|
|
5
|
+
|
|
6
|
+
## 0.4.1 (2021-09-06)
|
|
7
|
+
|
|
8
|
+
Allow a configurable number of retries for a 'Data required for operation' error
|
|
9
|
+
|
|
10
|
+
## 0.4.0 (2019-12-13)
|
|
11
|
+
|
|
12
|
+
Add support for copy-on-write wordlists for symboliser builds that support this
|
|
13
|
+
|
|
14
|
+
## 0.3.0 (2019-07-19)
|
|
15
|
+
|
|
16
|
+
Add support for read-only wordlists
|
|
17
|
+
|
|
1
18
|
## 0.2.4 (2018-10-25)
|
|
2
19
|
|
|
3
20
|
Make attachments option in get_wordlist_entries truly optional and update integration tests to
|
data/README.md
CHANGED
|
@@ -94,8 +94,9 @@ You can also initialise a client with the following options:
|
|
|
94
94
|
|
|
95
95
|
| Option | |
|
|
96
96
|
| ----------- | --- |
|
|
97
|
-
| :endpoint
|
|
98
|
-
| :savon_opts
|
|
97
|
+
| :endpoint | Specifies the symbolisation SOAP endpoint to use, if not the public symbolisation server. |
|
|
98
|
+
| :savon_opts | Specifies options to pass to the underlying savon engine. e.g. `{ log_level: :debug }` |
|
|
99
|
+
| :data_required_error_retries | Specifies the number of times to attempt a request when the response is 'Data required for operation'. |
|
|
99
100
|
|
|
100
101
|
### Errors
|
|
101
102
|
|
data/lib/symgate/client.rb
CHANGED
|
@@ -6,7 +6,8 @@ module Symgate
|
|
|
6
6
|
# A generic client for the Symgate API.
|
|
7
7
|
# See the WSDL for full documentation
|
|
8
8
|
class Client
|
|
9
|
-
attr_accessor :wsdl, :endpoint, :user, :password, :token, :account, :key, :savon_opts
|
|
9
|
+
attr_accessor :wsdl, :endpoint, :user, :password, :token, :account, :key, :savon_opts,
|
|
10
|
+
:data_required_error_retries
|
|
10
11
|
attr_reader :savon_client
|
|
11
12
|
|
|
12
13
|
# Constructs a new client with the provided options
|
|
@@ -14,6 +15,7 @@ module Symgate
|
|
|
14
15
|
@wsdl = 'https://ws.widgitonline.com/schema/symboliser.wsdl'
|
|
15
16
|
@endpoint = 'https://ws.widgitonline.com/'
|
|
16
17
|
@savon_opts = {}
|
|
18
|
+
@data_required_error_retries = 3
|
|
17
19
|
opts.each { |k, v| instance_variable_set("@#{k}", v) }
|
|
18
20
|
|
|
19
21
|
validate_client_options
|
|
@@ -83,16 +85,30 @@ module Symgate
|
|
|
83
85
|
# sends a request to the server and yields a soap block for defining the
|
|
84
86
|
# message body
|
|
85
87
|
def savon_request(method, opts = {})
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
88
|
+
attempts = 0
|
|
89
|
+
|
|
90
|
+
begin
|
|
91
|
+
attempts += 1
|
|
92
|
+
|
|
93
|
+
r = @savon_client.call(method) do |soap|
|
|
94
|
+
yield soap if block_given?
|
|
95
|
+
soap.message({}) if soap[:message].nil?
|
|
96
|
+
soap[:message].merge!(savon_creds)
|
|
97
|
+
end
|
|
91
98
|
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
99
|
+
raise_error_on_string_response(r, "#{method}_response".to_sym) if opts[:returns_error_string]
|
|
100
|
+
|
|
101
|
+
r
|
|
102
|
+
rescue Savon::SOAPFault => e
|
|
103
|
+
# Allow a configurable number of retries for a 'Data required for operation' error. This is because the
|
|
104
|
+
# symboliser occasionally throw this error when it shouldn't and succeeds on retry. It's not ideal that we have
|
|
105
|
+
# to rely on the fault string, however.
|
|
106
|
+
if attempts < @data_required_error_retries && e.to_hash[:fault][:faultstring] == 'Data required for operation'
|
|
107
|
+
retry
|
|
108
|
+
end
|
|
109
|
+
|
|
110
|
+
raise Symgate::Error.from_savon(e)
|
|
111
|
+
end
|
|
96
112
|
end
|
|
97
113
|
|
|
98
114
|
def raise_error_on_string_response(response, response_type)
|
data/lib/symgate/error.rb
CHANGED
|
@@ -5,7 +5,7 @@ module Symgate
|
|
|
5
5
|
class Error < StandardError
|
|
6
6
|
attr_reader :original_error, :detail
|
|
7
7
|
|
|
8
|
-
# Initialises a symgate error from either a string or a
|
|
8
|
+
# Initialises a symgate error from either a string or a Savon error
|
|
9
9
|
def initialize(message)
|
|
10
10
|
super(message)
|
|
11
11
|
end
|
data/lib/symgate/version.rb
CHANGED
data/symgate-gem.gemspec
CHANGED
|
@@ -8,6 +8,7 @@ Gem::Specification.new do |spec|
|
|
|
8
8
|
spec.authors = ['Simon Detheridge', 'Tim Down', 'Stu Wright']
|
|
9
9
|
spec.email = ['tim@widgit.com']
|
|
10
10
|
spec.license = 'Apache-2.0'
|
|
11
|
+
spec.required_ruby_version = '>= 2.1'
|
|
11
12
|
|
|
12
13
|
spec.summary = "Wrapper around Widgit's Symgate SOAP symboliser"
|
|
13
14
|
spec.homepage = 'https://github.com/symbols-worldwide/symgate-gem'
|
|
@@ -18,10 +19,10 @@ Gem::Specification.new do |spec|
|
|
|
18
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
|
19
20
|
spec.require_paths = ['lib']
|
|
20
21
|
|
|
21
|
-
spec.add_development_dependency 'bundler', '~>
|
|
22
|
+
spec.add_development_dependency 'bundler', '~> 2.2'
|
|
22
23
|
spec.add_development_dependency 'codecov', '~> 0.1.16'
|
|
23
24
|
spec.add_development_dependency 'mysql2', '~> 0.5.3'
|
|
24
|
-
spec.add_development_dependency 'rack', '~>
|
|
25
|
+
spec.add_development_dependency 'rack', '~> 2.2'
|
|
25
26
|
spec.add_development_dependency 'rake', '~> 12.0'
|
|
26
27
|
spec.add_development_dependency 'rspec', '~> 3.9.0'
|
|
27
28
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
|
|
@@ -30,6 +31,6 @@ Gem::Specification.new do |spec|
|
|
|
30
31
|
spec.add_development_dependency 'simplecov', '~> 0.17.0'
|
|
31
32
|
spec.add_development_dependency 'simplecov-teamcity-summary', '~> 1.0.0'
|
|
32
33
|
|
|
33
|
-
spec.add_dependency 'savon', '~> 2.
|
|
34
|
+
spec.add_dependency 'savon', '~> 2.15.1'
|
|
34
35
|
spec.add_dependency 'tryit', '~> 0.0.1'
|
|
35
36
|
end
|
metadata
CHANGED
|
@@ -1,16 +1,16 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: symgate
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.4.
|
|
4
|
+
version: 0.4.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Simon Detheridge
|
|
8
8
|
- Tim Down
|
|
9
9
|
- Stu Wright
|
|
10
|
-
autorequire:
|
|
10
|
+
autorequire:
|
|
11
11
|
bindir: bin
|
|
12
12
|
cert_chain: []
|
|
13
|
-
date:
|
|
13
|
+
date: 2025-12-01 00:00:00.000000000 Z
|
|
14
14
|
dependencies:
|
|
15
15
|
- !ruby/object:Gem::Dependency
|
|
16
16
|
name: bundler
|
|
@@ -18,14 +18,14 @@ dependencies:
|
|
|
18
18
|
requirements:
|
|
19
19
|
- - "~>"
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
|
-
version: '
|
|
21
|
+
version: '2.2'
|
|
22
22
|
type: :development
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
requirements:
|
|
26
26
|
- - "~>"
|
|
27
27
|
- !ruby/object:Gem::Version
|
|
28
|
-
version: '
|
|
28
|
+
version: '2.2'
|
|
29
29
|
- !ruby/object:Gem::Dependency
|
|
30
30
|
name: codecov
|
|
31
31
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -60,14 +60,14 @@ dependencies:
|
|
|
60
60
|
requirements:
|
|
61
61
|
- - "~>"
|
|
62
62
|
- !ruby/object:Gem::Version
|
|
63
|
-
version:
|
|
63
|
+
version: '2.2'
|
|
64
64
|
type: :development
|
|
65
65
|
prerelease: false
|
|
66
66
|
version_requirements: !ruby/object:Gem::Requirement
|
|
67
67
|
requirements:
|
|
68
68
|
- - "~>"
|
|
69
69
|
- !ruby/object:Gem::Version
|
|
70
|
-
version:
|
|
70
|
+
version: '2.2'
|
|
71
71
|
- !ruby/object:Gem::Dependency
|
|
72
72
|
name: rake
|
|
73
73
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -172,14 +172,14 @@ dependencies:
|
|
|
172
172
|
requirements:
|
|
173
173
|
- - "~>"
|
|
174
174
|
- !ruby/object:Gem::Version
|
|
175
|
-
version: 2.
|
|
175
|
+
version: 2.15.1
|
|
176
176
|
type: :runtime
|
|
177
177
|
prerelease: false
|
|
178
178
|
version_requirements: !ruby/object:Gem::Requirement
|
|
179
179
|
requirements:
|
|
180
180
|
- - "~>"
|
|
181
181
|
- !ruby/object:Gem::Version
|
|
182
|
-
version: 2.
|
|
182
|
+
version: 2.15.1
|
|
183
183
|
- !ruby/object:Gem::Dependency
|
|
184
184
|
name: tryit
|
|
185
185
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -194,7 +194,7 @@ dependencies:
|
|
|
194
194
|
- - "~>"
|
|
195
195
|
- !ruby/object:Gem::Version
|
|
196
196
|
version: 0.0.1
|
|
197
|
-
description:
|
|
197
|
+
description:
|
|
198
198
|
email:
|
|
199
199
|
- tim@widgit.com
|
|
200
200
|
executables: []
|
|
@@ -236,7 +236,7 @@ homepage: https://github.com/symbols-worldwide/symgate-gem
|
|
|
236
236
|
licenses:
|
|
237
237
|
- Apache-2.0
|
|
238
238
|
metadata: {}
|
|
239
|
-
post_install_message:
|
|
239
|
+
post_install_message:
|
|
240
240
|
rdoc_options: []
|
|
241
241
|
require_paths:
|
|
242
242
|
- lib
|
|
@@ -244,15 +244,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
|
244
244
|
requirements:
|
|
245
245
|
- - ">="
|
|
246
246
|
- !ruby/object:Gem::Version
|
|
247
|
-
version: '
|
|
247
|
+
version: '2.1'
|
|
248
248
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
249
249
|
requirements:
|
|
250
250
|
- - ">="
|
|
251
251
|
- !ruby/object:Gem::Version
|
|
252
252
|
version: '0'
|
|
253
253
|
requirements: []
|
|
254
|
-
rubygems_version: 3.
|
|
255
|
-
signing_key:
|
|
254
|
+
rubygems_version: 3.3.27
|
|
255
|
+
signing_key:
|
|
256
256
|
specification_version: 4
|
|
257
257
|
summary: Wrapper around Widgit's Symgate SOAP symboliser
|
|
258
258
|
test_files: []
|