diff options
author | Neil Lathwood <neil@lathwood.co.uk> | 2018-04-27 10:51:39 +0100 |
---|---|---|
committer | Neil Lathwood <neil@lathwood.co.uk> | 2018-04-27 10:51:39 +0100 |
commit | 6574f129bca9633d728c178b12e49a2e9be89cdd (patch) | |
tree | a2d630fca3156658aea07469b9a5c3fdf00f6846 /extra/rest_client.rb | |
parent | d96cfac1f09ff4055f54ab604358290865d41f62 (diff) | |
parent | 34fd5369feee94ab45c5a81d7769b1df717e4c8c (diff) |
Rebased from master
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 |