rexchange 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,3 +1,6 @@
1
+ -- 0.1.3: Bugfixes
2
+ * Fixed several nasty bugs.
3
+
1
4
  -- 0.1.2: Minor documentation/cleanup
2
5
  * Removed a double-dash in the README that was apparently causing some viewing errors
3
6
  * Changed Session initialize to a ternary condition
data/RAKEFILE CHANGED
@@ -5,9 +5,9 @@ require 'rake'
5
5
  require 'rake/rdoctask'
6
6
  require 'rake/gempackagetask'
7
7
  require 'rake/contrib/rubyforgepublisher'
8
- # require 'pscp'
8
+ require 'pscp'
9
9
 
10
- PACKAGE_VERSION = '0.1.2'
10
+ PACKAGE_VERSION = '0.1.3'
11
11
 
12
12
  PACKAGE_FILES = FileList[
13
13
  'README',
data/lib/rexchange.rb CHANGED
@@ -6,6 +6,9 @@ module RExchange
6
6
 
7
7
  # A shortcut to RExchange::Session#new's block syntax
8
8
  def self.open(uri, options = {})
9
- yield RExchange::Session.new(uri, options)
9
+ session = RExchange::Session.new(uri, options)
10
+
11
+ yield session if block_given?
12
+ return session
10
13
  end
11
14
  end
@@ -5,14 +5,14 @@ module RExchange
5
5
  # Credentials are passed around between Folders to emulate a stateful
6
6
  # connection with the RExchange::Session
7
7
  class Credentials
8
- attr_reader :user, :password, :uri, :use_ssl
8
+ attr_reader :user, :password, :uri
9
9
 
10
10
  # You must pass a uri, and an options hash containing :user and :password
11
11
  def initialize(uri, options = {})
12
12
  @uri = URI.parse(uri)
13
13
  @use_ssl = (@uri.scheme.downcase == 'https')
14
- @user = @uri.userinfo ? @user.userinfo.split(':')[0] : options.delete(:user)
15
- @password = @uri.userinfo ? @user.userinfo.split(':')[1] : options.delete(:password)
14
+ @user = @uri.userinfo ? @user.userinfo.split(':')[0] : options.values_at(:user)
15
+ @password = @uri.userinfo ? @user.userinfo.split(':')[1] : options.values_at(:password)
16
16
  @port = @uri.port || @uri.default_port
17
17
 
18
18
  if block_given?
@@ -22,6 +22,10 @@ module RExchange
22
22
  end
23
23
  end
24
24
 
25
+ def use_ssl?
26
+ @use_ssl
27
+ end
28
+
25
29
  end
26
30
 
27
31
  end
@@ -25,7 +25,7 @@ module RExchange
25
25
  end
26
26
 
27
27
  req.body = options[:body] if REQUEST_HAS_BODY
28
- http.use_ssl = true
28
+ http.use_ssl = credentials.use_ssl?
29
29
  http.verify_mode = OpenSSL::SSL::VERIFY_NONE
30
30
  return http.request(req) if RESPONSE_HAS_BODY
31
31
  return true
@@ -22,7 +22,7 @@ module RExchange
22
22
  @parent = @credentials.uri.path
23
23
  @folder = ''
24
24
 
25
- block_given? ? yield self : return self
25
+ yield(self) if block_given?
26
26
  end
27
27
 
28
28
  end
metadata CHANGED
@@ -1,58 +1,63 @@
1
- --- !ruby/object:Gem::Specification
2
- rubygems_version: 0.8.10
1
+ !ruby/object:Gem::Specification
2
+ rubygems_version: 0.8.11
3
3
  specification_version: 1
4
4
  name: rexchange
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.2
7
- date: 2006-01-28
8
- summary: "A simple wrapper around Microsoft Exchange Server's WebDAV API"
6
+ version: 0.1.3
7
+ date: 2006-02-01 00:00:00 -06:00
8
+ summary: A simple wrapper around Microsoft Exchange Server's WebDAV API
9
9
  require_paths:
10
- - lib
10
+ - lib
11
11
  email: ssmoot@gmail.com; bauer.mail@gmail.com
12
12
  homepage: http://substantiality.net
13
13
  rubyforge_project: rexchange
14
- description: "Connect, browse, and iterate through folders and messages on an Exchange Server"
14
+ description: Connect, browse, and iterate through folders and messages on an Exchange Server
15
15
  autorequire: rexchange
16
16
  default_executable:
17
17
  bindir: bin
18
18
  has_rdoc: true
19
19
  required_ruby_version: !ruby/object:Gem::Version::Requirement
20
20
  requirements:
21
- -
22
- - ">"
23
- - !ruby/object:Gem::Version
24
- version: 0.0.0
21
+ - - ">"
22
+ - !ruby/object:Gem::Version
23
+ version: 0.0.0
25
24
  version:
26
25
  platform: ruby
26
+ signing_key:
27
+ cert_chain:
27
28
  authors:
28
- - Sam Smoot
29
- - Scott Bauer
29
+ - Sam Smoot
30
+ - Scott Bauer
30
31
  files:
31
- - README
32
- - CHANGELOG
33
- - RAKEFILE
34
- - lib/rexchange.rb
35
- - lib/rexchange/credentials.rb
36
- - lib/rexchange/dav_move_request.rb
37
- - lib/rexchange/dav_search_request.rb
38
- - lib/rexchange/exchange_request.rb
39
- - lib/rexchange/extensions.rb
40
- - lib/rexchange/folder.rb
41
- - lib/rexchange/message.rb
42
- - lib/rexchange/session.rb
43
- - test/functional.rb
32
+ - README
33
+ - CHANGELOG
34
+ - RAKEFILE
35
+ - lib/rexchange.rb
36
+ - lib/rexchange/credentials.rb
37
+ - lib/rexchange/dav_move_request.rb
38
+ - lib/rexchange/dav_search_request.rb
39
+ - lib/rexchange/exchange_request.rb
40
+ - lib/rexchange/extensions.rb
41
+ - lib/rexchange/folder.rb
42
+ - lib/rexchange/message.rb
43
+ - lib/rexchange/session.rb
44
+ - test/functional.rb
44
45
  test_files: []
46
+
45
47
  rdoc_options:
46
- - "--line-numbers"
47
- - "--inline-source"
48
- - "--main"
49
- - README
48
+ - --line-numbers
49
+ - --inline-source
50
+ - --main
51
+ - README
50
52
  extra_rdoc_files:
51
- - README
52
- - CHANGELOG
53
- - RAKEFILE
53
+ - README
54
+ - CHANGELOG
55
+ - RAKEFILE
54
56
  executables: []
57
+
55
58
  extensions: []
59
+
56
60
  requirements:
57
- - none
58
- dependencies: []
61
+ - none
62
+ dependencies: []
63
+