soar_sr 1.1.18 → 1.1.19
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +2 -0
- data/lib/soar_sr/search.rb +12 -0
- data/lib/soar_sr/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: eaf078c9c1b09242167e5af16f924e4b93edaaa2
|
4
|
+
data.tar.gz: 415caef940a141d0f8740ac58567ee517aa124a4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bccba58fc3db0b4236f93046ef8e8351e25bd9f0f6c1fdce72424fb9baa7589e844fc93ae3539bcd3dc4da6dbab449ae7b20a39e8ed94511a3ec582fa949e76f
|
7
|
+
data.tar.gz: a1439fb9005201798b41db86d04f56f2834dde89c4407f7948be889345a520f453300b901488444e1b3180f33150ef3412d61039ee8b38680a637e77f7876458
|
data/README.md
CHANGED
@@ -104,6 +104,8 @@ Or install it yourself as:
|
|
104
104
|
ss.search_for_service('search') # name
|
105
105
|
ss.search_for_service('please') # description
|
106
106
|
ss.search_for_service('ti.on') # definition
|
107
|
+
ss.search_for_service_component('search') # name
|
108
|
+
ss.search_for_service_component('please') # description
|
107
109
|
ss.search_domain_perspective('my domain', 'search')
|
108
110
|
ss.search_access_points('one-uri.com')
|
109
111
|
|
data/lib/soar_sr/search.rb
CHANGED
@@ -34,6 +34,18 @@ module SoarSr
|
|
34
34
|
success_data({'services' => found})
|
35
35
|
}end
|
36
36
|
|
37
|
+
def search_for_service_component(pattern, full_text = true)
|
38
|
+
services = search_for_service(pattern, true, full_text)
|
39
|
+
service_components = {}
|
40
|
+
if services['status'] == 'success'
|
41
|
+
services['data']['services'].each do |service, detail|
|
42
|
+
service_components['service'] = detail if detail['key'].include?('service-components')
|
43
|
+
end
|
44
|
+
result = success_data({'services' => service_components})
|
45
|
+
end
|
46
|
+
result
|
47
|
+
end
|
48
|
+
|
37
49
|
def search_for_service(pattern, include_service_components = true, full_text = true)_{
|
38
50
|
provided?(pattern, 'pattern') and length_at_least?(pattern, 4, 'pattern')
|
39
51
|
|
data/lib/soar_sr/version.rb
CHANGED