lita-onewheel-beer-properpint 0.0.0 → 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cabd12239f44072d864e29e2b767d81d55892eb89f73cc894349e16fe97cad92
|
4
|
+
data.tar.gz: f8ea8607f78accdce02eaf2eb08dfe57955a33e9d4f9d37adcd41815780deca4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ffff9edc0aa4c0b38daf5d77d6010e1fa18cfabd6ed18e28c7e4542f0031c265514ee4591aff4f2445fde80fa6293a05e9954cde08126bf103f1e989ddd75543
|
7
|
+
data.tar.gz: e72b77657d7f497836d6f095dafeec0c66c64392469b01ff42eb57db171795043042ad3d7c131aba963c0705e94ccd90d96110a0295773bb0460bfe446d12637
|
@@ -83,24 +83,14 @@ module Lita
|
|
83
83
|
end
|
84
84
|
|
85
85
|
live_products.each_with_index do |beer, idx|
|
86
|
-
tap = idx
|
86
|
+
tap = idx + 1
|
87
87
|
tap_type = ''
|
88
|
-
|
89
|
-
beer_name = beer['name']
|
90
|
-
# beer_desc = get_beer_desc(beer_node)
|
91
|
-
# abv = get_abv(beer_desc)
|
88
|
+
beer_name = beer['name'].sub(/ 32oz Crowler/, '')
|
92
89
|
full_text_search = "#{tap} #{beer_name}"
|
93
|
-
|
94
|
-
#
|
90
|
+
|
95
91
|
gimme_what_you_got[tap] = {
|
96
92
|
type: tap_type,
|
97
|
-
# remaining: remaining,
|
98
|
-
# brewery: brewery.to_s,
|
99
93
|
name: beer_name.to_s,
|
100
|
-
# desc: beer_desc.to_s,
|
101
|
-
# abv: abv.to_f,
|
102
|
-
# prices: prices,
|
103
|
-
# price: prices[1][:cost],
|
104
94
|
search: full_text_search
|
105
95
|
}
|
106
96
|
end
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Gem::Specification.new do |spec|
|
2
2
|
spec.name = 'lita-onewheel-beer-properpint'
|
3
|
-
spec.version = '0.0.
|
3
|
+
spec.version = '0.0.1'
|
4
4
|
spec.authors = ['Andrew Kreps']
|
5
5
|
spec.email = ['andrew.kreps@gmail.com']
|
6
6
|
spec.description = %q{Lita interface to Bailey's Taproom listings.}
|
@@ -3,19 +3,6 @@ require 'spec_helper'
|
|
3
3
|
describe Lita::Handlers::OnewheelBeerProperPint, lita_handler: true do
|
4
4
|
it { is_expected.to route_command('proper') }
|
5
5
|
it { is_expected.to route_command('proper 4') }
|
6
|
-
it { is_expected.to route_command('proper nitro') }
|
7
|
-
it { is_expected.to route_command('proper CASK') }
|
8
|
-
it { is_expected.to route_command('proper <$4') }
|
9
|
-
it { is_expected.to route_command('proper < $4') }
|
10
|
-
it { is_expected.to route_command('proper <=$4') }
|
11
|
-
it { is_expected.to route_command('proper <= $4') }
|
12
|
-
it { is_expected.to route_command('proper >4%') }
|
13
|
-
it { is_expected.to route_command('proper > 4%') }
|
14
|
-
it { is_expected.to route_command('proper >=4%') }
|
15
|
-
it { is_expected.to route_command('proper >= 4%') }
|
16
|
-
it { is_expected.to route_command('properlow') }
|
17
|
-
it { is_expected.to route_command('properabvhigh') }
|
18
|
-
it { is_expected.to route_command('properabvlow') }
|
19
6
|
|
20
7
|
before do
|
21
8
|
mock = File.open('spec/fixtures/properpint.html').read
|
@@ -24,7 +11,7 @@ describe Lita::Handlers::OnewheelBeerProperPint, lita_handler: true do
|
|
24
11
|
|
25
12
|
it 'shows the taps' do
|
26
13
|
send_command 'proper'
|
27
|
-
expect(replies.last).to eq("Proper's taps: 1)
|
14
|
+
expect(replies.last).to eq("Proper's taps: 1) Sticky Hands IIPA Block 15 2) Montavilla Lil' More Righteous ISA 3) Helles Lager Rosenstadt 4) Topcutter IPA Bale Breaker 5) Leafwalker Red Bent Shovel 6) 54-40 Belgium Quad Avant Garde A Clue 7) Old Town Glow Torch 8) Forgeberry Tart Ale Ale Smith 9) Wanderlust IPA Breakside 10) Empire of the Clouds NEIPA Grains of Wrath 11) Oatis Stout Ninkasi 12) Upright Three Deadly Hops Amber 13) Bone Dry Cuvee Cider Swift 14) Pipp Crush Cider 15) Grapefruit Hibiscus Beet BoochCraft Hard Kombucha 16) Underberg")
|
28
15
|
end
|
29
16
|
|
30
17
|
it 'displays details for tap 4' do
|
@@ -37,152 +24,4 @@ describe Lita::Handlers::OnewheelBeerProperPint, lita_handler: true do
|
|
37
24
|
expect(replies.count).to eq(1)
|
38
25
|
expect(replies.last).to eq('Proper\'s tap 1) Cider Riot! Plastic Paddy - Apple Cider w/ Irish tea 6.0%, 10oz - $4 | 20oz - $7 | 32oz Crowler - $10, 48% remaining')
|
39
26
|
end
|
40
|
-
|
41
|
-
it 'gets nitro' do
|
42
|
-
send_command 'proper nitro'
|
43
|
-
expect(replies.last).to eq('Proper\'s tap 6) (Nitro) Backwoods Winchester Brown - Brown Ale 6.2%, 10oz - $3 | 20oz - $5, 98% remaining')
|
44
|
-
end
|
45
|
-
|
46
|
-
it 'gets cask' do
|
47
|
-
send_command 'proper cask'
|
48
|
-
expect(replies.last).to eq("Proper's tap 3) (Cask) Machine House Crystal Maze - ESB 4.0%, 10oz - $3 | 20oz - $5, 57% remaining")
|
49
|
-
end
|
50
|
-
|
51
|
-
it 'searches for ipa' do
|
52
|
-
send_command 'proper ipa'
|
53
|
-
expect(replies.last).to eq("Proper's tap 24) Oakshire Perfect Storm - Imperial IPA 9.0%, 10oz - $4 | 20oz - $6 | 32oz Crowler - $10, 61% remaining")
|
54
|
-
end
|
55
|
-
|
56
|
-
it 'searches for brown' do
|
57
|
-
send_command 'proper brown'
|
58
|
-
expect(replies.last).to eq("Proper's tap 22) GoodLife 29er - India Brown Ale 6.0%, 10oz - $3 | 20oz - $5 | 32oz Crowler - $8, 37% remaining")
|
59
|
-
end
|
60
|
-
|
61
|
-
it 'searches for abv >9%' do
|
62
|
-
send_command 'proper >9%'
|
63
|
-
expect(replies.count).to eq(4)
|
64
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
65
|
-
expect(replies[1]).to eq("Proper's tap 9) Hopworks Noggin’ Floggin’ - Barleywine 11.0%, 4oz - $3 | 12oz - $6 | 32oz Crowler - $13, 34% remaining")
|
66
|
-
expect(replies[2]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
67
|
-
expect(replies[3]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
68
|
-
end
|
69
|
-
|
70
|
-
it 'searches for abv > 9%' do
|
71
|
-
send_command 'proper > 9%'
|
72
|
-
expect(replies.count).to eq(4)
|
73
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
74
|
-
expect(replies[1]).to eq("Proper's tap 9) Hopworks Noggin’ Floggin’ - Barleywine 11.0%, 4oz - $3 | 12oz - $6 | 32oz Crowler - $13, 34% remaining")
|
75
|
-
expect(replies[2]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
76
|
-
expect(replies[3]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
77
|
-
end
|
78
|
-
|
79
|
-
it 'searches for abv >= 9%' do
|
80
|
-
send_command 'proper >= 9%'
|
81
|
-
expect(replies.count).to eq(5)
|
82
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
83
|
-
expect(replies[1]).to eq("Proper's tap 9) Hopworks Noggin’ Floggin’ - Barleywine 11.0%, 4oz - $3 | 12oz - $6 | 32oz Crowler - $13, 34% remaining")
|
84
|
-
expect(replies[2]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
85
|
-
expect(replies[3]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
86
|
-
expect(replies.last).to eq("Proper's tap 24) Oakshire Perfect Storm - Imperial IPA 9.0%, 10oz - $4 | 20oz - $6 | 32oz Crowler - $10, 61% remaining")
|
87
|
-
end
|
88
|
-
|
89
|
-
it 'searches for abv <4.1%' do
|
90
|
-
send_command 'proper <4.1%'
|
91
|
-
expect(replies.count).to eq(2)
|
92
|
-
expect(replies[0]).to eq("Proper's tap 3) (Cask) Machine House Crystal Maze - ESB 4.0%, 10oz - $3 | 20oz - $5, 57% remaining")
|
93
|
-
expect(replies.last).to eq("Proper's tap 11) Lagunitas Copper Fusion Ale - Copper Ale 4.0%, 10oz - $3 | 20oz - $5 | 32oz Crowler - $8, 19% remaining")
|
94
|
-
end
|
95
|
-
|
96
|
-
it 'searches for abv < 4.1%' do
|
97
|
-
send_command 'proper < 4.1%'
|
98
|
-
expect(replies.count).to eq(2)
|
99
|
-
expect(replies[0]).to eq("Proper's tap 3) (Cask) Machine House Crystal Maze - ESB 4.0%, 10oz - $3 | 20oz - $5, 57% remaining")
|
100
|
-
expect(replies.last).to eq("Proper's tap 11) Lagunitas Copper Fusion Ale - Copper Ale 4.0%, 10oz - $3 | 20oz - $5 | 32oz Crowler - $8, 19% remaining")
|
101
|
-
end
|
102
|
-
|
103
|
-
it 'searches for abv <= 4%' do
|
104
|
-
send_command 'proper <= 4%'
|
105
|
-
expect(replies.count).to eq(2)
|
106
|
-
expect(replies[0]).to eq("Proper's tap 3) (Cask) Machine House Crystal Maze - ESB 4.0%, 10oz - $3 | 20oz - $5, 57% remaining")
|
107
|
-
expect(replies.last).to eq("Proper's tap 11) Lagunitas Copper Fusion Ale - Copper Ale 4.0%, 10oz - $3 | 20oz - $5 | 32oz Crowler - $8, 19% remaining")
|
108
|
-
end
|
109
|
-
|
110
|
-
it 'searches for prices >$6' do
|
111
|
-
send_command 'proper >$6'
|
112
|
-
expect(replies.count).to eq(2)
|
113
|
-
expect(replies[0]).to eq("Proper's tap 1) Cider Riot! Plastic Paddy - Apple Cider w/ Irish tea 6.0%, 10oz - $4 | 20oz - $7 | 32oz Crowler - $10, 48% remaining")
|
114
|
-
expect(replies[1]).to eq("Proper's tap 4) Wild Ride Solidarity - Abbey Dubbel – Barrel Aged (Pinot Noir) 8.2%, 4oz - $4 | 12oz - $7, 26% remaining")
|
115
|
-
end
|
116
|
-
|
117
|
-
it 'searches for prices >=$6' do
|
118
|
-
send_command 'proper >=$6'
|
119
|
-
expect(replies.count).to eq(4)
|
120
|
-
expect(replies[0]).to eq("Proper's tap 1) Cider Riot! Plastic Paddy - Apple Cider w/ Irish tea 6.0%, 10oz - $4 | 20oz - $7 | 32oz Crowler - $10, 48% remaining")
|
121
|
-
expect(replies[1]).to eq("Proper's tap 4) Wild Ride Solidarity - Abbey Dubbel – Barrel Aged (Pinot Noir) 8.2%, 4oz - $4 | 12oz - $7, 26% remaining")
|
122
|
-
expect(replies[2]).to eq("Proper's tap 9) Hopworks Noggin’ Floggin’ - Barleywine 11.0%, 4oz - $3 | 12oz - $6 | 32oz Crowler - $13, 34% remaining")
|
123
|
-
expect(replies[3]).to eq("Proper's tap 24) Oakshire Perfect Storm - Imperial IPA 9.0%, 10oz - $4 | 20oz - $6 | 32oz Crowler - $10, 61% remaining")
|
124
|
-
end
|
125
|
-
|
126
|
-
it 'searches for prices > $6' do
|
127
|
-
send_command 'proper > $6'
|
128
|
-
expect(replies.count).to eq(2)
|
129
|
-
expect(replies[0]).to eq("Proper's tap 1) Cider Riot! Plastic Paddy - Apple Cider w/ Irish tea 6.0%, 10oz - $4 | 20oz - $7 | 32oz Crowler - $10, 48% remaining")
|
130
|
-
expect(replies[1]).to eq("Proper's tap 4) Wild Ride Solidarity - Abbey Dubbel – Barrel Aged (Pinot Noir) 8.2%, 4oz - $4 | 12oz - $7, 26% remaining")
|
131
|
-
end
|
132
|
-
|
133
|
-
it 'searches for prices <$4.1' do
|
134
|
-
send_command 'proper <$4.1'
|
135
|
-
expect(replies.count).to eq(3)
|
136
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
137
|
-
expect(replies[1]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
138
|
-
expect(replies[2]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
139
|
-
end
|
140
|
-
|
141
|
-
it 'searches for prices < $4.01' do
|
142
|
-
send_command 'proper < $4.01'
|
143
|
-
expect(replies.count).to eq(3)
|
144
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
145
|
-
expect(replies[1]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
146
|
-
expect(replies[2]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
147
|
-
end
|
148
|
-
|
149
|
-
it 'searches for prices <= $4.00' do
|
150
|
-
send_command 'proper <= $4.00'
|
151
|
-
expect(replies.count).to eq(3)
|
152
|
-
expect(replies[0]).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
153
|
-
expect(replies[1]).to eq("Proper's tap 18) Knee Deep Hop Surplus - Triple IPA 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 25% remaining")
|
154
|
-
expect(replies[2]).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
155
|
-
end
|
156
|
-
|
157
|
-
it 'runs a random beer through' do
|
158
|
-
send_command 'proper roulette'
|
159
|
-
expect(replies.count).to eq(1)
|
160
|
-
expect(replies.last).to include("Proper's tap")
|
161
|
-
end
|
162
|
-
|
163
|
-
it 'runs a random beer through' do
|
164
|
-
send_command 'proper random'
|
165
|
-
expect(replies.count).to eq(1)
|
166
|
-
expect(replies.last).to include("Proper's tap")
|
167
|
-
end
|
168
|
-
|
169
|
-
it 'searches with a space' do
|
170
|
-
send_command 'proper zeus juice'
|
171
|
-
expect(replies.last).to eq("Proper's tap 8) Fat Head’s Zeus Juice - Belgian Strong Blonde 10.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $9, 44% remaining")
|
172
|
-
end
|
173
|
-
|
174
|
-
it 'displays low taps' do
|
175
|
-
send_command 'properlow'
|
176
|
-
expect(replies.last).to eq("Proper's tap 25) Green Flash Passion Fruit Kicker - Wheat Ale w/ Passion Fruit 5.5%, 10oz - $3 | 20oz - $5, <= 1% remaining")
|
177
|
-
end
|
178
|
-
|
179
|
-
it 'displays low abv' do
|
180
|
-
send_command 'properabvhigh'
|
181
|
-
expect(replies.last).to eq("Proper's tap 20) Knee Deep Dark Horse - Imperial Stout 12.0%, 4oz - $2 | 12oz - $4 | 32oz Crowler - $10, 39% remaining")
|
182
|
-
end
|
183
|
-
|
184
|
-
it 'displays high abv' do
|
185
|
-
send_command 'properabvlow'
|
186
|
-
expect(replies.last).to eq("Proper's tap 3) (Cask) Machine House Crystal Maze - ESB 4.0%, 10oz - $3 | 20oz - $5, 57% remaining")
|
187
|
-
end
|
188
27
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lita-onewheel-beer-properpint
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kreps
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-06-
|
11
|
+
date: 2020-06-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: lita
|