planet_express 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,8 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ### 0.1.4 Fixing EOF error
5
+
4
6
  ### 0.1.3
5
7
 
6
8
  - Don't use SSL by default: `http.use_ssl = false`.
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- planet_express (0.1.3)
4
+ planet_express (0.1.4)
5
5
  activesupport
6
6
  hpricot
7
7
  log4r
@@ -3,7 +3,7 @@ module PlanetExpress
3
3
  attr_accessor :gateway_url
4
4
 
5
5
  def initialize *args
6
- @gateway_url = 'https://transact5.silverpop.com/XTMail'
6
+ @gateway_url = 'http://transact5.silverpop.com/XTMail'
7
7
  end
8
8
  end
9
9
  end
@@ -9,7 +9,7 @@ module PlanetExpress
9
9
  # Settings
10
10
  self.configuration ||= PlanetExpress::Configuration.new
11
11
  self.logger = Rails.logger
12
- logger.info "gateway_url => #{configuration.gateway_url}"
12
+ logger.debug "gateway_url => #{configuration.gateway_url}"
13
13
  end
14
14
 
15
15
  def configure
@@ -28,7 +28,8 @@ module PlanetExpress
28
28
  def deliver!
29
29
  url = URI.parse configuration.gateway_url
30
30
  http, resp = Net::HTTP.new(url.host, url.port), ''
31
- http.use_ssl = false
31
+ http.use_ssl = url.scheme == 'https'
32
+ logger.debug "SSL version: #{http.ssl_version.inspect}" if http.use_ssl?
32
33
 
33
34
  http.start do |h|
34
35
  path = url.path
@@ -95,11 +96,11 @@ module PlanetExpress
95
96
  recipients_received = @response.at('RECIPIENTS_RECEIVED').innerHTML
96
97
  emails_sent = @response.at('EMAILS_SENT').innerHTML
97
98
 
98
- logger.info "Delivering: (#{emails_sent}/#{recipients_received})"
99
- logger.warn "Can't retrieve the response!" if @response.nil?
100
99
  logger.error "Error: #{error_string}" if status == 2
100
+ logger.warn "Can't retrieve the response!" if @response.nil?
101
+ logger.info "Email (#{emails_sent}/#{recipients_received}) delivered."
101
102
 
102
- return @response
103
+ return response
103
104
  end
104
105
  end
105
106
  end
@@ -1,3 +1,3 @@
1
1
  module PlanetExpress
2
- VERSION = "0.1.3"
2
+ VERSION = "0.1.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: planet_express
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: