beway 1.0.2 → 1.0.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/Gemfile +1 -1
- data/README +7 -16
- data/README.rdoc +8 -20
- data/doc/Beway.html +136 -183
- data/doc/Beway/Auction.html +630 -816
- data/doc/Beway/AuctionParseError.html +139 -158
- data/doc/Beway/Bidder.html +384 -529
- data/doc/Beway/BidderError.html +139 -158
- data/doc/Beway/CliRunner.html +742 -818
- data/doc/Beway/EbayData.html +398 -451
- data/doc/Beway/EbayDataParseError.html +139 -158
- data/doc/Beway/InvalidUrlError.html +139 -158
- data/doc/README.html +129 -167
- data/doc/created.rid +6 -6
- data/doc/images/add.png +0 -0
- data/doc/images/brick.png +0 -0
- data/doc/images/brick_link.png +0 -0
- data/doc/images/bug.png +0 -0
- data/doc/images/bullet_black.png +0 -0
- data/doc/images/bullet_toggle_minus.png +0 -0
- data/doc/images/bullet_toggle_plus.png +0 -0
- data/doc/images/date.png +0 -0
- data/doc/images/delete.png +0 -0
- data/doc/images/find.png +0 -0
- data/doc/images/loadingAnimation.gif +0 -0
- data/doc/images/macFFBgHack.png +0 -0
- data/doc/images/package.png +0 -0
- data/doc/images/page_green.png +0 -0
- data/doc/images/page_white_text.png +0 -0
- data/doc/images/page_white_width.png +0 -0
- data/doc/images/plugin.png +0 -0
- data/doc/images/ruby.png +0 -0
- data/doc/images/tag_blue.png +0 -0
- data/doc/images/tag_green.png +0 -0
- data/doc/images/transparent.png +0 -0
- data/doc/images/wrench.png +0 -0
- data/doc/images/wrench_orange.png +0 -0
- data/doc/images/zoom.png +0 -0
- data/doc/index.html +134 -223
- data/doc/js/darkfish.js +153 -0
- data/doc/js/jquery.js +18 -0
- data/doc/js/navigation.js +142 -0
- data/doc/js/search.js +94 -0
- data/doc/js/search_index.js +1 -0
- data/doc/js/searcher.js +228 -0
- data/doc/lib/beway/auction_rb.html +1 -1
- data/doc/lib/beway/bidder_rb.html +1 -1
- data/doc/lib/beway/cli_runner_rb.html +1 -1
- data/doc/lib/beway/ebay_data_rb.html +1 -1
- data/doc/rdoc.css +310 -473
- data/doc/table_of_contents.html +154 -0
- data/lib/beway.rb +4 -0
- data/lib/beway/auction.rb +5 -7
- data/lib/beway/cli_runner.rb +2 -3
- data/lib/beway/ebay_data.rb +1 -1
- data/spec/auction_spec.rb +12 -1
- data/spec/bidder_spec.rb +19 -3
- data/spec/config.rb +2 -2
- data/spec/html/kodak-film-old.html +59 -0
- metadata +82 -97
|
@@ -1,160 +1,141 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
5
4
|
<head>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
</div>
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
147
|
-
|
|
148
|
-
<p>Disabled; run with --debug to generate this.</p>
|
|
149
|
-
|
|
150
|
-
</div>
|
|
151
|
-
|
|
152
|
-
<div id="validator-badges">
|
|
153
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
154
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
155
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
156
|
-
</div>
|
|
157
|
-
|
|
158
|
-
</body>
|
|
159
|
-
</html>
|
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
+
|
|
7
|
+
<title>class Beway::AuctionParseError - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
var rdoc_rel_prefix = "../";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body id="top" class="class">
|
|
24
|
+
<nav id="metadata">
|
|
25
|
+
<nav id="home-section" class="section">
|
|
26
|
+
<h3 class="section-header">
|
|
27
|
+
<a href="../index.html">Home</a>
|
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
30
|
+
</h3>
|
|
31
|
+
</nav>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
+
<h3 class="section-header">
|
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
+
</h3>
|
|
40
|
+
</form>
|
|
41
|
+
|
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
+
</nav>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div id="file-metadata">
|
|
47
|
+
<nav id="file-list-section" class="section">
|
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
|
49
|
+
<ul>
|
|
50
|
+
<li>lib/beway/auction.rb
|
|
51
|
+
</ul>
|
|
52
|
+
</nav>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div id="class-metadata">
|
|
58
|
+
|
|
59
|
+
<nav id="parent-class-section" class="section">
|
|
60
|
+
<h3 class="section-header">Parent</h3>
|
|
61
|
+
|
|
62
|
+
<p class="link">StandardError
|
|
63
|
+
|
|
64
|
+
</nav>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
|
|
68
|
+
</div>
|
|
69
|
+
|
|
70
|
+
<div id="project-metadata">
|
|
71
|
+
<nav id="fileindex-section" class="section project-section">
|
|
72
|
+
<h3 class="section-header">Pages</h3>
|
|
73
|
+
|
|
74
|
+
<ul>
|
|
75
|
+
|
|
76
|
+
<li class="file"><a href="../README.html">README</a>
|
|
77
|
+
|
|
78
|
+
</ul>
|
|
79
|
+
</nav>
|
|
80
|
+
|
|
81
|
+
<nav id="classindex-section" class="section project-section">
|
|
82
|
+
<h3 class="section-header">Class and Module Index</h3>
|
|
83
|
+
|
|
84
|
+
<ul class="link-list">
|
|
85
|
+
|
|
86
|
+
<li><a href="../Beway.html">Beway</a>
|
|
87
|
+
|
|
88
|
+
<li><a href="../Beway/Auction.html">Beway::Auction</a>
|
|
89
|
+
|
|
90
|
+
<li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a>
|
|
91
|
+
|
|
92
|
+
<li><a href="../Beway/Bidder.html">Beway::Bidder</a>
|
|
93
|
+
|
|
94
|
+
<li><a href="../Beway/BidderError.html">Beway::BidderError</a>
|
|
95
|
+
|
|
96
|
+
<li><a href="../Beway/CliRunner.html">Beway::CliRunner</a>
|
|
97
|
+
|
|
98
|
+
<li><a href="../Beway/EbayData.html">Beway::EbayData</a>
|
|
99
|
+
|
|
100
|
+
<li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a>
|
|
101
|
+
|
|
102
|
+
<li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a>
|
|
103
|
+
|
|
104
|
+
</ul>
|
|
105
|
+
</nav>
|
|
106
|
+
|
|
107
|
+
</div>
|
|
108
|
+
</nav>
|
|
109
|
+
|
|
110
|
+
<div id="documentation">
|
|
111
|
+
<h1 class="class">class Beway::AuctionParseError</h1>
|
|
112
|
+
|
|
113
|
+
<div id="description" class="description">
|
|
114
|
+
|
|
115
|
+
</div><!-- description -->
|
|
116
|
+
|
|
117
|
+
|
|
118
|
+
|
|
119
|
+
|
|
120
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
121
|
+
|
|
122
|
+
|
|
123
|
+
|
|
124
|
+
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
|
|
128
|
+
|
|
129
|
+
<!-- Methods -->
|
|
130
|
+
|
|
131
|
+
</section><!-- 5Buntitled-5D -->
|
|
132
|
+
|
|
133
|
+
</div><!-- documentation -->
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
<footer id="validator-badges">
|
|
137
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
138
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
|
139
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
140
|
+
</footer>
|
|
160
141
|
|
data/doc/Beway/Bidder.html
CHANGED
|
@@ -1,531 +1,386 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
|
|
1
|
+
<!DOCTYPE html>
|
|
2
|
+
|
|
3
|
+
<html>
|
|
5
4
|
<head>
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
|
|
245
|
-
|
|
246
|
-
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
|
|
253
|
-
|
|
254
|
-
|
|
255
|
-
|
|
256
|
-
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
278
|
-
|
|
279
|
-
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
313
|
-
|
|
314
|
-
|
|
315
|
-
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
|
|
327
|
-
</
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
<div class="method-description">
|
|
388
|
-
|
|
389
|
-
<p>
|
|
390
|
-
log user in with credentials. returns boolean representing success
|
|
391
|
-
</p>
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
395
|
-
<div class="method-source-code"
|
|
396
|
-
id="login-source">
|
|
397
|
-
<pre>
|
|
398
|
-
<span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 29</span>
|
|
399
|
-
29: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">login</span>
|
|
400
|
-
30: <span class="ruby-identifier">ebay_home_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">EBAY_HOME</span>)
|
|
401
|
-
31:
|
|
402
|
-
32: <span class="ruby-identifier">sign_in_link</span> = <span class="ruby-identifier">ebay_home_page</span>.<span class="ruby-identifier">link_with</span>( <span class="ruby-value">:text</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'Sign in'</span> )
|
|
403
|
-
33: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">"Couldn't find sign in link"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">sign_in_link</span>
|
|
404
|
-
34: <span class="ruby-identifier">login_page</span> = <span class="ruby-identifier">sign_in_link</span>.<span class="ruby-identifier">click</span>
|
|
405
|
-
35:
|
|
406
|
-
36: <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
|
|
407
|
-
37:
|
|
408
|
-
38: <span class="ruby-keyword kw">return</span> <span class="ruby-ivar">@logged_in</span>
|
|
409
|
-
39: <span class="ruby-keyword kw">end</span></pre>
|
|
410
|
-
</div>
|
|
411
|
-
|
|
412
|
-
</div>
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
</div>
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
</div>
|
|
421
|
-
|
|
422
|
-
<div id="private-instance-method-details" class="method-section section">
|
|
423
|
-
<h3 class="section-header">Private Instance Methods</h3>
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
<div id="handle-login-page-method" class="method-detail ">
|
|
427
|
-
<a name="method-i-handle_login_page"></a>
|
|
428
|
-
|
|
429
|
-
<div class="method-heading">
|
|
430
|
-
|
|
431
|
-
<span class="method-name">handle_login_page</span><span
|
|
432
|
-
class="method-args">(login_page)</span>
|
|
433
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
434
|
-
|
|
435
|
-
</div>
|
|
436
|
-
|
|
437
|
-
<div class="method-description">
|
|
438
|
-
|
|
439
|
-
<p>
|
|
440
|
-
log into ebay as prompted by login_page
|
|
441
|
-
</p>
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
<div class="method-source-code"
|
|
446
|
-
id="handle-login-page-source">
|
|
447
|
-
<pre>
|
|
448
|
-
<span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 86</span>
|
|
449
|
-
86: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
|
|
450
|
-
87: <span class="ruby-identifier">login_form</span> = <span class="ruby-identifier">login_page</span>.<span class="ruby-identifier">form_with</span>( <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'SignInForm'</span>)
|
|
451
|
-
88: <span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-value str">"Couldn't find login form"</span> <span class="ruby-keyword kw">unless</span> <span class="ruby-identifier">login_form</span>
|
|
452
|
-
89: <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">userid</span> = <span class="ruby-ivar">@username</span>
|
|
453
|
-
90: <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">pass</span> = <span class="ruby-ivar">@password</span>
|
|
454
|
-
91: <span class="ruby-identifier">login_response</span> = <span class="ruby-identifier">login_form</span>.<span class="ruby-identifier">submit</span>
|
|
455
|
-
92:
|
|
456
|
-
93: <span class="ruby-ivar">@logged_in</span> = <span class="ruby-identifier">login_response</span>.<span class="ruby-identifier">search</span>(<span class="ruby-value str">'form#SignInForm'</span>).<span class="ruby-identifier">empty?</span>
|
|
457
|
-
94: <span class="ruby-ivar">@last_login_time</span> = <span class="ruby-constant">Time</span>.<span class="ruby-identifier">now</span> <span class="ruby-keyword kw">if</span> <span class="ruby-ivar">@logged_in</span>
|
|
458
|
-
95:
|
|
459
|
-
96: <span class="ruby-keyword kw">return</span> <span class="ruby-identifier">login_response</span>
|
|
460
|
-
97: <span class="ruby-keyword kw">end</span></pre>
|
|
461
|
-
</div>
|
|
462
|
-
|
|
463
|
-
</div>
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
</div>
|
|
469
|
-
|
|
470
|
-
|
|
471
|
-
<div id="is-login-page--method" class="method-detail ">
|
|
472
|
-
<a name="method-i-is_login_page%3F"></a>
|
|
473
|
-
|
|
474
|
-
<div class="method-heading">
|
|
475
|
-
|
|
476
|
-
<span class="method-name">is_login_page?</span><span
|
|
477
|
-
class="method-args">(page)</span>
|
|
478
|
-
<span class="method-click-advice">click to toggle source</span>
|
|
479
|
-
|
|
480
|
-
</div>
|
|
481
|
-
|
|
482
|
-
<div class="method-description">
|
|
483
|
-
|
|
484
|
-
<p>
|
|
485
|
-
is page a login page?
|
|
486
|
-
</p>
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
<div class="method-source-code"
|
|
491
|
-
id="is-login-page--source">
|
|
492
|
-
<pre>
|
|
493
|
-
<span class="ruby-comment cmt"># File lib/beway/bidder.rb, line 77</span>
|
|
494
|
-
77: <span class="ruby-keyword kw">def</span> <span class="ruby-identifier">is_login_page?</span>(<span class="ruby-identifier">page</span>)
|
|
495
|
-
78: <span class="ruby-keyword kw">if</span> <span class="ruby-identifier">page</span>.<span class="ruby-identifier">form_with</span>( <span class="ruby-value">:name</span> =<span class="ruby-operator">></span> <span class="ruby-value str">'SignInForm'</span>)
|
|
496
|
-
79: <span class="ruby-keyword kw">true</span>
|
|
497
|
-
80: <span class="ruby-keyword kw">else</span>
|
|
498
|
-
81: <span class="ruby-keyword kw">false</span>
|
|
499
|
-
82: <span class="ruby-keyword kw">end</span>
|
|
500
|
-
83: <span class="ruby-keyword kw">end</span></pre>
|
|
501
|
-
</div>
|
|
502
|
-
|
|
503
|
-
</div>
|
|
504
|
-
|
|
505
|
-
|
|
506
|
-
|
|
507
|
-
|
|
508
|
-
</div>
|
|
509
|
-
|
|
510
|
-
|
|
511
|
-
</div>
|
|
512
|
-
|
|
513
|
-
|
|
514
|
-
</div>
|
|
515
|
-
|
|
516
|
-
|
|
517
|
-
<div id="rdoc-debugging-section-dump" class="debugging-section">
|
|
518
|
-
|
|
519
|
-
<p>Disabled; run with --debug to generate this.</p>
|
|
520
|
-
|
|
521
|
-
</div>
|
|
522
|
-
|
|
523
|
-
<div id="validator-badges">
|
|
524
|
-
<p><small><a href="http://validator.w3.org/check/referer">[Validate]</a></small></p>
|
|
525
|
-
<p><small>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish
|
|
526
|
-
Rdoc Generator</a> 1.1.6</small>.</p>
|
|
527
|
-
</div>
|
|
528
|
-
|
|
529
|
-
</body>
|
|
530
|
-
</html>
|
|
5
|
+
<meta content="text/html; charset=UTF-8" http-equiv="Content-Type">
|
|
6
|
+
|
|
7
|
+
<title>class Beway::Bidder - RDoc Documentation</title>
|
|
8
|
+
|
|
9
|
+
<link type="text/css" media="screen" href="../rdoc.css" rel="stylesheet">
|
|
10
|
+
|
|
11
|
+
<script type="text/javascript">
|
|
12
|
+
var rdoc_rel_prefix = "../";
|
|
13
|
+
</script>
|
|
14
|
+
|
|
15
|
+
<script type="text/javascript" charset="utf-8" src="../js/jquery.js"></script>
|
|
16
|
+
<script type="text/javascript" charset="utf-8" src="../js/navigation.js"></script>
|
|
17
|
+
<script type="text/javascript" charset="utf-8" src="../js/search_index.js"></script>
|
|
18
|
+
<script type="text/javascript" charset="utf-8" src="../js/search.js"></script>
|
|
19
|
+
<script type="text/javascript" charset="utf-8" src="../js/searcher.js"></script>
|
|
20
|
+
<script type="text/javascript" charset="utf-8" src="../js/darkfish.js"></script>
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
<body id="top" class="class">
|
|
24
|
+
<nav id="metadata">
|
|
25
|
+
<nav id="home-section" class="section">
|
|
26
|
+
<h3 class="section-header">
|
|
27
|
+
<a href="../index.html">Home</a>
|
|
28
|
+
<a href="../table_of_contents.html#classes">Classes</a>
|
|
29
|
+
<a href="../table_of_contents.html#methods">Methods</a>
|
|
30
|
+
</h3>
|
|
31
|
+
</nav>
|
|
32
|
+
|
|
33
|
+
|
|
34
|
+
<nav id="search-section" class="section project-section" class="initially-hidden">
|
|
35
|
+
<form action="#" method="get" accept-charset="utf-8">
|
|
36
|
+
<h3 class="section-header">
|
|
37
|
+
<input type="text" name="search" placeholder="Search" id="search-field"
|
|
38
|
+
title="Type to search, Up and Down to navigate, Enter to load">
|
|
39
|
+
</h3>
|
|
40
|
+
</form>
|
|
41
|
+
|
|
42
|
+
<ul id="search-results" class="initially-hidden"></ul>
|
|
43
|
+
</nav>
|
|
44
|
+
|
|
45
|
+
|
|
46
|
+
<div id="file-metadata">
|
|
47
|
+
<nav id="file-list-section" class="section">
|
|
48
|
+
<h3 class="section-header">Defined In</h3>
|
|
49
|
+
<ul>
|
|
50
|
+
<li>lib/beway/bidder.rb
|
|
51
|
+
</ul>
|
|
52
|
+
</nav>
|
|
53
|
+
|
|
54
|
+
|
|
55
|
+
</div>
|
|
56
|
+
|
|
57
|
+
<div id="class-metadata">
|
|
58
|
+
|
|
59
|
+
<nav id="parent-class-section" class="section">
|
|
60
|
+
<h3 class="section-header">Parent</h3>
|
|
61
|
+
|
|
62
|
+
<p class="link">Object
|
|
63
|
+
|
|
64
|
+
</nav>
|
|
65
|
+
|
|
66
|
+
|
|
67
|
+
<!-- Method Quickref -->
|
|
68
|
+
<nav id="method-list-section" class="section">
|
|
69
|
+
<h3 class="section-header">Methods</h3>
|
|
70
|
+
|
|
71
|
+
<ul class="link-list">
|
|
72
|
+
|
|
73
|
+
<li><a href="#method-c-new">::new</a>
|
|
74
|
+
|
|
75
|
+
<li><a href="#method-i-bid">#bid</a>
|
|
76
|
+
|
|
77
|
+
<li><a href="#method-i-login">#login</a>
|
|
78
|
+
|
|
79
|
+
</ul>
|
|
80
|
+
</nav>
|
|
81
|
+
|
|
82
|
+
</div>
|
|
83
|
+
|
|
84
|
+
<div id="project-metadata">
|
|
85
|
+
<nav id="fileindex-section" class="section project-section">
|
|
86
|
+
<h3 class="section-header">Pages</h3>
|
|
87
|
+
|
|
88
|
+
<ul>
|
|
89
|
+
|
|
90
|
+
<li class="file"><a href="../README.html">README</a>
|
|
91
|
+
|
|
92
|
+
</ul>
|
|
93
|
+
</nav>
|
|
94
|
+
|
|
95
|
+
<nav id="classindex-section" class="section project-section">
|
|
96
|
+
<h3 class="section-header">Class and Module Index</h3>
|
|
97
|
+
|
|
98
|
+
<ul class="link-list">
|
|
99
|
+
|
|
100
|
+
<li><a href="../Beway.html">Beway</a>
|
|
101
|
+
|
|
102
|
+
<li><a href="../Beway/Auction.html">Beway::Auction</a>
|
|
103
|
+
|
|
104
|
+
<li><a href="../Beway/AuctionParseError.html">Beway::AuctionParseError</a>
|
|
105
|
+
|
|
106
|
+
<li><a href="../Beway/Bidder.html">Beway::Bidder</a>
|
|
107
|
+
|
|
108
|
+
<li><a href="../Beway/BidderError.html">Beway::BidderError</a>
|
|
109
|
+
|
|
110
|
+
<li><a href="../Beway/CliRunner.html">Beway::CliRunner</a>
|
|
111
|
+
|
|
112
|
+
<li><a href="../Beway/EbayData.html">Beway::EbayData</a>
|
|
113
|
+
|
|
114
|
+
<li><a href="../Beway/EbayDataParseError.html">Beway::EbayDataParseError</a>
|
|
115
|
+
|
|
116
|
+
<li><a href="../Beway/InvalidUrlError.html">Beway::InvalidUrlError</a>
|
|
117
|
+
|
|
118
|
+
</ul>
|
|
119
|
+
</nav>
|
|
120
|
+
|
|
121
|
+
</div>
|
|
122
|
+
</nav>
|
|
123
|
+
|
|
124
|
+
<div id="documentation">
|
|
125
|
+
<h1 class="class">class Beway::Bidder</h1>
|
|
126
|
+
|
|
127
|
+
<div id="description" class="description">
|
|
128
|
+
|
|
129
|
+
<p><a href="Bidder.html">Bidder</a></p>
|
|
130
|
+
|
|
131
|
+
<p>Wrapper for Mechanize to perform actions on ebay</p>
|
|
132
|
+
|
|
133
|
+
</div><!-- description -->
|
|
134
|
+
|
|
135
|
+
|
|
136
|
+
|
|
137
|
+
|
|
138
|
+
<section id="5Buntitled-5D" class="documentation-section">
|
|
139
|
+
|
|
140
|
+
|
|
141
|
+
|
|
142
|
+
|
|
143
|
+
|
|
144
|
+
<!-- Constants -->
|
|
145
|
+
<section id="constants-list" class="section">
|
|
146
|
+
<h3 class="section-header">Constants</h3>
|
|
147
|
+
<dl>
|
|
148
|
+
|
|
149
|
+
<dt id="EBAY_HOME">EBAY_HOME
|
|
150
|
+
|
|
151
|
+
<dd class="description">
|
|
152
|
+
|
|
153
|
+
|
|
154
|
+
</dl>
|
|
155
|
+
</section>
|
|
156
|
+
|
|
157
|
+
|
|
158
|
+
|
|
159
|
+
<!-- Attributes -->
|
|
160
|
+
<section id="attribute-method-details" class="method-section section">
|
|
161
|
+
<h3 class="section-header">Attributes</h3>
|
|
162
|
+
|
|
163
|
+
|
|
164
|
+
<div id="attribute-i-agent" class="method-detail">
|
|
165
|
+
<div class="method-heading attribute-method-heading">
|
|
166
|
+
<span class="method-name">agent</span><span
|
|
167
|
+
class="attribute-access-type">[R]</span>
|
|
168
|
+
</div>
|
|
169
|
+
|
|
170
|
+
<div class="method-description">
|
|
171
|
+
|
|
172
|
+
|
|
173
|
+
|
|
174
|
+
</div>
|
|
175
|
+
</div>
|
|
176
|
+
|
|
177
|
+
<div id="attribute-i-last_login_time" class="method-detail">
|
|
178
|
+
<div class="method-heading attribute-method-heading">
|
|
179
|
+
<span class="method-name">last_login_time</span><span
|
|
180
|
+
class="attribute-access-type">[R]</span>
|
|
181
|
+
</div>
|
|
182
|
+
|
|
183
|
+
<div class="method-description">
|
|
184
|
+
|
|
185
|
+
|
|
186
|
+
|
|
187
|
+
</div>
|
|
188
|
+
</div>
|
|
189
|
+
|
|
190
|
+
<div id="attribute-i-logged_in" class="method-detail">
|
|
191
|
+
<div class="method-heading attribute-method-heading">
|
|
192
|
+
<span class="method-name">logged_in</span><span
|
|
193
|
+
class="attribute-access-type">[R]</span>
|
|
194
|
+
</div>
|
|
195
|
+
|
|
196
|
+
<div class="method-description">
|
|
197
|
+
|
|
198
|
+
|
|
199
|
+
|
|
200
|
+
</div>
|
|
201
|
+
</div>
|
|
202
|
+
|
|
203
|
+
<div id="attribute-i-password" class="method-detail">
|
|
204
|
+
<div class="method-heading attribute-method-heading">
|
|
205
|
+
<span class="method-name">password</span><span
|
|
206
|
+
class="attribute-access-type">[W]</span>
|
|
207
|
+
</div>
|
|
208
|
+
|
|
209
|
+
<div class="method-description">
|
|
210
|
+
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
</div>
|
|
214
|
+
</div>
|
|
215
|
+
|
|
216
|
+
<div id="attribute-i-username" class="method-detail">
|
|
217
|
+
<div class="method-heading attribute-method-heading">
|
|
218
|
+
<span class="method-name">username</span><span
|
|
219
|
+
class="attribute-access-type">[RW]</span>
|
|
220
|
+
</div>
|
|
221
|
+
|
|
222
|
+
<div class="method-description">
|
|
223
|
+
|
|
224
|
+
|
|
225
|
+
|
|
226
|
+
</div>
|
|
227
|
+
</div>
|
|
228
|
+
|
|
229
|
+
</section><!-- attribute-method-details -->
|
|
230
|
+
|
|
231
|
+
|
|
232
|
+
<!-- Methods -->
|
|
233
|
+
|
|
234
|
+
<section id="public-class-5Buntitled-5D-method-details" class="method-section section">
|
|
235
|
+
<h3 class="section-header">Public Class Methods</h3>
|
|
236
|
+
|
|
237
|
+
|
|
238
|
+
<div id="method-c-new" class="method-detail ">
|
|
239
|
+
|
|
240
|
+
<div class="method-heading">
|
|
241
|
+
<span class="method-name">new</span><span
|
|
242
|
+
class="method-args">(username, password)</span>
|
|
243
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
244
|
+
</div>
|
|
245
|
+
|
|
246
|
+
|
|
247
|
+
<div class="method-description">
|
|
248
|
+
|
|
249
|
+
<p>create a bidder with login credentials</p>
|
|
250
|
+
|
|
251
|
+
|
|
252
|
+
|
|
253
|
+
<div class="method-source-code" id="new-source">
|
|
254
|
+
<pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 19</span>
|
|
255
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">initialize</span>(<span class="ruby-identifier">username</span>, <span class="ruby-identifier">password</span>)
|
|
256
|
+
<span class="ruby-ivar">@username</span> = <span class="ruby-identifier">username</span>
|
|
257
|
+
<span class="ruby-ivar">@password</span> = <span class="ruby-identifier">password</span>
|
|
258
|
+
<span class="ruby-ivar">@agent</span> = <span class="ruby-constant">Mechanize</span>.<span class="ruby-identifier">new</span>
|
|
259
|
+
<span class="ruby-ivar">@logged_in</span> = <span class="ruby-keyword">false</span>
|
|
260
|
+
<span class="ruby-ivar">@last_login_time</span> = <span class="ruby-keyword">nil</span>
|
|
261
|
+
<span class="ruby-keyword">end</span></pre>
|
|
262
|
+
</div><!-- new-source -->
|
|
263
|
+
|
|
264
|
+
</div>
|
|
265
|
+
|
|
266
|
+
|
|
267
|
+
|
|
268
|
+
|
|
269
|
+
</div><!-- new-method -->
|
|
270
|
+
|
|
271
|
+
|
|
272
|
+
</section><!-- public-class-method-details -->
|
|
273
|
+
|
|
274
|
+
<section id="public-instance-5Buntitled-5D-method-details" class="method-section section">
|
|
275
|
+
<h3 class="section-header">Public Instance Methods</h3>
|
|
276
|
+
|
|
277
|
+
|
|
278
|
+
<div id="method-i-bid" class="method-detail ">
|
|
279
|
+
|
|
280
|
+
<div class="method-heading">
|
|
281
|
+
<span class="method-name">bid</span><span
|
|
282
|
+
class="method-args">(auction_url, amount)</span>
|
|
283
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
284
|
+
</div>
|
|
285
|
+
|
|
286
|
+
|
|
287
|
+
<div class="method-description">
|
|
288
|
+
|
|
289
|
+
<p>bid amount on given auction</p>
|
|
290
|
+
|
|
291
|
+
|
|
292
|
+
|
|
293
|
+
<div class="method-source-code" id="bid-source">
|
|
294
|
+
<pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 42</span>
|
|
295
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">bid</span>(<span class="ruby-identifier">auction_url</span>, <span class="ruby-identifier">amount</span>)
|
|
296
|
+
|
|
297
|
+
<span class="ruby-comment"># get auction</span>
|
|
298
|
+
<span class="ruby-identifier">auction_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-identifier">auction_url</span>)
|
|
299
|
+
|
|
300
|
+
<span class="ruby-comment"># get the bid form</span>
|
|
301
|
+
<span class="ruby-identifier">forms</span> = <span class="ruby-identifier">auction_page</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">></span> <span class="ruby-regexp">%rhttp:\/\/offer\.ebay\.com\//</span> )
|
|
302
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">"Couldn't find auction bid form"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
|
|
303
|
+
<span class="ruby-identifier">bid_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
|
|
304
|
+
|
|
305
|
+
<span class="ruby-comment"># fill in, submit bid form</span>
|
|
306
|
+
<span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">maxbid</span> = <span class="ruby-identifier">amount</span>
|
|
307
|
+
<span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">bid_form</span>.<span class="ruby-identifier">submit</span>
|
|
308
|
+
|
|
309
|
+
<span class="ruby-comment"># if given a login page, do it and get redirected to confirm bid</span>
|
|
310
|
+
<span class="ruby-keyword">if</span> <span class="ruby-identifier">is_login_page?</span>(<span class="ruby-identifier">bid_response</span>)
|
|
311
|
+
<span class="ruby-identifier">bid_response</span> = <span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">bid_response</span>)
|
|
312
|
+
<span class="ruby-keyword">end</span>
|
|
313
|
+
|
|
314
|
+
<span class="ruby-comment"># get confirm bid form</span>
|
|
315
|
+
<span class="ruby-identifier">forms</span> = <span class="ruby-identifier">bid_response</span>.<span class="ruby-identifier">forms_with</span>( <span class="ruby-value">:action</span> =<span class="ruby-operator">></span> <span class="ruby-string">'http://offer.ebay.com/ws/eBayISAPI.dll'</span> )
|
|
316
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">"Couldn't find confirm bid form"</span> <span class="ruby-keyword">if</span> <span class="ruby-identifier">forms</span>.<span class="ruby-identifier">length</span> <span class="ruby-operator">!=</span> <span class="ruby-value">1</span>
|
|
317
|
+
<span class="ruby-identifier">confirm_form</span> = <span class="ruby-identifier">forms</span>[<span class="ruby-value">0</span>]
|
|
318
|
+
|
|
319
|
+
<span class="ruby-comment"># click confirm button</span>
|
|
320
|
+
<span class="ruby-identifier">confirm_button</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">button_with</span>( <span class="ruby-value">:value</span> =<span class="ruby-operator">></span> <span class="ruby-string">'Confirm Bid'</span> )
|
|
321
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">"Couldn't find confirm bid button"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">confirm_button</span>
|
|
322
|
+
<span class="ruby-identifier">confirm_response</span> = <span class="ruby-identifier">confirm_form</span>.<span class="ruby-identifier">submit</span>( <span class="ruby-identifier">confirm_button</span> )
|
|
323
|
+
|
|
324
|
+
<span class="ruby-identifier">confirm_response</span>
|
|
325
|
+
<span class="ruby-keyword">end</span></pre>
|
|
326
|
+
</div><!-- bid-source -->
|
|
327
|
+
|
|
328
|
+
</div>
|
|
329
|
+
|
|
330
|
+
|
|
331
|
+
|
|
332
|
+
|
|
333
|
+
</div><!-- bid-method -->
|
|
334
|
+
|
|
335
|
+
|
|
336
|
+
<div id="method-i-login" class="method-detail ">
|
|
337
|
+
|
|
338
|
+
<div class="method-heading">
|
|
339
|
+
<span class="method-name">login</span><span
|
|
340
|
+
class="method-args">()</span>
|
|
341
|
+
<span class="method-click-advice">click to toggle source</span>
|
|
342
|
+
</div>
|
|
343
|
+
|
|
344
|
+
|
|
345
|
+
<div class="method-description">
|
|
346
|
+
|
|
347
|
+
<p>log user in with credentials. returns boolean representing success</p>
|
|
348
|
+
|
|
349
|
+
|
|
350
|
+
|
|
351
|
+
<div class="method-source-code" id="login-source">
|
|
352
|
+
<pre><span class="ruby-comment"># File lib/beway/bidder.rb, line 29</span>
|
|
353
|
+
<span class="ruby-keyword">def</span> <span class="ruby-identifier">login</span>
|
|
354
|
+
<span class="ruby-identifier">ebay_home_page</span> = <span class="ruby-ivar">@agent</span>.<span class="ruby-identifier">get</span>(<span class="ruby-constant">EBAY_HOME</span>)
|
|
355
|
+
|
|
356
|
+
<span class="ruby-identifier">sign_in_link</span> = <span class="ruby-identifier">ebay_home_page</span>.<span class="ruby-identifier">link_with</span>( <span class="ruby-value">:text</span> =<span class="ruby-operator">></span> <span class="ruby-string">'Sign in'</span> )
|
|
357
|
+
<span class="ruby-identifier">raise</span> <span class="ruby-constant">BidderError</span>, <span class="ruby-string">"Couldn't find sign in link"</span> <span class="ruby-keyword">unless</span> <span class="ruby-identifier">sign_in_link</span>
|
|
358
|
+
<span class="ruby-identifier">login_page</span> = <span class="ruby-identifier">sign_in_link</span>.<span class="ruby-identifier">click</span>
|
|
359
|
+
|
|
360
|
+
<span class="ruby-identifier">handle_login_page</span>(<span class="ruby-identifier">login_page</span>)
|
|
361
|
+
|
|
362
|
+
<span class="ruby-keyword">return</span> <span class="ruby-ivar">@logged_in</span>
|
|
363
|
+
<span class="ruby-keyword">end</span></pre>
|
|
364
|
+
</div><!-- login-source -->
|
|
365
|
+
|
|
366
|
+
</div>
|
|
367
|
+
|
|
368
|
+
|
|
369
|
+
|
|
370
|
+
|
|
371
|
+
</div><!-- login-method -->
|
|
372
|
+
|
|
373
|
+
|
|
374
|
+
</section><!-- public-instance-method-details -->
|
|
375
|
+
|
|
376
|
+
</section><!-- 5Buntitled-5D -->
|
|
377
|
+
|
|
378
|
+
</div><!-- documentation -->
|
|
379
|
+
|
|
380
|
+
|
|
381
|
+
<footer id="validator-badges">
|
|
382
|
+
<p><a href="http://validator.w3.org/check/referer">[Validate]</a>
|
|
383
|
+
<p>Generated by <a href="https://github.com/rdoc/rdoc">RDoc</a> 3.12.
|
|
384
|
+
<p>Generated with the <a href="http://deveiate.org/projects/Darkfish-Rdoc/">Darkfish Rdoc Generator</a> 3.
|
|
385
|
+
</footer>
|
|
531
386
|
|