incoming 0.1.7 → 0.1.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 669e826d514d7f60c2f0b573d05e06b5c787bd58
4
- data.tar.gz: 69297a42708e49dcc34dfbb8c9e7564c98fca255
3
+ metadata.gz: 13d2a53b1d5027bf212a3a74e08b40207997d8c7
4
+ data.tar.gz: d12a01b4a2c2a8d90881579196534dc550884742
5
5
  SHA512:
6
- metadata.gz: fffdd521a873011ce3a2c63086b9a90428a366b6eb0e902692d1c58c10d15a200f6b1329bcb5c270dc0d7ad8fb93f30e2fa30c4298c2faf218a892b16ed12b56
7
- data.tar.gz: b74dd6dd56b1a0dacc49807b38da6fbe5747045d7ea28703574eee4ea0f827e8275154141ff724520501a06aa6eb94a781c9968ec69de29543b4202d930ca18c
6
+ metadata.gz: b68bc6f0758974533a972551df3df2d1f27810707f82adf340ea266b2acfba5f504a86b39c4fb8c1980622660eefc7d8f0d0722462dddedd55f1bf002a1e8719
7
+ data.tar.gz: 3ffb9246ad28a0f6e2bb17fceed526d384ed6a2ca32a7eb99db1b496207b5bf690ee0ade115f60bf80a417ba68f407243782481bbd09354580b93a8dcae5f247
@@ -2,7 +2,7 @@ require 'mail'
2
2
  require 'incoming/strategy'
3
3
 
4
4
  module Incoming
5
- VERSION = '0.1.7'
5
+ VERSION = '0.1.8'
6
6
 
7
7
  module Strategies
8
8
  autoload :Mandrill, 'incoming/strategies/mandrill'
@@ -17,7 +17,7 @@ module Incoming
17
17
  end
18
18
 
19
19
  def authenticate
20
- hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('SHA256'), self.class.default_options[:secret], [timestamp, token].join)
20
+ hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('SHA256'), self.class.default_options[:secret], [timestamp, token].join)
21
21
  hexdigest.eql?(signature) or false
22
22
  end
23
23
  end
@@ -69,7 +69,7 @@ module Incoming
69
69
  def authenticate
70
70
  api_key = self.class.default_options[:api_key]
71
71
 
72
- hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest::Digest.new('SHA256'), api_key, [timestamp, token].join)
72
+ hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest.new('SHA256'), api_key, [timestamp, token].join)
73
73
  hexdigest.eql?(signature) or false
74
74
  end
75
75
  end
@@ -8,7 +8,6 @@ module Incoming
8
8
  def initialize(request)
9
9
  params = request.params.dup
10
10
 
11
- # TODO: Properly handle encodings
12
11
  encodings = JSON.parse(params['charsets'])
13
12
 
14
13
  attachments = 1.upto(params['attachments'].to_i).map do |num|
@@ -17,6 +16,8 @@ module Incoming
17
16
 
18
17
  @message = Mail.new do
19
18
  header params['headers']
19
+ header['Content-Transfer-Encoding'] = nil
20
+
20
21
  if encodings['text'].blank?
21
22
  body params['text']
22
23
  else
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: incoming
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.7
4
+ version: 0.1.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua Wood
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-04-08 00:00:00.000000000 Z
11
+ date: 2014-06-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rack
@@ -106,7 +106,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
106
106
  version: '0'
107
107
  requirements: []
108
108
  rubyforge_project:
109
- rubygems_version: 2.2.0
109
+ rubygems_version: 2.2.2
110
110
  signing_key:
111
111
  specification_version: 4
112
112
  summary: Incoming! helps you receive email in your Rack apps.