Permalink
Browse files

removed deep_merge because it conflicts with Rails

  • Loading branch information...
1 parent 492caee commit b12f22c842cbf25131771e0af651f70cdc977151 Christopher Warren committed Apr 18, 2011
Showing with 5 additions and 5 deletions.
  1. +0 −1 assistly.gemspec
  2. +0 −1 lib/assistly.rb
  3. +5 −3 lib/assistly/client/interaction.rb
View
1 assistly.gemspec
@@ -21,7 +21,6 @@ Gem::Specification.new do |s|
s.add_runtime_dependency('rash', '~> 0.3.0')
s.add_runtime_dependency('simple_oauth', '~> 0.1.4')
s.add_runtime_dependency('pony', '~> 1.1')
- s.add_runtime_dependency('deep_merge', '~> 0.1.0')
s.authors = ["Chris Warren"]
s.description = %q{A Ruby wrapper for the Assistly REST API}
s.post_install_message =<<eos
View
1 lib/assistly.rb
@@ -3,7 +3,6 @@
require 'assistly/api'
require 'assistly/client'
require 'pony'
-require 'deep_merge'
module Assistly
extend Configuration
View
8 lib/assistly/client/interaction.rb
@@ -63,9 +63,11 @@ def create_outbound_interaction(to, subject, body, *args)
raise Assistly::SupportEmailNotSet if support_email.blank?
options = args.last.is_a?(Hash) ? args.pop : {}
options.merge!(:to => to, :subject => subject, :body => body, :from => support_email, :bcc => support_email)
- options.deep_merge!(:headers => { "x-assistly-customer-email" => to,
- "x-assistly-interaction-direction" => "out",
- "x-assistly-case-status" => options[:status]||"open"})
+ headers = { "x-assistly-customer-email" => to,
+ "x-assistly-interaction-direction" => "out",
+ "x-assistly-case-status" => options[:status]||"open"}
+ headers.merge!(options[:headers]) if options[:headers]
+ options.merge!(:headers => headers)
Pony.mail(options)
end
end

0 comments on commit b12f22c

Please sign in to comment.