mlist 0.1.9 → 0.1.10
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.
- data/VERSION.yml +2 -1
- data/lib/mlist/email.rb +6 -4
- data/lib/mlist/list.rb +8 -0
- data/lib/mlist/server.rb +1 -1
- data/spec/integration/mlist_spec.rb +1 -0
- metadata +2 -2
data/VERSION.yml
CHANGED
data/lib/mlist/email.rb
CHANGED
@@ -6,10 +6,6 @@ module MList
|
|
6
6
|
include MList::Util::EmailHelpers
|
7
7
|
include MList::Util::TMailReaders
|
8
8
|
|
9
|
-
def been_here?(list)
|
10
|
-
tmail.header_string('x-beenthere') == list.address
|
11
|
-
end
|
12
|
-
|
13
9
|
def date
|
14
10
|
if date_from_email = super
|
15
11
|
return date_from_email
|
@@ -22,6 +18,12 @@ module MList
|
|
22
18
|
tmail.header_string('from')
|
23
19
|
end
|
24
20
|
|
21
|
+
# Answers the values of all the X-BeenThere headers.
|
22
|
+
#
|
23
|
+
def been_there_addresses
|
24
|
+
Array(tmail['x-beenthere']).collect { |e| e.body.downcase }.uniq
|
25
|
+
end
|
26
|
+
|
25
27
|
# Answers the usable destination addresses of the email.
|
26
28
|
#
|
27
29
|
def list_addresses
|
data/lib/mlist/list.rb
CHANGED
@@ -17,6 +17,14 @@ module MList
|
|
17
17
|
true
|
18
18
|
end
|
19
19
|
|
20
|
+
# Answers whether the email has been to this list before. The simplest
|
21
|
+
# test is whether the email has an X-BeenThere header that matches this
|
22
|
+
# list's address.
|
23
|
+
#
|
24
|
+
def been_here?(email)
|
25
|
+
email.been_there_addresses.include?(address)
|
26
|
+
end
|
27
|
+
|
20
28
|
# Answers whether the subscriber is blocked from posting or not. This will
|
21
29
|
# not be asked when the list is not active (answers _active?_ as false).
|
22
30
|
#
|
data/lib/mlist/server.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: mlist
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.10
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adam Williams
|
@@ -9,7 +9,7 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date:
|
12
|
+
date: 2010-01-11 00:00:00 -05:00
|
13
13
|
default_executable:
|
14
14
|
dependencies: []
|
15
15
|
|