source "https://rubygems.org"
-gem "rubocop"
gem "foodcritic"
-gem "test-kitchen"
gem "kitchen-vagrant"
+gem "rubocop"
gem "serverspec"
+gem "test-kitchen"
net-telnet (0.1.1)
nokogiri (1.6.8.1)
mini_portile2 (~> 2.1.0)
- parser (2.3.1.4)
+ parser (2.3.3.1)
ast (~> 2.2)
polyglot (0.3.5)
powerpack (0.1.1)
- rainbow (2.1.0)
+ rainbow (2.2.1)
rake (11.3.0)
rspec (3.5.0)
rspec-core (~> 3.5.0)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.5.0)
rspec-support (3.5.0)
- rubocop (0.45.0)
- parser (>= 2.3.1.1, < 3.0)
+ rubocop (0.47.1)
+ parser (>= 2.3.3.1, < 3.0)
powerpack (~> 0.1)
rainbow (>= 1.99.1, < 3.0)
ruby-progressbar (~> 1.7)
thor (0.19.1)
treetop (1.6.8)
polyglot (~> 0.3)
- unicode-display_width (1.1.1)
+ unicode-display_width (1.1.3)
yajl-ruby (1.3.0)
PLATFORMS
end
layers = Dir.glob("/srv/imagery/layers/#{name}/*.yml").collect do |path|
- YAML.load(::File.read(path))
+ YAML.safe_load(::File.read(path))
end
template "/srv/#{name}/imagery.js" do
node[:kibana][:sites].each do |name, details|
file "/etc/kibana/#{name}.yml" do
- content YAML.dump(YAML.load(File.read("/opt/kibana-#{version}/config/kibana.yml")).merge(
+ content YAML.dump(YAML.safe_load(File.read("/opt/kibana-#{version}/config/kibana.yml")).merge(
"port" => details[:port],
"host" => "127.0.0.1",
"elasticsearch_url" => details[:elasticsearch_url],
# replicated to a file.
class Replicator
def initialize(config)
- @config = YAML.load(File.read(config))
- @state = YAML.load(File.read(@config["state_file"]))
+ @config = YAML.safe_load(File.read(config))
+ @state = YAML.safe_load(File.read(@config["state_file"]))
@conn = PGconn.connect(@config["db"])
# get current time from the database rather than the current system
@now = @conn.exec("select now() as now").map { |row| Time.parse(row["now"]) }[0]