rest-assured 3.0.0 → 3.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
  SHA1:
3
- metadata.gz: d6dbb2567ce9b78bddff115b00f57999052f0bfc
4
- data.tar.gz: 69f443e6bfd47995fd8c1d29a674702f3ebf4e97
3
+ metadata.gz: c8bebfd6fd3857fc85f3d713ada8adb4fd595558
4
+ data.tar.gz: e0451bae7509abb772bf2e80d13be71af79c6241
5
5
  SHA512:
6
- metadata.gz: eaef1f201d5063cc4e7de3f1f827b6be2e24c14c18a4781f904fb1301b4f0814fb67ecdfbaabac13090892d603192b7d1a350505f3787ac2e325adc83f3048c1
7
- data.tar.gz: a1ae1c24692c74ff7fe007e444d2d1bc4f681927375f2b2b6866acd2cf2e71cdc176fac3afa74dd2d723ba055299fa2df9a0180c6a08b9b519696393b1ef650b
6
+ metadata.gz: 8ef30bd005cade9bfc00ec2557d8b79de98306d300d6e00b8ea2db929b532cfd056f4b1fbfe72aebb2b61ac2ce9d75f50776b9867741e9b5b01ed4fccb6a496f
7
+ data.tar.gz: 56d74fd446acf8f62fec9883b6f3188570db77871e704fabdfdaf7e2c82bb173f1607e657421a4cb631120d08ea6cb381df66a295b267837d31c1b5cbbb92bbe
@@ -109,7 +109,7 @@ module RestAssured
109
109
  end
110
110
 
111
111
  router.delete '/doubles/all' do
112
- status Models::Double.delete_all ? 200 : 500
112
+ status Models::Double.destroy_all ? 200 : 500
113
113
  end
114
114
  end
115
115
  end
@@ -67,7 +67,7 @@ module RestAssured
67
67
  end
68
68
 
69
69
  router.delete '/redirects/all' do
70
- status Models::Redirect.delete_all ? 200 : 500
70
+ status Models::Redirect.destroy_all ? 200 : 500
71
71
  end
72
72
  end
73
73
  end
@@ -1,3 +1,3 @@
1
1
  module RestAssured
2
- VERSION = '3.0.0'
2
+ VERSION = '3.0.1'
3
3
  end
@@ -4,12 +4,18 @@ module RestAssured
4
4
  describe 'Double routes' do
5
5
  let :test_double do
6
6
  {
7
- :fullpath => '/api/google?a=5',
8
- :content => 'some awesome content',
9
- :description => 'awesome double',
10
- :verb => 'POST',
11
- :status => '201',
12
- :response_headers => { 'ACCEPT' => 'text/html' }
7
+ :fullpath => '/api/google?a=5',
8
+ :content => 'some awesome content',
9
+ :description => 'awesome double',
10
+ :verb => 'POST',
11
+ :status => '201',
12
+ :response_headers => { 'ACCEPT' => 'text/html' }
13
+ }
14
+ end
15
+
16
+ let :test_request do
17
+ {
18
+ :rack_env => {}
13
19
  }
14
20
  end
15
21
 
@@ -158,6 +164,17 @@ module RestAssured
158
164
  expect(last_response).to be_ok
159
165
  expect(Models::Double.count).to eq(0)
160
166
  end
167
+
168
+ it "deletes associated requests" do
169
+ double = Models::Double.create test_double
170
+
171
+ double.requests.create test_request
172
+
173
+ delete '/doubles/all'
174
+
175
+ expect(last_response).to be_ok
176
+ expect(Models::Request.count).to eq(0)
177
+ end
161
178
  end
162
179
 
163
180
  context 'REST (ActiveResource compatible) json api', :ui => false do
@@ -89,6 +89,15 @@ module RestAssured
89
89
 
90
90
  expect(Models::Redirect.exists?(redirect)).to be_falsey
91
91
  end
92
+
93
+ it "deletes all redirects" do
94
+ Models::Redirect.create redirect
95
+
96
+ delete '/redirects/all'
97
+
98
+ expect(last_response).to be_ok
99
+ expect(Models::Redirect.count).to eq(0)
100
+ end
92
101
  end
93
102
 
94
103
  context 'via api', :ui => false do
metadata CHANGED
@@ -1,135 +1,135 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rest-assured
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Artem Avetisyan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-10-02 00:00:00.000000000 Z
11
+ date: 2018-02-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sinatra
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ">="
17
+ - - '>='
18
18
  - !ruby/object:Gem::Version
19
19
  version: 1.4.0
20
- - - "~>"
20
+ - - ~>
21
21
  - !ruby/object:Gem::Version
22
22
  version: '2.0'
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
- - - ">="
27
+ - - '>='
28
28
  - !ruby/object:Gem::Version
29
29
  version: 1.4.0
30
- - - "~>"
30
+ - - ~>
31
31
  - !ruby/object:Gem::Version
32
32
  version: '2.0'
33
33
  - !ruby/object:Gem::Dependency
34
34
  name: childprocess
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
- - - "~>"
37
+ - - ~>
38
38
  - !ruby/object:Gem::Version
39
39
  version: '0.3'
40
40
  type: :runtime
41
41
  prerelease: false
42
42
  version_requirements: !ruby/object:Gem::Requirement
43
43
  requirements:
44
- - - "~>"
44
+ - - ~>
45
45
  - !ruby/object:Gem::Version
46
46
  version: '0.3'
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: sinatra-flash
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ">="
51
+ - - '>='
52
52
  - !ruby/object:Gem::Version
53
53
  version: '0'
54
54
  type: :runtime
55
55
  prerelease: false
56
56
  version_requirements: !ruby/object:Gem::Requirement
57
57
  requirements:
58
- - - ">="
58
+ - - '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: haml
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
- - - ">="
65
+ - - '>='
66
66
  - !ruby/object:Gem::Version
67
67
  version: '4.0'
68
- - - "~>"
68
+ - - ~>
69
69
  - !ruby/object:Gem::Version
70
70
  version: '5.0'
71
71
  type: :runtime
72
72
  prerelease: false
73
73
  version_requirements: !ruby/object:Gem::Requirement
74
74
  requirements:
75
- - - ">="
75
+ - - '>='
76
76
  - !ruby/object:Gem::Version
77
77
  version: '4.0'
78
- - - "~>"
78
+ - - ~>
79
79
  - !ruby/object:Gem::Version
80
80
  version: '5.0'
81
81
  - !ruby/object:Gem::Dependency
82
82
  name: activerecord
83
83
  requirement: !ruby/object:Gem::Requirement
84
84
  requirements:
85
- - - ">="
85
+ - - '>='
86
86
  - !ruby/object:Gem::Version
87
87
  version: '4.0'
88
- - - "~>"
88
+ - - ~>
89
89
  - !ruby/object:Gem::Version
90
90
  version: '5.0'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - ">="
95
+ - - '>='
96
96
  - !ruby/object:Gem::Version
97
97
  version: '4.0'
98
- - - "~>"
98
+ - - ~>
99
99
  - !ruby/object:Gem::Version
100
100
  version: '5.0'
101
101
  - !ruby/object:Gem::Dependency
102
102
  name: activeresource
103
103
  requirement: !ruby/object:Gem::Requirement
104
104
  requirements:
105
- - - ">="
105
+ - - '>='
106
106
  - !ruby/object:Gem::Version
107
107
  version: '4.0'
108
- - - "~>"
108
+ - - ~>
109
109
  - !ruby/object:Gem::Version
110
110
  version: '5.0'
111
111
  type: :runtime
112
112
  prerelease: false
113
113
  version_requirements: !ruby/object:Gem::Requirement
114
114
  requirements:
115
- - - ">="
115
+ - - '>='
116
116
  - !ruby/object:Gem::Version
117
117
  version: '4.0'
118
- - - "~>"
118
+ - - ~>
119
119
  - !ruby/object:Gem::Version
120
120
  version: '5.0'
121
121
  - !ruby/object:Gem::Dependency
122
122
  name: thin
123
123
  requirement: !ruby/object:Gem::Requirement
124
124
  requirements:
125
- - - "~>"
125
+ - - ~>
126
126
  - !ruby/object:Gem::Version
127
127
  version: '1.6'
128
128
  type: :runtime
129
129
  prerelease: false
130
130
  version_requirements: !ruby/object:Gem::Requirement
131
131
  requirements:
132
- - - "~>"
132
+ - - ~>
133
133
  - !ruby/object:Gem::Version
134
134
  version: '1.6'
135
135
  description:
@@ -141,9 +141,24 @@ extensions: []
141
141
  extra_rdoc_files: []
142
142
  files:
143
143
  - CHANGELOG
144
- - LICENSE
145
144
  - README.markdown
146
- - bin/rest-assured
145
+ - LICENSE
146
+ - lib/rest-assured/api/app_session.rb
147
+ - lib/rest-assured/api/resources.rb
148
+ - lib/rest-assured/api/server.rb
149
+ - lib/rest-assured/api.rb
150
+ - lib/rest-assured/application.rb
151
+ - lib/rest-assured/config.rb
152
+ - lib/rest-assured/models/double.rb
153
+ - lib/rest-assured/models/redirect.rb
154
+ - lib/rest-assured/models/request.rb
155
+ - lib/rest-assured/routes/double.rb
156
+ - lib/rest-assured/routes/redirect.rb
157
+ - lib/rest-assured/routes/response.rb
158
+ - lib/rest-assured/utils/port_explorer.rb
159
+ - lib/rest-assured/version.rb
160
+ - lib/rest-assured.rb
161
+ - lib/sinatra/partials.rb
147
162
  - db/migrate/20110620161740_add_fixtures.rb
148
163
  - db/migrate/20110625155332_add_redirects_table.rb
149
164
  - db/migrate/20110709150645_add_description_to_fixtures.rb
@@ -160,39 +175,6 @@ files:
160
175
  - db/migrate/20170713000515_add_delay_to_doubles.rb
161
176
  - db/migrate/20170818001158_add_pathpattern_to_doubles.rb
162
177
  - db/test.db
163
- - features/command_line_options.feature
164
- - features/rest_api/doubles.feature
165
- - features/rest_api/redirects.feature
166
- - features/ruby_api/create_double.feature
167
- - features/ruby_api/destroy_double.feature
168
- - features/ruby_api/list_doubles.feature
169
- - features/ruby_api/test_server.feature
170
- - features/ruby_api/verify_requests.feature
171
- - features/ruby_api/wait_for_requests.feature
172
- - features/step_definitions/command_line_options_steps.rb
173
- - features/step_definitions/doubles_steps.rb
174
- - features/step_definitions/redirect_rules_steps.rb
175
- - features/step_definitions/ruby_api_steps.rb
176
- - features/support/env.rb
177
- - features/support/world_helpers.rb
178
- - features/web_ui/doubles.feature
179
- - features/web_ui/redirects.feature
180
- - lib/rest-assured.rb
181
- - lib/rest-assured/api.rb
182
- - lib/rest-assured/api/app_session.rb
183
- - lib/rest-assured/api/resources.rb
184
- - lib/rest-assured/api/server.rb
185
- - lib/rest-assured/application.rb
186
- - lib/rest-assured/config.rb
187
- - lib/rest-assured/models/double.rb
188
- - lib/rest-assured/models/redirect.rb
189
- - lib/rest-assured/models/request.rb
190
- - lib/rest-assured/routes/double.rb
191
- - lib/rest-assured/routes/redirect.rb
192
- - lib/rest-assured/routes/response.rb
193
- - lib/rest-assured/utils/port_explorer.rb
194
- - lib/rest-assured/version.rb
195
- - lib/sinatra/partials.rb
196
178
  - public/css/base.css
197
179
  - public/css/grid.inuit.css
198
180
  - public/css/inuit.css
@@ -210,6 +192,17 @@ files:
210
192
  - public/javascript/application.js
211
193
  - public/javascript/jquery.jgrowl_minimized.js
212
194
  - public/javascript/jquery.simulate.drag-sortable.js
195
+ - views/doubles/_form.haml
196
+ - views/doubles/edit.haml
197
+ - views/doubles/index.haml
198
+ - views/doubles/new.haml
199
+ - views/layout.haml
200
+ - views/redirects/_form.haml
201
+ - views/redirects/edit.haml
202
+ - views/redirects/index.haml
203
+ - views/redirects/new.haml
204
+ - ssl/localhost.crt
205
+ - ssl/localhost.key
213
206
  - spec/api/app_session_spec.rb
214
207
  - spec/api/resource_double_spec.rb
215
208
  - spec/api/server_spec.rb
@@ -224,17 +217,24 @@ files:
224
217
  - spec/spec_helper.rb
225
218
  - spec/support/custom_matchers.rb
226
219
  - spec/support/reset-singleton.rb
227
- - ssl/localhost.crt
228
- - ssl/localhost.key
229
- - views/doubles/_form.haml
230
- - views/doubles/edit.haml
231
- - views/doubles/index.haml
232
- - views/doubles/new.haml
233
- - views/layout.haml
234
- - views/redirects/_form.haml
235
- - views/redirects/edit.haml
236
- - views/redirects/index.haml
237
- - views/redirects/new.haml
220
+ - features/command_line_options.feature
221
+ - features/rest_api/doubles.feature
222
+ - features/rest_api/redirects.feature
223
+ - features/ruby_api/create_double.feature
224
+ - features/ruby_api/destroy_double.feature
225
+ - features/ruby_api/list_doubles.feature
226
+ - features/ruby_api/test_server.feature
227
+ - features/ruby_api/verify_requests.feature
228
+ - features/ruby_api/wait_for_requests.feature
229
+ - features/step_definitions/command_line_options_steps.rb
230
+ - features/step_definitions/doubles_steps.rb
231
+ - features/step_definitions/redirect_rules_steps.rb
232
+ - features/step_definitions/ruby_api_steps.rb
233
+ - features/support/env.rb
234
+ - features/support/world_helpers.rb
235
+ - features/web_ui/doubles.feature
236
+ - features/web_ui/redirects.feature
237
+ - bin/rest-assured
238
238
  homepage: https://github.com/artemave/rest-assured
239
239
  licenses: []
240
240
  metadata: {}
@@ -244,17 +244,17 @@ require_paths:
244
244
  - lib
245
245
  required_ruby_version: !ruby/object:Gem::Requirement
246
246
  requirements:
247
- - - ">="
247
+ - - '>='
248
248
  - !ruby/object:Gem::Version
249
249
  version: 2.2.2
250
250
  required_rubygems_version: !ruby/object:Gem::Requirement
251
251
  requirements:
252
- - - ">="
252
+ - - '>='
253
253
  - !ruby/object:Gem::Version
254
254
  version: '0'
255
255
  requirements: []
256
256
  rubyforge_project: rest-assured
257
- rubygems_version: 2.6.11
257
+ rubygems_version: 2.0.14.1
258
258
  signing_key:
259
259
  specification_version: 4
260
260
  summary: Real stubs and spies for HTTP(S) services