reminders_txt 0.3.4 → 0.3.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- checksums.yaml.gz.sig +3 -1
- data.tar.gz.sig +0 -0
- data/lib/reminders_txt.rb +23 -9
- metadata +2 -2
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b9339ce4b39359e3a81880f3ebd5c811b809a21
|
4
|
+
data.tar.gz: 1cf904cf2c0c51e93b18404f12e6ab69790ff3f4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59290dc4cff2795294046bff630e66e01b51ed70e7752b5bf16af1db484fc41785c9ff4b48186bf85773f0b79f8d2d572a3f8a2986d52860f10f3c5a8617d47d
|
7
|
+
data.tar.gz: 2e04c0522eef08da8618b3072c0d722e2236c983af4b93fae1d8e2a5e412677ce76f4dadc8fdea4ec992bf277fddb5d96d64b90eb34cf47bad340a20df419d17
|
checksums.yaml.gz.sig
CHANGED
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/reminders_txt.rb
CHANGED
@@ -91,7 +91,7 @@ class RemindersTxt
|
|
91
91
|
end
|
92
92
|
|
93
93
|
# delete expired non-recurring reminders
|
94
|
-
|
94
|
+
#@reminders.reject! {|x| x.date.to_time < @now if not x.recurring }
|
95
95
|
|
96
96
|
@reminders.sort_by!(&:date)
|
97
97
|
|
@@ -137,6 +137,7 @@ class RemindersTxt
|
|
137
137
|
|
138
138
|
|
139
139
|
starting = /(?:\(?\s*starting (\d+\w{2} \w+\s*\w*)(?: until (.*))?\s*\))?/
|
140
|
+
weekday = Date::DAYNAMES.join('|').downcase
|
140
141
|
|
141
142
|
get /^(.*)(every \w+ \w+(?: at (\d+am) )?)\s*#{starting}/ do \
|
142
143
|
|title, recurring, time, raw_date, end_date|
|
@@ -160,19 +161,32 @@ class RemindersTxt
|
|
160
161
|
end
|
161
162
|
|
162
163
|
|
164
|
+
#puts [0, title, recurring, time, raw_date, end_date].inspect
|
163
165
|
OpenStruct.new input: input, title: title, recurring: recurring,
|
164
166
|
date: d, end_date: end_date
|
165
|
-
|
167
|
+
|
166
168
|
end
|
167
169
|
|
168
170
|
# some meeting 3rd thursday of the month at 7:30pm
|
169
171
|
# some meeting First thursday of the month at 7:30pm
|
170
172
|
get /(.*)\s+(\w+ \w+day of (?:the|every) month at .*)/ do |title, recurring|
|
171
|
-
|
173
|
+
|
174
|
+
#puts [1, title, recurring].inspect
|
172
175
|
OpenStruct.new input: params[:input], title: title, recurring: recurring
|
173
|
-
|
174
|
-
end
|
176
|
+
|
177
|
+
end
|
178
|
+
|
179
|
+
# hall 2 friday at 11am
|
180
|
+
get /(.*)\s+(#{weekday})\s+at\s+(.*)/i do |title, raw_day, time|
|
181
|
+
|
182
|
+
d = Chronic.parse(raw_day + ' ' + time)
|
183
|
+
|
184
|
+
#puts [1.5, title, raw_day].inspect
|
185
|
+
OpenStruct.new input: params[:input], title: title, date: d
|
186
|
+
|
187
|
+
end
|
175
188
|
|
189
|
+
# hall 2 friday at 11am
|
176
190
|
# some important day 24th Mar
|
177
191
|
get /(.*)\s+(\d+[^\*]+)(\*)?/ do |title, raw_date, annualar|
|
178
192
|
|
@@ -188,9 +202,9 @@ class RemindersTxt
|
|
188
202
|
end
|
189
203
|
end
|
190
204
|
|
205
|
+
#puts [2, title, raw_date].inspect
|
191
206
|
OpenStruct.new input: params[:input], title: title, date: d,
|
192
|
-
recurring: recurring
|
193
|
-
#[2, title, date].inspect
|
207
|
+
recurring: recurring
|
194
208
|
end
|
195
209
|
|
196
210
|
# 27-Mar@1436 some important day
|
@@ -208,9 +222,9 @@ class RemindersTxt
|
|
208
222
|
end
|
209
223
|
|
210
224
|
|
225
|
+
#puts [3, title, raw_date].inspect
|
211
226
|
OpenStruct.new input: params[:input], title: title, date: d,
|
212
|
-
recurring: recurring
|
213
|
-
#[3, title, date].inspect
|
227
|
+
recurring: recurring
|
214
228
|
end
|
215
229
|
|
216
230
|
# e.g. 04-Aug@12:34
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reminders_txt
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -31,7 +31,7 @@ cert_chain:
|
|
31
31
|
n+SSd9dm8JjhZ2pqHtX+bgMZ18hrN06xfR+UPtk5BKC8v1PC0FWxaVR4lom39rFU
|
32
32
|
seDxJNsJgamAKg==
|
33
33
|
-----END CERTIFICATE-----
|
34
|
-
date: 2016-11-
|
34
|
+
date: 2016-11-15 00:00:00.000000000 Z
|
35
35
|
dependencies:
|
36
36
|
- !ruby/object:Gem::Dependency
|
37
37
|
name: dynarex
|
metadata.gz.sig
CHANGED
Binary file
|