This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module Request | |
HEADERS = { 'Content-Type' => 'application/json' }.freeze | |
def self.add_headers(headers) | |
HEADERS.merge!(headers) | |
end | |
def get_request(path) | |
uri = URI.parse(path) | |
http = Net::HTTP.new(uri.host, uri.port) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'gruff' | |
g = Gruff::Line.new(400) | |
g.maximum_value = 100 | |
g.minimum_value = 0 | |
g.y_axis_increment = 5 | |
g.theme = { | |
:colors => %w(black red), | |
:marker_color => 'grey', | |
:font_color => 'black', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
content_type = request["content-type"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
require 'moneta' | |
require 'flipper' | |
load './lib/flipper/adapters/moneta.rb' | |
moneta = Moneta.build do | |
use :Logger | |
adapter :Memory | |
end | |
adapter = Flipper::Adapters::Moneta.new(moneta) |
OlderNewer