Sha256: 2ce548fce623841cec1d81b48a7d9605745124d6593170668e162c6765ad6585
Contents?: true
Size: 1.05 KB
Versions: 6
Compression:
Stored size: 1.05 KB
Contents
require "openssl" require "open-uri" require "multi_json" require "nokogiri" require "mustache" require "ostruct" require "moneta" require "cgi" require "net/http" require "digest" require "fast_blank" module Onebox DEFAULTS = { cache: Moneta.new(:Memory, expires: true, serializer: :json), connect_timeout: 5, timeout: 10, load_paths: [File.join(Gem::Specification.find_by_name("onebox").gem_dir, "templates")] } @@options = DEFAULTS def self.preview(url, options = Onebox.options) Preview.new(url, options) end def self.check(url, options = Onebox.options) StatusCheck.new(url, options) end def self.options OpenStruct.new(@@options) end def self.has_matcher?(url) !!Matcher.new(url).oneboxed end def self.options=(options) @@options = DEFAULTS.merge(options) end end require_relative "onebox/version" require_relative "onebox/preview" require_relative "onebox/status_check" require_relative "onebox/matcher" require_relative "onebox/engine" require_relative "onebox/layout" require_relative "onebox/view"
Version data entries
6 entries across 6 versions & 1 rubygems
Version | Path |
---|---|
onebox-1.7.5 | lib/onebox.rb |
onebox-1.7.4 | lib/onebox.rb |
onebox-1.7.3 | lib/onebox.rb |
onebox-1.7.2 | lib/onebox.rb |
onebox-1.7.1 | lib/onebox.rb |
onebox-1.7.0 | lib/onebox.rb |