rails_api_documentation 0.1.2 → 0.1.3

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: 1a49207950a93e5b5cd746c1e0c8b315dc7d6c94
4
- data.tar.gz: e12f0dce8f906738103348b3b5b35c2ea433c8f8
3
+ metadata.gz: b9d56342e45a6d7b01e82bc224038846b82c07be
4
+ data.tar.gz: fff285d3cee6a080078ef38b0a2f92e10ec3fd96
5
5
  SHA512:
6
- metadata.gz: 28f06b3a3c6385f159ac95d4dcc49a5ba6eac1792a843d5801b8d8150c47c569ddb9e347c24c692f9c5a0b15d1e11819dedfb58016f49671feb005acce3931ff
7
- data.tar.gz: 09ff6a7d0872042cc51ac2124b0af0c32fa18bc4132f6ab248d48006231263f49dbf23aab0ad9006b87dfe3584cf70a37c5b81bd1d4334b49762ebde7dd7950f
6
+ metadata.gz: d882032bbbe4b68289e9f0c7941c66e9d713ac9cf64fc72ad1d91477ca344a7e6b2331c09e76a5d30ff0149c59475b9baf2f8a34e5c77510855e5600fef3832d
7
+ data.tar.gz: 06bbd056316f3e6f4eae2ed7763dfcdbc12aed2e7af2161d1c300c8df2c9b0dc9a22216e9e3e58a40d4d917fdaad0f583923b97c41c40fbc7ea9196530646648
@@ -29,9 +29,9 @@ class RailsApiDoc::Controller::Response
29
29
 
30
30
  def action_route(ctrl, action)
31
31
  action_route = @map[ctrl][:routes].detect { |r| r.defaults[:action] == action }
32
- method = action_route.instance_variable_get(:@request_method_match).first.name.split('::').last
32
+ method = action_route.instance_variable_get(:@request_method_match)&.first&.name&.split('::')&.last
33
33
  route = action_route.path.spec.to_s
34
- [method, route].join(' ')
34
+ [method, route].compact.join(' ')
35
35
  end
36
36
 
37
37
  private
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # author: Vadim Shaveiko <@vshaveyko>
3
3
  module RailsApiDoc
4
- VERSION = '0.1.2'
4
+ VERSION = '0.1.3'
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails_api_documentation
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vs