pjstadig-easy_imap 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.
data/History.txt CHANGED
@@ -8,3 +8,8 @@
8
8
  * 1 minor enhancement:
9
9
  * Added support for simple LOGIN authentication. (intabulas)
10
10
 
11
+ == 0.0.3 2009-01-25
12
+
13
+ * 2 minor enhancement:
14
+ * An SSL option for connecting to the server. (Guillaume Dorchies)
15
+ * Caching for the envelope method of Message. (Guillaume Dorchies)
data/README.rdoc CHANGED
@@ -33,8 +33,11 @@ access the Attachments on a Message use EasyIMAP::Message#attachments.
33
33
 
34
34
  == CONTRIBUTORS:
35
35
 
36
+ EasyIMAP would not be nearly as wonderful without the contributions of others. I could not have done it myself. Thank you to all the contributors!
37
+
36
38
  * Paul Stadig (pjstadig)
37
39
  * Mark Lussier (intabulas)
40
+ * Guillaume Dorchies
38
41
 
39
42
  == LICENSE:
40
43
 
@@ -98,7 +98,7 @@ module EasyIMAP
98
98
  end
99
99
 
100
100
  def envelope
101
- @conn.uid_fetch(@uid, "ENVELOPE").first.attr["ENVELOPE"]
101
+ @envelope ||= @conn.uid_fetch(@uid, "ENVELOPE").first.attr["ENVELOPE"]
102
102
  end
103
103
 
104
104
  def body
@@ -5,9 +5,9 @@ module EasyIMAP
5
5
  class Server
6
6
  # Makes a connection to +host+ and returns an instance of Server.
7
7
  #
8
- # It is recommended that you use this method to connect instead
8
+ # It is recommended that you use this method to connect instead
9
9
  # of Server#new, because at some time in the future there may be
10
- # multiple server classes to smooth over "quirks" in IMAP
10
+ # multiple server classes to smooth over "quirks" in IMAP
11
11
  # implementations. This method should automatically select the
12
12
  # right server class for you.
13
13
  #
@@ -21,6 +21,7 @@ module EasyIMAP
21
21
  # username:: the username with which to connect
22
22
  # password:: the password with which to connect
23
23
  # auth_type:: the authentication type with which to connect (defaults to LOGIN)
24
+ # use_ssl:: if true, then use SSL to connect (defaults to false).
24
25
  def self.connect(host, options = nil)
25
26
  conn = Server.new(host, options)
26
27
  if block_given?
@@ -35,7 +36,8 @@ module EasyIMAP
35
36
  def initialize(host, options = nil)
36
37
  options ||= {}
37
38
  @host = host
38
- @conn = Net::IMAP.new(host, options[:port] || 143)
39
+ @conn = Net::IMAP.new(host, options[:port] || 143, options[:use_ssl] || false)
40
+
39
41
  if options[:auth_type].to_s.downcase == "plain"
40
42
  @conn.login(options[:username], options[:password])
41
43
  else
data/lib/easy_imap.rb CHANGED
@@ -2,7 +2,7 @@ $:.unshift(File.dirname(__FILE__)) unless
2
2
  $:.include?(File.dirname(__FILE__)) || $:.include?(File.expand_path(File.dirname(__FILE__)))
3
3
 
4
4
  module EasyIMAP
5
- VERSION = '0.0.2'
5
+ VERSION = '0.0.3'
6
6
  end
7
7
 
8
8
  require 'easy_imap/server'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pjstadig-easy_imap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Paul Stadig
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2008-12-17 00:00:00 -08:00
12
+ date: 2009-01-25 00:00:00 -08:00
13
13
  default_executable:
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
@@ -28,7 +28,7 @@ dependencies:
28
28
  requirements:
29
29
  - - ">="
30
30
  - !ruby/object:Gem::Version
31
- version: 1.1.0
31
+ version: 1.2.3
32
32
  version:
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: hoe