soar_sr 0.1.5 → 0.1.6

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
2
  SHA1:
3
- metadata.gz: 5d7140ecb1b8db4257124c2f57ad2e51620dde90
4
- data.tar.gz: 2d2848a6d26079e2cfe5c7e941216573a265e0f6
3
+ metadata.gz: f70f5737b75f2535a7eed5c47a97af944d14b01b
4
+ data.tar.gz: b9720f29b51743d365fc31f878da44e33438fce5
5
5
  SHA512:
6
- metadata.gz: e1eb991f60690270e2b563a633e165675ba47960ff019eb9f612fa25e143fc71c083b68189599e0c1e7e6556c0ca14fcc79246759fa7ae934b6f47a3d22ffb5b
7
- data.tar.gz: da250ea11a467afdc03609d186eecfee9a4ff2ec05ecbb6c0affeb225ff7655f17a84cf87fe86c6cecd03c3787b8c064a1218bb1d7f52086bdc02615ac3d3086
6
+ metadata.gz: 08077201d88fccb5e45e8c83425f81755bfd224d6abd8f20d92832f1a7e2843fd3563b2207b83f45549469b0433e9ed26b44c56cb618be97e27d12c81511eddd
7
+ data.tar.gz: 02696cd744a6ffb140bbe1e09b53c942f78288d7172a398dfc8f4a6b144b7183567593dcec5dfdac49e9f59718791ea4a43a7467957f57b44ccb266f29a57c90
@@ -41,7 +41,7 @@ module SoarSr
41
41
 
42
42
  def associate_service_component_with_domain_perspective(service_component, domain_perspective)_{
43
43
  provided?(domain_perspective, 'domain perspective') and registered?(domain_perspective, 'domains')
44
- provided?(service_component, 'service component') and registered?(service_component, 'service components')
44
+ provided?(service_component, 'service component') and registered?(service_component, 'service-components')
45
45
 
46
46
  service_component_id = compile_domain_id('service-components', service_component)
47
47
  meta = @registry.domain_perspectives.meta_for_domain_perspective('domains', domain_perspective)
@@ -72,7 +72,7 @@ module SoarSr
72
72
  def disassociate_service_component_from_domain_perspective(domain_perspective, service_component)_{
73
73
  # byebug
74
74
  provided?(domain_perspective, 'domain perspective') and registered?(domain_perspective, 'domains')
75
- provided?(service_component, 'service component') and registered?(service_component, 'service components')
75
+ provided?(service_component, 'service component') and registered?(service_component, 'service-components')
76
76
 
77
77
  service_component_id = compile_domain_id('service-components', service_component)
78
78
  meta = @registry.domain_perspectives.meta_for_domain_perspective('domains', domain_perspective)
@@ -55,7 +55,7 @@ module SoarSr
55
55
 
56
56
  def register_service_component(service_component)_{
57
57
  authorize
58
- provided?(service_component, 'service component') and not_registered?(service_component, 'service components')
58
+ provided?(service_component, 'service component') and not_registered?(service_component, 'service-components')
59
59
 
60
60
  result = @uddi.save_service_component(service_component)
61
61
  authorized?(result) and identifier?(result, 'service component')
@@ -65,7 +65,7 @@ module SoarSr
65
65
  def deregister_service_component(service_component)_{
66
66
  # byebug
67
67
  authorize
68
- provided?(service_component, 'service component') and registered?(service_component, 'service components')
68
+ provided?(service_component, 'service component') and registered?(service_component, 'service-components')
69
69
  raise ValidationError, 'service component has domain perspective associations' if @registry.associations.service_component_has_domain_perspective_associations?(service_component)
70
70
  result = @uddi.delete_service_component(service_component)
71
71
  authorized?(result) and identifier?(result, 'service component')
@@ -74,14 +74,14 @@ module SoarSr
74
74
 
75
75
  def configure_service_component_uri(service_component, uri)_{
76
76
  authorize
77
- provided?(service_component, 'service component') and provided?(uri, 'URI') and uri?(uri) and registered?(service_component, 'service components')
77
+ provided?(service_component, 'service component') and provided?(uri, 'URI') and uri?(uri) and registered?(service_component, 'service-components')
78
78
  result = @uddi.save_service_component_uri(service_component, uri)
79
79
  authorized?(result) and identifier?(result, 'service component')
80
80
  success
81
81
  }end
82
82
 
83
83
  def service_component_uri(service_component)_{
84
- provided?(service_component, 'service component') and registered?(service_component, 'service components')
84
+ provided?(service_component, 'service component') and registered?(service_component, 'service-components')
85
85
  result = @uddi.find_service_component_uri(service_component)
86
86
  identifier?(result, 'service component')
87
87
  uri = (has_data?(result, 'bindings') and (result['data']['bindings'].size > 0)) ? result['data']['bindings'].first[1]['access_point'] : nil
@@ -3,6 +3,8 @@ require 'soap4juddi'
3
3
 
4
4
  module SoarSr
5
5
  class Validator
6
+ include Jsender
7
+
6
8
  def present?(field)
7
9
  not (field.nil? or (field.is_a?(String) and field.strip == ""))
8
10
  end
@@ -42,7 +44,7 @@ module SoarSr
42
44
  end
43
45
 
44
46
  def identifier?(result, label)
45
- raise ValidationError, "invalid #{element} identifier provided" if notifications_include?(result, 'E_invalidKeyPassed')
47
+ raise ValidationError, "invalid #{label} identifier provided" if notifications_include?(result, 'E_invalidKeyPassed')
46
48
  true
47
49
  end
48
50
 
@@ -57,7 +59,7 @@ module SoarSr
57
59
  end
58
60
 
59
61
  def type?(type)
60
- ['domains', 'services', 'teams', 'service_components'].include?(type)
62
+ ['domains', 'services', 'teams', 'service-components'].include?(type)
61
63
  end
62
64
 
63
65
  def wadl?(definition)
@@ -74,7 +76,7 @@ module SoarSr
74
76
 
75
77
  def type_registered?(element, type)
76
78
  return is_registered?(@registry.domain_perspectives.domain_perspective_registered?(element)) if (type == 'domains')
77
- return is_registered?(@registry.service_components.service_component_registered?(element)) if (type == 'service components')
79
+ return is_registered?(@registry.service_components.service_component_registered?(element)) if (type == 'service-components')
78
80
  return is_registered?(@registry.services.service_registered?(element)) if (type == 'services')
79
81
  return is_registered?(@registry.teams.team_registered?(element)) if (type == 'teams')
80
82
  false
@@ -1,3 +1,3 @@
1
1
  module SoarSr
2
- VERSION = "0.1.5"
2
+ VERSION = "0.1.6"
3
3
  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: 0.1.5
4
+ version: 0.1.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ernst van Graan