symgate 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 +4 -4
- data/.gitignore +1 -0
- data/.rubocop.yml +34 -7
- data/.ruby-version +1 -1
- data/.travis.yml +1 -1
- data/README.md +4 -0
- data/lib/symgate/metadata/client.rb +0 -4
- data/lib/symgate/version.rb +1 -1
- data/lib/symgate/wordlist/client.rb +24 -2
- data/symgate-gem.gemspec +13 -12
- metadata +30 -28
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 23804f86b9de8e1bab9c0384217f0e5f5a3a853d01ddf26acb07d1377bb3c8ba
|
4
|
+
data.tar.gz: 8cb335b86699f2bcf0c32cad06354a1e48aa12a3cfe80a745a369d3e366cc046
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad8da67d0ea94083948a155660f3904c31b19546c243bad8bf3debf64df813ced13f8951bf8c9e7b1310a73ac276ef3fde3f69b4830c78bd99a9931a08b94359
|
7
|
+
data.tar.gz: 8c5da32f7c9105d5d5fa4922dd97c866702d460f43fe97b7446b288fb4d4d76b726fbe57fc3524a03f26dd4e8184dd65e2c6ae46127857a942235b688d8ffd33
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
@@ -6,20 +6,47 @@ AllCops:
|
|
6
6
|
- 'local-mode-cache/**/*'
|
7
7
|
- 'symboliser-vagrant/**/*'
|
8
8
|
|
9
|
+
Style/NumericLiterals:
|
10
|
+
MinDigits: 6
|
11
|
+
|
12
|
+
Style/DoubleNegation:
|
13
|
+
Enabled: false
|
14
|
+
|
15
|
+
Style/HashSyntax:
|
16
|
+
Enabled: false
|
17
|
+
|
18
|
+
Style/DateTime:
|
19
|
+
Enabled: false
|
20
|
+
|
21
|
+
Style/IfUnlessModifier:
|
22
|
+
Enabled: false
|
23
|
+
|
9
24
|
Metrics/LineLength:
|
10
|
-
Max:
|
25
|
+
Max: 120
|
11
26
|
|
12
27
|
Metrics/MethodLength:
|
13
|
-
Max:
|
14
|
-
|
15
|
-
Style/NumericLiterals:
|
16
|
-
MinDigits: 6
|
28
|
+
Max: 20
|
17
29
|
|
18
30
|
Metrics/ClassLength:
|
19
|
-
Max:
|
31
|
+
Max: 2000
|
20
32
|
|
21
33
|
Metrics/BlockLength:
|
22
|
-
Max:
|
34
|
+
Max: 2000
|
35
|
+
|
36
|
+
Metrics/AbcSize:
|
37
|
+
Max: 20
|
38
|
+
|
39
|
+
Metrics/CyclomaticComplexity:
|
40
|
+
Max: 9
|
41
|
+
|
42
|
+
Metrics/PerceivedComplexity:
|
43
|
+
Max: 9
|
44
|
+
|
45
|
+
Metrics/ParameterLists:
|
46
|
+
Max: 9
|
23
47
|
|
24
48
|
Naming/UncommunicativeMethodParamName:
|
25
49
|
MinNameLength: 2
|
50
|
+
|
51
|
+
Naming/AccessorMethodName:
|
52
|
+
Enabled: false
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.5
|
data/.travis.yml
CHANGED
data/README.md
CHANGED
@@ -131,6 +131,10 @@ To shut down and destroy the VM completely, run `rake vagrant:destroy`
|
|
131
131
|
|
132
132
|
Note that you need access to the Widgit CI server for this to work.
|
133
133
|
|
134
|
+
Alternatively, in the highly unlikely event that the Vagrant stuff doesn't work, you can run the tests against some
|
135
|
+
other running symboliser by copying `test/config/local.example.yml` to `test/config/local.yml` and editing `local.yml`
|
136
|
+
to include the particulars of your symboliser endpoint, database and WSDL.
|
137
|
+
|
134
138
|
## License
|
135
139
|
|
136
140
|
This project is licensed under the Apache License 2.0.
|
@@ -2,8 +2,6 @@ require 'symgate/client'
|
|
2
2
|
require 'symgate/error'
|
3
3
|
require 'symgate/metadata/data_item'
|
4
4
|
|
5
|
-
# rubocop:disable Naming/AccessorMethodName
|
6
|
-
|
7
5
|
module Symgate
|
8
6
|
module Metadata
|
9
7
|
# client for the Symgate metadata system
|
@@ -70,5 +68,3 @@ module Symgate
|
|
70
68
|
end
|
71
69
|
end
|
72
70
|
end
|
73
|
-
|
74
|
-
# rubocop:enable Naming/AccessorMethodName
|
data/lib/symgate/version.rb
CHANGED
@@ -37,8 +37,8 @@ module Symgate
|
|
37
37
|
)
|
38
38
|
rescue Symgate::Error => e
|
39
39
|
# Handle SOS-105 (sometimes the wordlist is created but the symboliser claims it can't
|
40
|
-
# find it and sends a SOAP error back) by
|
41
|
-
# Yes, this is not nice.
|
40
|
+
# find it and sends a SOAP error back) by extracting the wordlist UUID from the error
|
41
|
+
# message. Yes, this is not nice.
|
42
42
|
match = /^No wordlist found for ID: ({[0-9a-f-]{36}})$/.match(e.detail)
|
43
43
|
|
44
44
|
return get_wordlist_info(match[1]) if match
|
@@ -67,6 +67,28 @@ module Symgate
|
|
67
67
|
)
|
68
68
|
end
|
69
69
|
|
70
|
+
# Copies a wordlist with the specified UUID with optional parameters to specify the destination wordlist UUID, the
|
71
|
+
# context, name and readonlyness of the destination wordlist, source and destination group and/or user
|
72
|
+
def copy_wordlist(src_uuid, dest_uuid: nil, context: nil, name: nil, readonly: nil,
|
73
|
+
src_group: nil, src_user: nil, dest_group: nil, dest_user: nil)
|
74
|
+
response = savon_request(:copy_wordlist) do |soap|
|
75
|
+
params = { srcwordlistuuid: src_uuid }
|
76
|
+
params[:dstwordlistuuid] = dest_uuid unless dest_uuid.nil?
|
77
|
+
params[:context] = context unless context.nil?
|
78
|
+
params[:name] = name unless name.nil?
|
79
|
+
params[:readonly] = readonly unless readonly.nil?
|
80
|
+
params[:srcgroup] = src_group unless src_group.nil?
|
81
|
+
params[:srcusername] = src_user unless src_user.nil?
|
82
|
+
params[:dstgroup] = dest_group unless dest_group.nil?
|
83
|
+
params[:dstusername] = dest_user unless dest_user.nil?
|
84
|
+
soap.message(params)
|
85
|
+
end
|
86
|
+
|
87
|
+
Symgate::Wordlist::Info.from_soap(
|
88
|
+
response.body[:copy_wordlist_response][:wordlistinfo]
|
89
|
+
)
|
90
|
+
end
|
91
|
+
|
70
92
|
# returns all wordlist entries for the wordlist specified by uuid.
|
71
93
|
# accepts the following optional parameters:
|
72
94
|
# attachments (boolean) - fetch custom graphics for the entries (default: false)
|
data/symgate-gem.gemspec
CHANGED
@@ -5,8 +5,9 @@ require 'symgate'
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
6
|
spec.name = 'symgate'
|
7
7
|
spec.version = Symgate::VERSION
|
8
|
-
spec.authors = ['Simon Detheridge']
|
9
|
-
spec.email = ['
|
8
|
+
spec.authors = ['Simon Detheridge', 'Tim Down', 'Stu Wright']
|
9
|
+
spec.email = ['tim@widgit.com']
|
10
|
+
spec.license = 'Apache-2.0'
|
10
11
|
|
11
12
|
spec.summary = "Wrapper around Widgit's Symgate SOAP symboliser"
|
12
13
|
spec.homepage = 'https://github.com/symbols-worldwide/symgate-gem'
|
@@ -18,17 +19,17 @@ Gem::Specification.new do |spec|
|
|
18
19
|
spec.require_paths = ['lib']
|
19
20
|
|
20
21
|
spec.add_development_dependency 'bundler', '~> 1.9'
|
21
|
-
spec.add_development_dependency 'codecov'
|
22
|
-
spec.add_development_dependency 'mysql2', '~> 0.
|
23
|
-
spec.add_development_dependency 'rack', '~> 1.6.
|
24
|
-
spec.add_development_dependency 'rake', '~>
|
25
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
26
|
-
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.
|
22
|
+
spec.add_development_dependency 'codecov', '~> 0.1.16'
|
23
|
+
spec.add_development_dependency 'mysql2', '~> 0.5.3'
|
24
|
+
spec.add_development_dependency 'rack', '~> 1.6.11'
|
25
|
+
spec.add_development_dependency 'rake', '~> 12.0'
|
26
|
+
spec.add_development_dependency 'rspec', '~> 3.9.0'
|
27
|
+
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.4.1'
|
27
28
|
spec.add_development_dependency 'rubocop', '~> 0.57.0'
|
28
|
-
spec.add_development_dependency 'rubocop-junit-formatter', '~> 0.1.
|
29
|
-
spec.add_development_dependency 'simplecov', '~> 0.
|
30
|
-
spec.add_development_dependency 'simplecov-teamcity-summary', '~> 0.
|
29
|
+
spec.add_development_dependency 'rubocop-junit-formatter', '~> 0.1.4'
|
30
|
+
spec.add_development_dependency 'simplecov', '~> 0.17.0'
|
31
|
+
spec.add_development_dependency 'simplecov-teamcity-summary', '~> 1.0.0'
|
31
32
|
|
32
|
-
spec.add_dependency 'savon', '~> 2.
|
33
|
+
spec.add_dependency 'savon', '~> 2.12.0'
|
33
34
|
spec.add_dependency 'tryit', '~> 0.0.1'
|
34
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,16 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symgate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Detheridge
|
8
|
+
- Tim Down
|
9
|
+
- Stu Wright
|
8
10
|
autorequire:
|
9
11
|
bindir: bin
|
10
12
|
cert_chain: []
|
11
|
-
date: 2019-
|
13
|
+
date: 2019-12-13 00:00:00.000000000 Z
|
12
14
|
dependencies:
|
13
15
|
- !ruby/object:Gem::Dependency
|
14
16
|
name: bundler
|
@@ -28,86 +30,86 @@ dependencies:
|
|
28
30
|
name: codecov
|
29
31
|
requirement: !ruby/object:Gem::Requirement
|
30
32
|
requirements:
|
31
|
-
- - "
|
33
|
+
- - "~>"
|
32
34
|
- !ruby/object:Gem::Version
|
33
|
-
version:
|
35
|
+
version: 0.1.16
|
34
36
|
type: :development
|
35
37
|
prerelease: false
|
36
38
|
version_requirements: !ruby/object:Gem::Requirement
|
37
39
|
requirements:
|
38
|
-
- - "
|
40
|
+
- - "~>"
|
39
41
|
- !ruby/object:Gem::Version
|
40
|
-
version:
|
42
|
+
version: 0.1.16
|
41
43
|
- !ruby/object:Gem::Dependency
|
42
44
|
name: mysql2
|
43
45
|
requirement: !ruby/object:Gem::Requirement
|
44
46
|
requirements:
|
45
47
|
- - "~>"
|
46
48
|
- !ruby/object:Gem::Version
|
47
|
-
version: 0.
|
49
|
+
version: 0.5.3
|
48
50
|
type: :development
|
49
51
|
prerelease: false
|
50
52
|
version_requirements: !ruby/object:Gem::Requirement
|
51
53
|
requirements:
|
52
54
|
- - "~>"
|
53
55
|
- !ruby/object:Gem::Version
|
54
|
-
version: 0.
|
56
|
+
version: 0.5.3
|
55
57
|
- !ruby/object:Gem::Dependency
|
56
58
|
name: rack
|
57
59
|
requirement: !ruby/object:Gem::Requirement
|
58
60
|
requirements:
|
59
61
|
- - "~>"
|
60
62
|
- !ruby/object:Gem::Version
|
61
|
-
version: 1.6.
|
63
|
+
version: 1.6.11
|
62
64
|
type: :development
|
63
65
|
prerelease: false
|
64
66
|
version_requirements: !ruby/object:Gem::Requirement
|
65
67
|
requirements:
|
66
68
|
- - "~>"
|
67
69
|
- !ruby/object:Gem::Version
|
68
|
-
version: 1.6.
|
70
|
+
version: 1.6.11
|
69
71
|
- !ruby/object:Gem::Dependency
|
70
72
|
name: rake
|
71
73
|
requirement: !ruby/object:Gem::Requirement
|
72
74
|
requirements:
|
73
75
|
- - "~>"
|
74
76
|
- !ruby/object:Gem::Version
|
75
|
-
version: '
|
77
|
+
version: '12.0'
|
76
78
|
type: :development
|
77
79
|
prerelease: false
|
78
80
|
version_requirements: !ruby/object:Gem::Requirement
|
79
81
|
requirements:
|
80
82
|
- - "~>"
|
81
83
|
- !ruby/object:Gem::Version
|
82
|
-
version: '
|
84
|
+
version: '12.0'
|
83
85
|
- !ruby/object:Gem::Dependency
|
84
86
|
name: rspec
|
85
87
|
requirement: !ruby/object:Gem::Requirement
|
86
88
|
requirements:
|
87
89
|
- - "~>"
|
88
90
|
- !ruby/object:Gem::Version
|
89
|
-
version: 3.
|
91
|
+
version: 3.9.0
|
90
92
|
type: :development
|
91
93
|
prerelease: false
|
92
94
|
version_requirements: !ruby/object:Gem::Requirement
|
93
95
|
requirements:
|
94
96
|
- - "~>"
|
95
97
|
- !ruby/object:Gem::Version
|
96
|
-
version: 3.
|
98
|
+
version: 3.9.0
|
97
99
|
- !ruby/object:Gem::Dependency
|
98
100
|
name: rspec_junit_formatter
|
99
101
|
requirement: !ruby/object:Gem::Requirement
|
100
102
|
requirements:
|
101
103
|
- - "~>"
|
102
104
|
- !ruby/object:Gem::Version
|
103
|
-
version: 0.
|
105
|
+
version: 0.4.1
|
104
106
|
type: :development
|
105
107
|
prerelease: false
|
106
108
|
version_requirements: !ruby/object:Gem::Requirement
|
107
109
|
requirements:
|
108
110
|
- - "~>"
|
109
111
|
- !ruby/object:Gem::Version
|
110
|
-
version: 0.
|
112
|
+
version: 0.4.1
|
111
113
|
- !ruby/object:Gem::Dependency
|
112
114
|
name: rubocop
|
113
115
|
requirement: !ruby/object:Gem::Requirement
|
@@ -128,56 +130,56 @@ dependencies:
|
|
128
130
|
requirements:
|
129
131
|
- - "~>"
|
130
132
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.1.
|
133
|
+
version: 0.1.4
|
132
134
|
type: :development
|
133
135
|
prerelease: false
|
134
136
|
version_requirements: !ruby/object:Gem::Requirement
|
135
137
|
requirements:
|
136
138
|
- - "~>"
|
137
139
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.1.
|
140
|
+
version: 0.1.4
|
139
141
|
- !ruby/object:Gem::Dependency
|
140
142
|
name: simplecov
|
141
143
|
requirement: !ruby/object:Gem::Requirement
|
142
144
|
requirements:
|
143
145
|
- - "~>"
|
144
146
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
147
|
+
version: 0.17.0
|
146
148
|
type: :development
|
147
149
|
prerelease: false
|
148
150
|
version_requirements: !ruby/object:Gem::Requirement
|
149
151
|
requirements:
|
150
152
|
- - "~>"
|
151
153
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
154
|
+
version: 0.17.0
|
153
155
|
- !ruby/object:Gem::Dependency
|
154
156
|
name: simplecov-teamcity-summary
|
155
157
|
requirement: !ruby/object:Gem::Requirement
|
156
158
|
requirements:
|
157
159
|
- - "~>"
|
158
160
|
- !ruby/object:Gem::Version
|
159
|
-
version: 0.
|
161
|
+
version: 1.0.0
|
160
162
|
type: :development
|
161
163
|
prerelease: false
|
162
164
|
version_requirements: !ruby/object:Gem::Requirement
|
163
165
|
requirements:
|
164
166
|
- - "~>"
|
165
167
|
- !ruby/object:Gem::Version
|
166
|
-
version: 0.
|
168
|
+
version: 1.0.0
|
167
169
|
- !ruby/object:Gem::Dependency
|
168
170
|
name: savon
|
169
171
|
requirement: !ruby/object:Gem::Requirement
|
170
172
|
requirements:
|
171
173
|
- - "~>"
|
172
174
|
- !ruby/object:Gem::Version
|
173
|
-
version: 2.
|
175
|
+
version: 2.12.0
|
174
176
|
type: :runtime
|
175
177
|
prerelease: false
|
176
178
|
version_requirements: !ruby/object:Gem::Requirement
|
177
179
|
requirements:
|
178
180
|
- - "~>"
|
179
181
|
- !ruby/object:Gem::Version
|
180
|
-
version: 2.
|
182
|
+
version: 2.12.0
|
181
183
|
- !ruby/object:Gem::Dependency
|
182
184
|
name: tryit
|
183
185
|
requirement: !ruby/object:Gem::Requirement
|
@@ -194,7 +196,7 @@ dependencies:
|
|
194
196
|
version: 0.0.1
|
195
197
|
description:
|
196
198
|
email:
|
197
|
-
-
|
199
|
+
- tim@widgit.com
|
198
200
|
executables: []
|
199
201
|
extensions: []
|
200
202
|
extra_rdoc_files: []
|
@@ -231,7 +233,8 @@ files:
|
|
231
233
|
- lib/symgate/wordlist/info.rb
|
232
234
|
- symgate-gem.gemspec
|
233
235
|
homepage: https://github.com/symbols-worldwide/symgate-gem
|
234
|
-
licenses:
|
236
|
+
licenses:
|
237
|
+
- Apache-2.0
|
235
238
|
metadata: {}
|
236
239
|
post_install_message:
|
237
240
|
rdoc_options: []
|
@@ -248,8 +251,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
248
251
|
- !ruby/object:Gem::Version
|
249
252
|
version: '0'
|
250
253
|
requirements: []
|
251
|
-
|
252
|
-
rubygems_version: 2.7.8
|
254
|
+
rubygems_version: 3.0.3
|
253
255
|
signing_key:
|
254
256
|
specification_version: 4
|
255
257
|
summary: Wrapper around Widgit's Symgate SOAP symboliser
|