viewpoint 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/COPYING.txt +674 -0
- data/README +60 -0
- data/Rakefile +39 -0
- data/examples/cal2ical.rb +29 -0
- data/examples/ews_fusefs.rb +364 -0
- data/examples/webclient/.gems +2 -0
- data/examples/webclient/README +1 -0
- data/examples/webclient/config.ru +26 -0
- data/examples/webclient/ews_access_handler.rb +42 -0
- data/examples/webclient/public/css/mail.css +33 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/examples/webclient/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/examples/webclient/public/css/smoothness/jquery-ui-1.7.2.custom.css +406 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/examples/webclient/public/css/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/examples/webclient/public/css/ui-lightness/jquery-ui-1.7.2.custom.css +406 -0
- data/examples/webclient/public/js/jquery-1.3.2.min.js +19 -0
- data/examples/webclient/public/js/jquery-ui-1.7.2.custom.min.js +145 -0
- data/examples/webclient/viewpoint_web.rb +295 -0
- data/examples/webclient/views/_footer.haml +1 -0
- data/examples/webclient/views/_header.haml +11 -0
- data/examples/webclient/views/_tagline.haml +1 -0
- data/examples/webclient/views/index.haml +20 -0
- data/examples/webclient/views/layout.haml +42 -0
- data/examples/webclient/views/mail.haml +45 -0
- data/examples/webclient/views/welcome.haml +0 -0
- data/lib/calendar.rb +121 -0
- data/lib/calendar_item.rb +110 -0
- data/lib/event.rb +0 -0
- data/lib/exchange_headers.rb +50 -0
- data/lib/exchwebserv.rb +228 -0
- data/lib/folder.rb +269 -0
- data/lib/item.rb +56 -0
- data/lib/mail.rb +118 -0
- data/lib/message.rb +134 -0
- data/lib/soap/viewpoint.conf +3 -0
- data/lib/task.rb +0 -0
- data/lib/tasks.rb +0 -0
- data/lib/viewpoint.rb +2 -0
- data/lib/wsdl/defaultMappingRegistry.rb +10680 -0
- data/lib/wsdl/exchangeServiceBinding.rb +349 -0
- data/lib/wsdl/exchangeServiceTypes.rb +11013 -0
- data/preamble +19 -0
- data/test/spec/authtest_spec.rb +12 -0
- data/test/spec/findfolders_spec.rb +14 -0
- data/test/test_client.rb +12 -0
- data/test/testrestrict.rb +75 -0
- metadata +130 -0
data/preamble
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
#############################################################################
|
2
|
+
# Copyright © 2009 Dan Wanek <dan.wanek@gmail.com>
|
3
|
+
#
|
4
|
+
#
|
5
|
+
# This file is part of Viewpoint.
|
6
|
+
#
|
7
|
+
# Viewpoint is free software: you can redistribute it and/or
|
8
|
+
# modify it under the terms of the GNU General Public License as published
|
9
|
+
# by the Free Software Foundation, either version 3 of the License, or (at
|
10
|
+
# your option) any later version.
|
11
|
+
#
|
12
|
+
# Viewpoint is distributed in the hope that it will be useful,
|
13
|
+
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
+
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General
|
15
|
+
# Public License for more details.
|
16
|
+
#
|
17
|
+
# You should have received a copy of the GNU General Public License along
|
18
|
+
# with Viewpoint. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
#############################################################################
|
data/test/test_client.rb
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require File.dirname(__FILE__) + '/../lib/exchwebserv'
|
2
|
+
$DEBUG = true
|
3
|
+
vp = Viewpoint::ExchWebServ.instance
|
4
|
+
vp.authenticate
|
5
|
+
vp.find_folders
|
6
|
+
mail = vp.get_folder("Inbox")
|
7
|
+
msgs = mail.get_todays_messages
|
8
|
+
|
9
|
+
puts "Sender | Subject | Recieved"
|
10
|
+
msgs.each do |msg|
|
11
|
+
puts "#{msg.sender} | #{msg.subject} |#{msg.date_time_recieved}"
|
12
|
+
end
|
@@ -0,0 +1,75 @@
|
|
1
|
+
require 'rubygems'
|
2
|
+
gem 'soap4r'
|
3
|
+
require File.dirname(__FILE__) + '/../lib/exchwebserv'
|
4
|
+
require File.dirname(__FILE__) + '/../lib/wsdl/exchangeServiceBinding'
|
5
|
+
include Viewpoint
|
6
|
+
|
7
|
+
$DEBUG = true
|
8
|
+
|
9
|
+
vp = ExchWebServ.instance
|
10
|
+
vp.authenticate
|
11
|
+
vp.find_folders
|
12
|
+
|
13
|
+
fit = FindItemType.new
|
14
|
+
fit.xmlattr_Traversal = ItemQueryTraversalType::Shallow
|
15
|
+
fit.itemShape = ItemResponseShapeType.new(DefaultShapeNamesType::Default, false)
|
16
|
+
|
17
|
+
fid = NonEmptyArrayOfBaseFolderIdsType.new()
|
18
|
+
fidt = DistinguishedFolderIdType.new
|
19
|
+
fidt.xmlattr_Id = DistinguishedFolderIdNameType::Calendar
|
20
|
+
fid.distinguishedFolderId = fidt
|
21
|
+
fit.parentFolderIds = fid
|
22
|
+
|
23
|
+
cal_span = CalendarViewType.new
|
24
|
+
cal_span.xmlattr_StartDate = DateTime.parse(Date.today.to_s).to_s
|
25
|
+
cal_span.xmlattr_EndDate = DateTime.parse(Date.today.next.to_s).to_s
|
26
|
+
fit.calendarView = cal_span
|
27
|
+
|
28
|
+
|
29
|
+
# Set up restriction
|
30
|
+
# Filter by a "Contains" expression
|
31
|
+
=begin
|
32
|
+
rt = RestrictionType.new
|
33
|
+
se = ContainsExpressionType.new
|
34
|
+
fielduri = PathToUnindexedFieldType.new
|
35
|
+
fielduri.xmlattr_FieldURI = "item:Subject"
|
36
|
+
#const = FieldURIOrConstantType.new
|
37
|
+
c = ConstantValueType.new
|
38
|
+
c.xmlattr_Value = "Systems"
|
39
|
+
#const.constant = c
|
40
|
+
se.path = fielduri
|
41
|
+
se.constant = c
|
42
|
+
se.xmlattr_ContainmentMode = "Substring"
|
43
|
+
rt.containsExpression = se
|
44
|
+
=end
|
45
|
+
|
46
|
+
|
47
|
+
# Filter by when Item was received
|
48
|
+
=begin
|
49
|
+
rt = RestrictionType.new
|
50
|
+
se = IsGreaterThanType.new
|
51
|
+
fielduri = PathToUnindexedFieldType.new
|
52
|
+
fielduri.xmlattr_FieldURI = UnindexedFieldURIType::ItemDateTimeReceived
|
53
|
+
const = FieldURIOrConstantType.new
|
54
|
+
c = ConstantValueType.new
|
55
|
+
c.xmlattr_Value = (DateTime.now - 2).new_offset(0).to_s
|
56
|
+
const.constant = c
|
57
|
+
se.path = fielduri
|
58
|
+
se.fieldURIOrConstant = const
|
59
|
+
rt.isGreaterThan = se
|
60
|
+
=end
|
61
|
+
|
62
|
+
|
63
|
+
# Filter by a simple "Exists" expression
|
64
|
+
=begin
|
65
|
+
rt = RestrictionType.new
|
66
|
+
se = ExistsType.new
|
67
|
+
fielduri = PathToUnindexedFieldType.new
|
68
|
+
fielduri.xmlattr_FieldURI="item:Subject"
|
69
|
+
se.path = fielduri
|
70
|
+
rt.exists = se
|
71
|
+
=end
|
72
|
+
|
73
|
+
|
74
|
+
|
75
|
+
vp.ews.findItem(fit)
|
metadata
ADDED
@@ -0,0 +1,130 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: viewpoint
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Wanek
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
|
12
|
+
date: 2009-11-09 00:00:00 -06:00
|
13
|
+
default_executable:
|
14
|
+
dependencies: []
|
15
|
+
|
16
|
+
description: " \tA Ruby client access library for Microsoft Exchange Web Services (EWS). It is a work in progress. Methods are still being added from the EWS API docs. Please see them for further information: http://msdn.microsoft.com/en-us/library/bb204119.aspx\n"
|
17
|
+
email: dan.wanek@gmail.com
|
18
|
+
executables: []
|
19
|
+
|
20
|
+
extensions: []
|
21
|
+
|
22
|
+
extra_rdoc_files:
|
23
|
+
- README
|
24
|
+
- COPYING.txt
|
25
|
+
files:
|
26
|
+
- COPYING.txt
|
27
|
+
- README
|
28
|
+
- Rakefile
|
29
|
+
- examples/cal2ical.rb
|
30
|
+
- examples/ews_fusefs.rb
|
31
|
+
- examples/webclient/.gems
|
32
|
+
- examples/webclient/README
|
33
|
+
- examples/webclient/config.ru
|
34
|
+
- examples/webclient/ews_access_handler.rb
|
35
|
+
- examples/webclient/public/css/mail.css
|
36
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png
|
37
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_flat_75_ffffff_40x100.png
|
38
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png
|
39
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_glass_65_ffffff_1x400.png
|
40
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_glass_75_dadada_1x400.png
|
41
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png
|
42
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png
|
43
|
+
- examples/webclient/public/css/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png
|
44
|
+
- examples/webclient/public/css/smoothness/images/ui-icons_222222_256x240.png
|
45
|
+
- examples/webclient/public/css/smoothness/images/ui-icons_2e83ff_256x240.png
|
46
|
+
- examples/webclient/public/css/smoothness/images/ui-icons_454545_256x240.png
|
47
|
+
- examples/webclient/public/css/smoothness/images/ui-icons_888888_256x240.png
|
48
|
+
- examples/webclient/public/css/smoothness/images/ui-icons_cd0a0a_256x240.png
|
49
|
+
- examples/webclient/public/css/smoothness/jquery-ui-1.7.2.custom.css
|
50
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
|
51
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
|
52
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
|
53
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
|
54
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
|
55
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
|
56
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
|
57
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
|
58
|
+
- examples/webclient/public/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
|
59
|
+
- examples/webclient/public/css/ui-lightness/images/ui-icons_222222_256x240.png
|
60
|
+
- examples/webclient/public/css/ui-lightness/images/ui-icons_228ef1_256x240.png
|
61
|
+
- examples/webclient/public/css/ui-lightness/images/ui-icons_ef8c08_256x240.png
|
62
|
+
- examples/webclient/public/css/ui-lightness/images/ui-icons_ffd27a_256x240.png
|
63
|
+
- examples/webclient/public/css/ui-lightness/images/ui-icons_ffffff_256x240.png
|
64
|
+
- examples/webclient/public/css/ui-lightness/jquery-ui-1.7.2.custom.css
|
65
|
+
- examples/webclient/public/js/jquery-1.3.2.min.js
|
66
|
+
- examples/webclient/public/js/jquery-ui-1.7.2.custom.min.js
|
67
|
+
- examples/webclient/viewpoint_web.rb
|
68
|
+
- examples/webclient/views/_footer.haml
|
69
|
+
- examples/webclient/views/_header.haml
|
70
|
+
- examples/webclient/views/_tagline.haml
|
71
|
+
- examples/webclient/views/index.haml
|
72
|
+
- examples/webclient/views/layout.haml
|
73
|
+
- examples/webclient/views/mail.haml
|
74
|
+
- examples/webclient/views/welcome.haml
|
75
|
+
- lib/calendar.rb
|
76
|
+
- lib/calendar_item.rb
|
77
|
+
- lib/event.rb
|
78
|
+
- lib/exchange_headers.rb
|
79
|
+
- lib/exchwebserv.rb
|
80
|
+
- lib/folder.rb
|
81
|
+
- lib/item.rb
|
82
|
+
- lib/mail.rb
|
83
|
+
- lib/message.rb
|
84
|
+
- lib/soap/viewpoint.conf
|
85
|
+
- lib/task.rb
|
86
|
+
- lib/tasks.rb
|
87
|
+
- lib/viewpoint.rb
|
88
|
+
- lib/wsdl/defaultMappingRegistry.rb
|
89
|
+
- lib/wsdl/exchangeServiceBinding.rb
|
90
|
+
- lib/wsdl/exchangeServiceTypes.rb
|
91
|
+
- preamble
|
92
|
+
- test/spec/authtest_spec.rb
|
93
|
+
- test/spec/findfolders_spec.rb
|
94
|
+
- test/test_client.rb
|
95
|
+
- test/testrestrict.rb
|
96
|
+
has_rdoc: true
|
97
|
+
homepage: http://github.com/zenchild/Viewpoint
|
98
|
+
licenses: []
|
99
|
+
|
100
|
+
post_install_message: Don't forget to create .viewpointrc. See README
|
101
|
+
rdoc_options:
|
102
|
+
- -x
|
103
|
+
- wsdl/
|
104
|
+
- -x
|
105
|
+
- test/
|
106
|
+
- -x
|
107
|
+
- examples/
|
108
|
+
require_paths:
|
109
|
+
- lib
|
110
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
111
|
+
requirements:
|
112
|
+
- - ">="
|
113
|
+
- !ruby/object:Gem::Version
|
114
|
+
version: 1.8.7
|
115
|
+
version:
|
116
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
117
|
+
requirements:
|
118
|
+
- - ">="
|
119
|
+
- !ruby/object:Gem::Version
|
120
|
+
version: "0"
|
121
|
+
version:
|
122
|
+
requirements: []
|
123
|
+
|
124
|
+
rubyforge_project:
|
125
|
+
rubygems_version: 1.3.4
|
126
|
+
signing_key:
|
127
|
+
specification_version: 3
|
128
|
+
summary: A Ruby client access library for Microsoft Exchange Web Services (EWS)
|
129
|
+
test_files: []
|
130
|
+
|