sfpagent 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of sfpagent might be problematic. Click here for more details.
- data/README.md +1 -1
- data/bin/sfpagent +1 -1
- data/lib/sfpagent/agent.rb +4 -4
- data/sfpagent.gemspec +1 -1
- metadata +3 -3
data/README.md
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
SFP Agent for Ruby
|
2
2
|
==================
|
3
3
|
- Author: Herry (herry13@gmail.com)
|
4
|
-
- Version: 0.1.
|
4
|
+
- Version: 0.1.4
|
5
5
|
- License: [BSD License](https://github.com/herry13/sfpagent/blob/master/LICENSE)
|
6
6
|
|
7
7
|
A Ruby script and API of an SFP agent. The agent could be accessed through HTTP RESTful API.
|
data/bin/sfpagent
CHANGED
@@ -4,7 +4,7 @@ libdir = File.expand_path(File.dirname(__FILE__))
|
|
4
4
|
require "#{libdir}/../lib/sfpagent"
|
5
5
|
|
6
6
|
opts = Trollop::options do
|
7
|
-
version "sfpagent 0.1.
|
7
|
+
version "sfpagent 0.1.4 (c) 2013 Herry"
|
8
8
|
banner <<-EOS
|
9
9
|
SFP Agent that provides a Ruby framework for managing system configurations. The configurations are modelled in SFP language.
|
10
10
|
|
data/lib/sfpagent/agent.rb
CHANGED
@@ -202,12 +202,12 @@ module Sfp
|
|
202
202
|
|
203
203
|
def self.resolve(path, as_sfp=true)
|
204
204
|
begin
|
205
|
-
|
205
|
+
#@@runtime_lock.synchronize {
|
206
206
|
return Sfp::Undefined.new if !defined?(@@runtime) or @@runtime.nil? or @@runtime.modules.nil?
|
207
207
|
path = path.simplify
|
208
208
|
_, node, _ = path.split('.', 3)
|
209
209
|
if @@runtime.modules.has_key?(node)
|
210
|
-
#
|
210
|
+
# local resolve
|
211
211
|
parent, attribute = path.pop_ref
|
212
212
|
mod = @@runtime.modules.at?(parent)
|
213
213
|
if mod.is_a?(Hash)
|
@@ -217,10 +217,10 @@ module Sfp
|
|
217
217
|
end
|
218
218
|
return Sfp::Undefined.new
|
219
219
|
end
|
220
|
-
}
|
220
|
+
#}
|
221
221
|
agents = get_agents
|
222
222
|
if agents[node].is_a?(Hash)
|
223
|
-
#
|
223
|
+
# remote resolve
|
224
224
|
agent = agents[node]
|
225
225
|
path = path[1, path.length-1].gsub /\./, '/'
|
226
226
|
code, data = NetHelper.get_data(agent['sfpAddress'], agent['sfpPort'], "/state#{path}")
|
data/sfpagent.gemspec
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: sfpagent
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -13,7 +13,7 @@ date: 2013-08-13 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: sfp
|
16
|
-
requirement: &
|
16
|
+
requirement: &13245980 !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
19
|
- - ~>
|
@@ -21,7 +21,7 @@ dependencies:
|
|
21
21
|
version: 0.3.6
|
22
22
|
type: :runtime
|
23
23
|
prerelease: false
|
24
|
-
version_requirements: *
|
24
|
+
version_requirements: *13245980
|
25
25
|
description: A Ruby implementation of SFP agent.
|
26
26
|
email: herry13@gmail.com
|
27
27
|
executables:
|