iibee 0.1.4 → 0.1.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/iibee.gemspec +0 -2
- data/lib/iibee/application.rb +48 -0
- data/lib/iibee/broker.rb +3 -2
- data/lib/iibee/execution_group.rb +65 -0
- data/lib/iibee/service.rb +49 -0
- data/lib/iibee/version.rb +1 -1
- data/lib/iibee.rb +4 -1
- metadata +5 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 765f4752d8686d7ac3a7e08d486bd9c25dce7765
|
4
|
+
data.tar.gz: da0aed59c6fd8d60cc789b1544a3d21c1c5e8e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 58bcb20b41e892d89863373efac1b2770e198cc71a6dda35f0484ae6528370b51cee7c15a4d5d46b0c285aba89520d1e400322f8cb3c6b41de9618c4d22b5138
|
7
|
+
data.tar.gz: 1136cb447d0d0345750b9e3a0d7b7589845f47a3658d18b85aa9ada4d0d0ec1259c923273debec6e0608e0da61d6bd9ead2e81af3e5ac0285097736db690f623
|
data/iibee.gemspec
CHANGED
@@ -18,8 +18,6 @@ Gem::Specification.new do |spec|
|
|
18
18
|
spec.bindir = "exe"
|
19
19
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
20
|
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.required_ruby_version = '>= 1.9.3'
|
23
21
|
|
24
22
|
spec.add_development_dependency "bundler", "~> 1.9"
|
25
23
|
spec.add_development_dependency "rake", "~> 10.0"
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'oga'
|
3
|
+
|
4
|
+
module Iibee
|
5
|
+
class Application
|
6
|
+
class Properties
|
7
|
+
attr_reader :processId, :traceLevel, :soapNodesUseEmbeddedListener, :compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList, :traceNodeLevel, :userTraceLevel
|
8
|
+
def initialize(document)
|
9
|
+
document.xpath('properties/advancedProperties/property').each do |advancedProperty|
|
10
|
+
|
11
|
+
propertyName = advancedProperty.get('name')
|
12
|
+
propertyValue = advancedProperty.get('value')
|
13
|
+
instance_variable_set("@#{propertyName}", propertyValue)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
CONTEXT_PATH = "apiv1/executiongroups"
|
18
|
+
|
19
|
+
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri
|
20
|
+
|
21
|
+
def initialize(document)
|
22
|
+
document.xpath('application/@*').each do |attribute|
|
23
|
+
instance_variable_set("@#{attribute.name}", attribute.value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def properties
|
28
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{self.propertiesUri}")
|
29
|
+
document = Oga.parse_xml(response.body)
|
30
|
+
@properties = Iibee::Application::Properties.new(document)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.all(egName)
|
34
|
+
applications = []
|
35
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/applications/")
|
36
|
+
document = Oga.parse_xml(response.body)
|
37
|
+
document.xpath('applications/application').each do |application|
|
38
|
+
applications << new(document)
|
39
|
+
end
|
40
|
+
end
|
41
|
+
|
42
|
+
def self.find_by_name(egName, name)
|
43
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/applications/#{name}")
|
44
|
+
document = Oga.parse_xml(response.body)
|
45
|
+
new(document)
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
data/lib/iibee/broker.rb
CHANGED
@@ -3,7 +3,7 @@ require 'oga'
|
|
3
3
|
|
4
4
|
module Iibee
|
5
5
|
class Broker
|
6
|
-
CONTEXT_PATH = "/properties/"
|
6
|
+
CONTEXT_PATH = "/apiv1/properties/"
|
7
7
|
attr_reader :AdminSecurity, :version, :name, :runMode, :shortDesc, :longDesc,
|
8
8
|
:platformName, :FixpackCapability, :platformArchitecture, :platformVersion, :operationMode, :buildLevel, :AdminAgentPID, :queueManager
|
9
9
|
|
@@ -29,7 +29,8 @@ module Iibee
|
|
29
29
|
def self.find(id)
|
30
30
|
response = Faraday.get("#{Iibee.configuration.base_url}#{CONTEXT_PATH}")
|
31
31
|
document = Oga.parse_xml(response.body)
|
32
|
+
p document
|
32
33
|
new(document)
|
33
|
-
end
|
34
|
+
end
|
34
35
|
end
|
35
36
|
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'oga'
|
3
|
+
|
4
|
+
module Iibee
|
5
|
+
class ExecutionGroup
|
6
|
+
class Properties
|
7
|
+
attr_reader :processId, :traceLevel, :soapNodesUseEmbeddedListener, :compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList, :traceNodeLevel, :userTraceLevel
|
8
|
+
def initialize(document)
|
9
|
+
document.xpath('properties/advancedProperties/property').each do |advancedProperty|
|
10
|
+
|
11
|
+
propertyName = advancedProperty.get('name')
|
12
|
+
propertyValue = advancedProperty.get('value')
|
13
|
+
instance_variable_set("@#{propertyName}", propertyValue)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
|
18
|
+
CONTEXT_PATH = "/apiv1/executiongroups/"
|
19
|
+
|
20
|
+
attr_reader :isRunning, :runMode, :isRestricted, :hasChildren, :uri, :propertiesUri, :uuid, :name, :properties
|
21
|
+
|
22
|
+
def initialize(document)
|
23
|
+
document.xpath('executionGroup/@*').each do |attribute|
|
24
|
+
instance_variable_set("@#{attribute.name}", cast_value(attribute.name, attribute.value))
|
25
|
+
end
|
26
|
+
end
|
27
|
+
|
28
|
+
def properties
|
29
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{self.propertiesUri}")
|
30
|
+
document = Oga.parse_xml(response.body)
|
31
|
+
@properties = Iibee::ExecutionGroup::Properties.new(document)
|
32
|
+
end
|
33
|
+
|
34
|
+
def self.all
|
35
|
+
egs = []
|
36
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/")
|
37
|
+
document = Oga.parse_xml(response.body)
|
38
|
+
document.xpath('executionGroups/executionGroup').each do |eg|
|
39
|
+
egs << new(document)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.find_by_name(name)
|
44
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{name}")
|
45
|
+
document = Oga.parse_xml(response.body)
|
46
|
+
new(document)
|
47
|
+
end
|
48
|
+
|
49
|
+
protected
|
50
|
+
def cast_value(attrName, attrValue)
|
51
|
+
if [:isRunning].include? attrName
|
52
|
+
if attrValue == "true"
|
53
|
+
return true
|
54
|
+
else
|
55
|
+
return false
|
56
|
+
end
|
57
|
+
end
|
58
|
+
# if [:someInteger].include? attrName
|
59
|
+
# return attrValue.to_i
|
60
|
+
# end
|
61
|
+
return attrValue
|
62
|
+
end
|
63
|
+
|
64
|
+
end
|
65
|
+
end
|
@@ -0,0 +1,49 @@
|
|
1
|
+
require 'faraday'
|
2
|
+
require 'oga'
|
3
|
+
|
4
|
+
module Iibee
|
5
|
+
class Service
|
6
|
+
class Properties
|
7
|
+
attr_reader :processId, :traceLevel, :soapNodesUseEmbeddedListener, :compiledXPathCacheSizeEntries, :consoleMode, :httpNodesUseEmbeddedListener, :inactiveUserExitList, :activeUserExitList, :traceNodeLevel, :userTraceLevel
|
8
|
+
def initialize(document)
|
9
|
+
document.xpath('properties/advancedProperties/property').each do |advancedProperty|
|
10
|
+
|
11
|
+
propertyName = advancedProperty.get('name')
|
12
|
+
propertyValue = advancedProperty.get('value')
|
13
|
+
instance_variable_set("@#{propertyName}", propertyValue)
|
14
|
+
end
|
15
|
+
end
|
16
|
+
end
|
17
|
+
CONTEXT_PATH = "apiv1/executiongroups"
|
18
|
+
|
19
|
+
attr_reader :type, :isRunning, :runMode, :startMode, :hasChildren, :uuid, :name, :propertiesUri
|
20
|
+
|
21
|
+
def initialize(document)
|
22
|
+
document.xpath('service/@*').each do |attribute|
|
23
|
+
instance_variable_set("@#{attribute.name}", attribute.value)
|
24
|
+
end
|
25
|
+
end
|
26
|
+
|
27
|
+
def properties
|
28
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{self.propertiesUri}")
|
29
|
+
document = Oga.parse_xml(response.body)
|
30
|
+
@properties = Iibee::Service::Properties.new(document)
|
31
|
+
end
|
32
|
+
|
33
|
+
def self.all(egName)
|
34
|
+
services = []
|
35
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/services/")
|
36
|
+
p "#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/services/"
|
37
|
+
document = Oga.parse_xml(response.body)
|
38
|
+
document.xpath('services/service').each do |service|
|
39
|
+
services << new(document)
|
40
|
+
end
|
41
|
+
end
|
42
|
+
|
43
|
+
def self.find_by_name(egName, name)
|
44
|
+
response = Faraday.get("#{Iibee.configuration.base_url}/#{CONTEXT_PATH}/#{egName}/services/#{name}")
|
45
|
+
document = Oga.parse_xml(response.body)
|
46
|
+
new(document)
|
47
|
+
end
|
48
|
+
end
|
49
|
+
end
|
data/lib/iibee/version.rb
CHANGED
data/lib/iibee.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iibee
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- akil
|
@@ -126,8 +126,11 @@ files:
|
|
126
126
|
- bin/setup
|
127
127
|
- iibee.gemspec
|
128
128
|
- lib/iibee.rb
|
129
|
+
- lib/iibee/application.rb
|
129
130
|
- lib/iibee/broker.rb
|
130
131
|
- lib/iibee/configuration.rb
|
132
|
+
- lib/iibee/execution_group.rb
|
133
|
+
- lib/iibee/service.rb
|
131
134
|
- lib/iibee/version.rb
|
132
135
|
homepage: http://quantiguous.com.
|
133
136
|
licenses:
|
@@ -141,7 +144,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
141
144
|
requirements:
|
142
145
|
- - ">="
|
143
146
|
- !ruby/object:Gem::Version
|
144
|
-
version:
|
147
|
+
version: '0'
|
145
148
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
146
149
|
requirements:
|
147
150
|
- - ">="
|