Sha256: 9680c64f68eb989a443320bc0e280a61ceb29abbc58bf58283d6b7bc2b8d73f0
Contents?: true
Size: 497 Bytes
Versions: 2
Compression:
Stored size: 497 Bytes
Contents
require 'singleton' module Octonore class HTTPHelper include Singleton include HTTParty USER_AGENT = "octonore/#{VERSION}" base_uri 'https://api.github.com/gitignore' # Get the specified template's hash from Github. # @param location [String] location of resource to get # @return [Hash] whatever is gotten def get(location) self.class.get location, headers: headers end def headers {"User-Agent" => USER_AGENT} end end end
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
octonore-1.0.1 | lib/octonore/http_helper.rb |
octonore-1.0.0 | lib/octonore/http_helper.rb |