lazy_api_doc 0.2.1 → 0.2.2
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/Gemfile.lock +1 -1
- data/lib/lazy_api_doc/version.rb +1 -1
- data/lib/lazy_api_doc.rb +14 -14
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 0f0e518996dd248ab2ae4db3fff35867c58ef74810786fa49f7de71218cb45bf
|
|
4
|
+
data.tar.gz: 3885d2a3adbc40da030de0647ab19f5afb0b8d5268f7076988e65f300b2b75a6
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: dc95af1ff9d2fa9f593e8198d6b7909e1ae6d9ab364ceee1e33cad60687eac8b4543a9385e700bd3ba5858236f087f94830b863c6d0e9999ffd8065ae510296d
|
|
7
|
+
data.tar.gz: 442a7d980e4b867eaa7f880452058ff9f95754a76c42e3704b59e75d07fd06bf68bf2809c7ed879704ad87120391c24d8d0dd766af0584601e8fb0615737c724
|
data/Gemfile.lock
CHANGED
data/lib/lazy_api_doc/version.rb
CHANGED
data/lib/lazy_api_doc.rb
CHANGED
|
@@ -32,16 +32,16 @@ module LazyApiDoc
|
|
|
32
32
|
|
|
33
33
|
def add_spec(rspec_example) # rubocop:disable Metrics/AbcSize
|
|
34
34
|
add(
|
|
35
|
-
'controller' => rspec_example.request.params[:controller],
|
|
36
|
-
'action' => rspec_example.request.params[:action],
|
|
35
|
+
'controller' => rspec_example.instance_variable_get(:@request).params[:controller],
|
|
36
|
+
'action' => rspec_example.instance_variable_get(:@request).params[:action],
|
|
37
37
|
'description' => rspec_example.class.description,
|
|
38
38
|
'source_location' => [rspec_example.class.metadata[:file_path], rspec_example.class.metadata[:line_number]],
|
|
39
|
-
'verb' => rspec_example.request.method,
|
|
40
|
-
'params' => rspec_example.request.params,
|
|
41
|
-
'content_type' => rspec_example.request.content_type.to_s,
|
|
39
|
+
'verb' => rspec_example.instance_variable_get(:@request).method,
|
|
40
|
+
'params' => rspec_example.instance_variable_get(:@request).params,
|
|
41
|
+
'content_type' => rspec_example.instance_variable_get(:@request).content_type.to_s,
|
|
42
42
|
'request' => {
|
|
43
|
-
'query_params' => rspec_example.request.query_parameters,
|
|
44
|
-
'full_path' => rspec_example.request.fullpath
|
|
43
|
+
'query_params' => rspec_example.instance_variable_get(:@request).query_parameters,
|
|
44
|
+
'full_path' => rspec_example.instance_variable_get(:@request).fullpath
|
|
45
45
|
},
|
|
46
46
|
'response' => {
|
|
47
47
|
'code' => rspec_example.response.status,
|
|
@@ -53,16 +53,16 @@ module LazyApiDoc
|
|
|
53
53
|
|
|
54
54
|
def add_test(mini_test_example) # rubocop:disable Metrics/AbcSize
|
|
55
55
|
add(
|
|
56
|
-
'controller' => mini_test_example.request.params[:controller],
|
|
57
|
-
'action' => mini_test_example.request.params[:action],
|
|
56
|
+
'controller' => mini_test_example.instance_variable_get(:@request).params[:controller],
|
|
57
|
+
'action' => mini_test_example.instance_variable_get(:@request).params[:action],
|
|
58
58
|
'description' => mini_test_example.name.gsub(/\Atest_/, '').humanize,
|
|
59
59
|
'source_location' => mini_test_example.method(mini_test_example.name).source_location,
|
|
60
|
-
'verb' => mini_test_example.request.method,
|
|
61
|
-
'params' => mini_test_example.request.params,
|
|
62
|
-
'content_type' => mini_test_example.request.content_type.to_s,
|
|
60
|
+
'verb' => mini_test_example.instance_variable_get(:@request).method,
|
|
61
|
+
'params' => mini_test_example.instance_variable_get(:@request).params,
|
|
62
|
+
'content_type' => mini_test_example.instance_variable_get(:@request).content_type.to_s,
|
|
63
63
|
'request' => {
|
|
64
|
-
'query_params' => mini_test_example.request.query_parameters,
|
|
65
|
-
'full_path' => mini_test_example.request.fullpath
|
|
64
|
+
'query_params' => mini_test_example.instance_variable_get(:@request).query_parameters,
|
|
65
|
+
'full_path' => mini_test_example.instance_variable_get(:@request).fullpath
|
|
66
66
|
},
|
|
67
67
|
'response' => {
|
|
68
68
|
'code' => mini_test_example.response.status,
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lazy_api_doc
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Bogdan Guban
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: exe
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2022-
|
|
11
|
+
date: 2022-06-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies: []
|
|
13
13
|
description: The gem collects all requests and responses from your request specs and
|
|
14
14
|
generates documentationbased on it
|