vayacondios-server 0.1.10 → 0.1.11
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/vayacondios/client/itemset.rb +25 -8
- data/lib/vayacondios/version.rb +1 -1
- metadata +4 -4
@@ -33,11 +33,17 @@ class Vayacondios
|
|
33
33
|
private
|
34
34
|
|
35
35
|
def execute_request req
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
36
|
+
begin
|
37
|
+
resp = Net::HTTP.start(@host, @port) do |http|
|
38
|
+
http.request(req)
|
39
|
+
end.body
|
40
|
+
result = MultiJson.decode(resp) unless resp.nil? or resp.empty?
|
41
|
+
(result.respond_to?(:has_key?) and result.has_key? "error") ? nil : result
|
42
|
+
rescue StandardError => ex
|
43
|
+
Log.warn("problem contacting vayacondios: #{ex.message}")
|
44
|
+
Log.debug(ex.backtrace.join("\n"))
|
45
|
+
nil
|
46
|
+
end
|
41
47
|
end
|
42
48
|
|
43
49
|
def path organization, topic, id
|
@@ -83,9 +89,6 @@ class Vayacondios
|
|
83
89
|
@poll_wait_sec = poll_wait_sec
|
84
90
|
end
|
85
91
|
|
86
|
-
def setup() end
|
87
|
-
def teardown() end
|
88
|
-
|
89
92
|
def run
|
90
93
|
setup
|
91
94
|
loop do
|
@@ -103,6 +106,20 @@ class Vayacondios
|
|
103
106
|
end
|
104
107
|
teardown
|
105
108
|
end
|
109
|
+
|
110
|
+
protected
|
111
|
+
|
112
|
+
def add_items
|
113
|
+
raise NoMethodError.new("class #{self.class.name} must override add_items")
|
114
|
+
end
|
115
|
+
|
116
|
+
def remove_items
|
117
|
+
raise NoMethodError.new("class #{self.class.name} must override remove_items")
|
118
|
+
end
|
119
|
+
|
120
|
+
def setup() end
|
121
|
+
def teardown() end
|
122
|
+
|
106
123
|
end
|
107
124
|
end
|
108
125
|
end
|
data/lib/vayacondios/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: vayacondios-server
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.11
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -12,7 +12,7 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain: []
|
15
|
-
date: 2013-04-
|
15
|
+
date: 2013-04-03 00:00:00.000000000 Z
|
16
16
|
dependencies:
|
17
17
|
- !ruby/object:Gem::Dependency
|
18
18
|
name: configliere
|
@@ -269,7 +269,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
269
269
|
version: '0'
|
270
270
|
segments:
|
271
271
|
- 0
|
272
|
-
hash:
|
272
|
+
hash: 1484920319675864258
|
273
273
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
274
274
|
none: false
|
275
275
|
requirements:
|
@@ -278,7 +278,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
278
278
|
version: '0'
|
279
279
|
segments:
|
280
280
|
- 0
|
281
|
-
hash:
|
281
|
+
hash: 1484920319675864258
|
282
282
|
requirements: []
|
283
283
|
rubyforge_project:
|
284
284
|
rubygems_version: 1.8.25
|