lib/ratchetio/configuration.rb in ratchetio-0.6.1 vs lib/ratchetio/configuration.rb in ratchetio-0.6.3

- old
+ new

@@ -19,10 +19,11 @@ attr_accessor :person_username_method attr_accessor :person_email_method attr_accessor :root attr_accessor :scrub_fields attr_accessor :use_async + attr_accessor :use_eventmachine attr_accessor :web_base attr_accessor :write_to_file DEFAULT_ENDPOINT = 'https://submit.ratchet.io/api/1/item/' DEFAULT_WEB_BASE = 'https://ratchet.io' @@ -45,9 +46,15 @@ @scrub_fields = [:passwd, :password, :password_confirmation, :secret, :confirm_password, :password_confirmation] @use_async = false @web_base = DEFAULT_WEB_BASE @write_to_file = false + @use_eventmachine = false + end + + def use_eventmachine=(value) + require 'em-http-request' if value + @use_eventmachine = value end # allow params to be read like a hash def [](option) send(option)