lib/onebox/engine.rb in onebox-1.5.5 vs lib/onebox/engine.rb in onebox-1.5.6

- old
+ new

@@ -11,33 +11,33 @@ end attr_reader :url attr_reader :cache attr_reader :timeout - + DEFUALT = {} def options @options end - + def options=(opt) return @options if opt.nil? #make sure options provided if opt.instance_of? OpenStruct - @options = @options.merge(opt.to_h) + @options = @options.merge(opt.to_h) else @options = @options.merge(opt) end @options end - + def initialize(link, cache = nil, timeout = nil) - + @options = DEFUALT class_name = self.class.name.split("::").last.to_s self.options = Onebox.options[class_name] || {} #Set the engine options extracted from global options. - + @url = link @cache = cache || Onebox.options.cache @timeout = timeout || Onebox.options.timeout end @@ -116,27 +116,28 @@ end end require_relative "helpers" require_relative "layout_support" +require_relative "file_type_finder" require_relative "engine/standard_embed" require_relative "engine/html" require_relative "engine/json" require_relative "engine/amazon_onebox" require_relative "engine/classic_google_maps_onebox" require_relative "engine/github_issue_onebox" require_relative "engine/github_blob_onebox" require_relative "engine/github_commit_onebox" -# broken -#require_relative "engine/github_gist_onebox" +require_relative "engine/github_gist_onebox" require_relative "engine/github_pullrequest_onebox" require_relative "engine/google_play_app_onebox" require_relative "engine/image_onebox" +require_relative "engine/video_onebox" +require_relative "engine/audio_onebox" require_relative "engine/stack_exchange_onebox" require_relative "engine/twitter_status_onebox" require_relative "engine/wikipedia_onebox" require_relative "engine/youtube_onebox" +require_relative "engine/youku_onebox" require_relative "engine/douban_onebox" require_relative "engine/whitelisted_generic_onebox" require_relative "engine/pubmed_onebox" -require_relative "engine/video_onebox" -require_relative "engine/audio_onebox"