locomotive_page_redirect_plugin 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +15 -0
- data/.gitignore +1 -0
- data/Gemfile +28 -0
- data/Gemfile.lock +357 -0
- data/coverage/.last_run.json +5 -0
- data/coverage/.resultset.json +93 -0
- data/coverage/.resultset.json.lock +0 -0
- data/coverage/assets/0.7.1/application.css +1110 -0
- data/coverage/assets/0.7.1/application.js +626 -0
- data/coverage/assets/0.7.1/fancybox/blank.gif +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_close.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_loading.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_nav_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_e.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_n.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_ne.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_nw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_s.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_se.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_sw.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_shadow_w.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_left.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_main.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_over.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancy_title_right.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-x.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox-y.png +0 -0
- data/coverage/assets/0.7.1/fancybox/fancybox.png +0 -0
- data/coverage/assets/0.7.1/favicon_green.png +0 -0
- data/coverage/assets/0.7.1/favicon_red.png +0 -0
- data/coverage/assets/0.7.1/favicon_yellow.png +0 -0
- data/coverage/assets/0.7.1/loading.gif +0 -0
- data/coverage/assets/0.7.1/magnify.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.7.1/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/assets/0.8.0/application.css +799 -0
- data/coverage/assets/0.8.0/application.js +1559 -0
- data/coverage/assets/0.8.0/colorbox/border.png +0 -0
- data/coverage/assets/0.8.0/colorbox/controls.png +0 -0
- data/coverage/assets/0.8.0/colorbox/loading.gif +0 -0
- data/coverage/assets/0.8.0/colorbox/loading_background.png +0 -0
- data/coverage/assets/0.8.0/favicon_green.png +0 -0
- data/coverage/assets/0.8.0/favicon_red.png +0 -0
- data/coverage/assets/0.8.0/favicon_yellow.png +0 -0
- data/coverage/assets/0.8.0/loading.gif +0 -0
- data/coverage/assets/0.8.0/magnify.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_0_aaaaaa_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_flat_75_ffffff_40x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_55_fbf9ee_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_dadada_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_75_e6e6e6_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_glass_95_fef1ec_1x400.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-bg_highlight-soft_75_cccccc_1x100.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_222222_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_2e83ff_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_454545_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_888888_256x240.png +0 -0
- data/coverage/assets/0.8.0/smoothness/images/ui-icons_cd0a0a_256x240.png +0 -0
- data/coverage/index.html +851 -0
- data/lib/locomotive/page_redirect/plugin.rb +54 -0
- data/lib/locomotive/page_redirect/plugin/config.haml +12 -0
- data/lib/locomotive/page_redirect/plugin/config.rb +24 -0
- data/lib/locomotive/page_redirect/plugin/version.rb +3 -0
- data/lib/locomotive_page_redirect_plugin.rb +1 -0
- data/locomotive_page_redirect_plugin.gemspec +25 -0
- data/spec/dummy/README.rdoc +261 -0
- data/spec/dummy/Rakefile +7 -0
- data/spec/dummy/app/assets/javascripts/application.js +15 -0
- data/spec/dummy/app/assets/stylesheets/application.css +13 -0
- data/spec/dummy/app/controllers/application_controller.rb +3 -0
- data/spec/dummy/app/controllers/home_controller.rb +4 -0
- data/spec/dummy/app/controllers/test_controller.rb +13 -0
- data/spec/dummy/app/helpers/application_helper.rb +2 -0
- data/spec/dummy/app/mailers/.gitkeep +0 -0
- data/spec/dummy/app/models/.gitkeep +0 -0
- data/spec/dummy/app/views/home/index.html.erb +9 -0
- data/spec/dummy/app/views/layouts/application.html.erb +14 -0
- data/spec/dummy/app/views/sessions/new.html.erb +15 -0
- data/spec/dummy/config.ru +4 -0
- data/spec/dummy/config/application.rb +66 -0
- data/spec/dummy/config/boot.rb +10 -0
- data/spec/dummy/config/environment.rb +5 -0
- data/spec/dummy/config/environments/development.rb +31 -0
- data/spec/dummy/config/environments/production.rb +64 -0
- data/spec/dummy/config/environments/test.rb +35 -0
- data/spec/dummy/config/initializers/backtrace_silencers.rb +7 -0
- data/spec/dummy/config/initializers/inflections.rb +15 -0
- data/spec/dummy/config/initializers/mime_types.rb +5 -0
- data/spec/dummy/config/initializers/secret_token.rb +7 -0
- data/spec/dummy/config/initializers/session_store.rb +8 -0
- data/spec/dummy/config/initializers/wrap_parameters.rb +10 -0
- data/spec/dummy/config/locales/en.yml +5 -0
- data/spec/dummy/config/mongoid.yml +80 -0
- data/spec/dummy/config/routes.rb +3 -0
- data/spec/dummy/lib/assets/.gitkeep +0 -0
- data/spec/dummy/log/.gitkeep +0 -0
- data/spec/dummy/log/test.log +43769 -0
- data/spec/dummy/public/404.html +26 -0
- data/spec/dummy/public/422.html +26 -0
- data/spec/dummy/public/500.html +25 -0
- data/spec/dummy/public/favicon.ico +0 -0
- data/spec/dummy/script/rails +6 -0
- data/spec/lib/locomotive/page_redirect/plugin_spec.rb +53 -0
- data/spec/spec_helper.rb +50 -0
- data/spec/support/factories.rb +183 -0
- metadata +173 -0
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
Binary file
|
data/coverage/index.html
ADDED
@@ -0,0 +1,851 @@
|
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html xmlns='http://www.w3.org/1999/xhtml'>
|
3
|
+
<head>
|
4
|
+
<title>Code coverage for Page redirect plugin</title>
|
5
|
+
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
|
6
|
+
<script src='./assets/0.8.0/application.js' type='text/javascript'></script>
|
7
|
+
<link href='./assets/0.8.0/application.css' media='screen, projection, print' rel='stylesheet' type='text/css'>
|
8
|
+
<link rel="shortcut icon" type="image/png" href="./assets/0.8.0/favicon_green.png" />
|
9
|
+
<link rel="icon" type="image/png" href="./assets/0.8.0/favicon.png" />
|
10
|
+
</head>
|
11
|
+
|
12
|
+
<body>
|
13
|
+
<div id="loading">
|
14
|
+
<img src="./assets/0.8.0/loading.gif" alt="loading"/>
|
15
|
+
</div>
|
16
|
+
<div id="wrapper" style="display:none;">
|
17
|
+
<div class="timestamp">Generated <abbr class="timeago" title="2014-08-31T17:12:08-03:00">2014-08-31T17:12:08-03:00</abbr></div>
|
18
|
+
<ul class="group_tabs"></ul>
|
19
|
+
|
20
|
+
<div id="content">
|
21
|
+
<div class="file_list_container" id="AllFiles">
|
22
|
+
<h2>
|
23
|
+
<span class="group_name">All Files</span>
|
24
|
+
(<span class="covered_percent"><span class="green">93.18%</span></span>
|
25
|
+
covered at
|
26
|
+
<span class="covered_strength">
|
27
|
+
<span class="green">
|
28
|
+
1.46
|
29
|
+
</span>
|
30
|
+
</span> hits/line)
|
31
|
+
</h2>
|
32
|
+
<a name="AllFiles"></a>
|
33
|
+
<div>
|
34
|
+
<b>3</b> files in total.
|
35
|
+
<b>44</b> relevant lines.
|
36
|
+
<span class="green"><b>41</b> lines covered</span> and
|
37
|
+
<span class="red"><b>3</b> lines missed </span>
|
38
|
+
</div>
|
39
|
+
<table class="file_list">
|
40
|
+
<thead>
|
41
|
+
<tr>
|
42
|
+
<th>File</th>
|
43
|
+
<th>% covered</th>
|
44
|
+
<th>Lines</th>
|
45
|
+
<th>Relevant Lines</th>
|
46
|
+
<th>Lines covered</th>
|
47
|
+
<th>Lines missed</th>
|
48
|
+
<th>Avg. Hits / Line</th>
|
49
|
+
</tr>
|
50
|
+
</thead>
|
51
|
+
<tbody>
|
52
|
+
|
53
|
+
<tr>
|
54
|
+
<td class="strong"><a href="#2f4ed64bdd355f016d3e7991f1746cd91dbfb49c" class="src_link" title="lib/locomotive/page_redirect/plugin.rb">lib/locomotive/page_redirect/plugin.rb</a></td>
|
55
|
+
<td class="yellow strong">90.0 %</td>
|
56
|
+
<td>55</td>
|
57
|
+
<td>30</td>
|
58
|
+
<td>27</td>
|
59
|
+
<td>3</td>
|
60
|
+
<td>1.2</td>
|
61
|
+
</tr>
|
62
|
+
|
63
|
+
<tr>
|
64
|
+
<td class="strong"><a href="#d871315b75069881d3e12ac2b06111204e40c88c" class="src_link" title="lib/locomotive/page_redirect/plugin/config.rb">lib/locomotive/page_redirect/plugin/config.rb</a></td>
|
65
|
+
<td class="green strong">100.0 %</td>
|
66
|
+
<td>24</td>
|
67
|
+
<td>13</td>
|
68
|
+
<td>13</td>
|
69
|
+
<td>0</td>
|
70
|
+
<td>2.1</td>
|
71
|
+
</tr>
|
72
|
+
|
73
|
+
<tr>
|
74
|
+
<td class="strong"><a href="#46b2892a50ff007a0361506f765c400edb7f44ad" class="src_link" title="lib/locomotive_page_redirect_plugin.rb">lib/locomotive_page_redirect_plugin.rb</a></td>
|
75
|
+
<td class="green strong">100.0 %</td>
|
76
|
+
<td>1</td>
|
77
|
+
<td>1</td>
|
78
|
+
<td>1</td>
|
79
|
+
<td>0</td>
|
80
|
+
<td>1.0</td>
|
81
|
+
</tr>
|
82
|
+
|
83
|
+
</tbody>
|
84
|
+
</table>
|
85
|
+
</div>
|
86
|
+
|
87
|
+
|
88
|
+
|
89
|
+
<div class="file_list_container" id="Controllers">
|
90
|
+
<h2>
|
91
|
+
<span class="group_name">Controllers</span>
|
92
|
+
(<span class="covered_percent"><span class="green">100.0%</span></span>
|
93
|
+
covered at
|
94
|
+
<span class="covered_strength">
|
95
|
+
<span class="red">
|
96
|
+
0.0
|
97
|
+
</span>
|
98
|
+
</span> hits/line)
|
99
|
+
</h2>
|
100
|
+
<a name="Controllers"></a>
|
101
|
+
<div>
|
102
|
+
<b>0</b> files in total.
|
103
|
+
<b>0.0</b> relevant lines.
|
104
|
+
<span class="green"><b>0.0</b> lines covered</span> and
|
105
|
+
<span class="red"><b>0.0</b> lines missed </span>
|
106
|
+
</div>
|
107
|
+
<table class="file_list">
|
108
|
+
<thead>
|
109
|
+
<tr>
|
110
|
+
<th>File</th>
|
111
|
+
<th>% covered</th>
|
112
|
+
<th>Lines</th>
|
113
|
+
<th>Relevant Lines</th>
|
114
|
+
<th>Lines covered</th>
|
115
|
+
<th>Lines missed</th>
|
116
|
+
<th>Avg. Hits / Line</th>
|
117
|
+
</tr>
|
118
|
+
</thead>
|
119
|
+
<tbody>
|
120
|
+
|
121
|
+
</tbody>
|
122
|
+
</table>
|
123
|
+
</div>
|
124
|
+
|
125
|
+
|
126
|
+
<div class="file_list_container" id="Models">
|
127
|
+
<h2>
|
128
|
+
<span class="group_name">Models</span>
|
129
|
+
(<span class="covered_percent"><span class="green">100.0%</span></span>
|
130
|
+
covered at
|
131
|
+
<span class="covered_strength">
|
132
|
+
<span class="red">
|
133
|
+
0.0
|
134
|
+
</span>
|
135
|
+
</span> hits/line)
|
136
|
+
</h2>
|
137
|
+
<a name="Models"></a>
|
138
|
+
<div>
|
139
|
+
<b>0</b> files in total.
|
140
|
+
<b>0.0</b> relevant lines.
|
141
|
+
<span class="green"><b>0.0</b> lines covered</span> and
|
142
|
+
<span class="red"><b>0.0</b> lines missed </span>
|
143
|
+
</div>
|
144
|
+
<table class="file_list">
|
145
|
+
<thead>
|
146
|
+
<tr>
|
147
|
+
<th>File</th>
|
148
|
+
<th>% covered</th>
|
149
|
+
<th>Lines</th>
|
150
|
+
<th>Relevant Lines</th>
|
151
|
+
<th>Lines covered</th>
|
152
|
+
<th>Lines missed</th>
|
153
|
+
<th>Avg. Hits / Line</th>
|
154
|
+
</tr>
|
155
|
+
</thead>
|
156
|
+
<tbody>
|
157
|
+
|
158
|
+
</tbody>
|
159
|
+
</table>
|
160
|
+
</div>
|
161
|
+
|
162
|
+
|
163
|
+
<div class="file_list_container" id="Mailers">
|
164
|
+
<h2>
|
165
|
+
<span class="group_name">Mailers</span>
|
166
|
+
(<span class="covered_percent"><span class="green">100.0%</span></span>
|
167
|
+
covered at
|
168
|
+
<span class="covered_strength">
|
169
|
+
<span class="red">
|
170
|
+
0.0
|
171
|
+
</span>
|
172
|
+
</span> hits/line)
|
173
|
+
</h2>
|
174
|
+
<a name="Mailers"></a>
|
175
|
+
<div>
|
176
|
+
<b>0</b> files in total.
|
177
|
+
<b>0.0</b> relevant lines.
|
178
|
+
<span class="green"><b>0.0</b> lines covered</span> and
|
179
|
+
<span class="red"><b>0.0</b> lines missed </span>
|
180
|
+
</div>
|
181
|
+
<table class="file_list">
|
182
|
+
<thead>
|
183
|
+
<tr>
|
184
|
+
<th>File</th>
|
185
|
+
<th>% covered</th>
|
186
|
+
<th>Lines</th>
|
187
|
+
<th>Relevant Lines</th>
|
188
|
+
<th>Lines covered</th>
|
189
|
+
<th>Lines missed</th>
|
190
|
+
<th>Avg. Hits / Line</th>
|
191
|
+
</tr>
|
192
|
+
</thead>
|
193
|
+
<tbody>
|
194
|
+
|
195
|
+
</tbody>
|
196
|
+
</table>
|
197
|
+
</div>
|
198
|
+
|
199
|
+
|
200
|
+
<div class="file_list_container" id="Helpers">
|
201
|
+
<h2>
|
202
|
+
<span class="group_name">Helpers</span>
|
203
|
+
(<span class="covered_percent"><span class="green">100.0%</span></span>
|
204
|
+
covered at
|
205
|
+
<span class="covered_strength">
|
206
|
+
<span class="red">
|
207
|
+
0.0
|
208
|
+
</span>
|
209
|
+
</span> hits/line)
|
210
|
+
</h2>
|
211
|
+
<a name="Helpers"></a>
|
212
|
+
<div>
|
213
|
+
<b>0</b> files in total.
|
214
|
+
<b>0.0</b> relevant lines.
|
215
|
+
<span class="green"><b>0.0</b> lines covered</span> and
|
216
|
+
<span class="red"><b>0.0</b> lines missed </span>
|
217
|
+
</div>
|
218
|
+
<table class="file_list">
|
219
|
+
<thead>
|
220
|
+
<tr>
|
221
|
+
<th>File</th>
|
222
|
+
<th>% covered</th>
|
223
|
+
<th>Lines</th>
|
224
|
+
<th>Relevant Lines</th>
|
225
|
+
<th>Lines covered</th>
|
226
|
+
<th>Lines missed</th>
|
227
|
+
<th>Avg. Hits / Line</th>
|
228
|
+
</tr>
|
229
|
+
</thead>
|
230
|
+
<tbody>
|
231
|
+
|
232
|
+
</tbody>
|
233
|
+
</table>
|
234
|
+
</div>
|
235
|
+
|
236
|
+
|
237
|
+
<div class="file_list_container" id="Libraries">
|
238
|
+
<h2>
|
239
|
+
<span class="group_name">Libraries</span>
|
240
|
+
(<span class="covered_percent"><span class="green">93.18%</span></span>
|
241
|
+
covered at
|
242
|
+
<span class="covered_strength">
|
243
|
+
<span class="green">
|
244
|
+
1.46
|
245
|
+
</span>
|
246
|
+
</span> hits/line)
|
247
|
+
</h2>
|
248
|
+
<a name="Libraries"></a>
|
249
|
+
<div>
|
250
|
+
<b>3</b> files in total.
|
251
|
+
<b>44</b> relevant lines.
|
252
|
+
<span class="green"><b>41</b> lines covered</span> and
|
253
|
+
<span class="red"><b>3</b> lines missed </span>
|
254
|
+
</div>
|
255
|
+
<table class="file_list">
|
256
|
+
<thead>
|
257
|
+
<tr>
|
258
|
+
<th>File</th>
|
259
|
+
<th>% covered</th>
|
260
|
+
<th>Lines</th>
|
261
|
+
<th>Relevant Lines</th>
|
262
|
+
<th>Lines covered</th>
|
263
|
+
<th>Lines missed</th>
|
264
|
+
<th>Avg. Hits / Line</th>
|
265
|
+
</tr>
|
266
|
+
</thead>
|
267
|
+
<tbody>
|
268
|
+
|
269
|
+
<tr>
|
270
|
+
<td class="strong"><a href="#2f4ed64bdd355f016d3e7991f1746cd91dbfb49c" class="src_link" title="lib/locomotive/page_redirect/plugin.rb">lib/locomotive/page_redirect/plugin.rb</a></td>
|
271
|
+
<td class="yellow strong">90.0 %</td>
|
272
|
+
<td>55</td>
|
273
|
+
<td>30</td>
|
274
|
+
<td>27</td>
|
275
|
+
<td>3</td>
|
276
|
+
<td>1.2</td>
|
277
|
+
</tr>
|
278
|
+
|
279
|
+
<tr>
|
280
|
+
<td class="strong"><a href="#d871315b75069881d3e12ac2b06111204e40c88c" class="src_link" title="lib/locomotive/page_redirect/plugin/config.rb">lib/locomotive/page_redirect/plugin/config.rb</a></td>
|
281
|
+
<td class="green strong">100.0 %</td>
|
282
|
+
<td>24</td>
|
283
|
+
<td>13</td>
|
284
|
+
<td>13</td>
|
285
|
+
<td>0</td>
|
286
|
+
<td>2.1</td>
|
287
|
+
</tr>
|
288
|
+
|
289
|
+
<tr>
|
290
|
+
<td class="strong"><a href="#46b2892a50ff007a0361506f765c400edb7f44ad" class="src_link" title="lib/locomotive_page_redirect_plugin.rb">lib/locomotive_page_redirect_plugin.rb</a></td>
|
291
|
+
<td class="green strong">100.0 %</td>
|
292
|
+
<td>1</td>
|
293
|
+
<td>1</td>
|
294
|
+
<td>1</td>
|
295
|
+
<td>0</td>
|
296
|
+
<td>1.0</td>
|
297
|
+
</tr>
|
298
|
+
|
299
|
+
</tbody>
|
300
|
+
</table>
|
301
|
+
</div>
|
302
|
+
|
303
|
+
|
304
|
+
</div>
|
305
|
+
|
306
|
+
<div id="footer">
|
307
|
+
Generated by <a href="http://github.com/colszowka/simplecov">simplecov</a> v0.9.0
|
308
|
+
and simplecov-html v0.8.0<br/>
|
309
|
+
using RSpec
|
310
|
+
</div>
|
311
|
+
|
312
|
+
<div class="source_files">
|
313
|
+
|
314
|
+
<div class="source_table" id="2f4ed64bdd355f016d3e7991f1746cd91dbfb49c">
|
315
|
+
<div class="header">
|
316
|
+
<h3>lib/locomotive/page_redirect/plugin.rb</h3>
|
317
|
+
<h4><span class="yellow">90.0 %</span> covered</h4>
|
318
|
+
<div>
|
319
|
+
<b>30</b> relevant lines.
|
320
|
+
<span class="green"><b>27</b> lines covered</span> and
|
321
|
+
<span class="red"><b>3</b> lines missed.</span>
|
322
|
+
</div>
|
323
|
+
</div>
|
324
|
+
|
325
|
+
<pre>
|
326
|
+
<ol>
|
327
|
+
|
328
|
+
<li class="covered" data-hits="1" data-linenumber="1">
|
329
|
+
<span class="hits">1</span>
|
330
|
+
|
331
|
+
<code class="ruby">require 'locomotive_plugins'</code>
|
332
|
+
</li>
|
333
|
+
|
334
|
+
<li class="covered" data-hits="1" data-linenumber="2">
|
335
|
+
<span class="hits">1</span>
|
336
|
+
|
337
|
+
<code class="ruby">require 'locomotive/page_redirect/plugin/config'</code>
|
338
|
+
</li>
|
339
|
+
|
340
|
+
<li class="never" data-hits="" data-linenumber="3">
|
341
|
+
|
342
|
+
|
343
|
+
<code class="ruby"></code>
|
344
|
+
</li>
|
345
|
+
|
346
|
+
<li class="covered" data-hits="1" data-linenumber="4">
|
347
|
+
<span class="hits">1</span>
|
348
|
+
|
349
|
+
<code class="ruby">module Locomotive</code>
|
350
|
+
</li>
|
351
|
+
|
352
|
+
<li class="covered" data-hits="1" data-linenumber="5">
|
353
|
+
<span class="hits">1</span>
|
354
|
+
|
355
|
+
<code class="ruby"> module PageRedirect</code>
|
356
|
+
</li>
|
357
|
+
|
358
|
+
<li class="covered" data-hits="1" data-linenumber="6">
|
359
|
+
<span class="hits">1</span>
|
360
|
+
|
361
|
+
<code class="ruby"> class Plugin</code>
|
362
|
+
</li>
|
363
|
+
|
364
|
+
<li class="covered" data-hits="1" data-linenumber="7">
|
365
|
+
<span class="hits">1</span>
|
366
|
+
|
367
|
+
<code class="ruby"> include Locomotive::Plugin</code>
|
368
|
+
</li>
|
369
|
+
|
370
|
+
<li class="never" data-hits="" data-linenumber="8">
|
371
|
+
|
372
|
+
|
373
|
+
<code class="ruby"></code>
|
374
|
+
</li>
|
375
|
+
|
376
|
+
<li class="covered" data-hits="1" data-linenumber="9">
|
377
|
+
<span class="hits">1</span>
|
378
|
+
|
379
|
+
<code class="ruby"> after_plugin_setup :set_config</code>
|
380
|
+
</li>
|
381
|
+
|
382
|
+
<li class="covered" data-hits="1" data-linenumber="10">
|
383
|
+
<span class="hits">1</span>
|
384
|
+
|
385
|
+
<code class="ruby"> before_page_render :redirect</code>
|
386
|
+
</li>
|
387
|
+
|
388
|
+
<li class="never" data-hits="" data-linenumber="11">
|
389
|
+
|
390
|
+
|
391
|
+
<code class="ruby"></code>
|
392
|
+
</li>
|
393
|
+
|
394
|
+
<li class="covered" data-hits="1" data-linenumber="12">
|
395
|
+
<span class="hits">1</span>
|
396
|
+
|
397
|
+
<code class="ruby"> def config_template_file</code>
|
398
|
+
</li>
|
399
|
+
|
400
|
+
<li class="missed" data-hits="0" data-linenumber="13">
|
401
|
+
|
402
|
+
|
403
|
+
<code class="ruby"> File.join(File.dirname(__FILE__), 'plugin', 'config.haml')</code>
|
404
|
+
</li>
|
405
|
+
|
406
|
+
<li class="never" data-hits="" data-linenumber="14">
|
407
|
+
|
408
|
+
|
409
|
+
<code class="ruby"> end</code>
|
410
|
+
</li>
|
411
|
+
|
412
|
+
<li class="never" data-hits="" data-linenumber="15">
|
413
|
+
|
414
|
+
|
415
|
+
<code class="ruby"></code>
|
416
|
+
</li>
|
417
|
+
|
418
|
+
<li class="covered" data-hits="1" data-linenumber="16">
|
419
|
+
<span class="hits">1</span>
|
420
|
+
|
421
|
+
<code class="ruby"> protected</code>
|
422
|
+
</li>
|
423
|
+
|
424
|
+
<li class="never" data-hits="" data-linenumber="17">
|
425
|
+
|
426
|
+
|
427
|
+
<code class="ruby"></code>
|
428
|
+
</li>
|
429
|
+
|
430
|
+
<li class="covered" data-hits="1" data-linenumber="18">
|
431
|
+
<span class="hits">1</span>
|
432
|
+
|
433
|
+
<code class="ruby"> def set_config</code>
|
434
|
+
</li>
|
435
|
+
|
436
|
+
<li class="missed" data-hits="0" data-linenumber="19">
|
437
|
+
|
438
|
+
|
439
|
+
<code class="ruby"> Config.hash = config</code>
|
440
|
+
</li>
|
441
|
+
|
442
|
+
<li class="never" data-hits="" data-linenumber="20">
|
443
|
+
|
444
|
+
|
445
|
+
<code class="ruby"> end</code>
|
446
|
+
</li>
|
447
|
+
|
448
|
+
<li class="never" data-hits="" data-linenumber="21">
|
449
|
+
|
450
|
+
|
451
|
+
<code class="ruby"></code>
|
452
|
+
</li>
|
453
|
+
|
454
|
+
<li class="never" data-hits="" data-linenumber="22">
|
455
|
+
|
456
|
+
|
457
|
+
<code class="ruby"> # gets the current site</code>
|
458
|
+
</li>
|
459
|
+
|
460
|
+
<li class="covered" data-hits="1" data-linenumber="23">
|
461
|
+
<span class="hits">1</span>
|
462
|
+
|
463
|
+
<code class="ruby"> def get_site</code>
|
464
|
+
</li>
|
465
|
+
|
466
|
+
<li class="covered" data-hits="2" data-linenumber="24">
|
467
|
+
<span class="hits">2</span>
|
468
|
+
|
469
|
+
<code class="ruby"> controller.send(:current_site)</code>
|
470
|
+
</li>
|
471
|
+
|
472
|
+
<li class="never" data-hits="" data-linenumber="25">
|
473
|
+
|
474
|
+
|
475
|
+
<code class="ruby"> end</code>
|
476
|
+
</li>
|
477
|
+
|
478
|
+
<li class="never" data-hits="" data-linenumber="26">
|
479
|
+
|
480
|
+
|
481
|
+
<code class="ruby"></code>
|
482
|
+
</li>
|
483
|
+
|
484
|
+
<li class="never" data-hits="" data-linenumber="27">
|
485
|
+
|
486
|
+
|
487
|
+
<code class="ruby"> # gets the model and it needs for the redirects</code>
|
488
|
+
</li>
|
489
|
+
|
490
|
+
<li class="covered" data-hits="1" data-linenumber="28">
|
491
|
+
<span class="hits">1</span>
|
492
|
+
|
493
|
+
<code class="ruby"> def get_model(model_slug)</code>
|
494
|
+
</li>
|
495
|
+
|
496
|
+
<li class="covered" data-hits="2" data-linenumber="29">
|
497
|
+
<span class="hits">2</span>
|
498
|
+
|
499
|
+
<code class="ruby"> site = get_site</code>
|
500
|
+
</li>
|
501
|
+
|
502
|
+
<li class="covered" data-hits="2" data-linenumber="30">
|
503
|
+
<span class="hits">2</span>
|
504
|
+
|
505
|
+
<code class="ruby"> site.content_types.where(:slug => model_slug).first</code>
|
506
|
+
</li>
|
507
|
+
|
508
|
+
<li class="never" data-hits="" data-linenumber="31">
|
509
|
+
|
510
|
+
|
511
|
+
<code class="ruby"> end</code>
|
512
|
+
</li>
|
513
|
+
|
514
|
+
<li class="never" data-hits="" data-linenumber="32">
|
515
|
+
|
516
|
+
|
517
|
+
<code class="ruby"></code>
|
518
|
+
</li>
|
519
|
+
|
520
|
+
<li class="never" data-hits="" data-linenumber="33">
|
521
|
+
|
522
|
+
|
523
|
+
<code class="ruby"> # loops through all the redirect entries from the given model</code>
|
524
|
+
</li>
|
525
|
+
|
526
|
+
<li class="never" data-hits="" data-linenumber="34">
|
527
|
+
|
528
|
+
|
529
|
+
<code class="ruby"> # and checks if the fullpath match the regex given and will</code>
|
530
|
+
</li>
|
531
|
+
|
532
|
+
<li class="never" data-hits="" data-linenumber="35">
|
533
|
+
|
534
|
+
|
535
|
+
<code class="ruby"> # redirect to the given url.</code>
|
536
|
+
</li>
|
537
|
+
|
538
|
+
<li class="covered" data-hits="1" data-linenumber="36">
|
539
|
+
<span class="hits">1</span>
|
540
|
+
|
541
|
+
<code class="ruby"> def redirect</code>
|
542
|
+
</li>
|
543
|
+
|
544
|
+
<li class="covered" data-hits="2" data-linenumber="37">
|
545
|
+
<span class="hits">2</span>
|
546
|
+
|
547
|
+
<code class="ruby"> redirect_model = get_model(Config.hash[:redirect_model_slug])</code>
|
548
|
+
</li>
|
549
|
+
|
550
|
+
<li class="covered" data-hits="2" data-linenumber="38">
|
551
|
+
<span class="hits">2</span>
|
552
|
+
|
553
|
+
<code class="ruby"> if redirect_model</code>
|
554
|
+
</li>
|
555
|
+
|
556
|
+
<li class="covered" data-hits="2" data-linenumber="39">
|
557
|
+
<span class="hits">2</span>
|
558
|
+
|
559
|
+
<code class="ruby"> redirect_model.entries.each do |entry|</code>
|
560
|
+
</li>
|
561
|
+
|
562
|
+
<li class="covered" data-hits="2" data-linenumber="40">
|
563
|
+
<span class="hits">2</span>
|
564
|
+
|
565
|
+
<code class="ruby"> debugger</code>
|
566
|
+
</li>
|
567
|
+
|
568
|
+
<li class="covered" data-hits="2" data-linenumber="41">
|
569
|
+
<span class="hits">2</span>
|
570
|
+
|
571
|
+
<code class="ruby"> regexp = entry.send(Config.hash[:regexp_field_slug])</code>
|
572
|
+
</li>
|
573
|
+
|
574
|
+
<li class="covered" data-hits="2" data-linenumber="42">
|
575
|
+
<span class="hits">2</span>
|
576
|
+
|
577
|
+
<code class="ruby"> redirect_url = entry.send(Config.hash[:url_field_slug])</code>
|
578
|
+
</li>
|
579
|
+
|
580
|
+
<li class="covered" data-hits="2" data-linenumber="43">
|
581
|
+
<span class="hits">2</span>
|
582
|
+
|
583
|
+
<code class="ruby"> if controller.request.fullpath =~ /#{regexp}/</code>
|
584
|
+
</li>
|
585
|
+
|
586
|
+
<li class="covered" data-hits="1" data-linenumber="44">
|
587
|
+
<span class="hits">1</span>
|
588
|
+
|
589
|
+
<code class="ruby"> regexp_data = /#{regexp}/.match(controller.request.fullpath)</code>
|
590
|
+
</li>
|
591
|
+
|
592
|
+
<li class="covered" data-hits="1" data-linenumber="45">
|
593
|
+
<span class="hits">1</span>
|
594
|
+
|
595
|
+
<code class="ruby"> /#{regexp}/.named_captures.each do |key,value|</code>
|
596
|
+
</li>
|
597
|
+
|
598
|
+
<li class="missed" data-hits="0" data-linenumber="46">
|
599
|
+
|
600
|
+
|
601
|
+
<code class="ruby"> redirect_url.gsub!(/\$#{key}/, regexp_data[key])</code>
|
602
|
+
</li>
|
603
|
+
|
604
|
+
<li class="never" data-hits="" data-linenumber="47">
|
605
|
+
|
606
|
+
|
607
|
+
<code class="ruby"> end</code>
|
608
|
+
</li>
|
609
|
+
|
610
|
+
<li class="covered" data-hits="1" data-linenumber="48">
|
611
|
+
<span class="hits">1</span>
|
612
|
+
|
613
|
+
<code class="ruby"> controller.redirect_to redirect_url and return</code>
|
614
|
+
</li>
|
615
|
+
|
616
|
+
<li class="never" data-hits="" data-linenumber="49">
|
617
|
+
|
618
|
+
|
619
|
+
<code class="ruby"> end</code>
|
620
|
+
</li>
|
621
|
+
|
622
|
+
<li class="never" data-hits="" data-linenumber="50">
|
623
|
+
|
624
|
+
|
625
|
+
<code class="ruby"> end</code>
|
626
|
+
</li>
|
627
|
+
|
628
|
+
<li class="never" data-hits="" data-linenumber="51">
|
629
|
+
|
630
|
+
|
631
|
+
<code class="ruby"> end</code>
|
632
|
+
</li>
|
633
|
+
|
634
|
+
<li class="never" data-hits="" data-linenumber="52">
|
635
|
+
|
636
|
+
|
637
|
+
<code class="ruby"> end</code>
|
638
|
+
</li>
|
639
|
+
|
640
|
+
<li class="never" data-hits="" data-linenumber="53">
|
641
|
+
|
642
|
+
|
643
|
+
<code class="ruby"> end</code>
|
644
|
+
</li>
|
645
|
+
|
646
|
+
<li class="never" data-hits="" data-linenumber="54">
|
647
|
+
|
648
|
+
|
649
|
+
<code class="ruby"> end</code>
|
650
|
+
</li>
|
651
|
+
|
652
|
+
<li class="never" data-hits="" data-linenumber="55">
|
653
|
+
|
654
|
+
|
655
|
+
<code class="ruby">end</code>
|
656
|
+
</li>
|
657
|
+
|
658
|
+
</ol>
|
659
|
+
</pre>
|
660
|
+
</div>
|
661
|
+
|
662
|
+
<div class="source_table" id="d871315b75069881d3e12ac2b06111204e40c88c">
|
663
|
+
<div class="header">
|
664
|
+
<h3>lib/locomotive/page_redirect/plugin/config.rb</h3>
|
665
|
+
<h4><span class="green">100.0 %</span> covered</h4>
|
666
|
+
<div>
|
667
|
+
<b>13</b> relevant lines.
|
668
|
+
<span class="green"><b>13</b> lines covered</span> and
|
669
|
+
<span class="red"><b>0</b> lines missed.</span>
|
670
|
+
</div>
|
671
|
+
</div>
|
672
|
+
|
673
|
+
<pre>
|
674
|
+
<ol>
|
675
|
+
|
676
|
+
<li class="covered" data-hits="1" data-linenumber="1">
|
677
|
+
<span class="hits">1</span>
|
678
|
+
|
679
|
+
<code class="ruby">module Locomotive</code>
|
680
|
+
</li>
|
681
|
+
|
682
|
+
<li class="covered" data-hits="1" data-linenumber="2">
|
683
|
+
<span class="hits">1</span>
|
684
|
+
|
685
|
+
<code class="ruby"> module PageRedirect</code>
|
686
|
+
</li>
|
687
|
+
|
688
|
+
<li class="covered" data-hits="1" data-linenumber="3">
|
689
|
+
<span class="hits">1</span>
|
690
|
+
|
691
|
+
<code class="ruby"> class Config</code>
|
692
|
+
</li>
|
693
|
+
|
694
|
+
<li class="covered" data-hits="1" data-linenumber="4">
|
695
|
+
<span class="hits">1</span>
|
696
|
+
|
697
|
+
<code class="ruby"> def self.hash=(hash)</code>
|
698
|
+
</li>
|
699
|
+
|
700
|
+
<li class="covered" data-hits="2" data-linenumber="5">
|
701
|
+
<span class="hits">2</span>
|
702
|
+
|
703
|
+
<code class="ruby"> @@config_hash = ConfigObject.new(hash)</code>
|
704
|
+
</li>
|
705
|
+
|
706
|
+
<li class="never" data-hits="" data-linenumber="6">
|
707
|
+
|
708
|
+
|
709
|
+
<code class="ruby"> end</code>
|
710
|
+
</li>
|
711
|
+
|
712
|
+
<li class="covered" data-hits="1" data-linenumber="7">
|
713
|
+
<span class="hits">1</span>
|
714
|
+
|
715
|
+
<code class="ruby"> def self.hash</code>
|
716
|
+
</li>
|
717
|
+
|
718
|
+
<li class="covered" data-hits="6" data-linenumber="8">
|
719
|
+
<span class="hits">6</span>
|
720
|
+
|
721
|
+
<code class="ruby"> @@config_hash ||= ConfigObject.new</code>
|
722
|
+
</li>
|
723
|
+
|
724
|
+
<li class="never" data-hits="" data-linenumber="9">
|
725
|
+
|
726
|
+
|
727
|
+
<code class="ruby"> end</code>
|
728
|
+
</li>
|
729
|
+
|
730
|
+
<li class="never" data-hits="" data-linenumber="10">
|
731
|
+
|
732
|
+
|
733
|
+
<code class="ruby"> end</code>
|
734
|
+
</li>
|
735
|
+
|
736
|
+
<li class="covered" data-hits="1" data-linenumber="11">
|
737
|
+
<span class="hits">1</span>
|
738
|
+
|
739
|
+
<code class="ruby"> class ConfigObject < Hash</code>
|
740
|
+
</li>
|
741
|
+
|
742
|
+
<li class="covered" data-hits="1" data-linenumber="12">
|
743
|
+
<span class="hits">1</span>
|
744
|
+
|
745
|
+
<code class="ruby"> def initialize(hash = {})</code>
|
746
|
+
</li>
|
747
|
+
|
748
|
+
<li class="covered" data-hits="2" data-linenumber="13">
|
749
|
+
<span class="hits">2</span>
|
750
|
+
|
751
|
+
<code class="ruby"> defaults = {</code>
|
752
|
+
</li>
|
753
|
+
|
754
|
+
<li class="never" data-hits="" data-linenumber="14">
|
755
|
+
|
756
|
+
|
757
|
+
<code class="ruby"> redirect_model_slug: nil,</code>
|
758
|
+
</li>
|
759
|
+
|
760
|
+
<li class="never" data-hits="" data-linenumber="15">
|
761
|
+
|
762
|
+
|
763
|
+
<code class="ruby"> regexp_field_slug: 'regexp',</code>
|
764
|
+
</li>
|
765
|
+
|
766
|
+
<li class="never" data-hits="" data-linenumber="16">
|
767
|
+
|
768
|
+
|
769
|
+
<code class="ruby"> url_field_slug: 'url',</code>
|
770
|
+
</li>
|
771
|
+
|
772
|
+
<li class="never" data-hits="" data-linenumber="17">
|
773
|
+
|
774
|
+
|
775
|
+
<code class="ruby"> }</code>
|
776
|
+
</li>
|
777
|
+
|
778
|
+
<li class="covered" data-hits="2" data-linenumber="18">
|
779
|
+
<span class="hits">2</span>
|
780
|
+
|
781
|
+
<code class="ruby"> merge!(defaults)</code>
|
782
|
+
</li>
|
783
|
+
|
784
|
+
<li class="covered" data-hits="4" data-linenumber="19">
|
785
|
+
<span class="hits">4</span>
|
786
|
+
|
787
|
+
<code class="ruby"> hash.select! {|k,v| v && (v.class != String || !v.empty?)}</code>
|
788
|
+
</li>
|
789
|
+
|
790
|
+
<li class="covered" data-hits="4" data-linenumber="20">
|
791
|
+
<span class="hits">4</span>
|
792
|
+
|
793
|
+
<code class="ruby"> merge!(hash.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo})</code>
|
794
|
+
</li>
|
795
|
+
|
796
|
+
<li class="never" data-hits="" data-linenumber="21">
|
797
|
+
|
798
|
+
|
799
|
+
<code class="ruby"> end</code>
|
800
|
+
</li>
|
801
|
+
|
802
|
+
<li class="never" data-hits="" data-linenumber="22">
|
803
|
+
|
804
|
+
|
805
|
+
<code class="ruby"> end</code>
|
806
|
+
</li>
|
807
|
+
|
808
|
+
<li class="never" data-hits="" data-linenumber="23">
|
809
|
+
|
810
|
+
|
811
|
+
<code class="ruby"> end</code>
|
812
|
+
</li>
|
813
|
+
|
814
|
+
<li class="never" data-hits="" data-linenumber="24">
|
815
|
+
|
816
|
+
|
817
|
+
<code class="ruby">end</code>
|
818
|
+
</li>
|
819
|
+
|
820
|
+
</ol>
|
821
|
+
</pre>
|
822
|
+
</div>
|
823
|
+
|
824
|
+
<div class="source_table" id="46b2892a50ff007a0361506f765c400edb7f44ad">
|
825
|
+
<div class="header">
|
826
|
+
<h3>lib/locomotive_page_redirect_plugin.rb</h3>
|
827
|
+
<h4><span class="green">100.0 %</span> covered</h4>
|
828
|
+
<div>
|
829
|
+
<b>1</b> relevant lines.
|
830
|
+
<span class="green"><b>1</b> lines covered</span> and
|
831
|
+
<span class="red"><b>0</b> lines missed.</span>
|
832
|
+
</div>
|
833
|
+
</div>
|
834
|
+
|
835
|
+
<pre>
|
836
|
+
<ol>
|
837
|
+
|
838
|
+
<li class="covered" data-hits="1" data-linenumber="1">
|
839
|
+
<span class="hits">1</span>
|
840
|
+
|
841
|
+
<code class="ruby">require'locomotive/page_redirect/plugin'</code>
|
842
|
+
</li>
|
843
|
+
|
844
|
+
</ol>
|
845
|
+
</pre>
|
846
|
+
</div>
|
847
|
+
|
848
|
+
</div>
|
849
|
+
</div>
|
850
|
+
</body>
|
851
|
+
</html>
|