mailarchiva 0.0.9 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: afc68c1baff8bb72fb5352105c5523b4e94a452d
4
- data.tar.gz: f4fee65055132094cb78f10fa018ca99b84f1cde
3
+ metadata.gz: 9883dbb63ac04456b76859b4b62235fcb1832660
4
+ data.tar.gz: c273cc252dcc2b14fa4af121131a2e26afc7dd90
5
5
  SHA512:
6
- metadata.gz: a1f4d1a4d314e44b5e377edd841e1fbfa4618dddb0b49aadbd51f3a075e55c4787fa83a56fc43c87ca15623c57303ddf43a605c75321f994e5529b791d3bd6f4
7
- data.tar.gz: 8d5aa57e07bcbc0386cdaac1a7af95233a13ca9a543348aba795428babc150b47dbffdebb22f16643aea5b66827ad3f9300ba70ca86373c46ab00dd3174b6267
6
+ metadata.gz: 11209834303368c69c24a3238a1b8f0a4d7f130827ba2d8631d694b6b80b09ef746c241af64db7efb3dcdf3e0667528d10ead9796db4944a6ed5397404458253
7
+ data.tar.gz: 7942cf572ed60d4a1c2b27c07343d43bb578086efe4e6db2f9272fa2bbdbecd6dc16129a6c211366c40a093cc536cb073cfd1df24dcd96c254d0ea4bec11b199
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.9
1
+ 0.0.10
@@ -30,7 +30,7 @@ module Mailarchiva
30
30
  end
31
31
 
32
32
  def from
33
- @from.match(/<(.*)>/).captures.first
33
+ raw_from && raw_from.match(/<(.*)>/).captures.first
34
34
  end
35
35
 
36
36
  def raw_to
@@ -38,7 +38,11 @@ module Mailarchiva
38
38
  end
39
39
 
40
40
  def to
41
- undisclosed_recipients? ? mail_message.header.fields.select{|field| field.name =~ /received/i && field.value =~ /\sfor\s<(.*)>/i }.collect{|field| field.value.match(/\sfor\s<(.*)>/).captures.first}.uniq.join : @to.match(/<(.*)>/).captures.first
41
+ if undisclosed_recipients?
42
+ mail_message.header.fields.select{|field| field.name =~ /received/i && field.value =~ /\sfor\s<(.*)>/i }.collect{|field| field.value.match(/\sfor\s<(.*)>/).captures.first}.uniq.join
43
+ elsif raw_to
44
+ raw_to.match(/<(.*)>/).captures.first
45
+ end
42
46
  end
43
47
 
44
48
  def raw_message
@@ -46,11 +50,11 @@ module Mailarchiva
46
50
  end
47
51
 
48
52
  def mail_message
49
- @mail_message ||= Mail.new(raw_message)
53
+ @mail_message ||= @client.get_mail_message(@blob_id, @volume_id)
50
54
  end
51
55
 
52
56
  def undisclosed_recipients?
53
- (@to =~ /undisclosed-recipients/i) == 1
57
+ (raw_to =~ /undisclosed-recipients/i) == 1
54
58
  end
55
59
 
56
60
  end
@@ -42,6 +42,11 @@ module Mailarchiva
42
42
  decoded_message = Base64.decode64(encoded_message)
43
43
  end
44
44
 
45
+ def get_mail_message(blob_id, volume_id)
46
+ message = get_message(blob_id, volume_id)
47
+ Mail.new(message)
48
+ end
49
+
45
50
  def wsdl
46
51
  "%s://%s:%s/services/search?wsdl" % [@ssl ? 'https' : 'http', @host, @port]
47
52
  end
@@ -2,16 +2,16 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: mailarchiva 0.0.9 ruby lib
5
+ # stub: mailarchiva 0.0.10 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "mailarchiva"
9
- s.version = "0.0.9"
9
+ s.version = "0.0.10"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
13
13
  s.authors = ["David John"]
14
- s.date = "2015-07-14"
14
+ s.date = "2015-07-15"
15
15
  s.description = "A gem to access the Mailarchiva API"
16
16
  s.email = "dj@dbjohn.com"
17
17
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mailarchiva
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - David John
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-14 00:00:00.000000000 Z
11
+ date: 2015-07-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: mail