polyrex_calendarbase 0.2.5 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/lib/polyrex_calendarbase.rb +67 -66
- metadata +45 -41
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 16b1a652fc90a86d67da370601a5d4489e6f67de7362358b263f32309836425b
|
4
|
+
data.tar.gz: d00884057b38f5f3ee08e318fe4168dafdd95fe2dfade881d3175c8fd53e4f76
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d07bc5b66b9b48f0515f56b404649bfdc46b0bb8e404f4210b67802cc147e28acbd8679e3ebe0d2d32125345d798a00d5d6c572640dd5faf67bb598954ad3604
|
7
|
+
data.tar.gz: 07aac48912bf35e1268125a24f217407654fed608e513a3d0bbb2ba12cac4776737150b1bea1d205d835f98f856b982f0add5704c74960d1e14089bde28aa856
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/lib/polyrex_calendarbase.rb
CHANGED
@@ -14,11 +14,10 @@ module LIBRARY2
|
|
14
14
|
|
15
15
|
def fetch_filepath(filename)
|
16
16
|
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
17
|
+
lib = File.dirname(__FILE__)
|
18
|
+
File.join(lib,'..','stylesheet',filename)
|
19
|
+
|
20
|
+
end
|
22
21
|
|
23
22
|
def fetch_file(filename)
|
24
23
|
|
@@ -26,7 +25,6 @@ module LIBRARY2
|
|
26
25
|
read filepath
|
27
26
|
end
|
28
27
|
|
29
|
-
|
30
28
|
def generate_webpage(xml, xsl)
|
31
29
|
|
32
30
|
# transform the xml to html
|
@@ -55,6 +53,67 @@ end
|
|
55
53
|
|
56
54
|
CalendarObjects.new(visual_schema)
|
57
55
|
|
56
|
+
|
57
|
+
class PolyrexObjects
|
58
|
+
|
59
|
+
class Month
|
60
|
+
include LIBRARY2
|
61
|
+
|
62
|
+
attr_accessor :xslt, :css_layout, :css_style
|
63
|
+
|
64
|
+
def inspect()
|
65
|
+
"#<CalendarObjects::Month:%s" % __id__
|
66
|
+
end
|
67
|
+
|
68
|
+
def d(n)
|
69
|
+
self.records[n-1]
|
70
|
+
end
|
71
|
+
|
72
|
+
def find_today()
|
73
|
+
sdate = Time.now.strftime("%Y-%b-%d")
|
74
|
+
self.element "//day/summary[sdate='#{sdate}']"
|
75
|
+
end
|
76
|
+
|
77
|
+
def highlight_today()
|
78
|
+
|
79
|
+
# remove the old highlight if any
|
80
|
+
prev_day = self.at_css '.today'
|
81
|
+
prev_day.attributes.delete :class if prev_day
|
82
|
+
|
83
|
+
today = find_today()
|
84
|
+
today.attributes[:class] = 'today'
|
85
|
+
|
86
|
+
end
|
87
|
+
|
88
|
+
end
|
89
|
+
|
90
|
+
class Week
|
91
|
+
|
92
|
+
def inspect()
|
93
|
+
"#<CalendarObjects::Week:%s" % __id__
|
94
|
+
end
|
95
|
+
|
96
|
+
end
|
97
|
+
|
98
|
+
class Day
|
99
|
+
|
100
|
+
def date()
|
101
|
+
Date.parse(self.sdate)
|
102
|
+
end
|
103
|
+
|
104
|
+
def wday()
|
105
|
+
self.date.wday
|
106
|
+
end
|
107
|
+
|
108
|
+
def day()
|
109
|
+
self.date.day
|
110
|
+
end
|
111
|
+
|
112
|
+
end
|
113
|
+
|
114
|
+
end
|
115
|
+
|
116
|
+
|
58
117
|
class CalendarObjects::Month < PolyrexObjects::Month
|
59
118
|
|
60
119
|
def initialize(filename)
|
@@ -79,7 +138,6 @@ end
|
|
79
138
|
|
80
139
|
|
81
140
|
|
82
|
-
|
83
141
|
class Calendar < Polyrex
|
84
142
|
include LIBRARY2
|
85
143
|
|
@@ -111,69 +169,12 @@ class Calendar < Polyrex
|
|
111
169
|
end
|
112
170
|
end
|
113
171
|
|
114
|
-
class PolyrexObjects
|
115
|
-
|
116
|
-
class Month
|
117
|
-
include LIBRARY2
|
118
|
-
|
119
|
-
attr_accessor :xslt, :css_layout, :css_style
|
120
|
-
|
121
|
-
def inspect()
|
122
|
-
"#<CalendarObjects::Month:%s" % __id__
|
123
|
-
end
|
124
|
-
|
125
|
-
def d(n)
|
126
|
-
self.records[n-1]
|
127
|
-
end
|
128
|
-
|
129
|
-
def find_today()
|
130
|
-
sdate = Time.now.strftime("%Y-%b-%d")
|
131
|
-
self.element "//day/summary[sdate='#{sdate}']"
|
132
|
-
end
|
133
|
-
|
134
|
-
def highlight_today()
|
135
|
-
|
136
|
-
# remove the old highlight if any
|
137
|
-
prev_day = self.at_css '.today'
|
138
|
-
prev_day.attributes.delete :class if prev_day
|
139
|
-
|
140
|
-
today = find_today()
|
141
|
-
today.attributes[:class] = 'today'
|
142
|
-
|
143
|
-
end
|
144
|
-
|
145
|
-
end
|
146
|
-
|
147
|
-
class Week
|
148
|
-
|
149
|
-
def inspect()
|
150
|
-
"#<CalendarObjects::Week:%s" % __id__
|
151
|
-
end
|
152
|
-
|
153
|
-
end
|
154
|
-
|
155
|
-
class Day
|
156
|
-
|
157
|
-
def date()
|
158
|
-
Date.parse(self.sdate)
|
159
|
-
end
|
160
|
-
|
161
|
-
def wday()
|
162
|
-
self.date.wday
|
163
|
-
end
|
164
|
-
|
165
|
-
def day()
|
166
|
-
self.date.day
|
167
|
-
end
|
168
|
-
|
169
|
-
end
|
170
|
-
|
171
|
-
end
|
172
|
-
|
173
172
|
|
174
173
|
|
175
174
|
class PolyrexCalendarBase
|
176
175
|
include LIBRARY2
|
176
|
+
include RXFHelperModule
|
177
|
+
using ColouredText
|
177
178
|
|
178
179
|
|
179
180
|
attr_accessor :xsl, :css, :calendar, :month_xsl, :month_css
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: polyrex_calendarbase
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- James Robertson
|
@@ -10,28 +10,32 @@ bindir: bin
|
|
10
10
|
cert_chain:
|
11
11
|
- |
|
12
12
|
-----BEGIN CERTIFICATE-----
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
13
|
+
MIIEXjCCAsagAwIBAgIBATANBgkqhkiG9w0BAQsFADAsMSowKAYDVQQDDCFnZW1t
|
14
|
+
YXN0ZXIvREM9amFtZXNyb2JlcnRzb24vREM9ZXUwHhcNMTgxMjI4MTQzMzQ1WhcN
|
15
|
+
MTkxMjI4MTQzMzQ1WjAsMSowKAYDVQQDDCFnZW1tYXN0ZXIvREM9amFtZXNyb2Jl
|
16
|
+
cnRzb24vREM9ZXUwggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDV2Nzm
|
17
|
+
pl+Dmg32LpeFCBLRNoYkC4CwmLhh8NnT/r1ep6ky0DoBpxMr+BVLf3hoVe8A5hke
|
18
|
+
KInLk2kTdKScT2KIAPJJL76kQ4rSNSHHFbShToX/qzKbZ5WQaLqmztvJoK1vRS1R
|
19
|
+
dPPXGt971ubjdnN9F4BVnQB7EPqpkxXx2l5v/fAIVBNnd8/s9ei8x8xLpuSTkYYy
|
20
|
+
Et15XstGKQYJqK9T2/pgxGxd7xPf+rPvF6c2vYlmgSWUEOfPtYJLH8SrYGoBSneb
|
21
|
+
VTlQOFyw9JWE+NtXMIGydGUth1B7iJfXuEX69lTBIKgzA5UkLnZP5Lenu0BGjPuT
|
22
|
+
+Aqv7+VQ3G6oH/kp2D/mmL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----
|
34
|
-
date:
|
38
|
+
date: 2018-12-28 00:00:00.000000000 Z
|
35
39
|
dependencies:
|
36
40
|
- !ruby/object:Gem::Dependency
|
37
41
|
name: polyrex
|
@@ -39,40 +43,40 @@ dependencies:
|
|
39
43
|
requirements:
|
40
44
|
- - "~>"
|
41
45
|
- !ruby/object:Gem::Version
|
42
|
-
version: '1.
|
46
|
+
version: '1.2'
|
43
47
|
- - ">="
|
44
48
|
- !ruby/object:Gem::Version
|
45
|
-
version: 1.
|
49
|
+
version: 1.2.1
|
46
50
|
type: :runtime
|
47
51
|
prerelease: false
|
48
52
|
version_requirements: !ruby/object:Gem::Requirement
|
49
53
|
requirements:
|
50
54
|
- - "~>"
|
51
55
|
- !ruby/object:Gem::Version
|
52
|
-
version: '1.
|
56
|
+
version: '1.2'
|
53
57
|
- - ">="
|
54
58
|
- !ruby/object:Gem::Version
|
55
|
-
version: 1.
|
59
|
+
version: 1.2.1
|
56
60
|
- !ruby/object:Gem::Dependency
|
57
61
|
name: nokogiri
|
58
62
|
requirement: !ruby/object:Gem::Requirement
|
59
63
|
requirements:
|
60
64
|
- - "~>"
|
61
65
|
- !ruby/object:Gem::Version
|
62
|
-
version: '1.
|
66
|
+
version: '1.9'
|
63
67
|
- - ">="
|
64
68
|
- !ruby/object:Gem::Version
|
65
|
-
version: 1.
|
69
|
+
version: 1.9.1
|
66
70
|
type: :runtime
|
67
71
|
prerelease: false
|
68
72
|
version_requirements: !ruby/object:Gem::Requirement
|
69
73
|
requirements:
|
70
74
|
- - "~>"
|
71
75
|
- !ruby/object:Gem::Version
|
72
|
-
version: '1.
|
76
|
+
version: '1.9'
|
73
77
|
- - ">="
|
74
78
|
- !ruby/object:Gem::Version
|
75
|
-
version: 1.
|
79
|
+
version: 1.9.1
|
76
80
|
- !ruby/object:Gem::Dependency
|
77
81
|
name: chronic_duration
|
78
82
|
requirement: !ruby/object:Gem::Requirement
|
@@ -82,7 +86,7 @@ dependencies:
|
|
82
86
|
version: '0.10'
|
83
87
|
- - ">="
|
84
88
|
- !ruby/object:Gem::Version
|
85
|
-
version: 0.10.
|
89
|
+
version: 0.10.6
|
86
90
|
type: :runtime
|
87
91
|
prerelease: false
|
88
92
|
version_requirements: !ruby/object:Gem::Requirement
|
@@ -92,47 +96,47 @@ dependencies:
|
|
92
96
|
version: '0.10'
|
93
97
|
- - ">="
|
94
98
|
- !ruby/object:Gem::Version
|
95
|
-
version: 0.10.
|
99
|
+
version: 0.10.6
|
96
100
|
- !ruby/object:Gem::Dependency
|
97
101
|
name: chronic_cron
|
98
102
|
requirement: !ruby/object:Gem::Requirement
|
99
103
|
requirements:
|
100
104
|
- - "~>"
|
101
105
|
- !ruby/object:Gem::Version
|
102
|
-
version: '0.
|
106
|
+
version: '0.5'
|
103
107
|
- - ">="
|
104
108
|
- !ruby/object:Gem::Version
|
105
|
-
version: 0.
|
109
|
+
version: 0.5.0
|
106
110
|
type: :runtime
|
107
111
|
prerelease: false
|
108
112
|
version_requirements: !ruby/object:Gem::Requirement
|
109
113
|
requirements:
|
110
114
|
- - "~>"
|
111
115
|
- !ruby/object:Gem::Version
|
112
|
-
version: '0.
|
116
|
+
version: '0.5'
|
113
117
|
- - ">="
|
114
118
|
- !ruby/object:Gem::Version
|
115
|
-
version: 0.
|
119
|
+
version: 0.5.0
|
116
120
|
- !ruby/object:Gem::Dependency
|
117
121
|
name: rxfhelper
|
118
122
|
requirement: !ruby/object:Gem::Requirement
|
119
123
|
requirements:
|
120
124
|
- - "~>"
|
121
125
|
- !ruby/object:Gem::Version
|
122
|
-
version: '0.
|
126
|
+
version: '0.9'
|
123
127
|
- - ">="
|
124
128
|
- !ruby/object:Gem::Version
|
125
|
-
version: 0.2
|
129
|
+
version: 0.9.2
|
126
130
|
type: :runtime
|
127
131
|
prerelease: false
|
128
132
|
version_requirements: !ruby/object:Gem::Requirement
|
129
133
|
requirements:
|
130
134
|
- - "~>"
|
131
135
|
- !ruby/object:Gem::Version
|
132
|
-
version: '0.
|
136
|
+
version: '0.9'
|
133
137
|
- - ">="
|
134
138
|
- !ruby/object:Gem::Version
|
135
|
-
version: 0.2
|
139
|
+
version: 0.9.2
|
136
140
|
description:
|
137
141
|
email: james@jamesrobertson.eu
|
138
142
|
executables: []
|
@@ -160,7 +164,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
160
164
|
version: '0'
|
161
165
|
requirements: []
|
162
166
|
rubyforge_project:
|
163
|
-
rubygems_version: 2.6
|
167
|
+
rubygems_version: 2.7.6
|
164
168
|
signing_key:
|
165
169
|
specification_version: 4
|
166
170
|
summary: A calendar object which can be output to XML format from a Polyrex document
|
metadata.gz.sig
CHANGED
Binary file
|