symgate 0.2.1 → 0.2.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +9 -0
- data/Rakefile +6 -4
- data/lib/symgate/auth/user.rb +1 -1
- data/lib/symgate/client.rb +10 -14
- data/lib/symgate/cml/symbol.rb +1 -1
- data/lib/symgate/error.rb +1 -1
- data/lib/symgate/metadata/client.rb +4 -2
- data/lib/symgate/metadata/data_item.rb +1 -1
- data/lib/symgate/namespaces.rb +5 -5
- data/lib/symgate/version.rb +1 -1
- data/lib/symgate/wordlist/client.rb +4 -3
- data/lib/symgate/wordlist/entry.rb +1 -1
- data/lib/symgate/wordlist/graphic_attachment.rb +1 -1
- data/lib/symgate/wordlist/info.rb +1 -1
- data/symgate-gem.gemspec +6 -7
- metadata +36 -36
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ff7740ff5f9152bd4f3cb84514f5eef0321dcd83
|
4
|
+
data.tar.gz: c448385487c3563ec1c8ca38c8ed9f24ccd48caf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: cf1198a9ffa373baf1c06c9ab1dfbb331919124d85fc223534add2b758178224363688d6cb58e90e6c66bf6b4164048e2e6a8db94cadd4705068433234b71f69
|
7
|
+
data.tar.gz: 672fac7436ee70a62e0587e8be9aec6c3e9d51ff17105a18a24402192111abba7a41ea30ecbdd63bdacd79eb283eb114c838c6479020160d1eec4f98ea9a4fae
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
## 0.2.3 (2018-10-23)
|
2
|
+
|
3
|
+
Fix for invalid SOAP XML due to duplicate attributes (issue #3)
|
4
|
+
|
5
|
+
## 0.2.2 (2017-05-17)
|
6
|
+
|
7
|
+
Require wordlist entry class in wordlist client so that get_wordlist_entries method works without
|
8
|
+
requiring wordlist entry class separately
|
9
|
+
|
1
10
|
## 0.2.1 (2016-09-13)
|
2
11
|
|
3
12
|
Updated hash syntax to be compatible with Ruby 2.1 in tests
|
data/Rakefile
CHANGED
@@ -24,7 +24,7 @@ begin
|
|
24
24
|
spec.pattern = 'test/integration/**/*_spec.rb'
|
25
25
|
end
|
26
26
|
rescue LoadError
|
27
|
-
$stderr.
|
27
|
+
$stderr.warn 'Unable to find rspec gem'
|
28
28
|
end
|
29
29
|
|
30
30
|
desc 'Runs the rubocop linting tool'
|
@@ -33,7 +33,7 @@ task :rubocop do
|
|
33
33
|
end
|
34
34
|
|
35
35
|
desc 'Run all tests'
|
36
|
-
task test: [
|
36
|
+
task test: %i[rubocop spec]
|
37
37
|
|
38
38
|
namespace :teamcity do
|
39
39
|
desc 'Runs rubocop with junit output'
|
@@ -55,10 +55,10 @@ namespace :teamcity do
|
|
55
55
|
task :test do
|
56
56
|
first_exception = nil
|
57
57
|
|
58
|
-
%w
|
58
|
+
%w[teamcity:rubocop
|
59
59
|
teamcity:spec
|
60
60
|
teamcity:zip_coverage
|
61
|
-
teamcity:spec:integration
|
61
|
+
teamcity:spec:integration].each do |task_name|
|
62
62
|
begin
|
63
63
|
Rake::Task[task_name].invoke
|
64
64
|
rescue Exception => e
|
@@ -98,3 +98,5 @@ namespace :vagrant do
|
|
98
98
|
chdir: 'symboliser-vagrant'
|
99
99
|
end
|
100
100
|
end
|
101
|
+
|
102
|
+
# rubocop:enable Lint/RescueException
|
data/lib/symgate/auth/user.rb
CHANGED
data/lib/symgate/client.rb
CHANGED
@@ -52,9 +52,8 @@ module Symgate
|
|
52
52
|
end
|
53
53
|
|
54
54
|
def validate_is_passwordy
|
55
|
-
|
56
|
-
|
57
|
-
end
|
55
|
+
raise Symgate::Error, 'You must supply one of key, password or token' unless
|
56
|
+
[@key, @password, @token].one?
|
58
57
|
end
|
59
58
|
|
60
59
|
def create_savon_client
|
@@ -102,21 +101,18 @@ module Symgate
|
|
102
101
|
end
|
103
102
|
|
104
103
|
def arrayize_option(singular, plural, opts)
|
105
|
-
|
106
|
-
|
107
|
-
|
108
|
-
end
|
104
|
+
return unless opts.include? singular # else nothing to do
|
105
|
+
raise Symgate::Error, "Options can't include both #{singular} and #{plural}" if
|
106
|
+
opts.include? plural
|
109
107
|
|
110
|
-
|
111
|
-
|
112
|
-
end
|
108
|
+
opts[plural] = [opts[singular]]
|
109
|
+
opts.delete(singular)
|
113
110
|
end
|
114
111
|
|
115
112
|
def check_option_is_array_of(classname, key, opts)
|
116
|
-
|
117
|
-
|
118
|
-
|
119
|
-
end
|
113
|
+
return unless opts.include? key
|
114
|
+
raise Symgate::Error, "#{key} must be an array" unless opts[key].is_a? Array
|
115
|
+
check_array_for_type(opts[key], classname)
|
120
116
|
end
|
121
117
|
|
122
118
|
def check_for_unknown_opts(keys, opts)
|
data/lib/symgate/cml/symbol.rb
CHANGED
data/lib/symgate/error.rb
CHANGED
@@ -2,7 +2,7 @@ require 'symgate/client'
|
|
2
2
|
require 'symgate/error'
|
3
3
|
require 'symgate/metadata/data_item'
|
4
4
|
|
5
|
-
# rubocop:disable
|
5
|
+
# rubocop:disable Naming/AccessorMethodName
|
6
6
|
|
7
7
|
module Symgate
|
8
8
|
module Metadata
|
@@ -65,8 +65,10 @@ module Symgate
|
|
65
65
|
def parse_get_metadata_opts(opts)
|
66
66
|
arrayize_option(:key, :keys, opts)
|
67
67
|
check_option_is_array_of(String, :keys, opts)
|
68
|
-
check_for_unknown_opts(%i
|
68
|
+
check_for_unknown_opts(%i[keys scope], opts)
|
69
69
|
end
|
70
70
|
end
|
71
71
|
end
|
72
72
|
end
|
73
|
+
|
74
|
+
# rubocop:enable Naming/AccessorMethodName
|
data/lib/symgate/namespaces.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
module Symgate
|
2
2
|
NAMESPACES = {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
'xmlns:auth' => 'http://ws.widgit.com/schema/auth/1.2',
|
4
|
+
'xmlns:wl' => 'http://ws.widgit.com/schema/wordlist/1.2',
|
5
|
+
'xmlns:cml' => 'http://ws.widgit.com/schema/cml/2.0',
|
6
|
+
'xmlns:gt' => 'http://ws.widgit.com/schema/globaltypes/1.2',
|
7
|
+
'xmlns:symboliser' => 'http://ws.widgit.com/schema/symboliser/1.2'
|
8
8
|
}.freeze
|
9
9
|
end
|
data/lib/symgate/version.rb
CHANGED
@@ -2,6 +2,7 @@ require 'base64'
|
|
2
2
|
require 'symgate/client'
|
3
3
|
require 'symgate/error'
|
4
4
|
require 'symgate/wordlist/info'
|
5
|
+
require 'symgate/wordlist/entry'
|
5
6
|
|
6
7
|
module Symgate
|
7
8
|
module Wordlist
|
@@ -11,7 +12,7 @@ module Symgate
|
|
11
12
|
# optionally, supply one or more wordlist contexts as a string or string array parameter
|
12
13
|
# to only retrieve wordlist information about that context. e.g.:
|
13
14
|
# enumerate_wordlists('User')
|
14
|
-
# enumerate_wordlists(%w
|
15
|
+
# enumerate_wordlists(%w[Topic SymbolSet])
|
15
16
|
def enumerate_wordlists(context = [])
|
16
17
|
response = savon_request(:enumerate_wordlists) do |soap|
|
17
18
|
soap.message(context: [context].flatten)
|
@@ -72,8 +73,8 @@ module Symgate
|
|
72
73
|
# match (string) - only return wordlist entries matching this word
|
73
74
|
# entry (string, uuid) - return the entry specified by the uuid
|
74
75
|
def get_wordlist_entries(uuid, opts = {})
|
75
|
-
check_for_unknown_opts(%i
|
76
|
-
check_for_multiple_opts(%i
|
76
|
+
check_for_unknown_opts(%i[match entry attachments], opts)
|
77
|
+
check_for_multiple_opts(%i[match entry], opts)
|
77
78
|
|
78
79
|
response = savon_request(:get_wordlist_entries) do |soap|
|
79
80
|
soap.message(wordlistid: uuid, getattachments: opts[:attachments])
|
data/symgate-gem.gemspec
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
1
|
+
lib = File.expand_path('lib', __dir__)
|
3
2
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
3
|
require 'symgate'
|
5
4
|
|
@@ -19,16 +18,16 @@ Gem::Specification.new do |spec|
|
|
19
18
|
spec.require_paths = ['lib']
|
20
19
|
|
21
20
|
spec.add_development_dependency 'bundler', '~> 1.9'
|
21
|
+
spec.add_development_dependency 'codecov'
|
22
|
+
spec.add_development_dependency 'mysql2', '~> 0.4.1'
|
23
|
+
spec.add_development_dependency 'rack', '~> 1.6.4'
|
22
24
|
spec.add_development_dependency 'rake', '~> 10.0'
|
23
|
-
spec.add_development_dependency 'rspec', '~> 3.
|
24
|
-
spec.add_development_dependency 'rubocop', '~> 0.41.1'
|
25
|
+
spec.add_development_dependency 'rspec', '~> 3.8.0'
|
25
26
|
spec.add_development_dependency 'rspec_junit_formatter', '~> 0.2.3'
|
27
|
+
spec.add_development_dependency 'rubocop', '~> 0.57.0'
|
26
28
|
spec.add_development_dependency 'rubocop-junit-formatter', '~> 0.1.3'
|
27
|
-
spec.add_development_dependency 'rack', '~> 1.6.4'
|
28
|
-
spec.add_development_dependency 'mysql2', '~> 0.4.1'
|
29
29
|
spec.add_development_dependency 'simplecov', '~> 0.12.0'
|
30
30
|
spec.add_development_dependency 'simplecov-teamcity-summary', '~> 0.1.2'
|
31
|
-
spec.add_development_dependency 'codecov'
|
32
31
|
|
33
32
|
spec.add_dependency 'savon', '~> 2.11.0'
|
34
33
|
spec.add_dependency 'tryit', '~> 0.0.1'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symgate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Simon Detheridge
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-10-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -25,145 +25,145 @@ dependencies:
|
|
25
25
|
- !ruby/object:Gem::Version
|
26
26
|
version: '1.9'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
|
-
name:
|
28
|
+
name: codecov
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
|
-
- - "
|
31
|
+
- - ">="
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
|
-
- - "
|
38
|
+
- - ">="
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
|
-
name:
|
42
|
+
name: mysql2
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version:
|
47
|
+
version: 0.4.1
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version:
|
54
|
+
version: 0.4.1
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
|
-
name:
|
56
|
+
name: rack
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version:
|
61
|
+
version: 1.6.4
|
62
62
|
type: :development
|
63
63
|
prerelease: false
|
64
64
|
version_requirements: !ruby/object:Gem::Requirement
|
65
65
|
requirements:
|
66
66
|
- - "~>"
|
67
67
|
- !ruby/object:Gem::Version
|
68
|
-
version:
|
68
|
+
version: 1.6.4
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: rake
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - "~>"
|
74
74
|
- !ruby/object:Gem::Version
|
75
|
-
version: 0
|
75
|
+
version: '10.0'
|
76
76
|
type: :development
|
77
77
|
prerelease: false
|
78
78
|
version_requirements: !ruby/object:Gem::Requirement
|
79
79
|
requirements:
|
80
80
|
- - "~>"
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version: 0
|
82
|
+
version: '10.0'
|
83
83
|
- !ruby/object:Gem::Dependency
|
84
|
-
name:
|
84
|
+
name: rspec
|
85
85
|
requirement: !ruby/object:Gem::Requirement
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version:
|
89
|
+
version: 3.8.0
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version:
|
96
|
+
version: 3.8.0
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
|
-
name:
|
98
|
+
name: rspec_junit_formatter
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|
100
100
|
requirements:
|
101
101
|
- - "~>"
|
102
102
|
- !ruby/object:Gem::Version
|
103
|
-
version:
|
103
|
+
version: 0.2.3
|
104
104
|
type: :development
|
105
105
|
prerelease: false
|
106
106
|
version_requirements: !ruby/object:Gem::Requirement
|
107
107
|
requirements:
|
108
108
|
- - "~>"
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
version:
|
110
|
+
version: 0.2.3
|
111
111
|
- !ruby/object:Gem::Dependency
|
112
|
-
name:
|
112
|
+
name: rubocop
|
113
113
|
requirement: !ruby/object:Gem::Requirement
|
114
114
|
requirements:
|
115
115
|
- - "~>"
|
116
116
|
- !ruby/object:Gem::Version
|
117
|
-
version: 0.
|
117
|
+
version: 0.57.0
|
118
118
|
type: :development
|
119
119
|
prerelease: false
|
120
120
|
version_requirements: !ruby/object:Gem::Requirement
|
121
121
|
requirements:
|
122
122
|
- - "~>"
|
123
123
|
- !ruby/object:Gem::Version
|
124
|
-
version: 0.
|
124
|
+
version: 0.57.0
|
125
125
|
- !ruby/object:Gem::Dependency
|
126
|
-
name:
|
126
|
+
name: rubocop-junit-formatter
|
127
127
|
requirement: !ruby/object:Gem::Requirement
|
128
128
|
requirements:
|
129
129
|
- - "~>"
|
130
130
|
- !ruby/object:Gem::Version
|
131
|
-
version: 0.
|
131
|
+
version: 0.1.3
|
132
132
|
type: :development
|
133
133
|
prerelease: false
|
134
134
|
version_requirements: !ruby/object:Gem::Requirement
|
135
135
|
requirements:
|
136
136
|
- - "~>"
|
137
137
|
- !ruby/object:Gem::Version
|
138
|
-
version: 0.
|
138
|
+
version: 0.1.3
|
139
139
|
- !ruby/object:Gem::Dependency
|
140
|
-
name: simplecov
|
140
|
+
name: simplecov
|
141
141
|
requirement: !ruby/object:Gem::Requirement
|
142
142
|
requirements:
|
143
143
|
- - "~>"
|
144
144
|
- !ruby/object:Gem::Version
|
145
|
-
version: 0.
|
145
|
+
version: 0.12.0
|
146
146
|
type: :development
|
147
147
|
prerelease: false
|
148
148
|
version_requirements: !ruby/object:Gem::Requirement
|
149
149
|
requirements:
|
150
150
|
- - "~>"
|
151
151
|
- !ruby/object:Gem::Version
|
152
|
-
version: 0.
|
152
|
+
version: 0.12.0
|
153
153
|
- !ruby/object:Gem::Dependency
|
154
|
-
name:
|
154
|
+
name: simplecov-teamcity-summary
|
155
155
|
requirement: !ruby/object:Gem::Requirement
|
156
156
|
requirements:
|
157
|
-
- - "
|
157
|
+
- - "~>"
|
158
158
|
- !ruby/object:Gem::Version
|
159
|
-
version:
|
159
|
+
version: 0.1.2
|
160
160
|
type: :development
|
161
161
|
prerelease: false
|
162
162
|
version_requirements: !ruby/object:Gem::Requirement
|
163
163
|
requirements:
|
164
|
-
- - "
|
164
|
+
- - "~>"
|
165
165
|
- !ruby/object:Gem::Version
|
166
|
-
version:
|
166
|
+
version: 0.1.2
|
167
167
|
- !ruby/object:Gem::Dependency
|
168
168
|
name: savon
|
169
169
|
requirement: !ruby/object:Gem::Requirement
|