reckless 0.2.0 → 0.2.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.travis.yml +5 -0
- data/README.md +3 -0
- data/lib/reckless/results_parser.rb +1 -1
- data/lib/reckless/search.rb +12 -1
- data/lib/reckless/version.rb +1 -1
- data/lib/reckless.rb +4 -0
- data/reckless.gemspec +2 -2
- data/spec/fixtures/no_pagination.html +465 -0
- data/spec/reckless/results_parser_spec.rb +1 -1
- data/spec/reckless/search_spec.rb +20 -0
- data/spec/reckless_spec.rb +7 -0
- metadata +7 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 661ca335245f42f5f8a13c8662db049aad3ce577
|
4
|
+
data.tar.gz: 7988fd5beb9b8e2b776018402958e24ceef49690
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: eae2de3293b8c343d3010e9a9190e327c65a1cb1ea1066fa94f5a6d173e5783bff5dbdf5c0e8f48fc5afc16e1066ff9b2826d861dfdd862f424c8f02785afdd6
|
7
|
+
data.tar.gz: a2bcc3e73778cff329e02e8e217abf398eafdaf99a2566bab6612ede1e043943f3001c9f471da42c760d7ef564ae4d4cc9a9036ae73cba747d39733015c81694
|
data/.gitignore
CHANGED
data/README.md
CHANGED
@@ -2,6 +2,9 @@
|
|
2
2
|
|
3
3
|
Ruby client to Chicago's records store Reckless.com
|
4
4
|
|
5
|
+
[![Build Status](https://travis-ci.org/sosedoff/reckless.png?branch=master)](https://travis-ci.org/sosedoff/reckless)
|
6
|
+
[![Code Climate](https://codeclimate.com/github/sosedoff/reckless.png)](https://codeclimate.com/github/sosedoff/reckless)
|
7
|
+
|
5
8
|
## Installation
|
6
9
|
|
7
10
|
Add it to your Gemfile:
|
@@ -56,7 +56,7 @@ module Reckless
|
|
56
56
|
end
|
57
57
|
|
58
58
|
def fetch_location_name(node)
|
59
|
-
match = node.to_s.scan(/<span style="color:#a33; font-weight: bold;">([\w\s]+)
|
59
|
+
match = node.to_s.scan(/<span style="color:#a33; font-weight: bold;">([\w\s\.]+)<\/span>/)
|
60
60
|
match.flatten.first
|
61
61
|
end
|
62
62
|
end
|
data/lib/reckless/search.rb
CHANGED
@@ -27,11 +27,22 @@ module Reckless
|
|
27
27
|
def parse_results_count
|
28
28
|
matches = @body.scan(/<b>([\d]+) found.<\/b>/).flatten
|
29
29
|
|
30
|
-
|
30
|
+
if matches.empty?
|
31
|
+
parse_results_without_pagination
|
32
|
+
else
|
31
33
|
@total_results = matches.first.to_i
|
32
34
|
end
|
33
35
|
end
|
34
36
|
|
37
|
+
def parse_results_without_pagination
|
38
|
+
matches = @body.scan("<table class=\"item\">").flatten
|
39
|
+
|
40
|
+
if matches.any?
|
41
|
+
@total_results = matches.size
|
42
|
+
@total_pages = 1
|
43
|
+
end
|
44
|
+
end
|
45
|
+
|
35
46
|
def parse_pagination
|
36
47
|
matches = @body.scan(/This is page ([\d]+) of ([\d]+)/).flatten
|
37
48
|
|
data/lib/reckless/version.rb
CHANGED
data/lib/reckless.rb
CHANGED
data/reckless.gemspec
CHANGED
@@ -3,8 +3,8 @@ require File.expand_path("../lib/reckless/version", __FILE__)
|
|
3
3
|
Gem::Specification.new do |spec|
|
4
4
|
spec.name = "reckless"
|
5
5
|
spec.version = Reckless::VERSION
|
6
|
-
spec.summary = "
|
7
|
-
spec.description = "
|
6
|
+
spec.summary = "Ruby client to Chicago's records store Reckless.com http://reckless.com"
|
7
|
+
spec.description = "Ruby client to Chicago's records store Reckless.com http://reckless.com"
|
8
8
|
spec.homepage = "http://github.com/sosedoff/reckless"
|
9
9
|
spec.authors = ["Dan Sosedoff"]
|
10
10
|
spec.email = ["dan.sosedoff@gmail.com"]
|
@@ -0,0 +1,465 @@
|
|
1
|
+
|
2
|
+
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
|
3
|
+
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
4
|
+
<html xmlns="http://www.w3.org/1999/xhtml">
|
5
|
+
<head>
|
6
|
+
<title>
|
7
|
+
Reckless Records Chicago: New & Used LPs, CDs, DVDs, games & more - index.php
|
8
|
+
</title>
|
9
|
+
|
10
|
+
<meta name="wot-verification" content="bccedcbd7ff0e60e7485"/>
|
11
|
+
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1" />
|
12
|
+
<meta name="description" content="Reckless Records in Chicago sells new and used vinyl, CDs, DVDs and more. "/>
|
13
|
+
|
14
|
+
<script type="text/javascript">
|
15
|
+
<!--
|
16
|
+
function popUp(image) {
|
17
|
+
thisURL = '/cover.php?cvr='+image;
|
18
|
+
window.open(thisURL,'_reck','toolbar=0,scrollbars=1,location=0,statusbar=0,menubar=0,resizable=1,width=350,height=350');
|
19
|
+
}
|
20
|
+
-->
|
21
|
+
</script>
|
22
|
+
|
23
|
+
<link href="/style/reck_style.2014.css" rel="stylesheet" type="text/css" />
|
24
|
+
|
25
|
+
<meta property="og:title" content="Reckless Records Chicago: New & Used Records, CDs, DVDs, games & more - index.php
|
26
|
+
" />
|
27
|
+
<meta property="og:type" content="website" />
|
28
|
+
<meta property="og:description" content="Reckless Records in Chicago sells new and used vinyl LPs, CDs, DVDs and more." />
|
29
|
+
<meta property="og:url" content="http://www.reckless.com" />
|
30
|
+
<meta property="og:image" content="http://www.reckless.com/img/new_logo_250.jpg" />
|
31
|
+
<meta property="og:site_name" content="Reckless Records Chicago" />
|
32
|
+
|
33
|
+
<meta property="fb:admins" content="1606458654" />
|
34
|
+
|
35
|
+
</head>
|
36
|
+
<body>
|
37
|
+
<table class="bhead">
|
38
|
+
<!-- HEADER -->
|
39
|
+
<tr>
|
40
|
+
<td class="banner">
|
41
|
+
<a href="index.php">
|
42
|
+
<img src="/img/recklessweb_banner654x136.gif" height="136" width="654" alt="Reckless Records Chicago" />
|
43
|
+
</a>
|
44
|
+
</td>
|
45
|
+
<td valign="top" style="vertical-align: top;">
|
46
|
+
<div class="cartcount">
|
47
|
+
<div class="cartcount_h">
|
48
|
+
Cart:
|
49
|
+
</div>
|
50
|
+
<div class="cartcount_b">
|
51
|
+
Your cart is currently empty
|
52
|
+
|
53
|
+
</div>
|
54
|
+
</div>
|
55
|
+
</td>
|
56
|
+
</tr>
|
57
|
+
<!-- END HEADER -->
|
58
|
+
<tr>
|
59
|
+
<td colspan="2" class="blackbar">
|
60
|
+
We buy & sell CDs, Records, DVDs, Video Games, and more! Serving Chicago since 1989!
|
61
|
+
</td>
|
62
|
+
</tr>
|
63
|
+
<tr>
|
64
|
+
<td colspan="2" class="menu" >
|
65
|
+
<a href="/index.php">Home</a> ::
|
66
|
+
<a href="/news.php">News</a> ::
|
67
|
+
<a href="/contact_us.php">Contact</a> ::
|
68
|
+
<a href="/selltous.php">Sell To Us</a> ::
|
69
|
+
<a href="/visit.php">Locations</a> ::
|
70
|
+
<a href="/mailing_list.php">Mailing List</a> ::
|
71
|
+
<a href="/special_orders.php">Special Orders</a> ::
|
72
|
+
<a href="/faq.php">FAQs</a> ::
|
73
|
+
<a href="http://www.reckless.com/wordpress/">Blog</a> ::
|
74
|
+
<a href="http://www.facebook.com/RecklessRecords" ><img alt="facebook" src="/img/fb.png" /></a> ::
|
75
|
+
<a href="http://twitter.com/RecklessRecords"><img alt="twitter" src="/img/tw.png" /></a>
|
76
|
+
</td>
|
77
|
+
</tr>
|
78
|
+
</table>
|
79
|
+
<!-- START BODY -->
|
80
|
+
<table class="bmain" cellpadding="2" cellspacing="0">
|
81
|
+
<tr>
|
82
|
+
<!-- START SIDEBAR -->
|
83
|
+
<td class="sidebar">
|
84
|
+
<!-- SEARCH FORM -->
|
85
|
+
|
86
|
+
<div class="side_t">
|
87
|
+
<div class="heading">
|
88
|
+
Search:
|
89
|
+
</div>
|
90
|
+
<form action="index.php" method="get">
|
91
|
+
<div class="side_t_body">
|
92
|
+
|
93
|
+
|
94
|
+
Keywords:<input type="text" name="keywords" value="Led Zeppelin" />
|
95
|
+
<br />
|
96
|
+
Format:
|
97
|
+
<select name="format">
|
98
|
+
<option value="">all</option>
|
99
|
+
<option value="AM">all music formats</option>
|
100
|
+
<option value="CD">-CD</option>
|
101
|
+
<option SELECTED value="LP">-LP</option>
|
102
|
+
<option value="45">-45</option>
|
103
|
+
<option value="CS">-Cassette</option>
|
104
|
+
<option value="AV">all video formats</option>
|
105
|
+
<option value="DV">-DVD</option>
|
106
|
+
<option value="VC">-VHS</option>
|
107
|
+
<option value="LD">-Laserdisc</option>
|
108
|
+
<option value="VG">-Games</option>
|
109
|
+
<option value="TS">-T-Shirts</option>
|
110
|
+
</select>
|
111
|
+
<br />
|
112
|
+
Condition:
|
113
|
+
<select name="cond">
|
114
|
+
<option value="">all</option>
|
115
|
+
<option value="N">New</option>
|
116
|
+
<option value="U">Used</option>
|
117
|
+
</select>
|
118
|
+
<!-- -->
|
119
|
+
<br />
|
120
|
+
Restrict to store:
|
121
|
+
<select name="store">
|
122
|
+
<option value="">all stores</option>
|
123
|
+
<option value="bw">Broadway</option>
|
124
|
+
<option value="lp">Loop</option>
|
125
|
+
<option value="wp">Milwaukee Ave.</option>
|
126
|
+
</select>
|
127
|
+
|
128
|
+
<input type="hidden" name="is_search" value="true" />
|
129
|
+
<input type="submit" name="srch" value="Search"/>
|
130
|
+
|
131
|
+
or try <a href="/browse.php">browsing</a> our music sections...
|
132
|
+
|
133
|
+
</div>
|
134
|
+
</form>
|
135
|
+
</div>
|
136
|
+
<!-- END SEARCH -->
|
137
|
+
<!-- NEWS -->
|
138
|
+
|
139
|
+
<p class="sidelinks">
|
140
|
+
<a href="/index.php">Home / Featured Titles</a>
|
141
|
+
</p>
|
142
|
+
<p class="sidelinks">
|
143
|
+
<a href="/new_arrivals.php">Recent Arrivals</a>
|
144
|
+
</p>
|
145
|
+
|
146
|
+
<p class="sidelinks">
|
147
|
+
<a href="/news.php?newsid=186">Gift Certificates</a>
|
148
|
+
</p>
|
149
|
+
|
150
|
+
<p class="sidelinks">
|
151
|
+
<a href="/tshirts.php">Reckless T-Shirts</a>
|
152
|
+
</p>
|
153
|
+
|
154
|
+
<!-- NEWS -->
|
155
|
+
<div class="side_t">
|
156
|
+
<div class="heading">
|
157
|
+
News...
|
158
|
+
</div>
|
159
|
+
<div class="side_t_body">
|
160
|
+
<ul><li><b><a href="news.php?newsid=452">Brendan Kelly (LAWRENCE ARMS) acoustic in-store</a></b></li><li><b><a href="news.php?newsid=451">Reckless Records 2013 Employee Best of Lists</a></b></li><li><b><a href="news.php?newsid=186">Gift Certificates</a></b></li><li><b><a href="news.php?newsid=367">Every day is Kranky day at Reckless...</a></b></li></ul> [<a href="news.php">...All Recent News...</a>]
|
161
|
+
</div>
|
162
|
+
</div>
|
163
|
+
|
164
|
+
|
165
|
+
<!-- CURRENT INSTORES
|
166
|
+
<div class="side_t">
|
167
|
+
<div class="heading">
|
168
|
+
In-store Performances
|
169
|
+
</div>
|
170
|
+
<div class="side_t_body">
|
171
|
+
<p>
|
172
|
+
<span style="font-weight: bold; text-decoration: underline;">3126 N. Broadway</span><br />No in-store performances scheduled right now<br /> </p>
|
173
|
+
<p>
|
174
|
+
<span style="font-weight: bold; text-decoration: underline;">1532 N Milwaukee</span><br /><a href="news.php?newsid=452">Brendan Kelly (LAWRENCE ARMS) acoustic in-store</a> :: 01/28<br /> </p>
|
175
|
+
<p>
|
176
|
+
<span style="font-weight: bold; text-decoration: underline;">26 E. Madison</span><br />No in-store performances scheduled right now<br /> </p>
|
177
|
+
</div>
|
178
|
+
</div>
|
179
|
+
-->
|
180
|
+
<!-- hours of operation... -->
|
181
|
+
<div class="side_t">
|
182
|
+
<div class="heading">
|
183
|
+
Locations & Hours
|
184
|
+
</div>
|
185
|
+
<div class="side_t_body">
|
186
|
+
|
187
|
+
|
188
|
+
<p> <b>Lakeview:</b><br />
|
189
|
+
3126 N. Broadway<br />
|
190
|
+
phone: 773-404-5080 <br />
|
191
|
+
<b> Monday - Saturday: 10am - 10pm<br />
|
192
|
+
Sunday: 10am - 8pm<br /></b>
|
193
|
+
</p>
|
194
|
+
|
195
|
+
<p><b>Wicker Park:</b><br />
|
196
|
+
1532 N. Milwaukee Ave.<br />
|
197
|
+
phone: 773-235-3727<br />
|
198
|
+
<b>
|
199
|
+
Monday - Saturday: 10am - 10pm<br />
|
200
|
+
Sunday: 10am - 8pm<br /></b>
|
201
|
+
</p>
|
202
|
+
|
203
|
+
<p><b>Loop:</b><br />
|
204
|
+
26 E. Madison<br />
|
205
|
+
phone: 312-795-0878<br />
|
206
|
+
<b> Monday - Saturday: 10am - 8pm<br />
|
207
|
+
Sunday: 10am - 7pm<br /></b>
|
208
|
+
</p>
|
209
|
+
|
210
|
+
</div>
|
211
|
+
</div>
|
212
|
+
|
213
|
+
|
214
|
+
<div class="side_t" >
|
215
|
+
<div class="heading">
|
216
|
+
About Us:
|
217
|
+
</div>
|
218
|
+
<div class="side_t_body">
|
219
|
+
<p>
|
220
|
+
<b>Reckless Records</b> is a group of three record stores in Chicago IL. We carry new & used CDs, DVDs games and loads of Vinyl. Originally started in London, our first Chicago location opened in 1988.
|
221
|
+
(LPs & 7"s). We would love to have you <b><a href="http://www.reckless.com/visit.php">visit us</a></b> in person.
|
222
|
+
</p>
|
223
|
+
|
224
|
+
<p>
|
225
|
+
We are always looking to buy your unwanted CDs, DVDs, and vinyl. Please <a href="/contact_us.sell.php">get in touch if you are interested in selling your collections</a>.
|
226
|
+
We buy at all locations every day up to an hour before closing time.
|
227
|
+
</p>
|
228
|
+
|
229
|
+
<p><b>
|
230
|
+
You can also visit:<br />
|
231
|
+
<a href="http://www.facebook.com/RecklessRecords" ><img src="/img/fb.png" /></a>
|
232
|
+
<a href="http://twitter.com/RecklessRecords"><img src="/img/tw.png" /></a>
|
233
|
+
<a href="http://www.reckless.com/wordpress/">The Reckless Blog</a>
|
234
|
+
</b>
|
235
|
+
</p>
|
236
|
+
<p>
|
237
|
+
<b>We still have a shop in London too</b>! They are located in Soho at:<br>
|
238
|
+
30 Berwick Street<br>
|
239
|
+
London W1F 8RH<br>
|
240
|
+
<b><a href="http://reckless.co.uk/index.html">Reckless Records London</a></b>
|
241
|
+
|
242
|
+
</div>
|
243
|
+
</div>
|
244
|
+
|
245
|
+
<div class="side_t">
|
246
|
+
<div class="heading">
|
247
|
+
Information
|
248
|
+
</div>
|
249
|
+
<div class="side_t_body">
|
250
|
+
<ul>
|
251
|
+
|
252
|
+
<li><a href="contact_us.php">Contact us</a></li>
|
253
|
+
|
254
|
+
<li><a href="visit.php">Our shop locations</a></li>
|
255
|
+
|
256
|
+
<li><a href="faq.php">FAQs</a></li>
|
257
|
+
|
258
|
+
<li><a href="mailing_list.php">Mailing List</a></li>
|
259
|
+
|
260
|
+
<li><a href="http://www.reckless.com/index.php?keywords=Reckless+Records+Gift+Certificate&format=GC&is_search=true">Gift Certificates</a></li>
|
261
|
+
|
262
|
+
<li><a href="http://www.reckless.com/index.php?keywords=reckless&format=TS&is_search=true&srch=Search">Reckless T-Shirts!</a></li>
|
263
|
+
</ul>
|
264
|
+
|
265
|
+
</div>
|
266
|
+
</div>
|
267
|
+
|
268
|
+
<div class="side_t">
|
269
|
+
<a class="twitter-timeline" href="https://twitter.com/RecklessRecords" data-widget-id="410093207532228608">Tweets by @RecklessRecords</a>
|
270
|
+
<script>!function(d,s,id){var js,fjs=d.getElementsByTagName(s)[0],p=/^http:/.test(d.location)?'http':'https';if(!d.getElementById(id)){js=d.createElement(s);js.id=id;js.src=p+"://platform.twitter.com/widgets.js";fjs.parentNode.insertBefore(js,fjs);}}(document,"script","twitter-wjs");</script>
|
271
|
+
</div>
|
272
|
+
|
273
|
+
|
274
|
+
<!-- promo banner
|
275
|
+
<div class="side_t">
|
276
|
+
<a href="http://www.reckless.com/goa.php" >
|
277
|
+
<img src="http://www.reckless.com/grimeys160x600.jpg" border="0">
|
278
|
+
</a>
|
279
|
+
</div>
|
280
|
+
-->
|
281
|
+
|
282
|
+
</td>
|
283
|
+
<!-- END SIDEBAR -->
|
284
|
+
|
285
|
+
<td class="main">
|
286
|
+
<div style="text-align: center; background-color: #ccc; border: 1px solid #999; font-size: .8em;">
|
287
|
+
<form action="/index.php" method="GET">
|
288
|
+
Restrict to store:
|
289
|
+
<input type="hidden" name="keywords" value="Led Zeppelin">
|
290
|
+
<select name="store">
|
291
|
+
<option value="">any store</option>
|
292
|
+
<option value="bw">Broadway</option>
|
293
|
+
<option value="lp">Madison</option>
|
294
|
+
<option value="wp">Milwaukee</option>
|
295
|
+
</select>
|
296
|
+
format:
|
297
|
+
<select name="format">
|
298
|
+
<option value=""> -any-</option>
|
299
|
+
<option value="CD">CDs</option>
|
300
|
+
<option value="LP" selected="selected">LPs</option>
|
301
|
+
<option value="45">45s</option>
|
302
|
+
<option value="DV">DVDs</option>
|
303
|
+
<option value="VG">Games</option>
|
304
|
+
</select>
|
305
|
+
and condition:
|
306
|
+
<select name="cond">
|
307
|
+
<option value="">New & Used</option>
|
308
|
+
<option value="N">New Only</option>
|
309
|
+
<option value="U">Used Only</option>
|
310
|
+
</select>
|
311
|
+
|
312
|
+
<!--
|
313
|
+
in
|
314
|
+
<select name="style" >
|
315
|
+
|
316
|
+
<option value="0" selected="selected">any section</option>
|
317
|
+
<option value="ROCK">Rock/Pop</option>
|
318
|
+
<option value="METAL">Metal</option>
|
319
|
+
<option value="GARAGE">Garage/Surf/Rockabilly</option>
|
320
|
+
<option value="PUNK">Punk/EMO/Hardcore</option>
|
321
|
+
<option value="SKA">Ska</option>
|
322
|
+
<option value="GOTHIC">Gothic</option>
|
323
|
+
<option value="PSYCH">Kraut/Prog/Psychedelic</option>
|
324
|
+
<option value="EXPERI">Experimental/Noise</option>
|
325
|
+
<option value="AMBIEN">Ambient</option>
|
326
|
+
<option value="TRIPHO">Trip Hop</option>
|
327
|
+
<option value="RAP">Rap</option>
|
328
|
+
<option value="DANCE">Dance</option>
|
329
|
+
<option value="REGGAE">Reggae</option>
|
330
|
+
<option value="SOUL">Soul</option>
|
331
|
+
<option value="BLUES">Blues</option>
|
332
|
+
<option value="GOSPEL">Gospel</option>
|
333
|
+
<option value="JAZZ">Jazz</option>
|
334
|
+
<option value="FREEJ">Free Jazz</option>
|
335
|
+
<option value="JAZZVO">Jazz Vocal</option>
|
336
|
+
<option value="EASY">Easy Listening/Lounge</option>
|
337
|
+
<option value="FOLK">Folk</option>
|
338
|
+
<option value="NEWAGE">New Age</option>
|
339
|
+
<option value="C&W">Country/Bluegrass</option>
|
340
|
+
<option value="STRK">Soundtrack/Musicals</option>
|
341
|
+
<option value="WORLD">Misc. World</option>
|
342
|
+
<option value="LATIN">Latin</option>
|
343
|
+
<option value="AFRICA">African</option>
|
344
|
+
<option value="COM">Children's/Comedy</option>
|
345
|
+
<option value="SPOKEN">Spoken Word</option>
|
346
|
+
|
347
|
+
</select>
|
348
|
+
-->
|
349
|
+
<input type="hidden" name="pg" value="search">
|
350
|
+
<input type="hidden" name="is_search" value="true">
|
351
|
+
<input type="submit" name="srch" value="Search">
|
352
|
+
</form>
|
353
|
+
</div>
|
354
|
+
<table class="item">
|
355
|
+
<tr><td><span class="artist">LED ZEPPELIN</span><br /><span class="title">LED ZEPPELIN (1841 BW) << FAIR >> << FAIR COND >></span></td>
|
356
|
+
</tr>
|
357
|
+
<tr><td><span class="label">ATLANTIC </span></td></tr>
|
358
|
+
<tr><td> <<< FAIR CONDITION >>> </td></tr><tr><td>Available at: <span style="color:#a33; font-weight: bold;">Milwaukee Ave.</span></td></tr><tr><td ><b>Used LP( Good Condition ) </b> $4.99 <form method="get" action="/index.php">
|
359
|
+
|
360
|
+
<input type="hidden" name="qry_str" value="page=1&keywords=Led+Zeppelin&format=LP&cond=&store=&is_search=true&srch=Search" />
|
361
|
+
<input type="hidden" name="qty" value="1" />
|
362
|
+
<input type="hidden" name="item2add" value="6108045426D" />
|
363
|
+
<input type="submit" name="action" value="buy" />
|
364
|
+
<!--
|
365
|
+
or <a href="/index.php?item2add=6108045426D&action=buy">Add to cart?</a>
|
366
|
+
-->
|
367
|
+
</form>
|
368
|
+
</td>
|
369
|
+
</tr>
|
370
|
+
</table>
|
371
|
+
|
372
|
+
<hr class="lil" />
|
373
|
+
<table class="item">
|
374
|
+
<tr><td><span class="artist">LED ZEPPELIN</span><br /><span class="title">LED ZEPPELIN IV (75 ROCKEFELLER, 19129) </span></td>
|
375
|
+
</tr>
|
376
|
+
<tr><td><span class="label">ATLANTIC </span></td></tr>
|
377
|
+
<tr><td> the best part about owning this album on vinyl, is that you can play it BACKWARDS to hear all the Satanic messages during 'Stairway to Heaven'. right after the line, "there's still time to change the road you're on" - stop. play it backwards. Then enjoy the Satanic message. rumor has it that there are many more elsewhere on the record -- like a grocery list somewhere on side 2 (no really!) vinyl rules! don't blame Ozzy or Judas Priest. and don't leave a suicide note for your parents blaming Jimmy Page either! Otto from the Simpsons said it best as he was drowning in the Springfield river, "Zeppelin rules!!" </td></tr><tr><td>Available at: <span style="color:#a33; font-weight: bold;">Broadway</span></td></tr><tr><td ><b>Used LP( Very Good Condition ) </b> $14.99 <form method="get" action="/index.php">
|
378
|
+
|
379
|
+
<input type="hidden" name="qry_str" value="page=1&keywords=Led+Zeppelin&format=LP&cond=&store=&is_search=true&srch=Search" />
|
380
|
+
<input type="hidden" name="qty" value="1" />
|
381
|
+
<input type="hidden" name="item2add" value="6102525655C" />
|
382
|
+
<input type="submit" name="action" value="buy" />
|
383
|
+
<!--
|
384
|
+
or <a href="/index.php?item2add=6102525655C&action=buy">Add to cart?</a>
|
385
|
+
-->
|
386
|
+
</form>
|
387
|
+
</td>
|
388
|
+
</tr>
|
389
|
+
</table>
|
390
|
+
|
391
|
+
<hr class="lil" />
|
392
|
+
<table class="item">
|
393
|
+
<tr><td><span class="artist">LED ZEPPELIN</span><br /><span class="title">LED ZEPPELIN IV (ROCKEFELLER PRESSING) :(2ND PRESS 7208)</span></td>
|
394
|
+
</tr>
|
395
|
+
<tr><td><span class="label">ATLANTIC </span></td></tr>
|
396
|
+
<tr><td>Available at: <span style="color:#a33; font-weight: bold;">Milwaukee Ave.</span></td></tr><tr><td ><b>Used LP( Very Good Condition ) </b> $14.99 <form method="get" action="/index.php">
|
397
|
+
|
398
|
+
<input type="hidden" name="qry_str" value="page=1&keywords=Led+Zeppelin&format=LP&cond=&store=&is_search=true&srch=Search" />
|
399
|
+
<input type="hidden" name="qty" value="1" />
|
400
|
+
<input type="hidden" name="item2add" value="6107128441C" />
|
401
|
+
<input type="submit" name="action" value="buy" />
|
402
|
+
<!--
|
403
|
+
or <a href="/index.php?item2add=6107128441C&action=buy">Add to cart?</a>
|
404
|
+
-->
|
405
|
+
</form>
|
406
|
+
</td>
|
407
|
+
</tr>
|
408
|
+
</table>
|
409
|
+
|
410
|
+
<hr class="lil" />
|
411
|
+
<table class="item">
|
412
|
+
<tr><td><span class="artist">LED ZEPPELIN</span><br /><span class="title">PRESENCE (ORIG, NO INNER SLEEVE) </span></td>
|
413
|
+
</tr>
|
414
|
+
<tr><td><span class="label">SWANSONG </span></td></tr>
|
415
|
+
<tr><td> You owe it to yourself to purchase this based purely on ACHILLES LAST STAND at a very loud volume on your stereo. A very overlooked Zeppelin GEM. </td></tr><tr><td>Available at: <span style="color:#a33; font-weight: bold;">Milwaukee Ave.</span></td></tr><tr><td ><b>Used LP( Good Condition ) </b> $4.99 <form method="get" action="/index.php">
|
416
|
+
|
417
|
+
<input type="hidden" name="qry_str" value="page=1&keywords=Led+Zeppelin&format=LP&cond=&store=&is_search=true&srch=Search" />
|
418
|
+
<input type="hidden" name="qty" value="1" />
|
419
|
+
<input type="hidden" name="item2add" value="6108590580D" />
|
420
|
+
<input type="submit" name="action" value="buy" />
|
421
|
+
<!--
|
422
|
+
or <a href="/index.php?item2add=6108590580D&action=buy">Add to cart?</a>
|
423
|
+
-->
|
424
|
+
</form>
|
425
|
+
</td>
|
426
|
+
</tr>
|
427
|
+
</table>
|
428
|
+
|
429
|
+
<hr class="lil" /> </td>
|
430
|
+
</tr>
|
431
|
+
<!-- FOOTER -->
|
432
|
+
<tr>
|
433
|
+
<td colspan="2" class="footer">
|
434
|
+
<!-- promo banner
|
435
|
+
<a href="http://www.reckless.com/goa.php" >
|
436
|
+
<img src="http://www.reckless.com/grimeys728x90.jpg" border="0">
|
437
|
+
</a>
|
438
|
+
-->
|
439
|
+
<br />
|
440
|
+
<b>
|
441
|
+
Reckless Records in Chicago:<br />
|
442
|
+
3126 N. Broadway, Chicago IL 60657 :: phone: 773-404-5080<br />
|
443
|
+
1532 N Milwaukee Ave, Chicago IL 60622 :: phone: 773-235-3727<br />
|
444
|
+
26 E. Madison, Chicago IL 60602 :: phone: 312-795-0878<br />
|
445
|
+
</b>
|
446
|
+
|
447
|
+
</td>
|
448
|
+
</tr>
|
449
|
+
<tr>
|
450
|
+
<td colspan="2" class="footer">
|
451
|
+
© 2011 Reckless Records of London, Inc.
|
452
|
+
</td>
|
453
|
+
</tr>
|
454
|
+
</table>
|
455
|
+
<script type="text/javascript">
|
456
|
+
var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
|
457
|
+
document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
|
458
|
+
</script>
|
459
|
+
<script type="text/javascript">
|
460
|
+
try {
|
461
|
+
var pageTracker = _gat._getTracker("UA-12803074-1");
|
462
|
+
pageTracker._trackPageview();
|
463
|
+
} catch(err) {}</script>
|
464
|
+
</body>
|
465
|
+
</html>
|
@@ -78,4 +78,24 @@ describe Reckless::Search do
|
|
78
78
|
expect(search.results).to eq []
|
79
79
|
end
|
80
80
|
end
|
81
|
+
|
82
|
+
describe "for page without pagination" do
|
83
|
+
let(:page) { fixture("no_pagination.html") }
|
84
|
+
|
85
|
+
before do
|
86
|
+
Faraday.stub_chain(:get, :body) { page }
|
87
|
+
end
|
88
|
+
|
89
|
+
it "assigs total results count" do
|
90
|
+
expect(search.total_results).to eq 4
|
91
|
+
end
|
92
|
+
|
93
|
+
it "assigns total pages count" do
|
94
|
+
expect(search.total_pages).to eq 1
|
95
|
+
end
|
96
|
+
|
97
|
+
it "assings results" do
|
98
|
+
expect(search.results.size).to eq 4
|
99
|
+
end
|
100
|
+
end
|
81
101
|
end
|
data/spec/reckless_spec.rb
CHANGED
@@ -3,6 +3,7 @@ require "spec_helper"
|
|
3
3
|
describe Reckless do
|
4
4
|
it { should respond_to :search }
|
5
5
|
it { should respond_to :recent_arrivals }
|
6
|
+
it { should respond_to :new_arrivals }
|
6
7
|
|
7
8
|
before do
|
8
9
|
Faraday.stub_chain(:get, :body) { "" }
|
@@ -19,4 +20,10 @@ describe Reckless do
|
|
19
20
|
expect(described_class.recent_arrivals).to be_a Reckless::Search
|
20
21
|
end
|
21
22
|
end
|
23
|
+
|
24
|
+
describe ".new_arrivals" do
|
25
|
+
it "returns a search result" do
|
26
|
+
expect(described_class.new_arrivals).to be_a Reckless::Search
|
27
|
+
end
|
28
|
+
end
|
22
29
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: reckless
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dan Sosedoff
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-01
|
11
|
+
date: 2014-02-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: json
|
@@ -108,7 +108,7 @@ dependencies:
|
|
108
108
|
- - ~>
|
109
109
|
- !ruby/object:Gem::Version
|
110
110
|
version: '0.7'
|
111
|
-
description:
|
111
|
+
description: Ruby client to Chicago's records store Reckless.com http://reckless.com
|
112
112
|
email:
|
113
113
|
- dan.sosedoff@gmail.com
|
114
114
|
executables: []
|
@@ -117,6 +117,7 @@ extra_rdoc_files: []
|
|
117
117
|
files:
|
118
118
|
- .gitignore
|
119
119
|
- .rspec
|
120
|
+
- .travis.yml
|
120
121
|
- Gemfile
|
121
122
|
- LICENSE
|
122
123
|
- README.md
|
@@ -128,6 +129,7 @@ files:
|
|
128
129
|
- lib/reckless/search.rb
|
129
130
|
- lib/reckless/version.rb
|
130
131
|
- reckless.gemspec
|
132
|
+
- spec/fixtures/no_pagination.html
|
131
133
|
- spec/fixtures/no_results.html
|
132
134
|
- spec/fixtures/page_with_results.html
|
133
135
|
- spec/fixtures/pagination.html
|
@@ -161,8 +163,9 @@ rubyforge_project:
|
|
161
163
|
rubygems_version: 2.1.11
|
162
164
|
signing_key:
|
163
165
|
specification_version: 4
|
164
|
-
summary:
|
166
|
+
summary: Ruby client to Chicago's records store Reckless.com http://reckless.com
|
165
167
|
test_files:
|
168
|
+
- spec/fixtures/no_pagination.html
|
166
169
|
- spec/fixtures/no_results.html
|
167
170
|
- spec/fixtures/page_with_results.html
|
168
171
|
- spec/fixtures/pagination.html
|