alpha_omega 0.0.67 → 0.0.68

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.
@@ -1,4 +1,5 @@
1
1
  require 'capistrano'
2
+ require 'yaml'
2
3
 
3
4
  module AlphaOmega
4
5
 
@@ -127,7 +128,7 @@ module AlphaOmega
127
128
  def self.what_pods (config, node_home)
128
129
  pods = {
129
130
  "default" => {
130
- "nodes_spec" => "#{node_home}/nodes/*.json",
131
+ "nodes_spec" => "#{node_home}/nodes/*.yaml",
131
132
  "node_suffix" => ""
132
133
  }
133
134
  }
@@ -135,10 +136,10 @@ module AlphaOmega
135
136
  yield config, "default", pods["default"]
136
137
 
137
138
  this_host = Socket.gethostname.chomp.split(".")[0]
138
- this_node = JSON.load(File.read("#{node_home}/nodes/#{this_host}.json"))
139
+ this_node = YAML.load(File.read("#{node_home}/nodes/#{this_host}.yaml"))
139
140
  (this_node["pods"] || []).each do |pod_name|
140
141
  pods[pod_name] = {
141
- "nodes_spec" => "#{node_home}/pods/#{pod_name}/*.json",
142
+ "nodes_spec" => "#{node_home}/pods/#{pod_name}/*.yaml",
142
143
  "node_suffix" => ".#{pod_name}"
143
144
  }
144
145
 
@@ -153,9 +154,9 @@ module AlphaOmega
153
154
  nodes = {}
154
155
 
155
156
  Dir[pod["nodes_spec"]].each do |fname|
156
- node_name = File.basename(fname, ".json")
157
+ node_name = File.basename(fname, ".yaml")
157
158
 
158
- node = JSON.parse(IO.read(fname))
159
+ node = YAML.parse(IO.read(fname))
159
160
  node["node_name"] = node_name
160
161
  node["pod_context"] = pod
161
162
 
@@ -1,3 +1,3 @@
1
1
  module AlphaOmega
2
- Version = "0.0.67"
2
+ Version = "0.0.68"
3
3
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: alpha_omega
3
3
  version: !ruby/object:Gem::Version
4
- hash: 153
4
+ hash: 151
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 67
10
- version: 0.0.67
9
+ - 68
10
+ version: 0.0.68
11
11
  platform: ruby
12
12
  authors:
13
13
  - David Nghiem