symgate 0.2.4 → 0.3.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: d3bc2e286aa8d3b0c290824c2e111a6f352f613a
4
- data.tar.gz: 9c824ccaf6cbd0e023f4379b5e08435ba974410a
2
+ SHA256:
3
+ metadata.gz: 727f42f6f50972cadae6e1228d7f1405beae00f8d04dba7b710349fce240804d
4
+ data.tar.gz: 6bbc516ec77ab2b3592d46d863ff5eb4bfe90963942806d710135b1217874cd5
5
5
  SHA512:
6
- metadata.gz: 948217c98271b10f8128ab5171a44ceba95bfc25f8d7f75d0448eb82d7766072a19b344f28935bca71a83063fba8b8142d60e1cf75bdaf632e9ba9e4b3d64e4e
7
- data.tar.gz: ac4e485c6db9baccb0262989fcd965b0f4657ff7886f8188c85b02794b4de2f3b95c82a0ecee99053a1486095a31e271defc3d2badf5dbf459b6450206a9d61f
6
+ metadata.gz: 063d649704d23a8705126fef07fd9074eeaeb86ad4ebc21edc12511aac639a1450f9ef363ab658b1093a55ed71bd14490618024334eac4c4ee35fd31253e438e
7
+ data.tar.gz: 1b7867acfb437462743110aea54ad8da2db7443c66d9e6abca2ec008f8333957df2363c0e804bdb0ab1db024a08f7364db1c62fcf68713d17b9fc707a826a014
@@ -1,3 +1,3 @@
1
1
  module Symgate
2
- VERSION = '0.2.4'.freeze
2
+ VERSION = '0.3.0'.freeze
3
3
  end
@@ -27,12 +27,12 @@ module Symgate
27
27
 
28
28
  # creates a wordlist with the specified name, context and scope (see auth:scope).
29
29
  # optionally, supply a list of entries to form the wordlist's initial content
30
- def create_wordlist(name, context, entries = [])
30
+ def create_wordlist(name, context, entries = [], readonly: false)
31
31
  tries ||= 3 # TODO: Find out if we still need to do this!
32
32
 
33
33
  Symgate::Wordlist::Info.from_soap(
34
34
  savon_request(:create_wordlist) do |soap|
35
- soap.message(soap_params_for_create_wordlist(name, context, entries))
35
+ soap.message(soap_params_for_create_wordlist(name, context, readonly, entries))
36
36
  end.body[:create_wordlist_response][:wordlistinfo]
37
37
  )
38
38
  rescue Symgate::Error => e
@@ -132,11 +132,12 @@ module Symgate
132
132
 
133
133
  # creates a wordlist from the supplied cfwl data, in the requested context
134
134
  # if 'preserve_uuid' is true, the new wordlist will have the same uuid as the file
135
- def create_wordlist_from_cfwl_data(raw_cfwl_data, context, preserve_uuid)
135
+ def create_wordlist_from_cfwl_data(raw_cfwl_data, context, preserve_uuid, readonly: false)
136
136
  savon_request(:create_wordlist_from_cfwl_data) do |soap|
137
137
  soap.message(cfwl: Base64.encode64(raw_cfwl_data),
138
138
  context: context,
139
- preserve_uuid: preserve_uuid)
139
+ preserve_uuid: preserve_uuid,
140
+ readonly: readonly)
140
141
  end.body[:create_wordlist_from_cfwl_data_response][:uuid]
141
142
  end
142
143
 
@@ -153,11 +154,12 @@ module Symgate
153
154
  end
154
155
  end
155
156
 
156
- def soap_params_for_create_wordlist(name, context, entries)
157
+ def soap_params_for_create_wordlist(name, context, readonly, entries)
157
158
  {
158
159
  name: name,
159
160
  context: context,
160
- scope: scope_for_context(context)
161
+ scope: scope_for_context(context),
162
+ readonly: readonly
161
163
  }.merge(
162
164
  entries ? { %s(wl:wordlistentry) => entries.map(&:to_soap) } : {}
163
165
  )
@@ -11,6 +11,7 @@ module Symgate
11
11
  uuid: hash_value_with_optional_namespace(:wl, :uuid, hash),
12
12
  engine: hash_value_with_optional_namespace(:wl, :engine, hash),
13
13
  scope: hash_value_with_optional_namespace(:wl, :scope, hash),
14
+ readonly: hash_value_with_optional_namespace(:wl, :readonly, hash),
14
15
  entry_count: hash_value_with_optional_namespace(:wl, :entrycount, hash).to_i,
15
16
  last_change: hash_value_with_optional_namespace(:wl, :lastchange, hash)
16
17
  )
@@ -23,7 +24,7 @@ module Symgate
23
24
  protected
24
25
 
25
26
  def attributes
26
- %i[name context uuid entry_count last_change engine scope]
27
+ %i[name context uuid entry_count last_change engine scope readonly]
27
28
  end
28
29
  end
29
30
  end
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
4
+ version: 0.3.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Detheridge
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-10-25 00:00:00.000000000 Z
11
+ date: 2019-07-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -249,7 +249,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
249
249
  version: '0'
250
250
  requirements: []
251
251
  rubyforge_project:
252
- rubygems_version: 2.4.6
252
+ rubygems_version: 2.7.8
253
253
  signing_key:
254
254
  specification_version: 4
255
255
  summary: Wrapper around Widgit's Symgate SOAP symboliser