rest_baby 0.8 → 1.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +0 -1
- data/ChangeLog +12 -2
- data/Gemfile +2 -0
- data/Rakefile +7 -1
- data/doc/MockRestService.html +204 -31
- data/doc/RestBaby/Client.html +686 -246
- data/doc/RestBaby.html +6 -7
- data/doc/_index.html +6 -19
- data/doc/class_list.html +6 -2
- data/doc/css/style.css +2 -1
- data/doc/feature_list.html +82 -55
- data/doc/featuredirectories_list.html +25 -32
- data/doc/file.README.html +6 -6
- data/doc/file_list.html +5 -1
- data/doc/frames.html +5 -7
- data/doc/index.html +6 -6
- data/doc/js/app.js +7 -2
- data/doc/js/full_list.js +4 -1
- data/doc/method_list.html +41 -25
- data/doc/requirements/features/header_options.html +81 -45
- data/doc/requirements/features/print_response.html +42 -148
- data/doc/requirements/features/rest_client.html +38 -30
- data/doc/requirements/features/url_parameter.html +342 -0
- data/doc/requirements/features.html +42 -39
- data/doc/requirements/step_transformers.html +524 -321
- data/doc/requirements/tags/authentication.html +8 -8
- data/doc/requirements/tags/core.html +4 -4
- data/doc/requirements/tags/delete.html +4 -4
- data/doc/requirements/tags/extended.html +12 -12
- data/doc/requirements/tags/get.html +6 -6
- data/doc/requirements/tags/header.S1.html +160 -0
- data/doc/requirements/tags/header.S2.html +160 -0
- data/doc/requirements/tags/header.S3.html +160 -0
- data/doc/requirements/tags/header.S4.html +160 -0
- data/doc/requirements/tags/header.html +160 -0
- data/doc/requirements/tags/headers.html +7 -16
- data/doc/requirements/tags/parameter.S1.html +160 -0
- data/doc/requirements/tags/parameter.html +160 -0
- data/doc/requirements/tags/post.html +10 -10
- data/doc/requirements/tags/print.S1.html +160 -0
- data/doc/requirements/tags/print.S2.html +160 -0
- data/doc/requirements/tags/print.S3.html +160 -0
- data/doc/requirements/tags/print.S4.html +160 -0
- data/doc/requirements/tags/print.html +4 -4
- data/doc/requirements/tags/put.html +4 -4
- data/doc/requirements/tags/rest.S1.html +160 -0
- data/doc/requirements/tags/rest.S2.html +160 -0
- data/doc/requirements/tags/rest.S3.html +160 -0
- data/doc/requirements/tags/rest.S4.html +160 -0
- data/doc/requirements/tags.html +97 -57
- data/doc/requirements.html +43 -38
- data/doc/step_list.html +204 -189
- data/doc/stepdefinition_list.html +69 -35
- data/doc/tag_list.html +100 -6
- data/doc/top-level-namespace.html +79 -13
- data/features/step_definitions/rest_client_steps.rb +4 -4
- data/lib/rest_baby/version.rb +1 -1
- data/lib/rest_baby.rb +1 -1
- metadata +46 -31
- data/Gemfile.lock +0 -68
@@ -20,7 +20,11 @@
|
|
20
20
|
</head>
|
21
21
|
<body>
|
22
22
|
<script type="text/javascript" charset="utf-8">
|
23
|
-
|
23
|
+
var hasFrames = false;
|
24
|
+
try {
|
25
|
+
hasFrames = window.top.frames.main ? true : false;
|
26
|
+
} catch (e) { }
|
27
|
+
if (hasFrames) {
|
24
28
|
document.getElementById('base_target').target = 'main';
|
25
29
|
document.body.className = 'frames';
|
26
30
|
}
|
@@ -84,143 +88,173 @@
|
|
84
88
|
<li class="r2">
|
85
89
|
<span class='object_link'>
|
86
90
|
<span class="pre">Given</span>
|
87
|
-
<a href="requirements/step_transformers.html#step_definition2-stepdefinition" title="/^I have "(GET|PUT|POST|DELETE)" service for "(
|
88
|
-
|
91
|
+
<a href="requirements/step_transformers.html#step_definition2-stepdefinition" title="/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)" \
|
92
|
+
with the following headers$/">
|
93
|
+
<span class="name">/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)" \
|
94
|
+
with the following headers$/</span>
|
89
95
|
</a>
|
90
96
|
</span>
|
91
97
|
<small>features/step_definitions/header_steps.rb:8</small>
|
92
98
|
</li>
|
93
99
|
|
94
100
|
|
101
|
+
<li class="r1">
|
102
|
+
<span class='object_link'>
|
103
|
+
<span class="pre">Given</span>
|
104
|
+
<a href="requirements/step_transformers.html#step_definition3-stepdefinition" title="/^I have "(GET|DELETE)" service for "([^"]*)" for \
|
105
|
+
user "([^"]*)" and password "([^"]*)"$/">
|
106
|
+
<span class="name">/^I have "(GET|DELETE)" service for "([^"]*)" for \
|
107
|
+
user "([^"]*)" and password "([^"]*)"$/</span>
|
108
|
+
</a>
|
109
|
+
</span>
|
110
|
+
<small>features/step_definitions/header_steps.rb:14</small>
|
111
|
+
</li>
|
112
|
+
|
113
|
+
|
114
|
+
<li class="r2">
|
115
|
+
<span class='object_link'>
|
116
|
+
<span class="pre">Given</span>
|
117
|
+
<a href="requirements/step_transformers.html#step_definition4-stepdefinition" title="/^I have "(PUT|POST)" service for "([^"]*)" for \
|
118
|
+
user "([^"]*)" and password "([^"]*)"$/">
|
119
|
+
<span class="name">/^I have "(PUT|POST)" service for "([^"]*)" for \
|
120
|
+
user "([^"]*)" and password "([^"]*)"$/</span>
|
121
|
+
</a>
|
122
|
+
</span>
|
123
|
+
<small>features/step_definitions/header_steps.rb:20</small>
|
124
|
+
</li>
|
125
|
+
|
126
|
+
|
95
127
|
<li class="r1">
|
96
128
|
<span class='object_link'>
|
97
129
|
<span class="pre">When</span>
|
98
|
-
<a href="requirements/step_transformers.html#
|
130
|
+
<a href="requirements/step_transformers.html#step_definition5-stepdefinition" title="/^I have the following headers?$/">
|
99
131
|
<span class="name">/^I have the following headers?$/</span>
|
100
132
|
</a>
|
101
133
|
</span>
|
102
|
-
<small>features/step_definitions/header_steps.rb:
|
134
|
+
<small>features/step_definitions/header_steps.rb:27</small>
|
103
135
|
</li>
|
104
136
|
|
105
137
|
|
106
138
|
<li class="r2">
|
107
139
|
<span class='object_link'>
|
108
140
|
<span class="pre">Given</span>
|
109
|
-
<a href="requirements/step_transformers.html#
|
110
|
-
|
141
|
+
<a href="requirements/step_transformers.html#step_definition6-stepdefinition" title="/^I have basic auth for user "([^"]*)" \
|
142
|
+
and password "(.*?)"$/">
|
143
|
+
<span class="name">/^I have basic auth for user "([^"]*)" \
|
144
|
+
and password "(.*?)"$/</span>
|
111
145
|
</a>
|
112
146
|
</span>
|
113
|
-
<small>features/step_definitions/header_steps.rb:
|
147
|
+
<small>features/step_definitions/header_steps.rb:31</small>
|
114
148
|
</li>
|
115
149
|
|
116
150
|
|
117
151
|
<li class="r1">
|
118
152
|
<span class='object_link'>
|
119
153
|
<span class="pre">Given</span>
|
120
|
-
<a href="requirements/step_transformers.html#
|
154
|
+
<a href="requirements/step_transformers.html#step_definition7-stepdefinition" title="/^I have a web service$/">
|
121
155
|
<span class="name">/^I have a web service$/</span>
|
122
156
|
</a>
|
123
157
|
</span>
|
124
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
158
|
+
<small>features/step_definitions/rest_client_steps.rb:4</small>
|
125
159
|
</li>
|
126
160
|
|
127
161
|
|
128
162
|
<li class="r2">
|
129
163
|
<span class='object_link'>
|
130
164
|
<span class="pre">Given</span>
|
131
|
-
<a href="requirements/step_transformers.html#
|
132
|
-
<span class="name">/^I have "(GET|PUT|POST|DELETE)" service for "(
|
165
|
+
<a href="requirements/step_transformers.html#step_definition8-stepdefinition" title="/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)"$/">
|
166
|
+
<span class="name">/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)"$/</span>
|
133
167
|
</a>
|
134
168
|
</span>
|
135
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
169
|
+
<small>features/step_definitions/rest_client_steps.rb:11</small>
|
136
170
|
</li>
|
137
171
|
|
138
172
|
|
139
173
|
<li class="r1">
|
140
174
|
<span class='object_link'>
|
141
175
|
<span class="pre">Given</span>
|
142
|
-
<a href="requirements/step_transformers.html#
|
143
|
-
<span class="name">/^I have "(GET|PUT|POST|DELETE)" service for "(
|
176
|
+
<a href="requirements/step_transformers.html#step_definition9-stepdefinition" title="/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)" as follows$/">
|
177
|
+
<span class="name">/^I have "(GET|PUT|POST|DELETE)" service for "([^"]*)" as follows$/</span>
|
144
178
|
</a>
|
145
179
|
</span>
|
146
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
180
|
+
<small>features/step_definitions/rest_client_steps.rb:22</small>
|
147
181
|
</li>
|
148
182
|
|
149
183
|
|
150
184
|
<li class="r2">
|
151
185
|
<span class='object_link'>
|
152
186
|
<span class="pre">Given</span>
|
153
|
-
<a href="requirements/step_transformers.html#
|
187
|
+
<a href="requirements/step_transformers.html#step_definition10-stepdefinition" title="/^I am a rest client$/">
|
154
188
|
<span class="name">/^I am a rest client$/</span>
|
155
189
|
</a>
|
156
190
|
</span>
|
157
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
191
|
+
<small>features/step_definitions/rest_client_steps.rb:41</small>
|
158
192
|
</li>
|
159
193
|
|
160
194
|
|
161
195
|
<li class="r1">
|
162
196
|
<span class='object_link'>
|
163
197
|
<span class="pre">When</span>
|
164
|
-
<a href="requirements/step_transformers.html#
|
198
|
+
<a href="requirements/step_transformers.html#step_definition11-stepdefinition" title="/^I "(GET|DELETE)" from the web service$/">
|
165
199
|
<span class="name">/^I "(GET|DELETE)" from the web service$/</span>
|
166
200
|
</a>
|
167
201
|
</span>
|
168
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
202
|
+
<small>features/step_definitions/rest_client_steps.rb:45</small>
|
169
203
|
</li>
|
170
204
|
|
171
205
|
|
172
206
|
<li class="r2">
|
173
207
|
<span class='object_link'>
|
174
208
|
<span class="pre">When</span>
|
175
|
-
<a href="requirements/step_transformers.html#
|
209
|
+
<a href="requirements/step_transformers.html#step_definition12-stepdefinition" title="/^I "(PUT|POST)" to the web service with the following$/">
|
176
210
|
<span class="name">/^I "(PUT|POST)" to the web service with the following$/</span>
|
177
211
|
</a>
|
178
212
|
</span>
|
179
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
213
|
+
<small>features/step_definitions/rest_client_steps.rb:54</small>
|
180
214
|
</li>
|
181
215
|
|
182
216
|
|
183
217
|
<li class="r1">
|
184
218
|
<span class='object_link'>
|
185
219
|
<span class="pre">When</span>
|
186
|
-
<a href="requirements/step_transformers.html#
|
187
|
-
<span class="name">/^I
|
220
|
+
<a href="requirements/step_transformers.html#step_definition13-stepdefinition" title="/^I "GET" from the web service with the parameters$/">
|
221
|
+
<span class="name">/^I "GET" from the web service with the parameters$/</span>
|
188
222
|
</a>
|
189
223
|
</span>
|
190
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
224
|
+
<small>features/step_definitions/rest_client_steps.rb:65</small>
|
191
225
|
</li>
|
192
226
|
|
193
227
|
|
194
228
|
<li class="r2">
|
195
229
|
<span class='object_link'>
|
196
|
-
<span class="pre">
|
197
|
-
<a href="requirements/step_transformers.html#
|
198
|
-
<span class="name">/^I
|
230
|
+
<span class="pre">When</span>
|
231
|
+
<a href="requirements/step_transformers.html#step_definition14-stepdefinition" title="/^I pause$/">
|
232
|
+
<span class="name">/^I pause$/</span>
|
199
233
|
</a>
|
200
234
|
</span>
|
201
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
235
|
+
<small>features/step_definitions/rest_client_steps.rb:69</small>
|
202
236
|
</li>
|
203
237
|
|
204
238
|
|
205
239
|
<li class="r1">
|
206
240
|
<span class='object_link'>
|
207
241
|
<span class="pre">Then</span>
|
208
|
-
<a href="requirements/step_transformers.html#
|
209
|
-
<span class="name">/^I receive the
|
242
|
+
<a href="requirements/step_transformers.html#step_definition15-stepdefinition" title="/^I receive the expected message$/">
|
243
|
+
<span class="name">/^I receive the expected message$/</span>
|
210
244
|
</a>
|
211
245
|
</span>
|
212
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
246
|
+
<small>features/step_definitions/rest_client_steps.rb:73</small>
|
213
247
|
</li>
|
214
248
|
|
215
249
|
|
216
250
|
<li class="r2">
|
217
251
|
<span class='object_link'>
|
218
252
|
<span class="pre">Then</span>
|
219
|
-
<a href="requirements/step_transformers.html#
|
220
|
-
<span class="name">/^
|
253
|
+
<a href="requirements/step_transformers.html#step_definition16-stepdefinition" title="/^I receive a message with "([^"]*)"$/">
|
254
|
+
<span class="name">/^I receive a message with "([^"]*)"$/</span>
|
221
255
|
</a>
|
222
256
|
</span>
|
223
|
-
<small>features/step_definitions/rest_client_steps.rb:
|
257
|
+
<small>features/step_definitions/rest_client_steps.rb:78</small>
|
224
258
|
</li>
|
225
259
|
|
226
260
|
|
data/doc/tag_list.html
CHANGED
@@ -20,7 +20,11 @@
|
|
20
20
|
</head>
|
21
21
|
<body>
|
22
22
|
<script type="text/javascript" charset="utf-8">
|
23
|
-
|
23
|
+
var hasFrames = false;
|
24
|
+
try {
|
25
|
+
hasFrames = window.top.frames.main ? true : false;
|
26
|
+
} catch (e) { }
|
27
|
+
if (hasFrames) {
|
24
28
|
document.getElementById('base_target').target = 'main';
|
25
29
|
document.body.className = 'frames';
|
26
30
|
}
|
@@ -84,13 +88,13 @@
|
|
84
88
|
|
85
89
|
|
86
90
|
<li class="r1">
|
87
|
-
<span class='object_link'><a href="requirements/tags/
|
91
|
+
<span class='object_link'><a href="requirements/tags/core.html" title="requirements::tags::core (tag)">@core</a></span>
|
88
92
|
<small>4</small>
|
89
93
|
</li>
|
90
94
|
|
91
95
|
|
92
96
|
<li class="r2">
|
93
|
-
<span class='object_link'><a href="requirements/tags/
|
97
|
+
<span class='object_link'><a href="requirements/tags/print.html" title="requirements::tags::print (tag)">@print</a></span>
|
94
98
|
<small>4</small>
|
95
99
|
</li>
|
96
100
|
|
@@ -108,7 +112,7 @@
|
|
108
112
|
|
109
113
|
|
110
114
|
<li class="r1">
|
111
|
-
<span class='object_link'><a href="requirements/tags/
|
115
|
+
<span class='object_link'><a href="requirements/tags/authentication.html" title="requirements::tags::authentication (tag)">@authentication</a></span>
|
112
116
|
<small>2</small>
|
113
117
|
</li>
|
114
118
|
|
@@ -120,8 +124,98 @@
|
|
120
124
|
|
121
125
|
|
122
126
|
<li class="r1">
|
123
|
-
<span class='object_link'><a href="requirements/tags/
|
124
|
-
<small>
|
127
|
+
<span class='object_link'><a href="requirements/tags/print.S2.html" title="requirements::tags::print.S2 (tag)">@print.S2</a></span>
|
128
|
+
<small>1</small>
|
129
|
+
</li>
|
130
|
+
|
131
|
+
|
132
|
+
<li class="r2">
|
133
|
+
<span class='object_link'><a href="requirements/tags/parameter.html" title="requirements::tags::parameter (tag)">@parameter</a></span>
|
134
|
+
<small>1</small>
|
135
|
+
</li>
|
136
|
+
|
137
|
+
|
138
|
+
<li class="r1">
|
139
|
+
<span class='object_link'><a href="requirements/tags/parameter.S1.html" title="requirements::tags::parameter.S1 (tag)">@parameter.S1</a></span>
|
140
|
+
<small>1</small>
|
141
|
+
</li>
|
142
|
+
|
143
|
+
|
144
|
+
<li class="r2">
|
145
|
+
<span class='object_link'><a href="requirements/tags/rest.S1.html" title="requirements::tags::rest.S1 (tag)">@rest.S1</a></span>
|
146
|
+
<small>1</small>
|
147
|
+
</li>
|
148
|
+
|
149
|
+
|
150
|
+
<li class="r1">
|
151
|
+
<span class='object_link'><a href="requirements/tags/rest.S3.html" title="requirements::tags::rest.S3 (tag)">@rest.S3</a></span>
|
152
|
+
<small>1</small>
|
153
|
+
</li>
|
154
|
+
|
155
|
+
|
156
|
+
<li class="r2">
|
157
|
+
<span class='object_link'><a href="requirements/tags/print.S1.html" title="requirements::tags::print.S1 (tag)">@print.S1</a></span>
|
158
|
+
<small>1</small>
|
159
|
+
</li>
|
160
|
+
|
161
|
+
|
162
|
+
<li class="r1">
|
163
|
+
<span class='object_link'><a href="requirements/tags/rest.S4.html" title="requirements::tags::rest.S4 (tag)">@rest.S4</a></span>
|
164
|
+
<small>1</small>
|
165
|
+
</li>
|
166
|
+
|
167
|
+
|
168
|
+
<li class="r2">
|
169
|
+
<span class='object_link'><a href="requirements/tags/print.S3.html" title="requirements::tags::print.S3 (tag)">@print.S3</a></span>
|
170
|
+
<small>1</small>
|
171
|
+
</li>
|
172
|
+
|
173
|
+
|
174
|
+
<li class="r1">
|
175
|
+
<span class='object_link'><a href="requirements/tags/print.S4.html" title="requirements::tags::print.S4 (tag)">@print.S4</a></span>
|
176
|
+
<small>1</small>
|
177
|
+
</li>
|
178
|
+
|
179
|
+
|
180
|
+
<li class="r2">
|
181
|
+
<span class='object_link'><a href="requirements/tags/header.html" title="requirements::tags::header (tag)">@header</a></span>
|
182
|
+
<small>1</small>
|
183
|
+
</li>
|
184
|
+
|
185
|
+
|
186
|
+
<li class="r1">
|
187
|
+
<span class='object_link'><a href="requirements/tags/header.S1.html" title="requirements::tags::header.S1 (tag)">@header.S1</a></span>
|
188
|
+
<small>1</small>
|
189
|
+
</li>
|
190
|
+
|
191
|
+
|
192
|
+
<li class="r2">
|
193
|
+
<span class='object_link'><a href="requirements/tags/headers.html" title="requirements::tags::headers (tag)">@headers</a></span>
|
194
|
+
<small>1</small>
|
195
|
+
</li>
|
196
|
+
|
197
|
+
|
198
|
+
<li class="r1">
|
199
|
+
<span class='object_link'><a href="requirements/tags/header.S2.html" title="requirements::tags::header.S2 (tag)">@header.S2</a></span>
|
200
|
+
<small>1</small>
|
201
|
+
</li>
|
202
|
+
|
203
|
+
|
204
|
+
<li class="r2">
|
205
|
+
<span class='object_link'><a href="requirements/tags/rest.S2.html" title="requirements::tags::rest.S2 (tag)">@rest.S2</a></span>
|
206
|
+
<small>1</small>
|
207
|
+
</li>
|
208
|
+
|
209
|
+
|
210
|
+
<li class="r1">
|
211
|
+
<span class='object_link'><a href="requirements/tags/header.S3.html" title="requirements::tags::header.S3 (tag)">@header.S3</a></span>
|
212
|
+
<small>1</small>
|
213
|
+
</li>
|
214
|
+
|
215
|
+
|
216
|
+
<li class="r2">
|
217
|
+
<span class='object_link'><a href="requirements/tags/header.S4.html" title="requirements::tags::header.S4 (tag)">@header.S4</a></span>
|
218
|
+
<small>1</small>
|
125
219
|
</li>
|
126
220
|
|
127
221
|
|
@@ -6,7 +6,7 @@
|
|
6
6
|
<title>
|
7
7
|
Top Level Namespace
|
8
8
|
|
9
|
-
— Documentation by YARD 0.8.7
|
9
|
+
— Documentation by YARD 0.8.7.6
|
10
10
|
|
11
11
|
</title>
|
12
12
|
|
@@ -19,7 +19,7 @@
|
|
19
19
|
<script type="text/javascript" charset="utf-8">
|
20
20
|
hasFrames = window.top.frames.main ? true : false;
|
21
21
|
relpath = '';
|
22
|
-
framesUrl = "frames.html#!"
|
22
|
+
framesUrl = "frames.html#!top-level-namespace.html";
|
23
23
|
</script>
|
24
24
|
|
25
25
|
|
@@ -105,7 +105,7 @@
|
|
105
105
|
|
106
106
|
|
107
107
|
<dt class="r1">Includes:</dt>
|
108
|
-
<dd class="r1"
|
108
|
+
<dd class="r1"><span class='object_link'><a href="RestBaby.html" title="RestBaby (module)">RestBaby</a></span>, WebMock::API</dd>
|
109
109
|
|
110
110
|
|
111
111
|
|
@@ -122,7 +122,7 @@
|
|
122
122
|
|
123
123
|
|
124
124
|
|
125
|
-
<strong class="classes">Classes:</strong> <span class='object_link'><a href="MockRestService.html" title="MockRestService (class)">MockRestService</a></span
|
125
|
+
<strong class="classes">Classes:</strong> <span class='object_link'><a href="MockRestService.html" title="MockRestService (class)">MockRestService</a></span>
|
126
126
|
|
127
127
|
|
128
128
|
</p>
|
@@ -131,10 +131,15 @@
|
|
131
131
|
|
132
132
|
<dl class="constants">
|
133
133
|
|
134
|
-
<dt id="
|
134
|
+
<dt id="DEFAULT_MSG-constant" class="">DEFAULT_MSG =
|
135
135
|
|
136
136
|
</dt>
|
137
|
-
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'
|
137
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>{"Answer": "What did you expect?"}</span><span class='tstring_end'>'</span></span></pre></dd>
|
138
|
+
|
139
|
+
<dt id="DEFAULT_RESPONSE-constant" class="">DEFAULT_RESPONSE =
|
140
|
+
|
141
|
+
</dt>
|
142
|
+
<dd><pre class="code"><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>{"Question": "What is the meaning of life?"}</span><span class='tstring_end'>'</span></span></pre></dd>
|
138
143
|
|
139
144
|
</dl>
|
140
145
|
|
@@ -162,7 +167,7 @@
|
|
162
167
|
<li class="public ">
|
163
168
|
<span class="summary_signature">
|
164
169
|
|
165
|
-
<a href="#
|
170
|
+
<a href="top-level-namespace.html#create_get-instance_method" title="#create_get (instance method)">- (Object) <strong>create_get</strong>(path, message = DEFAULT_MSG) </a>
|
166
171
|
|
167
172
|
|
168
173
|
|
@@ -181,11 +186,32 @@
|
|
181
186
|
</li>
|
182
187
|
|
183
188
|
|
184
|
-
|
189
|
+
<li class="public ">
|
190
|
+
<span class="summary_signature">
|
191
|
+
|
192
|
+
<a href="top-level-namespace.html#pause-instance_method" title="#pause (instance method)">- (Object) <strong>pause</strong> </a>
|
193
|
+
|
194
|
+
|
195
|
+
|
196
|
+
</span>
|
197
|
+
|
198
|
+
|
199
|
+
|
200
|
+
|
201
|
+
|
202
|
+
|
185
203
|
|
186
204
|
|
205
|
+
|
206
|
+
<span class="summary_desc"><div class='inline'></div></span>
|
207
|
+
|
208
|
+
</li>
|
187
209
|
|
210
|
+
|
211
|
+
</ul>
|
188
212
|
|
213
|
+
|
214
|
+
|
189
215
|
|
190
216
|
|
191
217
|
|
@@ -199,7 +225,47 @@
|
|
199
225
|
|
200
226
|
|
201
227
|
<div class="method_details first">
|
202
|
-
<h3 class="signature first" id="
|
228
|
+
<h3 class="signature first" id="create_get-instance_method">
|
229
|
+
|
230
|
+
- (<tt>Object</tt>) <strong>create_get</strong>(path, message = DEFAULT_MSG)
|
231
|
+
|
232
|
+
|
233
|
+
|
234
|
+
|
235
|
+
|
236
|
+
</h3><table class="source_code">
|
237
|
+
<tr>
|
238
|
+
<td>
|
239
|
+
<pre class="lines">
|
240
|
+
|
241
|
+
|
242
|
+
32
|
243
|
+
33
|
244
|
+
34
|
245
|
+
35
|
246
|
+
36
|
247
|
+
37
|
248
|
+
38
|
249
|
+
39</pre>
|
250
|
+
</td>
|
251
|
+
<td>
|
252
|
+
<pre class="code"><span class="info file"># File 'features/step_definitions/rest_client_steps.rb', line 32</span>
|
253
|
+
|
254
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_create_get'>create_get</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span> <span class='op'>=</span> <span class='const'>DEFAULT_MSG</span><span class='rparen'>)</span>
|
255
|
+
<span class='ivar'>@path</span> <span class='op'>=</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>?</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='lbracket'>[</span><span class='int'>0</span><span class='rbracket'>]</span>
|
256
|
+
<span class='kw'>if</span> <span class='id identifier rubyid_path'>path</span><span class='period'>.</span><span class='id identifier rubyid_split'>split</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>?</span><span class='tstring_end'>'</span></span><span class='rparen'>)</span><span class='period'>.</span><span class='id identifier rubyid_length'>length</span> <span class='op'>==</span> <span class='int'>1</span>
|
257
|
+
<span class='ivar'>@mockservice</span><span class='period'>.</span><span class='id identifier rubyid_store_msg'>store_msg</span><span class='lparen'>(</span><span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>GET</span><span class='tstring_end'>'</span></span><span class='comma'>,</span> <span class='ivar'>@path</span><span class='comma'>,</span> <span class='id identifier rubyid_message'>message</span><span class='period'>.</span><span class='id identifier rubyid_to_s'>to_s</span><span class='rparen'>)</span>
|
258
|
+
<span class='kw'>else</span>
|
259
|
+
<span class='ivar'>@mockservice</span><span class='period'>.</span><span class='id identifier rubyid_store_get_query'>store_get_query</span><span class='lparen'>(</span><span class='id identifier rubyid_path'>path</span><span class='rparen'>)</span>
|
260
|
+
<span class='kw'>end</span>
|
261
|
+
<span class='kw'>end</span></pre>
|
262
|
+
</td>
|
263
|
+
</tr>
|
264
|
+
</table>
|
265
|
+
</div>
|
266
|
+
|
267
|
+
<div class="method_details ">
|
268
|
+
<h3 class="signature " id="pause-instance_method">
|
203
269
|
|
204
270
|
- (<tt>Object</tt>) <strong>pause</strong>
|
205
271
|
|
@@ -221,8 +287,8 @@
|
|
221
287
|
<td>
|
222
288
|
<pre class="code"><span class="info file"># File 'features/support/utility.rb', line 1</span>
|
223
289
|
|
224
|
-
<span class='kw'>def</span> <span class='id identifier rubyid_pause'>pause</span
|
225
|
-
|
290
|
+
<span class='kw'>def</span> <span class='id identifier rubyid_pause'>pause</span>
|
291
|
+
<span class='id identifier rubyid_print'>print</span> <span class='tstring'><span class='tstring_beg'>'</span><span class='tstring_content'>Press Return to continue...</span><span class='tstring_end'>'</span></span>
|
226
292
|
<span class='const'>STDIN</span><span class='period'>.</span><span class='id identifier rubyid_getc'>getc</span>
|
227
293
|
<span class='kw'>end</span></pre>
|
228
294
|
</td>
|
@@ -235,9 +301,9 @@
|
|
235
301
|
</div>
|
236
302
|
|
237
303
|
<div id="footer">
|
238
|
-
Generated on
|
304
|
+
Generated on Fri Jul 17 23:52:38 2015 by
|
239
305
|
<a href="http://yardoc.org" title="Yay! A Ruby Documentation Tool" target="_parent">yard</a>
|
240
|
-
0.8.7 (ruby-2.0.0).
|
306
|
+
0.8.7.6 (ruby-2.0.0).
|
241
307
|
</div>
|
242
308
|
|
243
309
|
</body>
|
@@ -32,7 +32,7 @@ end
|
|
32
32
|
def create_get(path, message = DEFAULT_MSG)
|
33
33
|
@path = path.split('?')[0]
|
34
34
|
if path.split('?').length == 1
|
35
|
-
@mockservice.store_msg('GET', @path, message)
|
35
|
+
@mockservice.store_msg('GET', @path, message.to_s)
|
36
36
|
else
|
37
37
|
@mockservice.store_get_query(path)
|
38
38
|
end
|
@@ -71,11 +71,11 @@ When(/^I pause$/) do
|
|
71
71
|
end
|
72
72
|
|
73
73
|
Then(/^I receive the expected message$/) do
|
74
|
-
@response.code.
|
74
|
+
expect(@response.code).to eq('200')
|
75
75
|
expect(@response.body).to eq(DEFAULT_MSG)
|
76
76
|
end
|
77
77
|
|
78
78
|
Then(/^I receive a message with "([^"]*)"$/) do |message|
|
79
|
-
@response.code.
|
80
|
-
@response.body.
|
79
|
+
expect(@response.code).to eq('200')
|
80
|
+
expect(@response.body).to eq(message)
|
81
81
|
end
|
data/lib/rest_baby/version.rb
CHANGED
data/lib/rest_baby.rb
CHANGED
@@ -137,7 +137,7 @@ module RestBaby
|
|
137
137
|
"> Headers:\n"\
|
138
138
|
"#{header_text(request, '> ')}\n"\
|
139
139
|
"> BODY =\n"\
|
140
|
-
"
|
140
|
+
"#{body_text(request['Content-Type'], request.body)}"
|
141
141
|
end
|
142
142
|
|
143
143
|
def print_response(response)
|