lurker 0.6.12 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/.rspec +1 -2
- data/.travis.yml +30 -20
- data/Gemfile +0 -32
- data/README.md +14 -52
- data/Rakefile +3 -3
- data/cucumber.yml +1 -2
- data/features/atom_persistent_within_the_same_type.feature +4 -4
- data/features/controller_nested_schema_scaffolding.feature +7 -10
- data/features/controller_schema_scaffolding.feature +1 -3
- data/features/dereferencing_through_inlining.feature +1 -3
- data/features/html_generation.feature +3 -4
- data/features/minitest.feature +3 -5
- data/features/multidomain_support.feature +5 -6
- data/features/multitype_request_support.feature +1 -3
- data/features/partials.feature +3 -5
- data/features/request_nested_schema_scaffolding.feature +0 -2
- data/features/request_schema_scaffolding.feature +0 -2
- data/features/schema_suffixes.feature +2 -6
- data/features/schema_updating_within_test_suite.feature +2 -6
- data/features/step_definitions/additional_cli_steps.rb +8 -11
- data/features/support/env.rb +50 -10
- data/features/test_endpoint.feature +2 -6
- data/gemfiles/rails_4.gemfile +14 -0
- data/gemfiles/rails_5.gemfile +10 -0
- data/gemfiles/rails_6.gemfile +10 -0
- data/lib/lurker.rb +0 -1
- data/lib/lurker/cli.rb +5 -7
- data/lib/lurker/endpoint.rb +4 -4
- data/lib/lurker/json/concerns/validatable.rb +5 -1
- data/lib/lurker/json/parser.rb +1 -1
- data/lib/lurker/presenters/service_presenter.rb +2 -1
- data/lib/lurker/spec_helper/rspec.rb +0 -4
- data/lib/lurker/spy.rb +3 -1
- data/lib/lurker/templates/public/application.css +3 -3
- data/lib/lurker/templates/public/application.js +13 -2896
- data/lib/lurker/version.rb +1 -1
- data/lurker.gemspec +31 -33
- data/spec/spec_helper.rb +0 -1
- data/tasks/build.rake +5 -3
- data/tasks/generate.rake +25 -15
- data/templates/Dockerfile +26 -0
- data/templates/generate_stuff.rb +59 -26
- data/templates/lurker_app.rb +27 -47
- data/templates/rails4_ruby26_thread_error_fix.rb +20 -0
- metadata +136 -98
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -3
- data/Appraisals +0 -36
- data/gemfiles/rails_32.gemfile +0 -31
- data/gemfiles/rails_40.gemfile +0 -31
- data/gemfiles/rails_41.gemfile +0 -31
- data/gemfiles/rails_42.gemfile +0 -31
- data/lib/lurker/validation_error.rb +0 -4
- data/templates/rails32_http_patch_support.rb +0 -125
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 74bcb914a737099b70ce82f674ad54cfa5c0f1e47745a07f0329d2b681023ebb
|
4
|
+
data.tar.gz: 227765d414c360ae6b1e1312d0c5234bf6e6f30b8d09079b347dcbf8c80e90cf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 90c753d8f6934b63fcff5a9abf62e17e71a1d578d93a9a774cccfa30186d8437f8c40d6adbcda8c24a5bce5105e3c75274292252626193b05a8c6985b5b1ea3f
|
7
|
+
data.tar.gz: 32e85f3c317c41425983bca85a6dd7a53476c1ecb0647897b6897a89f8047fa0419ebd5822f2cdf377d7216b23864ef5178c22f539c5a6e64ab831e8224c0088
|
data/.rspec
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
--
|
2
|
-
--format Fuubar
|
1
|
+
--color
|
data/.travis.yml
CHANGED
@@ -1,21 +1,31 @@
|
|
1
1
|
language: ruby
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
-
|
7
|
-
|
8
|
-
|
9
|
-
rvm
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
2
|
+
dist: xenial
|
3
|
+
group: dev
|
4
|
+
cache: bundler
|
5
|
+
before_install:
|
6
|
+
- if [ $BUNDLER_VERSION ]; then
|
7
|
+
rm -f $(which bundle);
|
8
|
+
rvm @global do gem uninstall bundler --executables --force;
|
9
|
+
rvm @global do gem install bundler --force -v $BUNDLER_VERSION;
|
10
|
+
else
|
11
|
+
gem install bundler --no-document;
|
12
|
+
fi
|
13
|
+
services:
|
14
|
+
- postgresql
|
15
|
+
env:
|
16
|
+
- CUCUMBER_PUBLISH_QUIET=true
|
17
|
+
jobs:
|
18
|
+
fast_finish: true
|
19
|
+
include:
|
20
|
+
- rvm: 2.6.5
|
21
|
+
env: BUNDLER_VERSION=1.17.3 CUCUMBER_PUBLISH_QUIET=true
|
22
|
+
gemfile: gemfiles/rails_4.gemfile
|
23
|
+
- rvm: 2.6.5
|
24
|
+
gemfile: gemfiles/rails_5.gemfile
|
25
|
+
- rvm: 2.6.5
|
26
|
+
gemfile: gemfiles/rails_6.gemfile
|
27
|
+
- rvm: 2.7.0
|
28
|
+
gemfile: gemfiles/rails_5.gemfile
|
29
|
+
- rvm: 2.7.0
|
30
|
+
gemfile: gemfiles/rails_6.gemfile
|
31
|
+
|
data/Gemfile
CHANGED
@@ -1,34 +1,2 @@
|
|
1
1
|
source 'https://rubygems.org'
|
2
2
|
gemspec
|
3
|
-
|
4
|
-
group :development do
|
5
|
-
# tools
|
6
|
-
platforms :mri_20, :mri_21, :mri_22 do
|
7
|
-
gem 'pry-byebug'
|
8
|
-
gem 'pry-stack_explorer'
|
9
|
-
gem 'pry-session'
|
10
|
-
end
|
11
|
-
# rspec --format fuubar
|
12
|
-
gem 'fuubar'
|
13
|
-
# cucumber --format fuubar
|
14
|
-
gem 'fuubar-cucumber'
|
15
|
-
gem 'selenium-webdriver'
|
16
|
-
|
17
|
-
# deploy site
|
18
|
-
gem 'highline'
|
19
|
-
# gem 'coderay', path: '../coderay'
|
20
|
-
|
21
|
-
# multiple rails versions support
|
22
|
-
gem 'appraisal'
|
23
|
-
|
24
|
-
# build template static
|
25
|
-
# run `rake assets:precompile`
|
26
|
-
# to get bundled application.(js|css)
|
27
|
-
gem 'uglifier'
|
28
|
-
gem 'coffee-rails'
|
29
|
-
gem 'bootstrap-sass', '~> 3.3.3'
|
30
|
-
gem 'jquery-rails'
|
31
|
-
gem 'remotipart'
|
32
|
-
gem 'launchy'
|
33
|
-
end
|
34
|
-
|
data/README.md
CHANGED
@@ -3,29 +3,12 @@
|
|
3
3
|
<img align="right" width="94" height="71" src="https://cdn.rawgit.com/razum2um/lurker/master/lurker-bw.svg">
|
4
4
|
|
5
5
|
Generates API schemas, validates code against them and creates a handy web interface for testing the API.
|
6
|
-
|
6
|
+
Tested on on Rails 4, 5, 6 and Ruby >= 2.6
|
7
7
|
|
8
8
|
[![Gem Version][GV img]][Gem Version]
|
9
9
|
[![Build Status][BS img]][Build Status]
|
10
10
|
[![Dependency Status][DS img]][Dependency Status]
|
11
11
|
|
12
|
-
## Installation
|
13
|
-
|
14
|
-
Add my public key:
|
15
|
-
|
16
|
-
gem cert --add <(curl -Ls https://raw.github.com/razum2um/lurker/master/certs/razum2um.pem)
|
17
|
-
|
18
|
-
$ gem install lurker # without key
|
19
|
-
$ gem install lurker -P HighSecurity # secure, with key added
|
20
|
-
|
21
|
-
Or this line to your application's Gemfile:
|
22
|
-
|
23
|
-
gem 'lurker'
|
24
|
-
|
25
|
-
Inject into `test_helper.rb` or `spec_helper.rb`:
|
26
|
-
|
27
|
-
require 'lurker/spec_helper'
|
28
|
-
|
29
12
|
## Usage
|
30
13
|
|
31
14
|
Wrap your integration test code, which does request like this
|
@@ -115,9 +98,10 @@ You can run this to get the demo running locally:
|
|
115
98
|
|
116
99
|
git clone https://github.com/razum2um/lurker.git
|
117
100
|
cd lurker
|
118
|
-
|
119
|
-
bundle
|
120
|
-
|
101
|
+
export BUNDLE_GEMFILE=gemfiles/rails_6.gemfile
|
102
|
+
bundle install
|
103
|
+
rake build_example_docs
|
104
|
+
cd tmp/lurker_app_rails_6
|
121
105
|
bin/rails s
|
122
106
|
|
123
107
|
Lurker supports multiple domains (usually `staging` and `production`) and can be deployed
|
@@ -126,8 +110,7 @@ statically everywhere as well as be served by the current `Rails` instance.
|
|
126
110
|
For example:
|
127
111
|
|
128
112
|
- [Github Pages][demo_app3] is deployed statically; no API endpoint
|
129
|
-
- [Custom domain][demo_app2]
|
130
|
-
- [Heroku][demo_app] HTML is served by unicorn as well as staging api endpoint in `Sandbox` mode
|
113
|
+
- [Custom domain][demo_app2] static + demo api production endpoint (in `Sandbox` mode)
|
131
114
|
|
132
115
|
## Features
|
133
116
|
|
@@ -178,17 +161,12 @@ are increasing notwithstanding ROLLBACK is called. As such:
|
|
178
161
|
[![Inline docs](http://inch-pages.github.io/github/razum2um/lurker.png)](http://inch-pages.github.io/github/razum2um/lurker)
|
179
162
|
[![Stories in Ready](https://badge.waffle.io/razum2um/lurker.png?label=ready&title=Ready&_=1)][waffle]
|
180
163
|
|
181
|
-
I try to use [Waffle][waffle] to develop this gem, if you want to help:
|
182
|
-
|
183
|
-
- look on "Ready" section
|
184
|
-
- drag an issue to "In Progress" and assign to yourself
|
185
|
-
- have fun!
|
186
|
-
|
187
164
|
**NOTE:** to get new version of bundled `bootstrap` or update JS/CSS,
|
188
165
|
don't touch files under `lib/lurker/templates/public` - they are autogenerated
|
189
166
|
and copied to static generated site while `bin/lurker convert`
|
190
167
|
|
191
|
-
|
168
|
+
export BUNDLE_GEMFILE=gemfiles/rails_6.gemfile
|
169
|
+
rake assets:precompile # to build them
|
192
170
|
|
193
171
|
Don't commit `lib/lurker/templates/public/**/*` to avoid conflicts.
|
194
172
|
|
@@ -198,20 +176,6 @@ features in a way to generate **new** relevant `lurker/**/*.json.yml` files
|
|
198
176
|
|
199
177
|
**NOTE:** template partial `submit_form.html.erb` and it's partials is a big `jsx` script for `React`
|
200
178
|
so there are `<label htmlFor` instead of `<label for>` and `<div className` instead of `<div class`
|
201
|
-
|
202
|
-
### Different Rails versions
|
203
|
-
|
204
|
-
We use [`appraisal`](https://github.com/thoughtbot/appraisal) to test the lib with different Rails versions (from 3.2 up to 4.2):
|
205
|
-
|
206
|
-
# run this to install all gems for all the supported rails versions:
|
207
|
-
bundle exec appraisal install
|
208
|
-
|
209
|
-
# then prefix any rake command with `bundle exec appraisal` and rails version
|
210
|
-
bundle exec appraisal rails-42 rake build_example_docs
|
211
|
-
|
212
|
-
Test apps are getting generated into their's directory under `tmp/lurker_app...` prefix. They also use
|
213
|
-
separate databases for each rails version both dev & test env - all prefixed with `lurker_app`
|
214
|
-
|
215
179
|
### Demo app == Testing app
|
216
180
|
|
217
181
|
Currently, the testing application is using PostgreSQL because **the same** testing app is deployed to serve demo purposes.
|
@@ -219,14 +183,12 @@ Currently, the testing application is using PostgreSQL because **the same** test
|
|
219
183
|
This is also the reason not to delete anything under `lurker` directory between feature tests
|
220
184
|
and using **different** API endpoints of the testing app. To run cucumber with clean `lurker` & `public/lurker` directories run:
|
221
185
|
|
222
|
-
CLEAN=1 bundle exec
|
186
|
+
CLEAN=1 export BUNDLE_GEMFILE=gemfiles/rails_6.gemfile bundle exec cucumber features
|
223
187
|
|
224
188
|
Beware while writing your feature tests for PRs.
|
225
189
|
|
226
190
|
## Acknowledgments
|
227
191
|
|
228
|
-
[![Sponsored by Evil Martians](https://evilmartians.com/badges/sponsored-by-evil-martians.svg)](http://evilmartians.com/)
|
229
|
-
|
230
192
|
This gem is quite opinionated and relies on rails - if you're
|
231
193
|
interested in anything else, please take a look at [api_taster][api_taster] or [fdoc][fdoc],
|
232
194
|
This gem is heavily inspired by them. Thanks, @square & @fredwu
|
@@ -234,6 +196,7 @@ This gem is heavily inspired by them. Thanks, @square & @fredwu
|
|
234
196
|
Also thanks to
|
235
197
|
|
236
198
|
- [Andrey Deryabin][aderyabin] for advice
|
199
|
+
- [Evil Martians][evil_martians] initial version sponsors
|
237
200
|
- [React.js][reactjs] for reactive UI
|
238
201
|
- [highlight.js][hljs] for syntax highlighting
|
239
202
|
|
@@ -247,7 +210,7 @@ Also thanks to
|
|
247
210
|
[json_schema]: http://json-schema.org/
|
248
211
|
[json_schema_example]: http://json-schema.org/example2.html
|
249
212
|
[json_schema_book]: http://spacetelescope.github.io/understanding-json-schema/
|
250
|
-
[evil_martians]:
|
213
|
+
[evil_martians]: https://evilmartians.com/
|
251
214
|
[rspec_controller_spec]: https://www.relishapp.com/rspec/rspec-rails/docs/controller-specs
|
252
215
|
[rspec_request_spec]: https://www.relishapp.com/rspec/rspec-rails/docs/request-specs/request-spec
|
253
216
|
[minitest_around]: https://github.com/splattael/minitest-around
|
@@ -261,10 +224,9 @@ Also thanks to
|
|
261
224
|
[suffixes_example]: https://www.relishapp.com/razum2um/lurker/docs/request-schema-suffixes
|
262
225
|
[minitest_example]: https://www.relishapp.com/razum2um/lurker/docs/minitest
|
263
226
|
|
264
|
-
[
|
265
|
-
[
|
266
|
-
[
|
267
|
-
[demo_live]: http://lurker.razum2um.me/lurker/api/v1/users-POST.html
|
227
|
+
[demo_app2]: https://lurker.razum2um.me
|
228
|
+
[demo_app3]: https://razum2um.github.io/lurker/
|
229
|
+
[demo_live]: https://lurker.razum2um.me/lurker/api/v1/users-POST.html
|
268
230
|
[pdf_example]: http://razum2um.github.io/lurker/lurker_demo_application.pdf
|
269
231
|
[partial_example_demo]: http://razum2um.github.io/lurker/api/v1/users/__user_id/repos-POST.html
|
270
232
|
|
data/Rakefile
CHANGED
@@ -23,7 +23,7 @@ RSpec::Core::RakeTask.new(:spec) do |t|
|
|
23
23
|
end
|
24
24
|
|
25
25
|
Cucumber::Rake::Task.new(:cucumber) do |t|
|
26
|
-
t.cucumber_opts = "features --format progress
|
26
|
+
t.cucumber_opts = "features --format progress"
|
27
27
|
end
|
28
28
|
|
29
29
|
task :default => ["clobber:coverage", :spec, :regenerate, :cucumber, 'coveralls:push']
|
@@ -32,8 +32,8 @@ desc 'releases gem & updates docs'
|
|
32
32
|
task :publish do
|
33
33
|
require 'lurker'
|
34
34
|
version = Lurker::VERSION
|
35
|
-
|
36
|
-
Bundler.
|
35
|
+
bundler_method = Bundler.respond_to?(:with_unbundled_env) ? :with_unbundled_env : :with_clean_env
|
36
|
+
Bundler.send(bundler_method) do
|
37
37
|
system "git tag v#{version}"
|
38
38
|
system "relish versions:add razum2um/lurker:#{version}"
|
39
39
|
system "relish push razum2um/lurker:#{version}"
|
data/cucumber.yml
CHANGED
@@ -1,2 +1 @@
|
|
1
|
-
default: --require features --format
|
2
|
-
wip: --require features --tags @wip
|
1
|
+
default: --require features --format progress
|
@@ -59,8 +59,6 @@ Feature: atom persistent within test suite
|
|
59
59
|
Scenario: json schema tests response parameters and keep atom unchanged using "users/update"
|
60
60
|
Given a file named "spec/controllers/api/v2/users_controller_spec.rb" with:
|
61
61
|
"""ruby
|
62
|
-
require "spec_helper"
|
63
|
-
|
64
62
|
describe Api::V2::UsersController, :lurker do
|
65
63
|
render_views
|
66
64
|
|
@@ -69,13 +67,15 @@ Feature: atom persistent within test suite
|
|
69
67
|
end
|
70
68
|
|
71
69
|
it "updates a user surname as string" do
|
72
|
-
|
70
|
+
puts Thread.list.to_a.inspect
|
71
|
+
|
72
|
+
patch :update, params: { id: user.id, user: { surname: 'Marley' } }
|
73
73
|
expect(response).to be_success
|
74
74
|
end
|
75
75
|
end
|
76
76
|
"""
|
77
77
|
|
78
|
-
When I run `bin/rspec spec/controllers/api/v2/users_controller_spec.rb`
|
78
|
+
When I run `bin/rspec -b spec/controllers/api/v2/users_controller_spec.rb`
|
79
79
|
Then the example should pass
|
80
80
|
Then a file named "lurker/api/v2/users/__id-PATCH.json.yml" should exist
|
81
81
|
Then the file "lurker/api/v2/users/__id-PATCH.json.yml" should contain exactly:
|
@@ -5,8 +5,6 @@ Feature: controller nested schema scaffolding
|
|
5
5
|
Scenario: scaffold a json schema for a "repos/index" in a nested controller spec
|
6
6
|
Given a file named "spec/controllers/api/v1/repos_controller_spec.rb" with:
|
7
7
|
"""ruby
|
8
|
-
require "spec_helper"
|
9
|
-
|
10
8
|
describe Api::V1::ReposController, :lurker do
|
11
9
|
render_views
|
12
10
|
|
@@ -18,7 +16,9 @@ Feature: controller nested schema scaffolding
|
|
18
16
|
end
|
19
17
|
|
20
18
|
it "lists all the repos of the user" do
|
21
|
-
|
19
|
+
# rails 4 doesn't stringify values and schema has integers
|
20
|
+
# rails >= 5 have limit as string & proper query_params extension
|
21
|
+
get :index, params: { user_id: user.id, limit: 1, format: 'json' }
|
22
22
|
expect(response).to be_success
|
23
23
|
expect(JSON.parse(response.body).size).to eq 1
|
24
24
|
end
|
@@ -28,7 +28,7 @@ Feature: controller nested schema scaffolding
|
|
28
28
|
When I run `bin/rspec spec/controllers/api/v1/repos_controller_spec.rb`
|
29
29
|
Then the example should pass
|
30
30
|
Then a file named "lurker/api/v1/users/__user_id/repos-GET.json.yml" should exist
|
31
|
-
Then the file "lurker/api/v1/users/__user_id/repos-GET.json.yml" should contain
|
31
|
+
Then the file "lurker/api/v1/users/__user_id/repos-GET.json.yml" should contain:
|
32
32
|
"""yml
|
33
33
|
---
|
34
34
|
description: repo listing
|
@@ -40,9 +40,9 @@ Feature: controller nested schema scaffolding
|
|
40
40
|
required: []
|
41
41
|
properties:
|
42
42
|
limit:
|
43
|
-
|
44
|
-
|
45
|
-
|
43
|
+
"""
|
44
|
+
Then the file "lurker/api/v1/users/__user_id/repos-GET.json.yml" should contain:
|
45
|
+
"""yml
|
46
46
|
responseCodes:
|
47
47
|
- status: 200
|
48
48
|
successful: true
|
@@ -74,8 +74,5 @@ Feature: controller nested schema scaffolding
|
|
74
74
|
controller: api/v1/repos
|
75
75
|
action: index
|
76
76
|
user_id: '1'
|
77
|
-
query_params:
|
78
|
-
limit: 1
|
79
|
-
|
80
77
|
"""
|
81
78
|
|
@@ -7,8 +7,6 @@ Feature: controller schema scaffolding
|
|
7
7
|
Scenario: scaffold a json schema for a "users/show" in controller spec
|
8
8
|
Given a file named "spec/controllers/api/v1/users_controller_spec.rb" with:
|
9
9
|
"""ruby
|
10
|
-
require "spec_helper"
|
11
|
-
|
12
10
|
describe Api::V1::UsersController, :lurker do
|
13
11
|
render_views
|
14
12
|
|
@@ -17,7 +15,7 @@ Feature: controller schema scaffolding
|
|
17
15
|
end
|
18
16
|
|
19
17
|
it "shows user" do
|
20
|
-
get :show, id: user.id, format: 'json'
|
18
|
+
get :show, params: { id: user.id, format: 'json' }
|
21
19
|
expect(response).to be_success
|
22
20
|
end
|
23
21
|
end
|
@@ -55,8 +55,6 @@ Feature: $ref defererencing through inlining
|
|
55
55
|
"""
|
56
56
|
And a file named "spec/controllers/api/v3/users_controller_spec.rb" with:
|
57
57
|
"""ruby
|
58
|
-
require "spec_helper"
|
59
|
-
|
60
58
|
describe Api::V3::UsersController, :lurker do
|
61
59
|
render_views
|
62
60
|
|
@@ -65,7 +63,7 @@ Feature: $ref defererencing through inlining
|
|
65
63
|
end
|
66
64
|
|
67
65
|
it "updates a user surname as string" do
|
68
|
-
patch :update, id: user.id, user: { surname: 'Marley' }
|
66
|
+
patch :update, params: { id: user.id, user: { surname: 'Marley' } }
|
69
67
|
expect(response).to be_success
|
70
68
|
end
|
71
69
|
end
|
@@ -15,8 +15,7 @@ Feature: html generation
|
|
15
15
|
basePath: ''
|
16
16
|
description: ''
|
17
17
|
domains:
|
18
|
-
'
|
19
|
-
'[Real] razum2um.me': 'http://lurker.razum2um.me'
|
18
|
+
'razum2um.me': 'https://lurker.razum2um.me'
|
20
19
|
consumes:
|
21
20
|
- application/x-www-form-urlencoded
|
22
21
|
- application/json
|
@@ -61,8 +60,8 @@ Feature: html generation
|
|
61
60
|
Converting lurker to html
|
62
61
|
using lurker
|
63
62
|
|
64
|
-
|
65
|
-
|
63
|
+
public/lurker/index.html
|
64
|
+
public/lurker/api/v1/users-POST.html
|
66
65
|
"""
|
67
66
|
|
68
67
|
When I go to "/lurker"
|
data/features/minitest.feature
CHANGED
@@ -49,10 +49,8 @@ Feature: minitest
|
|
49
49
|
description: ''
|
50
50
|
responseParameters:
|
51
51
|
description: ''
|
52
|
-
type:
|
53
|
-
|
54
|
-
required: []
|
55
|
-
properties: {}
|
52
|
+
type: boolean
|
53
|
+
example: true
|
56
54
|
extensions:
|
57
55
|
method: DELETE
|
58
56
|
path_info: "/api/v1/users/1/repos/1.json"
|
@@ -112,7 +110,7 @@ Feature: minitest
|
|
112
110
|
assert_equal 1, User.count
|
113
111
|
|
114
112
|
Lurker::Spy.on do
|
115
|
-
patch "/api/v1/users/#{user.id}.json", user: { name: '' }
|
113
|
+
patch "/api/v1/users/#{user.id}.json", params: { user: { name: '' } }
|
116
114
|
end
|
117
115
|
|
118
116
|
assert_equal 200, status
|
@@ -22,8 +22,7 @@ Feature: mutidomain support
|
|
22
22
|
basePath: ''
|
23
23
|
description: ''
|
24
24
|
domains:
|
25
|
-
'
|
26
|
-
'[Real] razum2um.me': 'http://lurker.razum2um.me'
|
25
|
+
'razum2um.me': 'https://lurker.razum2um.me'
|
27
26
|
name: Lurker Demo Application
|
28
27
|
extensions: {}
|
29
28
|
"""
|
@@ -55,14 +54,14 @@ Feature: mutidomain support
|
|
55
54
|
Converting lurker to html
|
56
55
|
using lurker
|
57
56
|
|
58
|
-
|
59
|
-
|
57
|
+
public/lurker/index.html
|
58
|
+
public/lurker/api/v1/users/__id-DELETE.html
|
60
59
|
"""
|
61
60
|
|
62
61
|
When I go to "/lurker/api/v1/users/__id-DELETE.html"
|
63
|
-
When I select "
|
62
|
+
When I select "razum2um.me" hostname
|
64
63
|
Then I should see:
|
65
64
|
"""
|
66
|
-
curl -X DELETE '
|
65
|
+
curl -X DELETE 'https://lurker.razum2um.me/api/v1/users/1'
|
67
66
|
"""
|
68
67
|
|