remote_dwsregistry 0.2.7 → 0.2.8

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: 8d31e5efdb24771ef3d2e476a7016b7a478f9115
4
- data.tar.gz: fe5fdb897f25465822f183f92d4aeec747b3d24c
2
+ SHA256:
3
+ metadata.gz: 574996a345b3719660c95ab7b6f63945fde68abe50b32e2bc1a6dff51cd405a9
4
+ data.tar.gz: a2be8b50a3204ebaefd9fafba3f8957392a90d1b781857759d965daab8bce66f
5
5
  SHA512:
6
- metadata.gz: d03ad5c8b466964934a4d1a51504a883267db3619e951dc3a56d7691f665872008fc09bcc2db7ea8da2d5b357b02114821166a6624c7ab38b8d68d10c9215138
7
- data.tar.gz: '09741cb9e6b795fcf45d833070a73103768d4cf3a3dfd613ad06456bd0892fb2674ef281dd26a06c32e232334879a9853b73e41648498ffbda00d25025c17f6c'
6
+ metadata.gz: b7391fc66e29aabb9d09f2b17498d235c43a68db65a676b35017c1e934d5282478d7992f4c2c0d4d20ba8c9b6189506f9fda49d37a44df9679f9a03b883d412a
7
+ data.tar.gz: 51ecdb5dc96882b895ab7851e67a768d711503bf575903c8973e43ca3607fbb3bf1a46239f0111cb273f395c5968f0774f2e5d437d087251ab55a6f459919763
checksums.yaml.gz.sig CHANGED
Binary file
@@ -13,11 +13,13 @@ require 'gpd-request'
13
13
  class RemoteDwsRegistry
14
14
 
15
15
  def initialize(url2_base=nil, domain: '127.0.0.1',
16
- port: '9292', url_base: "http://#{domain}:#{port}/")
16
+ port: '9292', url_base: "http://#{domain}:#{port}/",
17
+ debug: false)
17
18
 
18
19
  @url_base = url2_base || url_base
19
20
  @url_base += '/' unless url_base[-1] == '/'
20
21
  @req = GPDRequest.new
22
+ @debug = debug
21
23
 
22
24
  end
23
25
 
@@ -41,7 +43,9 @@ class RemoteDwsRegistry
41
43
  def get_key(key='', auto_detect_type: false)
42
44
 
43
45
  r = @req.get(@url_base + key)
44
-
46
+
47
+ puts 'r.content_type: ' + r.content_type.inspect if @debug
48
+
45
49
  case r.content_type
46
50
  when 'application/xml'
47
51
 
@@ -64,7 +68,7 @@ class RemoteDwsRegistry
64
68
  s = e.text
65
69
 
66
70
  return e if e.elements.length > 0 or s.nil?
67
- return s unless c
71
+ return s.to_s unless c
68
72
 
69
73
  h = {
70
74
  string: ->(x) {x},
@@ -124,6 +128,30 @@ class RemoteDwsRegistry
124
128
  end
125
129
 
126
130
  end
131
+
132
+ def import(s)
133
+
134
+ url = @url_base + 'import'
135
+
136
+ r = @req.post(url, 's' => s)
137
+
138
+ case r.content_type
139
+ when 'application/xml'
140
+
141
+ doc = Rexle.new(r.body)
142
+ doc.root
143
+
144
+ when 'application/json'
145
+
146
+ JSON.parse r.body
147
+
148
+ else
149
+
150
+ r.body
151
+
152
+ end
153
+
154
+ end
127
155
 
128
156
  def set_key(key, val)
129
157
 
@@ -180,4 +208,4 @@ class RemoteDwsRegistry
180
208
  end
181
209
  end
182
210
 
183
- end
211
+ end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: remote_dwsregistry
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.7
4
+ version: 0.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - James Robertson
@@ -10,28 +10,32 @@ bindir: bin
10
10
  cert_chain:
11
11
  - |
12
12
  -----BEGIN CERTIFICATE-----
13
- MIIDljCCAn6gAwIBAgIBATANBgkqhkiG9w0BAQUFADBIMRIwEAYDVQQDDAlnZW1t
14
- YXN0ZXIxHjAcBgoJkiaJk/IsZAEZFg5qYW1lc3JvYmVydHNvbjESMBAGCgmSJomT
15
- 8ixkARkWAmV1MB4XDTE2MDQyNTEyMDgyN1oXDTE3MDQyNTEyMDgyN1owSDESMBAG
16
- A1UEAwwJZ2VtbWFzdGVyMR4wHAYKCZImiZPyLGQBGRYOamFtZXNyb2JlcnRzb24x
17
- EjA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g/7GLBOh6zbmdv0G38GW5hV+ykWF
29
+ WDhDVNIarTKS/aX9o2HFJF3FUCYDByHV4Ao9xTI+oz9C/Bo83yQKdtN6FOc+YAsi
30
+ mtUNrSJHEMuNTEBpJW+XYa3qpK0Ndqn58zB2tK/oj/yFxda7jHpwPI1hGEa86SjZ
31
+ WEJ6PAEB0fza+EG+JKanf7zWBZTGV/pKgixs290FTgUnmw7BqysDTJB40uertBPt
32
+ RD9cbbLqMbOpdLcsQnRy2tXZAyGuteGKhodhO12i7LimbY9wFvmT4IeiS34UOTkV
33
+ qGQHPKDT7GQ9jJnz2Y3oCIw1XM8reHKT4liZbgzBbCTKCQhIF4UysnDcw8w8vPxn
34
+ redGAZ1DHTfYuyiro0o2SNEkJtRjkUerUypG8WVL1XVRO949y4XYdBY3EXp7//0e
35
+ lf+G3rBrUndsAjdu7IIfrTdKusuBHZGgcr6+IrbQcX+O1Uw4tFUitV5FA9VK69Hs
36
+ zKfjberrEXRarMwv+AQWg2Ca
33
37
  -----END CERTIFICATE-----
34
- date: 2017-03-08 00:00:00.000000000 Z
38
+ date: 2018-08-13 00:00:00.000000000 Z
35
39
  dependencies:
36
40
  - !ruby/object:Gem::Dependency
37
41
  name: rexle
@@ -39,20 +43,20 @@ dependencies:
39
43
  requirements:
40
44
  - - "~>"
41
45
  - !ruby/object:Gem::Version
42
- version: '1.3'
46
+ version: '1.4'
43
47
  - - ">="
44
48
  - !ruby/object:Gem::Version
45
- version: 1.3.30
49
+ version: 1.4.12
46
50
  type: :runtime
47
51
  prerelease: false
48
52
  version_requirements: !ruby/object:Gem::Requirement
49
53
  requirements:
50
54
  - - "~>"
51
55
  - !ruby/object:Gem::Version
52
- version: '1.3'
56
+ version: '1.4'
53
57
  - - ">="
54
58
  - !ruby/object:Gem::Version
55
- version: 1.3.30
59
+ version: 1.4.12
56
60
  - !ruby/object:Gem::Dependency
57
61
  name: gpd-request
58
62
  requirement: !ruby/object:Gem::Requirement
@@ -100,7 +104,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
100
104
  version: '0'
101
105
  requirements: []
102
106
  rubyforge_project:
103
- rubygems_version: 2.6.8
107
+ rubygems_version: 2.7.6
104
108
  signing_key:
105
109
  specification_version: 4
106
110
  summary: Used in conjunction with the rack_dwsregistry gem to remotely get and set
metadata.gz.sig CHANGED
@@ -1 +1 @@
1
- ��/����eP@T��~߬��zo��� �=h����A3{6��1{
1
+ ���V��YpP����\�޻:��M ��zϿR�'��^.t��Px�ypR�.�jY��/ ��F�a嚌;��J`n%>�D�}�%�Ӎ�����w� �e)��li"��\�C<�餼5"~=�����A{rL�ʂ�e��� ~�6�O̎��|�N��Fz҈��9����g�}��w�� ����S@f6y�aL��+Q��U�h���z_�r�c�Q<�Pgм�ʉH��y/��c{��̟3O@bD��ck���p�̆�