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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5b9bdbff963854199877b4fbcf1712ef7734a350b305e0fd0e6dc331cf3a3dd4
4
- data.tar.gz: 7e8247e2001ff3dd2cd4caea9a269c25d094c0d718eb7385de417c6873cf6d84
3
+ metadata.gz: 0f0e518996dd248ab2ae4db3fff35867c58ef74810786fa49f7de71218cb45bf
4
+ data.tar.gz: 3885d2a3adbc40da030de0647ab19f5afb0b8d5268f7076988e65f300b2b75a6
5
5
  SHA512:
6
- metadata.gz: a6e4a437cce43bf45cb7f53deec99b8b981af170debac416cd4ac6e835f45b2d12ac3b51f9314c9b7136116585d4401f32a27e5d0f3d24678b9b4b765b363ab9
7
- data.tar.gz: c972f6b00a4bdd8e0f2a3f7a9a117d4d72063bb6f05c8174d75d8e28c1ffbd739a2aa9f422d612110234ec5bb1a20ab254518aa497d2423cd33b9026ac4f2fb3
6
+ metadata.gz: dc95af1ff9d2fa9f593e8198d6b7909e1ae6d9ab364ceee1e33cad60687eac8b4543a9385e700bd3ba5858236f087f94830b863c6d0e9999ffd8065ae510296d
7
+ data.tar.gz: 442a7d980e4b867eaa7f880452058ff9f95754a76c42e3704b59e75d07fd06bf68bf2809c7ed879704ad87120391c24d8d0dd766af0584601e8fb0615737c724
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- lazy_api_doc (0.2.1)
4
+ lazy_api_doc (0.2.2)
5
5
 
6
6
  GEM
7
7
  remote: https://rubygems.org/
@@ -1,3 +1,3 @@
1
1
  module LazyApiDoc
2
- VERSION = "0.2.1".freeze
2
+ VERSION = "0.2.2".freeze
3
3
  end
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.1
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-05-09 00:00:00.000000000 Z
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