lib/mkit/app/controllers/pods_controller.rb in mkit-0.4.1 vs lib/mkit/app/controllers/pods_controller.rb in mkit-0.4.2
- old
+ new
@@ -1,7 +1,8 @@
-class PodsController < MKIt::Server
+# frozen_string_literal: true
+class PodsController < MKIt::Server
get '/services/:service_id/pods' do
"Not implemented\n"
end
get '/services/:service_id/pods/:pod_id' do
@@ -15,16 +16,14 @@
delete '/services/:service_id/pods/:pod_id' do
"Not implemented\n"
end
post '/services/:service_id/pods' do
- xx = "no file"
+ xx = 'no file'
if params[:file]
tempfile = params[:file][:tempfile]
- xx= YAML.load(tempfile.read)
+ xx = YAML.safe_load(tempfile.read)
puts xx
end
JSON.pretty_generate(JSON.parse(xx.to_json))
end
-
end
-