punky_brewster 1.3.0 → 1.3.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/punky_brewster/beer.rb +5 -0
- data/lib/punky_brewster/beer_list_response.rb +1 -6
- data/lib/punky_brewster/version.rb +1 -1
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6844c1b11fcbf2b357dcaa4d0642e9542d7d1911
|
4
|
+
data.tar.gz: aa60da5f829ee4e2ac68c82ad393a77920c155e0
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b5fa3e019bf34fb1c0cdaa1600c391c50d209b5aba74e25a402caa2b4baad08cd933fc6c6e30fe4120485ffb50940886be62bcd2b5d4620350f95321878c4bcd
|
7
|
+
data.tar.gz: cf120db09b90f5c51d0a1c7d7df524eb685722219c11bf79c22fea35d3edbb98e17443b5580021293be26c61ed684f107340ae6800d4388044e575aacf41c664
|
data/lib/punky_brewster/beer.rb
CHANGED
@@ -11,14 +11,9 @@ module PunkyBrewster
|
|
11
11
|
def beers
|
12
12
|
@beers ||= begin
|
13
13
|
content = document.at_css('#content')
|
14
|
-
divide = content.at_css('.styled-hr')
|
15
|
-
past_divide = false
|
16
14
|
beer_list = []
|
17
15
|
|
18
16
|
content.traverse do |node|
|
19
|
-
past_divide = true if node == divide
|
20
|
-
next unless past_divide
|
21
|
-
|
22
17
|
if node.name == 'h2'
|
23
18
|
beer_list << Beer.new
|
24
19
|
# Includes non-breaking spaces
|
@@ -32,7 +27,7 @@ module PunkyBrewster
|
|
32
27
|
end
|
33
28
|
end
|
34
29
|
|
35
|
-
beer_list
|
30
|
+
beer_list.select(&:valid?)
|
36
31
|
end
|
37
32
|
end
|
38
33
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: punky_brewster
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.3.
|
4
|
+
version: 1.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Pete Nicholls
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-04-
|
11
|
+
date: 2015-04-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: nokogiri
|
@@ -187,4 +187,3 @@ signing_key:
|
|
187
187
|
specification_version: 4
|
188
188
|
summary: What's pouring at Punky Brewster?
|
189
189
|
test_files: []
|
190
|
-
has_rdoc:
|