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 +4 -4
- data/lib/incoming.rb +1 -1
- data/lib/incoming/strategies/http_post.rb +1 -1
- data/lib/incoming/strategies/mailgun.rb +1 -1
- data/lib/incoming/strategies/sendgrid.rb +2 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 13d2a53b1d5027bf212a3a74e08b40207997d8c7
|
4
|
+
data.tar.gz: d12a01b4a2c2a8d90881579196534dc550884742
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b68bc6f0758974533a972551df3df2d1f27810707f82adf340ea266b2acfba5f504a86b39c4fb8c1980622660eefc7d8f0d0722462dddedd55f1bf002a1e8719
|
7
|
+
data.tar.gz: 3ffb9246ad28a0f6e2bb17fceed526d384ed6a2ca32a7eb99db1b496207b5bf690ee0ade115f60bf80a417ba68f407243782481bbd09354580b93a8dcae5f247
|
data/lib/incoming.rb
CHANGED
@@ -17,7 +17,7 @@ module Incoming
|
|
17
17
|
end
|
18
18
|
|
19
19
|
def authenticate
|
20
|
-
hexdigest = OpenSSL::HMAC.hexdigest(OpenSSL::Digest
|
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
|
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.
|
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-
|
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.
|
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.
|