viewpoint 0.1.5fix → 0.1.5
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/lib/model/generic_folder.rb +4 -11
- metadata +6 -8
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.5
|
data/lib/model/generic_folder.rb
CHANGED
@@ -214,27 +214,20 @@ module Viewpoint
|
|
214
214
|
|
215
215
|
def todays_items
|
216
216
|
#opts = {:query_string => ["Received:today"]}
|
217
|
-
|
218
|
-
items_since(DateTime.parse(Date.today.to_s))
|
217
|
+
items_since(Date.today.to_datetime)
|
219
218
|
end
|
220
219
|
|
221
220
|
def items_since(date_time)
|
222
221
|
restr = {:restriction =>
|
223
222
|
{:is_greater_than_or_equal_to =>
|
224
|
-
|
225
|
-
{:field_uRI_or_constant =>{:constant => {:value=>date_time}}}]
|
226
|
-
}}
|
223
|
+
{:field_uRI => {:field_uRI=>'item:DateTimeReceived'}, :field_uRI_or_constant =>{:constant => {:value=>date_time}}}}}
|
227
224
|
find_items(restr)
|
228
225
|
end
|
229
226
|
|
230
227
|
def items_between(start_date, end_date)
|
231
228
|
restr = {:restriction => {:and => [
|
232
|
-
{:is_greater_than_or_equal_to =>
|
233
|
-
|
234
|
-
{:field_uRI_or_constant=>{:constant => {:value =>start_date}}}]},
|
235
|
-
{:is_less_than_or_equal_to =>
|
236
|
-
[{:field_uRI => {:field_uRI=>'item:DateTimeReceived'}},
|
237
|
-
{:field_uRI_or_constant=>{:constant => {:value =>end_date}}}]}
|
229
|
+
{:is_greater_than_or_equal_to => {:field_uRI => {:field_uRI=>'item:DateTimeReceived'},:field_uRI_or_constant=>{:constant => {:value =>start_date}}}},
|
230
|
+
{:is_less_than_or_equal_to => {:field_uRI => {:field_uRI=>'item:DateTimeReceived'},:field_uRI_or_constant=>{:constant => {:value =>end_date}}}}
|
238
231
|
]}}
|
239
232
|
find_items(restr)
|
240
233
|
end
|
metadata
CHANGED
@@ -1,12 +1,12 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: viewpoint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
prerelease:
|
4
|
+
prerelease: false
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 1
|
8
|
-
-
|
9
|
-
version: 0.1.
|
8
|
+
- 5
|
9
|
+
version: 0.1.5
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Dan Wanek
|
@@ -179,13 +179,11 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
179
179
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
180
180
|
none: false
|
181
181
|
requirements:
|
182
|
-
- - "
|
182
|
+
- - ">="
|
183
183
|
- !ruby/object:Gem::Version
|
184
184
|
segments:
|
185
|
-
-
|
186
|
-
|
187
|
-
- 1
|
188
|
-
version: 1.3.1
|
185
|
+
- 0
|
186
|
+
version: "0"
|
189
187
|
requirements: []
|
190
188
|
|
191
189
|
rubyforge_project:
|