soar_sr 1.1.5 → 1.1.6

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
2
  SHA1:
3
- metadata.gz: 994cbaba1fd332b69c03daf1978eae61e468b8d2
4
- data.tar.gz: 798996ba2a81adb302d0f70ead4438660a235dab
3
+ metadata.gz: dd1964b9894c246621ad8453e60938dad184a442
4
+ data.tar.gz: a5c3ed9361bdaaa663ae97353cd474d38ef333f9
5
5
  SHA512:
6
- metadata.gz: 1cb204c69e50a3626f1d7006f59dfdf283559416d0a97fd9b93aa90e53d3e99aec441bf515d978b9e8e57dc192868e9ad66e22f32e2be8ade6765b63a34ab686
7
- data.tar.gz: 483073f2c989f8b30d630adf58835594c46705f561c95949eb640a0ddd00ece0c663a6dc0fb2434a0dfb63c4baa6379edbf21cae352ba43d12561d42708091ee
6
+ metadata.gz: ddcbd82018a7c8e3aa176d91c544a831b4fe81768c9db10bcea1d4c594c8b147fec74582ecd77659533ad6cf3b6059e7dedccce32c0729fdf1c35756f219bd76
7
+ data.tar.gz: 35321dd2867f2ab7a7a3281e230bced87fef406f5a082c4cf62e06ac5e2ee8c80e1f1b6dc6895f48aa24fba409a47332a525d2a3eeac67ad5dc6e363128ffc03
@@ -49,7 +49,6 @@ module SoarSr
49
49
  domain_perspective = standardize(domain_perspective)
50
50
  provided?(domain_perspective, 'domain perspective') and any_registered?(domain_perspective)
51
51
  provided?(service_component, 'service component') and registered?(service_component, 'service-components')
52
-
53
52
  service_component_id = compile_domain_id('service-components', service_component)
54
53
  type_registered = which_type_registered?(domain_perspective)
55
54
 
@@ -74,7 +74,6 @@ module SoarSr
74
74
  domain_perspective = standardize(domain_perspective)
75
75
  provided?(domain_perspective, one_of(type)) and registered?(domain_perspective, type)
76
76
  provided?(type, 'element type') and type?(type)
77
-
78
77
  meta = extract_meta_for_domain_perspective(extract_detail_for_domain_perspective(type, domain_perspective))
79
78
  meta['associations'] ||= {}
80
79
  meta['associations']['service_components'] ||= {}
@@ -145,7 +144,7 @@ module SoarSr
145
144
  meta = {}
146
145
  if detail['description']
147
146
  detail['description'].each do |desc|
148
- meta.merge!(JSON.parse(CGI.unescape(desc))) if (description_is_meta?(desc))
147
+ meta = Hash::deep_merge(meta, JSON.parse(CGI.unescape(desc))) if (description_is_meta?(desc))
149
148
  end
150
149
  end
151
150
  meta
@@ -1,3 +1,3 @@
1
1
  module SoarSr
2
- VERSION = "1.1.5"
2
+ VERSION = "1.1.6"
3
3
  end
data/lib/soar_sr.rb CHANGED
@@ -17,3 +17,32 @@ require 'jsender'
17
17
  module SoarSr
18
18
  DOMAIN_TYPES = ['domains', 'services', 'service-components', 'teams'] unless defined? DOMAIN_TYPES; DOMAIN_TYPES.freeze
19
19
  end
20
+
21
+ class ::Hash
22
+ def self.deep_merge(first, second)
23
+ result = first.merge(second)
24
+ first.each do |first_key, first_value|
25
+ second.each do |second_key, second_value|
26
+ if (first_key == second_key)
27
+ if first_value.is_a?(Hash) and (second_value.is_a?(Hash))
28
+ result[first_key] = Hash::deep_merge(first_value, second_value)
29
+ elsif first_value.is_a?(Array) and (second_value.is_a?(Array))
30
+ result[first_key] = first_value + second_value
31
+ else
32
+ result[first_key] = first_value + second_value
33
+ end
34
+ end
35
+ end
36
+ end
37
+ result
38
+ end
39
+
40
+ def self.value_has_hash?(value)
41
+ return nil if not value.is_a?(Hash)
42
+ keys = []
43
+ value.each do |k, v|
44
+ keys << k if v.is_a?(Hash)
45
+ end
46
+ keys
47
+ end
48
+ end
data/soar_sr.gemspec CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
  spec.add_development_dependency "rspec"
27
27
  spec.add_development_dependency "byebug"
28
28
  spec.add_dependency "jsender"
29
- spec.add_dependency "soap4juddi", "~> 1.0.1"
29
+ spec.add_dependency "soap4juddi", "~> 1.0.3"
30
30
  spec.add_dependency "connection_pool"
31
31
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: soar_sr
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.5
4
+ version: 1.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: 1.0.1
103
+ version: 1.0.3
104
104
  type: :runtime
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: 1.0.1
110
+ version: 1.0.3
111
111
  - !ruby/object:Gem::Dependency
112
112
  name: connection_pool
113
113
  requirement: !ruby/object:Gem::Requirement