diff options
author | Wild Kat <wk@futureinquestion.net> | 2018-04-21 13:27:05 +0200 |
---|---|---|
committer | Wild Kat <wk@futureinquestion.net> | 2018-04-21 13:35:54 +0200 |
commit | 21e3d6490496573f25ef77fe8172766ac7d1a736 (patch) | |
tree | 785e5243f5f7ffe7e5a4bfcde551ec04c723b2ae /extra/rest_client.rb | |
parent | 2648b1bb271727976e2d96123fcd51d52af39f79 (diff) |
the great makeover - standardize layout, alignment, indentation
Diffstat (limited to 'extra/rest_client.rb')
-rw-r--r-- | extra/rest_client.rb | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/extra/rest_client.rb b/extra/rest_client.rb index 35d93ae..dba89c3 100644 --- a/extra/rest_client.rb +++ b/extra/rest_client.rb @@ -6,10 +6,10 @@ module Oxidized require 'asetus' class Config - Root = Root = ENV['OXIDIZED_HOME'] || File.join(ENV['HOME'], '.config', 'oxidized') + Root = Root = ENV['OXIDIZED_HOME'] || File.join(ENV['HOME'], '.config', 'oxidized') end - CFGS = Asetus.new :name=>'oxidized', :load=>false, :key_to_s=>true + CFGS = Asetus.new :name => 'oxidized', :load => false, :key_to_s => true CFGS.default.rest = '127.0.0.1:8888' begin @@ -28,13 +28,13 @@ module Oxidized PATH = URI(restcfg).path class << self - def next opt={}, host=HOST, port=PORT + def next opt = {}, host = HOST, port = PORT web = new host, port web.next opt end end - def initialize host=HOST, port=PORT + def initialize host = HOST, port = PORT @web = Net::HTTP.new host, port end @@ -42,6 +42,5 @@ module Oxidized data = JSON.dump opt @web.put PATH + '/node/next/' + opt[:name].to_s, data end - end end |