drillmail 0.0.2 → 0.0.3
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/drillmail.gemspec +1 -1
- data/lib/drillmail/commands/data.rb +7 -2
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 0f3706a86ade7c69f2fd52744c6f1247d23f9724
|
4
|
+
data.tar.gz: f37f7ad025f4ff57e6c1a872f0ac7ae323d19314
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 69a342389eb3a6098494653a6a411a11212ab85cee4f4adff90251295a7bc80ba963b0ec592a379ddc4fb73c717cc2cf9a7b67ad1e757ab2fcc896083e2e9972
|
7
|
+
data.tar.gz: 3a1d70f1e89f63006bef3a0008752b73335eb8074aabbc1404448e447bd8495718b228ba622c7597aec861d83f3c1b76ac7f4ce61887c6c14873e9d39c3e55cc
|
data/drillmail.gemspec
CHANGED
@@ -1,4 +1,5 @@
|
|
1
1
|
require 'mail'
|
2
|
+
require 'securerandom'
|
2
3
|
|
3
4
|
DataCommand = Struct.new(:session, :body) do
|
4
5
|
def call
|
@@ -11,8 +12,12 @@ DataCommand = Struct.new(:session, :body) do
|
|
11
12
|
end
|
12
13
|
|
13
14
|
mail = Mail.new(session.message.join)
|
14
|
-
|
15
|
-
|
15
|
+
|
16
|
+
puts "writing to #{mail.to.last}/#{mail.message_id}.eml"
|
17
|
+
# this could be dangerous as fake messages could flood in
|
18
|
+
# as we would just be committing them all to disk. Should do this
|
19
|
+
# async?
|
20
|
+
File.open("./#{mail.to.last}/#{mail.message_id}.eml", 'w') do |f|
|
16
21
|
f.write(mail)
|
17
22
|
end
|
18
23
|
|