identikey 0.5.1 → 0.5.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/lib/identikey/administration.rb +37 -16
- data/lib/identikey/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39bb043b3ece2e37fc84ec06bb4f83b88be7af8391fb2061bee01d64fc9f0464
|
4
|
+
data.tar.gz: 94114e6c78ce9572c80b415be3a27bb39e17eb57e978fcb1a446da4a63fc1d00
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 43194c6c964d57d6565ccd01d5b714ad4f61ae9658d24c3798b240715b543e67378f1e44ade48c3d76af245072bb7704399b80763934a4a8141b444806288b76
|
7
|
+
data.tar.gz: 3aa8e78fc6d9b07b1d308b28cfaa4da4ede847dd33af3311a2db2f699ed9521720ec5d88485286be66f2c71aaf4f6b0bc276fd92b32e7e4df976064fb9ca9a83
|
@@ -61,12 +61,7 @@ module Identikey
|
|
61
61
|
# `log:` keyword is set to false.
|
62
62
|
#
|
63
63
|
def ping(session_id:, log:)
|
64
|
-
|
65
|
-
client.globals[:log] = log
|
66
|
-
|
67
|
-
sessionalive(session_id: session_id)
|
68
|
-
ensure
|
69
|
-
client.globals[:log] = old_log
|
64
|
+
logging_to(log) { sessionalive(session_id: session_id) }
|
70
65
|
end
|
71
66
|
|
72
67
|
def admin_session_query(session_id:)
|
@@ -151,16 +146,23 @@ module Identikey
|
|
151
146
|
end
|
152
147
|
|
153
148
|
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
149
|
+
# Executes a userQuery command that searches users. By default, it doesn't
|
150
|
+
# log anywhere. To enable logging to a specific destination, pass a logger
|
151
|
+
# as the log: option. To log to the default destination, pass `true` as
|
152
|
+
# the log: option.
|
153
|
+
#
|
154
|
+
def user_query(session_id:, attributes:, query_options:, log: false)
|
155
|
+
logging_to(log) do
|
156
|
+
resp = super(message: {
|
157
|
+
sessionID: session_id,
|
158
|
+
attributeSet: {
|
159
|
+
attributes: typed_attributes_query_list_from(attributes)
|
160
|
+
},
|
161
|
+
queryOptions: query_options
|
162
|
+
})
|
163
|
+
|
164
|
+
parse_response resp, :user_query_response
|
165
|
+
end
|
164
166
|
end
|
165
167
|
|
166
168
|
|
@@ -260,5 +262,24 @@ module Identikey
|
|
260
262
|
)
|
261
263
|
end
|
262
264
|
|
265
|
+
private
|
266
|
+
# Allows temporarily overriding the log destination. If it
|
267
|
+
# is set to `false` then logging is disabled altogether.
|
268
|
+
# If it is set to `true`, then this is a no-op.
|
269
|
+
#
|
270
|
+
def logging_to(destination)
|
271
|
+
old_log = client.globals[:log]
|
272
|
+
|
273
|
+
unless destination === true
|
274
|
+
client.globals[:log] = destination
|
275
|
+
end
|
276
|
+
|
277
|
+
yield
|
278
|
+
|
279
|
+
ensure
|
280
|
+
client.globals[:log] = old_log
|
281
|
+
end
|
282
|
+
|
283
|
+
|
263
284
|
end
|
264
285
|
end
|
data/lib/identikey/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: identikey
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.5.
|
4
|
+
version: 0.5.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marcello Barnaba
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-11
|
11
|
+
date: 2019-12-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: savon
|