planet_express 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md CHANGED
@@ -1,6 +1,14 @@
1
1
  Changelog
2
2
  =========
3
3
 
4
+ ### 0.1.3
5
+
6
+ - Don't use SSL by default: `http.use_ssl = false`.
7
+ - Return the full response and log the response stats to logger.
8
+ - Indentation fixes
9
+
10
+ - Return full XML response.
11
+
4
12
  ### 0.1.2 Other typo with 0.1.1.
5
13
  ### 0.1.1 Typo with the new SAVE_COLUMNS feature.
6
14
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- planet_express (0.1.0)
4
+ planet_express (0.1.3)
5
5
  activesupport
6
6
  hpricot
7
7
  log4r
@@ -29,7 +29,7 @@ GEM
29
29
  listen (0.5.3)
30
30
  log4r (1.1.10)
31
31
  method_source (0.7.1)
32
- multi_json (1.7.2)
32
+ multi_json (1.7.7)
33
33
  pry (0.9.9.6)
34
34
  coderay (~> 1.0.5)
35
35
  method_source (~> 0.7.1)
@@ -28,7 +28,7 @@ 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 = true
31
+ http.use_ssl = false
32
32
 
33
33
  http.start do |h|
34
34
  path = url.path
@@ -51,7 +51,7 @@ module PlanetExpress
51
51
  " </PERSONALIZATION>\n"
52
52
 
53
53
  personalization_names +=
54
- " <COLUMN_NAME>#{name}</COLUMN_NAME>\n"
54
+ " <COLUMN_NAME>#{name}</COLUMN_NAME>\n"
55
55
  end
56
56
 
57
57
  recipient_xml =
@@ -95,9 +95,11 @@ module PlanetExpress
95
95
  recipients_received = @response.at('RECIPIENTS_RECEIVED').innerHTML
96
96
  emails_sent = @response.at('EMAILS_SENT').innerHTML
97
97
 
98
- return { status: false, emails_sent: emails_sent, recipients_received: recipients_received, message: 'The request has not been executed.' } if @response.nil?
99
- return { status: false, emails_sent: emails_sent, recipients_received: recipients_received, message: error_string } if status == 2
100
- return { status: true, emails_sent: emails_sent, recipients_received: recipients_received } if status == 0
98
+ logger.info "Delivering: (#{emails_sent}/#{recipients_received})"
99
+ logger.warn "Can't retrieve the response!" if @response.nil?
100
+ logger.error "Error: #{error_string}" if status == 2
101
+
102
+ return @response
101
103
  end
102
104
  end
103
105
  end
@@ -1,3 +1,3 @@
1
1
  module PlanetExpress
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
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.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-03 00:00:00.000000000 Z
12
+ date: 2013-08-23 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport