diff options
author | ytti <saku@ytti.fi> | 2018-04-25 16:12:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-04-25 16:12:44 +0300 |
commit | 583bc422448a234a215113a15f8a6976c50b2296 (patch) | |
tree | b3f757e6f37aa058a0c80e4ded3ef82553bc98c1 /extra/rest_client.rb | |
parent | 9a7d16c00163c421d2c9f3cb2783c76633860336 (diff) | |
parent | dffae0f76656a57da8f5473ce21955638cbe1f7f (diff) |
Merge pull request #1296 from wk/the-great-makeover
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 |