polyrex_calendarbase 0.1.1 → 0.1.2
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 +0 -0
- data.tar.gz.sig +2 -3
- data/lib/polyrex_calendarbase.rb +17 -7
- metadata +1 -1
- 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: 71a9787ea30f9531037fa097a29124132aa3ce5e
|
4
|
+
data.tar.gz: d6de4a7e4755122e7686adda5eacdd54f269b652
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6429471c3b23f36ac77944090a8675a1538f5d2b8bfc3346fe2eebea1119847490fc789ff9cfd81bb497539632017dd4153acfb84d7f14504b8b72545e9705e9
|
7
|
+
data.tar.gz: 2cc8290ccf2478e2cd6957cb59c813eafd8034a944829c1b2b46f337274d2a8e28f0bd97ebe272d2532fe9b169c0d50f6a0612f27c1e5a5eb0669e12df1ea4e3
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
�
|
3
|
-
%�)
|
1
|
+
������x��8^寄Y�&�;j����"K�^2h���e��j��gn}?�JqX���N
|
2
|
+
��d]�'����
|
data/lib/polyrex_calendarbase.rb
CHANGED
@@ -28,8 +28,11 @@ module LIBRARY
|
|
28
28
|
|
29
29
|
def fetch_file(filename)
|
30
30
|
|
31
|
-
lib = File.dirname(__FILE__)
|
32
|
-
File.read filename
|
31
|
+
#lib = File.dirname(__FILE__)
|
32
|
+
#File.read filename
|
33
|
+
lib = 'http://rorbuilder.info/r/ruby/polyrex-calendar'
|
34
|
+
open(File.join(lib, filename),
|
35
|
+
'UserAgent' => 'PolyrexCalendar'){|x| x.read }
|
33
36
|
end
|
34
37
|
|
35
38
|
def generate_webpage(xml, xsl)
|
@@ -55,6 +58,10 @@ class Calendar < Polyrex
|
|
55
58
|
def inspect()
|
56
59
|
"#<Calendar:%s" % __id__
|
57
60
|
end
|
61
|
+
|
62
|
+
def month(n)
|
63
|
+
self.records[n-1]
|
64
|
+
end
|
58
65
|
|
59
66
|
def to_webpage()
|
60
67
|
|
@@ -172,7 +179,7 @@ class PolyrexCalendarBase
|
|
172
179
|
|
173
180
|
def find(s)
|
174
181
|
dt = Chronic.parse s, now: Time.local(@year,1,1)
|
175
|
-
|
182
|
+
@calendar.month(dt.month).d(dt.day)
|
176
183
|
end
|
177
184
|
|
178
185
|
def to_xml()
|
@@ -189,11 +196,14 @@ class PolyrexCalendarBase
|
|
189
196
|
|
190
197
|
def inspect()
|
191
198
|
%Q(=> #<PolyrexCalendarBase:#{self.object_id} @id="#{@id}", @year="#{@year}">)
|
199
|
+
end
|
200
|
+
|
201
|
+
def month(n)
|
202
|
+
@calendar.month(n)
|
192
203
|
end
|
193
204
|
|
194
|
-
def
|
195
|
-
|
196
|
-
n ? r[n-1] : r
|
205
|
+
def months
|
206
|
+
@calendar.records
|
197
207
|
end
|
198
208
|
|
199
209
|
def parse_events(list)
|
@@ -232,7 +242,7 @@ class PolyrexCalendarBase
|
|
232
242
|
end
|
233
243
|
|
234
244
|
def this_month()
|
235
|
-
|
245
|
+
@calendar.month(DateTime.now.month)
|
236
246
|
end
|
237
247
|
|
238
248
|
def import_bankholidays(dynarex)
|
metadata
CHANGED
metadata.gz.sig
CHANGED
Binary file
|