rews 0.5.3 → 0.5.4
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/.travis.yml +4 -0
- data/README.md +71 -0
- data/Rakefile +14 -2
- data/VERSION +1 -1
- data/rews.gemspec +92 -0
- metadata +30 -23
- data/README.rdoc +0 -72
data/.travis.yml
ADDED
data/README.md
ADDED
@@ -0,0 +1,71 @@
|
|
1
|
+
rews [](http://travis-ci.org/trampoline/rews)
|
2
|
+
====
|
3
|
+
|
4
|
+
Rews is a simple Ruby client for Exchange Web Services
|
5
|
+
|
6
|
+
Install
|
7
|
+
-------
|
8
|
+
|
9
|
+
gem install rews
|
10
|
+
|
11
|
+
About
|
12
|
+
-----
|
13
|
+
|
14
|
+
* Find, Get and Delete of Items and Folders is supported.
|
15
|
+
* Filtering, ordering, and arbitrary property retrieval are supported.
|
16
|
+
* Bulk operations are supported
|
17
|
+
* Runs on both CRuby and JRuby
|
18
|
+
|
19
|
+
Method names generally follow the Exchange Web Services API
|
20
|
+
http://msdn.microsoft.com/en-us/library/bb409286(EXCHG.140).aspx
|
21
|
+
|
22
|
+
It has been tested against
|
23
|
+
|
24
|
+
* Exchange 2007 SP1 (Version 8.1, Build 240.6)
|
25
|
+
* Exchange 2010 SP1 (Version 14.1, Build 218.15)
|
26
|
+
|
27
|
+
Use
|
28
|
+
---
|
29
|
+
|
30
|
+
# create a client
|
31
|
+
c = Rews::Client.new("https://exchange.bar.com/EWS/Exchange.asmx", :ntlm, 'EXCHDOM\foo', 'password')
|
32
|
+
|
33
|
+
# find a distinguished folder from one of the mailboxes the user has permissions for
|
34
|
+
inbox=c.distinguished_folder_id('inbox', 'foo@bar.com')
|
35
|
+
|
36
|
+
# find some message_ids,
|
37
|
+
mids = inbox.find_item_id(:restriction=>[:<=, "item:DateTimeReceived",DateTime.now],
|
38
|
+
:sort_order=>[["item:DateTimeReceived", "Ascending"]],
|
39
|
+
:indexed_page_item_view=>{:max_entries_returned=>10, :offset=>0})
|
40
|
+
|
41
|
+
# get some properties for a bunch of messages in one hit
|
42
|
+
messages = c.get_item(mids, :item_shape=>{
|
43
|
+
:base_shape=>:IdOnly,
|
44
|
+
:additional_properties=>[
|
45
|
+
[:field_uri, "item:Subject"],
|
46
|
+
[:field_uri, "item:DateTimeReceived"],
|
47
|
+
[:field_uri, "message:InternetMessageId"],
|
48
|
+
[:field_uri, "message:IsRead"],
|
49
|
+
[:field_uri, "message:IsReadReceiptRequested"]]})
|
50
|
+
|
51
|
+
# suppress read receipts on any messages which have requested them
|
52
|
+
c.suppress_read_receipt(messages)
|
53
|
+
|
54
|
+
# delete the items to the DeletedItems folder
|
55
|
+
c.delete_item(mids, :delete_type=>:MoveToDeletedItems)
|
56
|
+
|
57
|
+
Note on Patches/Pull Requests
|
58
|
+
-----------------------------
|
59
|
+
|
60
|
+
* Fork the project.
|
61
|
+
* Make your feature addition or bug fix.
|
62
|
+
* Add tests for it. This is important so I don't break it in a
|
63
|
+
future version unintentionally.
|
64
|
+
* Commit, do not mess with rakefile, version, or history.
|
65
|
+
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
66
|
+
* Send me a pull request. Bonus points for topic branches.
|
67
|
+
|
68
|
+
Copyright
|
69
|
+
---------
|
70
|
+
|
71
|
+
Copyright (c) 2011 Trampoline Systems Ltd. See LICENSE for details.
|
data/Rakefile
CHANGED
@@ -1,6 +1,17 @@
|
|
1
1
|
require 'rubygems'
|
2
2
|
require 'rake'
|
3
3
|
|
4
|
+
begin
|
5
|
+
require "yard"
|
6
|
+
|
7
|
+
YARD::Rake::YardocTask.new do |t|
|
8
|
+
t.files = ["README.md", "lib/**/*.rb"]
|
9
|
+
end
|
10
|
+
rescue LoadError
|
11
|
+
desc message = %{"gem install yard" to generate documentation}
|
12
|
+
task("yard") { abort message }
|
13
|
+
end
|
14
|
+
|
4
15
|
begin
|
5
16
|
require 'jeweler'
|
6
17
|
Jeweler::Tasks.new do |gem|
|
@@ -15,13 +26,14 @@ begin
|
|
15
26
|
gem.add_runtime_dependency "pyu-ntlm-http", ">= 0.1.3"
|
16
27
|
gem.add_runtime_dependency "fetch_in", ">= 0.2.0"
|
17
28
|
gem.add_runtime_dependency "rsxml", ">= 0.3.0"
|
18
|
-
gem.add_development_dependency "rspec", "
|
29
|
+
gem.add_development_dependency "rspec", "~> 1.3.1"
|
19
30
|
gem.add_development_dependency "rr", ">= 0.10.5"
|
20
31
|
gem.add_development_dependency "nokogiri", ">= 1.4.4"
|
32
|
+
gem.add_development_dependency "yard", ">= 0.7.1"
|
21
33
|
|
22
34
|
# gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
|
23
35
|
end
|
24
|
-
Jeweler::
|
36
|
+
Jeweler::RubygemsDotOrgTasks.new
|
25
37
|
rescue LoadError
|
26
38
|
puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
|
27
39
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.4
|
data/rews.gemspec
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
# Generated by jeweler
|
2
|
+
# DO NOT EDIT THIS FILE DIRECTLY
|
3
|
+
# Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
|
4
|
+
# -*- encoding: utf-8 -*-
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = %q{rews}
|
8
|
+
s.version = "0.5.4"
|
9
|
+
|
10
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
|
+
s.authors = ["Trampoline Systems Ltd"]
|
12
|
+
s.date = %q{2011-06-01}
|
13
|
+
s.description = %q{an email focussed Ruby client for Exchange Web Services atop Savon}
|
14
|
+
s.email = %q{craig@trampolinesystems.com}
|
15
|
+
s.extra_rdoc_files = [
|
16
|
+
"LICENSE",
|
17
|
+
"README.md"
|
18
|
+
]
|
19
|
+
s.files = [
|
20
|
+
".document",
|
21
|
+
".travis.yml",
|
22
|
+
"LICENSE",
|
23
|
+
"README.md",
|
24
|
+
"Rakefile",
|
25
|
+
"VERSION",
|
26
|
+
"lib/rews.rb",
|
27
|
+
"lib/rews/client.rb",
|
28
|
+
"lib/rews/folder.rb",
|
29
|
+
"lib/rews/item.rb",
|
30
|
+
"lib/rews/restriction.rb",
|
31
|
+
"lib/rews/shape.rb",
|
32
|
+
"lib/rews/sort_order.rb",
|
33
|
+
"lib/rews/update.rb",
|
34
|
+
"lib/rews/util.rb",
|
35
|
+
"lib/rews/view.rb",
|
36
|
+
"rews.gemspec",
|
37
|
+
"spec/request_proxy.rb",
|
38
|
+
"spec/rews/client_spec.rb",
|
39
|
+
"spec/rews/folder_spec.rb",
|
40
|
+
"spec/rews/item_spec.rb",
|
41
|
+
"spec/rews/restriction_spec.rb",
|
42
|
+
"spec/rews/shape_spec.rb",
|
43
|
+
"spec/rews/sort_order_spec.rb",
|
44
|
+
"spec/rews/update_spec.rb",
|
45
|
+
"spec/rews/util_spec.rb",
|
46
|
+
"spec/rews/view_spec.rb",
|
47
|
+
"spec/rews_spec.rb",
|
48
|
+
"spec/spec.opts",
|
49
|
+
"spec/spec_helper.rb"
|
50
|
+
]
|
51
|
+
s.homepage = %q{http://github.com/trampoline/rews}
|
52
|
+
s.require_paths = ["lib"]
|
53
|
+
s.rubygems_version = %q{1.6.2}
|
54
|
+
s.summary = %q{a Ruby client for Exchange Web Services}
|
55
|
+
|
56
|
+
if s.respond_to? :specification_version then
|
57
|
+
s.specification_version = 3
|
58
|
+
|
59
|
+
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
60
|
+
s.add_runtime_dependency(%q<savon>, ["= 0.9.1"])
|
61
|
+
s.add_runtime_dependency(%q<httpclient>, [">= 2.2.0.2"])
|
62
|
+
s.add_runtime_dependency(%q<pyu-ntlm-http>, [">= 0.1.3"])
|
63
|
+
s.add_runtime_dependency(%q<fetch_in>, [">= 0.2.0"])
|
64
|
+
s.add_runtime_dependency(%q<rsxml>, [">= 0.3.0"])
|
65
|
+
s.add_development_dependency(%q<rspec>, ["~> 1.3.1"])
|
66
|
+
s.add_development_dependency(%q<rr>, [">= 0.10.5"])
|
67
|
+
s.add_development_dependency(%q<nokogiri>, [">= 1.4.4"])
|
68
|
+
s.add_development_dependency(%q<yard>, [">= 0.7.1"])
|
69
|
+
else
|
70
|
+
s.add_dependency(%q<savon>, ["= 0.9.1"])
|
71
|
+
s.add_dependency(%q<httpclient>, [">= 2.2.0.2"])
|
72
|
+
s.add_dependency(%q<pyu-ntlm-http>, [">= 0.1.3"])
|
73
|
+
s.add_dependency(%q<fetch_in>, [">= 0.2.0"])
|
74
|
+
s.add_dependency(%q<rsxml>, [">= 0.3.0"])
|
75
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
76
|
+
s.add_dependency(%q<rr>, [">= 0.10.5"])
|
77
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
|
78
|
+
s.add_dependency(%q<yard>, [">= 0.7.1"])
|
79
|
+
end
|
80
|
+
else
|
81
|
+
s.add_dependency(%q<savon>, ["= 0.9.1"])
|
82
|
+
s.add_dependency(%q<httpclient>, [">= 2.2.0.2"])
|
83
|
+
s.add_dependency(%q<pyu-ntlm-http>, [">= 0.1.3"])
|
84
|
+
s.add_dependency(%q<fetch_in>, [">= 0.2.0"])
|
85
|
+
s.add_dependency(%q<rsxml>, [">= 0.3.0"])
|
86
|
+
s.add_dependency(%q<rspec>, ["~> 1.3.1"])
|
87
|
+
s.add_dependency(%q<rr>, [">= 0.10.5"])
|
88
|
+
s.add_dependency(%q<nokogiri>, [">= 1.4.4"])
|
89
|
+
s.add_dependency(%q<yard>, [">= 0.7.1"])
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rews
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 3
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 4
|
10
|
+
version: 0.5.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Trampoline Systems Ltd
|
@@ -105,14 +105,14 @@ dependencies:
|
|
105
105
|
requirement: &id006 !ruby/object:Gem::Requirement
|
106
106
|
none: false
|
107
107
|
requirements:
|
108
|
-
- -
|
108
|
+
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
|
-
hash:
|
110
|
+
hash: 25
|
111
111
|
segments:
|
112
112
|
- 1
|
113
|
-
-
|
114
|
-
-
|
115
|
-
version: 1.
|
113
|
+
- 3
|
114
|
+
- 1
|
115
|
+
version: 1.3.1
|
116
116
|
type: :development
|
117
117
|
version_requirements: *id006
|
118
118
|
- !ruby/object:Gem::Dependency
|
@@ -147,6 +147,22 @@ dependencies:
|
|
147
147
|
version: 1.4.4
|
148
148
|
type: :development
|
149
149
|
version_requirements: *id008
|
150
|
+
- !ruby/object:Gem::Dependency
|
151
|
+
name: yard
|
152
|
+
prerelease: false
|
153
|
+
requirement: &id009 !ruby/object:Gem::Requirement
|
154
|
+
none: false
|
155
|
+
requirements:
|
156
|
+
- - ">="
|
157
|
+
- !ruby/object:Gem::Version
|
158
|
+
hash: 1
|
159
|
+
segments:
|
160
|
+
- 0
|
161
|
+
- 7
|
162
|
+
- 1
|
163
|
+
version: 0.7.1
|
164
|
+
type: :development
|
165
|
+
version_requirements: *id009
|
150
166
|
description: an email focussed Ruby client for Exchange Web Services atop Savon
|
151
167
|
email: craig@trampolinesystems.com
|
152
168
|
executables: []
|
@@ -155,11 +171,12 @@ extensions: []
|
|
155
171
|
|
156
172
|
extra_rdoc_files:
|
157
173
|
- LICENSE
|
158
|
-
- README.
|
174
|
+
- README.md
|
159
175
|
files:
|
160
176
|
- .document
|
177
|
+
- .travis.yml
|
161
178
|
- LICENSE
|
162
|
-
- README.
|
179
|
+
- README.md
|
163
180
|
- Rakefile
|
164
181
|
- VERSION
|
165
182
|
- lib/rews.rb
|
@@ -172,6 +189,7 @@ files:
|
|
172
189
|
- lib/rews/update.rb
|
173
190
|
- lib/rews/util.rb
|
174
191
|
- lib/rews/view.rb
|
192
|
+
- rews.gemspec
|
175
193
|
- spec/request_proxy.rb
|
176
194
|
- spec/rews/client_spec.rb
|
177
195
|
- spec/rews/folder_spec.rb
|
@@ -219,16 +237,5 @@ rubygems_version: 1.6.2
|
|
219
237
|
signing_key:
|
220
238
|
specification_version: 3
|
221
239
|
summary: a Ruby client for Exchange Web Services
|
222
|
-
test_files:
|
223
|
-
|
224
|
-
- spec/rews/client_spec.rb
|
225
|
-
- spec/rews/folder_spec.rb
|
226
|
-
- spec/rews/item_spec.rb
|
227
|
-
- spec/rews/restriction_spec.rb
|
228
|
-
- spec/rews/shape_spec.rb
|
229
|
-
- spec/rews/sort_order_spec.rb
|
230
|
-
- spec/rews/update_spec.rb
|
231
|
-
- spec/rews/util_spec.rb
|
232
|
-
- spec/rews/view_spec.rb
|
233
|
-
- spec/rews_spec.rb
|
234
|
-
- spec/spec_helper.rb
|
240
|
+
test_files: []
|
241
|
+
|
data/README.rdoc
DELETED
@@ -1,72 +0,0 @@
|
|
1
|
-
= rews
|
2
|
-
|
3
|
-
Rews is a simple Ruby client for Exchange Web Services
|
4
|
-
|
5
|
-
* Find, Get and Delete of Items and Folders is supported.
|
6
|
-
* Filtering, ordering, and arbitrary property retrieval are supported.
|
7
|
-
* Bulk operations are supported
|
8
|
-
* Runs on both CRuby and JRuby
|
9
|
-
|
10
|
-
Method names generally follow the Exchange Web Services API
|
11
|
-
http://msdn.microsoft.com/en-us/library/bb409286(EXCHG.140).aspx
|
12
|
-
|
13
|
-
It has been tested against
|
14
|
-
|
15
|
-
* Exchange 2007 SP1 (Version 8.1, Build 240.6)
|
16
|
-
* Exchange 2010 SP1 (Version 14.1, Build 218.15)
|
17
|
-
|
18
|
-
to use :
|
19
|
-
|
20
|
-
# create a client
|
21
|
-
c = Rews::Client.new("https://exchange.bar.com/EWS/Exchange.asmx", :ntlm, 'EXCHDOM\foo', 'password')
|
22
|
-
|
23
|
-
# find a distinguished folder from one of the mailboxes the user has permissions for
|
24
|
-
inbox=c.distinguished_folder_id('inbox', 'foo@bar.com')
|
25
|
-
|
26
|
-
# find some message_ids,
|
27
|
-
mids = inbox.find_item_id(:restriction=>[:<=, "item:DateTimeReceived",DateTime.now],
|
28
|
-
:sort_order=>[["item:DateTimeReceived", "Ascending"]],
|
29
|
-
:indexed_page_item_view=>{:max_entries_returned=>10, :offset=>0})
|
30
|
-
|
31
|
-
# get some properties for a bunch of messages in one hit
|
32
|
-
messages = c.get_item(mids, :item_shape=>{
|
33
|
-
:base_shape=>:IdOnly,
|
34
|
-
:additional_properties=>[
|
35
|
-
[:field_uri, "item:Subject"],
|
36
|
-
[:field_uri, "item:DateTimeReceived"],
|
37
|
-
[:field_uri, "message:InternetMessageId"],
|
38
|
-
[:field_uri, "message:IsRead"],
|
39
|
-
[:field_uri, "message:IsReadReceiptRequested"]]})
|
40
|
-
|
41
|
-
# suppress read receipts on any messages which have requested them
|
42
|
-
c.suppress_read_receipt(messages)
|
43
|
-
|
44
|
-
# delete the items to the DeletedItems folder
|
45
|
-
c.delete_item(mids, :delete_type=>:MoveToDeletedItems)
|
46
|
-
|
47
|
-
== Install
|
48
|
-
|
49
|
-
slightly painful : because of bugs in released versions of gems relating to NTLM authentication, you need
|
50
|
-
versions of ntlm-http gem with fixes :
|
51
|
-
|
52
|
-
* ntlm-http v0.1.3 : branch fix_ntlm_domain from: https://github.com/trampoline/ntlm-http/tree/new-version-0.1.2.1
|
53
|
-
|
54
|
-
also, httpclient >= 2.1.7 is supported
|
55
|
-
|
56
|
-
then:
|
57
|
-
|
58
|
-
gem install rews
|
59
|
-
|
60
|
-
== Note on Patches/Pull Requests
|
61
|
-
|
62
|
-
* Fork the project.
|
63
|
-
* Make your feature addition or bug fix.
|
64
|
-
* Add tests for it. This is important so I don't break it in a
|
65
|
-
future version unintentionally.
|
66
|
-
* Commit, do not mess with rakefile, version, or history.
|
67
|
-
(if you want to have your own version, that is fine but bump version in a commit by itself I can ignore when I pull)
|
68
|
-
* Send me a pull request. Bonus points for topic branches.
|
69
|
-
|
70
|
-
== Copyright
|
71
|
-
|
72
|
-
Copyright (c) 2011 Trampoline Systems Ltd. See LICENSE for details.
|