slickplan 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +7 -0
- data/Rakefile +2 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/example.xml +310 -0
- data/lib/slickplan.rb +11 -0
- data/lib/slickplan/page.rb +5 -0
- data/lib/slickplan/parser/xml.rb +23 -0
- data/lib/slickplan/sitemap.rb +4 -0
- data/lib/slickplan/template.rb +5 -0
- data/lib/slickplan/version.rb +3 -0
- data/slickplan.gemspec +27 -0
- metadata +104 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 73275f1dfc58b306445a6d110ae71d99af4f7023
|
4
|
+
data.tar.gz: fb88becc4c384a8642cbbe58a27dcec30a14313e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 87290a6cbf2deea5c8ab4e3577a3021048e05e25607421cf639590288b10c08168f3c589183342c6e746249b5c282c4c7ffbb12c8170b90347b3d4d295440e9e
|
7
|
+
data.tar.gz: 7adae97f5524a3459759ca1641bf2eec7105432a7bcd03fd2bae54d93fb5eb62a7e9d01095e99baaee9ca502ce9cec8597e8e6f4538c6b9bbd91a6087b27efb0
|
data/.gitignore
ADDED
data/.ruby-gemset
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
slickplan
|
data/.ruby-version
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
2.4.1
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at ed@errorstudio.co.uk. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Ed Jones
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "slickplan"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
# require "pry"
|
11
|
+
# Pry.start
|
12
|
+
|
13
|
+
require "irb"
|
14
|
+
IRB.start
|
data/bin/setup
ADDED
data/example.xml
ADDED
@@ -0,0 +1,310 @@
|
|
1
|
+
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
+
<sitemap scheme="2.0">
|
3
|
+
<title>Example site map</title>
|
4
|
+
<version>1.3</version>
|
5
|
+
<link>https://erroragency.slickplan.com/pdongaqin</link>
|
6
|
+
<pubDate>Thu, 15 Jun 2017 06:06:14 -0400</pubDate>
|
7
|
+
<settings>
|
8
|
+
<title>Example site map</title>
|
9
|
+
<tagline>Example</tagline>
|
10
|
+
<language>en_GB</language>
|
11
|
+
</settings>
|
12
|
+
<content_templates>
|
13
|
+
<template id="n6kzozdw" name="1. Home">
|
14
|
+
<elements>
|
15
|
+
<wysiwyg>
|
16
|
+
<id>dwsftd5gbyk2nycd</id>
|
17
|
+
</wysiwyg>
|
18
|
+
</elements>
|
19
|
+
</template>
|
20
|
+
<template id="nzcshyps" name="2. Highlights">
|
21
|
+
<elements>
|
22
|
+
<wysiwyg>
|
23
|
+
<id>k6aerdml6irv6er5</id>
|
24
|
+
</wysiwyg>
|
25
|
+
</elements>
|
26
|
+
</template>
|
27
|
+
<template id="cewk9qe8w" name="3. What's On">
|
28
|
+
<elements>
|
29
|
+
<wysiwyg>
|
30
|
+
<id>lcx55dfdmigkn8am</id>
|
31
|
+
<content><h1>Event title</h1>
|
32
|
+
<p>Event date & time</p>
|
33
|
+
<p>Event category</p>
|
34
|
+
<p>Event detail paragraph</p></content>
|
35
|
+
</wysiwyg>
|
36
|
+
</elements>
|
37
|
+
</template>
|
38
|
+
<template id="xrquiryc" name="4. Visiting">
|
39
|
+
<elements>
|
40
|
+
<wysiwyg>
|
41
|
+
<id>r25ddrelebue9qth</id>
|
42
|
+
</wysiwyg>
|
43
|
+
</elements>
|
44
|
+
</template>
|
45
|
+
<template id="dcdvxwcu" name="5. Content">
|
46
|
+
<elements>
|
47
|
+
<wysiwyg>
|
48
|
+
<id>wp0pagr8pqvi97sm</id>
|
49
|
+
</wysiwyg>
|
50
|
+
</elements>
|
51
|
+
</template>
|
52
|
+
<template id="f6decp3o2" name="6. History & Collections">
|
53
|
+
<elements>
|
54
|
+
<wysiwyg>
|
55
|
+
<id>xc3i6rcl5lpynbk2</id>
|
56
|
+
</wysiwyg>
|
57
|
+
</elements>
|
58
|
+
</template>
|
59
|
+
<template id="kujcf03" name="7. Collection detail">
|
60
|
+
<elements>
|
61
|
+
<wysiwyg>
|
62
|
+
<id>i1tvfmbnzvytbqjj</id>
|
63
|
+
</wysiwyg>
|
64
|
+
</elements>
|
65
|
+
</template>
|
66
|
+
<template id="frgex2pg" name="Schools">
|
67
|
+
<elements>
|
68
|
+
<wysiwyg>
|
69
|
+
<id>nw68m77elpxw916l</id>
|
70
|
+
</wysiwyg>
|
71
|
+
</elements>
|
72
|
+
</template>
|
73
|
+
<template id="kqci4zn" name="Section landing">
|
74
|
+
<elements>
|
75
|
+
<wysiwyg>
|
76
|
+
<id>iykivjij8xpjrwar</id>
|
77
|
+
</wysiwyg>
|
78
|
+
</elements>
|
79
|
+
</template>
|
80
|
+
</content_templates>
|
81
|
+
<section id="svgmainsection">
|
82
|
+
<options>
|
83
|
+
<template>horizontal</template>
|
84
|
+
<design>flat</design>
|
85
|
+
<color_scheme>
|
86
|
+
<default_color>#d5d5d5</default_color>
|
87
|
+
<lines_color>#e5e5e5</lines_color>
|
88
|
+
<text_color>#595959</text_color>
|
89
|
+
<home>#96ceb4</home>
|
90
|
+
<level1>#ffeead</level1>
|
91
|
+
<level2>#ff9350</level2>
|
92
|
+
<level3>#ff6f69</level3>
|
93
|
+
<level4>#ffcc5c</level4>
|
94
|
+
<util>#aad8b0</util>
|
95
|
+
<foot>#aad8b0</foot>
|
96
|
+
</color_scheme>
|
97
|
+
<text_shadow>false</text_shadow>
|
98
|
+
<id>svgmainsection</id>
|
99
|
+
<section>svgmainsection</section>
|
100
|
+
</options>
|
101
|
+
<cells>
|
102
|
+
<cell id="svgl0pe9ch2cn8j530x">
|
103
|
+
<level>util</level>
|
104
|
+
<text>Temporary news</text>
|
105
|
+
<order>1000</order>
|
106
|
+
<contents>
|
107
|
+
<body>
|
108
|
+
<wysiwyg>
|
109
|
+
<id>wp0pagr8pqvi97sm</id>
|
110
|
+
</wysiwyg>
|
111
|
+
</body>
|
112
|
+
<template>dcdvxwcu</template>
|
113
|
+
</contents>
|
114
|
+
</cell>
|
115
|
+
<cell id="svgoob4in8uuta3t13b">
|
116
|
+
<archetype>_consumption</archetype>
|
117
|
+
<level>foot</level>
|
118
|
+
<text>About</text>
|
119
|
+
<order>1000</order>
|
120
|
+
<contents>
|
121
|
+
<body>
|
122
|
+
<wysiwyg>
|
123
|
+
<id>wp0pagr8pqvi97sm</id>
|
124
|
+
</wysiwyg>
|
125
|
+
</body>
|
126
|
+
<template>dcdvxwcu</template>
|
127
|
+
</contents>
|
128
|
+
</cell>
|
129
|
+
<cell id="svgw6k82nowg4k0jzh2">
|
130
|
+
<level>foot</level>
|
131
|
+
<text>Get in touch</text>
|
132
|
+
<order>2000</order>
|
133
|
+
<contents>
|
134
|
+
<body>
|
135
|
+
<wysiwyg>
|
136
|
+
<id>wp0pagr8pqvi97sm</id>
|
137
|
+
</wysiwyg>
|
138
|
+
</body>
|
139
|
+
<template>dcdvxwcu</template>
|
140
|
+
</contents>
|
141
|
+
</cell>
|
142
|
+
<cell id="svgk97i2y8g8g827ecx">
|
143
|
+
<textcolor>#414141</textcolor>
|
144
|
+
<level>home</level>
|
145
|
+
<text>Home</text>
|
146
|
+
<order>1000</order>
|
147
|
+
<contents>
|
148
|
+
<body>
|
149
|
+
<wysiwyg>
|
150
|
+
<id>dwsftd5gbyk2nycd</id>
|
151
|
+
</wysiwyg>
|
152
|
+
</body>
|
153
|
+
<template>n6kzozdw</template>
|
154
|
+
</contents>
|
155
|
+
</cell>
|
156
|
+
<cell id="svgah1cm1du97u7cggt">
|
157
|
+
<level>1</level>
|
158
|
+
<text>Highlights</text>
|
159
|
+
<order>1000</order>
|
160
|
+
<desc>Highlights could show the past month's event highlights as one of the section.</desc>
|
161
|
+
<contents>
|
162
|
+
<body>
|
163
|
+
<wysiwyg>
|
164
|
+
<id>k6aerdml6irv6er5</id>
|
165
|
+
</wysiwyg>
|
166
|
+
</body>
|
167
|
+
<template>nzcshyps</template>
|
168
|
+
</contents>
|
169
|
+
</cell>
|
170
|
+
<cell id="svgslmv3wmolvqu9eap">
|
171
|
+
<textcolor>#3c3c3c</textcolor>
|
172
|
+
<archetype>_listing</archetype>
|
173
|
+
<level>1</level>
|
174
|
+
<text>What's On</text>
|
175
|
+
<order>2000</order>
|
176
|
+
<contents>
|
177
|
+
<body>
|
178
|
+
<wysiwyg>
|
179
|
+
<id>lcx55dfdmigkn8am</id>
|
180
|
+
<content><h1>Event title</h1> <p>Event date & time</p> <p>Event image</p> <p>Price/Free</p> <p>Type of event</p> <p>Event detail paragraph</p></content>
|
181
|
+
</wysiwyg>
|
182
|
+
</body>
|
183
|
+
<status>draft</status>
|
184
|
+
<template>cewk9qe8w</template>
|
185
|
+
<assignee firstName="Martin" lastName="Chapman Fromm" email="martin@error.agency">188443</assignee>
|
186
|
+
</contents>
|
187
|
+
</cell>
|
188
|
+
<cell id="svgvxnlu0yth95meaet">
|
189
|
+
<desc><strong>From writeup</strong><br /><ul><li>Parking and coach drop off points</li><li>Prices</li><li>Opening times</li><li>The local area</li><li>Location and directions</li><li>What to expect: clothing, weather</li><li>Accessibility</li><li>Amenities (toilets, baby change, café, gift shop)</li><li>Walking tour</li><li>Group visits</li></ul></desc>
|
190
|
+
<archetype>_fragment</archetype>
|
191
|
+
<level>1</level>
|
192
|
+
<text>Visiting</text>
|
193
|
+
<order>3000</order>
|
194
|
+
<contents>
|
195
|
+
<body>
|
196
|
+
<wysiwyg>
|
197
|
+
<id>r25ddrelebue9qth</id>
|
198
|
+
</wysiwyg>
|
199
|
+
</body>
|
200
|
+
<template>xrquiryc</template>
|
201
|
+
</contents>
|
202
|
+
</cell>
|
203
|
+
<cell id="svgj8eri1wqsoyow2uu">
|
204
|
+
<level>1</level>
|
205
|
+
<text>Season Passes & Offers</text>
|
206
|
+
<order>4000</order>
|
207
|
+
<contents>
|
208
|
+
<body>
|
209
|
+
<wysiwyg>
|
210
|
+
<id>wp0pagr8pqvi97sm</id>
|
211
|
+
</wysiwyg>
|
212
|
+
</body>
|
213
|
+
<template>dcdvxwcu</template>
|
214
|
+
</contents>
|
215
|
+
</cell>
|
216
|
+
<cell id="svgoi0t2pbesailq3pw">
|
217
|
+
<level>1</level>
|
218
|
+
<text>History & Collections</text>
|
219
|
+
<order>5000</order>
|
220
|
+
<contents>
|
221
|
+
<body>
|
222
|
+
<wysiwyg>
|
223
|
+
<id>xc3i6rcl5lpynbk2</id>
|
224
|
+
</wysiwyg>
|
225
|
+
</body>
|
226
|
+
<template>f6decp3o2</template>
|
227
|
+
</contents>
|
228
|
+
</cell>
|
229
|
+
<cell id="svgfmlluc4tv1pa4z9l">
|
230
|
+
<desc><strong>From writeup<br /></strong><ul><li>Typical projects</li><li>Worksheets</li><li>Links to curriculum</li><li>Risk assessment (download?)</li><li>Goody bags/souvenir info</li></ul></desc>
|
231
|
+
<level>1</level>
|
232
|
+
<text>Schools</text>
|
233
|
+
<order>6000</order>
|
234
|
+
<contents>
|
235
|
+
<body>
|
236
|
+
<wysiwyg>
|
237
|
+
<id>wp0pagr8pqvi97sm</id>
|
238
|
+
</wysiwyg>
|
239
|
+
</body>
|
240
|
+
<template>dcdvxwcu</template>
|
241
|
+
</contents>
|
242
|
+
</cell>
|
243
|
+
<cell id="svgam3j8qjjoya15a34">
|
244
|
+
<level>1</level>
|
245
|
+
<text>Get involved</text>
|
246
|
+
<order>7000</order>
|
247
|
+
<desc><strong>From writeup<br /><br />Volunteering</strong><br /><ul><li>Available volunteer positions</li><li>Benefits of volunteering</li><li>Application form (Word doc)</li><li>Volunteering handbook (Word doc)</li></ul>And...<br /><ul><li>Donate</li></ul></desc>
|
248
|
+
<contents>
|
249
|
+
<template>dcdvxwcu</template>
|
250
|
+
<body>
|
251
|
+
<wysiwyg>
|
252
|
+
<id>wp0pagr8pqvi97sm</id>
|
253
|
+
</wysiwyg>
|
254
|
+
</body>
|
255
|
+
</contents>
|
256
|
+
</cell>
|
257
|
+
<cell id="svge3r4d6vviqxp7oya">
|
258
|
+
<parent>svgfmlluc4tv1pa4z9l</parent>
|
259
|
+
<desc><strong>Includes</strong><br /><ul><li>list of sessions</li><li>prices</li><li>enquiry form</li></ul></desc>
|
260
|
+
<level>2</level>
|
261
|
+
<text>Sessions & prices</text>
|
262
|
+
<order>1000</order>
|
263
|
+
<contents>
|
264
|
+
<body>
|
265
|
+
<wysiwyg>
|
266
|
+
<id>wp0pagr8pqvi97sm</id>
|
267
|
+
</wysiwyg>
|
268
|
+
</body>
|
269
|
+
<template>dcdvxwcu</template>
|
270
|
+
</contents>
|
271
|
+
</cell>
|
272
|
+
<cell id="svgdoznheorsf2xtj0b">
|
273
|
+
<parent>svgoi0t2pbesailq3pw</parent>
|
274
|
+
<level>2</level>
|
275
|
+
<text>History content page</text>
|
276
|
+
<order>1000</order>
|
277
|
+
<contents>
|
278
|
+
<body>
|
279
|
+
<wysiwyg>
|
280
|
+
<id>wp0pagr8pqvi97sm</id>
|
281
|
+
</wysiwyg>
|
282
|
+
</body>
|
283
|
+
<template>dcdvxwcu</template>
|
284
|
+
</contents>
|
285
|
+
</cell>
|
286
|
+
<cell id="svgktdf5th3grhur1yi">
|
287
|
+
<parent>svgvxnlu0yth95meaet</parent>
|
288
|
+
<level>2</level>
|
289
|
+
<text>Walking tour</text>
|
290
|
+
<order>1000</order>
|
291
|
+
<archetype>_file</archetype>
|
292
|
+
</cell>
|
293
|
+
<cell id="svgegzubzb1wonw46l6">
|
294
|
+
<parent>svgoi0t2pbesailq3pw</parent>
|
295
|
+
<level>2</level>
|
296
|
+
<text>Collections content page</text>
|
297
|
+
<order>2000</order>
|
298
|
+
<desc>Probably 6 collections</desc>
|
299
|
+
<contents>
|
300
|
+
<body>
|
301
|
+
<wysiwyg>
|
302
|
+
<id>i1tvfmbnzvytbqjj</id>
|
303
|
+
</wysiwyg>
|
304
|
+
</body>
|
305
|
+
<template>kujcf03</template>
|
306
|
+
</contents>
|
307
|
+
</cell>
|
308
|
+
</cells>
|
309
|
+
</section>
|
310
|
+
</sitemap>
|
data/lib/slickplan.rb
ADDED
@@ -0,0 +1,23 @@
|
|
1
|
+
module SlickPlan
|
2
|
+
module Parser
|
3
|
+
class XML
|
4
|
+
def self.parse(xml)
|
5
|
+
doc = Nokogiri::XML(xml)
|
6
|
+
sitemap = SlickPlan::Sitemap.new(title: doc.css('sitemap>title').text)
|
7
|
+
sitemap.templates = doc.css('content_templates>template').collect do |t|
|
8
|
+
SlickPlan::Template.new(name: t.attr(:name), id: t.attr(:id))
|
9
|
+
end
|
10
|
+
sitemap.pages = doc.css('section#svgmainsection>cells>cell').collect do |p|
|
11
|
+
template_id = p.css('contents>template').text
|
12
|
+
parent_id = p.css('parent').text
|
13
|
+
|
14
|
+
SlickPlan::Page.new(id: p.attr(:id), title: p.css('text').text, content: p.css('contents>body>wysiwyg>content').text, template_id: template_id, template: sitemap.templates.find {|t| t.id == template_id}, parent_id: parent_id)
|
15
|
+
end
|
16
|
+
sitemap.pages.each do |page|
|
17
|
+
page.parent = sitemap.pages.find {|p| p.id == page.parent_id}
|
18
|
+
end
|
19
|
+
return sitemap
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
data/slickplan.gemspec
ADDED
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'slickplan/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "slickplan"
|
8
|
+
spec.version = Slickplan::VERSION
|
9
|
+
spec.authors = ["Ed Jones"]
|
10
|
+
spec.email = ["ed@errorstudio.co.uk"]
|
11
|
+
|
12
|
+
spec.summary = %q{A Ruby library for slickplan.com}
|
13
|
+
spec.homepage = "https://github.com/errorstudio/slickplan"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
17
|
+
f.match(%r{^(test|spec|features)/})
|
18
|
+
end
|
19
|
+
spec.bindir = "exe"
|
20
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
21
|
+
spec.require_paths = ["lib"]
|
22
|
+
|
23
|
+
spec.add_development_dependency "bundler", "~> 1.13"
|
24
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
25
|
+
|
26
|
+
spec.add_dependency 'nokogiri'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,104 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: slickplan
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Ed Jones
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-06-28 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: bundler
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.13'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.13'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '10.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '10.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: nokogiri
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description:
|
56
|
+
email:
|
57
|
+
- ed@errorstudio.co.uk
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- ".ruby-gemset"
|
64
|
+
- ".ruby-version"
|
65
|
+
- CODE_OF_CONDUCT.md
|
66
|
+
- Gemfile
|
67
|
+
- LICENSE.txt
|
68
|
+
- README.md
|
69
|
+
- Rakefile
|
70
|
+
- bin/console
|
71
|
+
- bin/setup
|
72
|
+
- example.xml
|
73
|
+
- lib/slickplan.rb
|
74
|
+
- lib/slickplan/page.rb
|
75
|
+
- lib/slickplan/parser/xml.rb
|
76
|
+
- lib/slickplan/sitemap.rb
|
77
|
+
- lib/slickplan/template.rb
|
78
|
+
- lib/slickplan/version.rb
|
79
|
+
- slickplan.gemspec
|
80
|
+
homepage: https://github.com/errorstudio/slickplan
|
81
|
+
licenses:
|
82
|
+
- MIT
|
83
|
+
metadata: {}
|
84
|
+
post_install_message:
|
85
|
+
rdoc_options: []
|
86
|
+
require_paths:
|
87
|
+
- lib
|
88
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
89
|
+
requirements:
|
90
|
+
- - ">="
|
91
|
+
- !ruby/object:Gem::Version
|
92
|
+
version: '0'
|
93
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
94
|
+
requirements:
|
95
|
+
- - ">="
|
96
|
+
- !ruby/object:Gem::Version
|
97
|
+
version: '0'
|
98
|
+
requirements: []
|
99
|
+
rubyforge_project:
|
100
|
+
rubygems_version: 2.6.12
|
101
|
+
signing_key:
|
102
|
+
specification_version: 4
|
103
|
+
summary: A Ruby library for slickplan.com
|
104
|
+
test_files: []
|