rews 0.5.0 → 0.5.1
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/rews/client.rb +2 -0
- data/spec/rews/client_spec.rb +14 -0
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.5.
|
1
|
+
0.5.1
|
data/lib/rews/client.rb
CHANGED
@@ -83,6 +83,8 @@ module Rews
|
|
83
83
|
# no +SuppressReadReceipt+ Item will be created if ( +IsRead+=true or
|
84
84
|
# +IsReadReceiptRequested+=false)
|
85
85
|
def suppress_read_receipt(iids)
|
86
|
+
iids = iids.result if iids.is_a?(Folder::FindResult)
|
87
|
+
|
86
88
|
items = iids.map do |item_or_item_id|
|
87
89
|
item_id = item_or_item_id.is_a?(Item::Item) ? item_or_item_id.item_id : item_or_item_id
|
88
90
|
srr = [:suppress_read_receipt, [:reference_item_id, {:id=>item_id.id, :change_key=>item_id.change_key}]]
|
data/spec/rews/client_spec.rb
CHANGED
@@ -83,6 +83,20 @@ module Rews
|
|
83
83
|
end
|
84
84
|
end
|
85
85
|
|
86
|
+
it "should send a CreateItemRequest with SuppressReadReceipt for each item in a FindResult" do
|
87
|
+
client = Client.new("https://foo/EWS/Exchange.asmx", :ntlm, "EXCHDOM\\foo", "password")
|
88
|
+
fr = Folder::FindResult.new({}){[Item::Item.new(client, 'Message', {:item_id=>{:id=>'abc', :change_key=>'def'}}),
|
89
|
+
Item::Item.new(client, 'Message', {:item_id=>{:id=>'ghi', :change_key=>'jkl'}})]}
|
90
|
+
test_suppress_read_receipt(client, fr) do |body|
|
91
|
+
rsxml = Rsxml.to_rsxml(body, :ns=>{"wsdl"=>"ews_wsdl", "t"=>"ews_types"})
|
92
|
+
rsxml.should == ["wsdl:Items", {"xmlns:wsdl"=>"ews_wsdl", "xmlns:t"=>"ews_types"},
|
93
|
+
["t:SuppressReadReceipt",
|
94
|
+
["t:ReferenceItemId", {"Id"=>"abc", "ChangeKey"=>"def"}]],
|
95
|
+
["t:SuppressReadReceipt",
|
96
|
+
["t:ReferenceItemId", {"Id"=>"ghi", "ChangeKey"=>"jkl"}]]]
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
86
100
|
it "should filter Items with IsRead=true or IsReadReceiptRequested=false before making request" do
|
87
101
|
client = Client.new("https://foo/EWS/Exchange.asmx", :ntlm, "EXCHDOM\\foo", "password")
|
88
102
|
test_suppress_read_receipt(client, [Item::Item.new(client,
|
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: 9
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 5
|
9
|
-
-
|
10
|
-
version: 0.5.
|
9
|
+
- 1
|
10
|
+
version: 0.5.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Trampoline Systems Ltd
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-05-
|
18
|
+
date: 2011-05-09 00:00:00 +01:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|