rails_api_documentation 0.2.0 → 0.2.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: 2eafaedd7e6a3665cb3f17763d5204a80ec35e84
4
- data.tar.gz: 3b09eb7ddd55e8300a60a0a4514084c8b03a2496
3
+ metadata.gz: f8b8f7b032d883cc5ea4129aea304e1f24fe0461
4
+ data.tar.gz: 3c6ccd6d88e6ea75a21c91ce05fb60d39c07c834
5
5
  SHA512:
6
- metadata.gz: 8aff4ed365764127675f1150047a0ef21f05da820834a77a5459607bb0c7319b60123643f24398cd9003bda449a304ce8de2b094420a51409d321c347970ef17
7
- data.tar.gz: 4d095bb8a1ea783f09820189c7c96544d21e1adf57b6d8a8065b24701fdef752e7cc9461cc755aec682c6fe7849cf29621157580fde4a39c86e149208c5590e6
6
+ metadata.gz: fd89abad36beb60a5769825e8d45e96a9376c8c03c96f438f2625b5a3f82f888aa58d8ee1592fb147c3eb16d17657fcbbfb81d78707c41f1217cfb30c0a6f28e
7
+ data.tar.gz: 72f6539705ebc78f5ff275e76558a814de311e8b960172858d1e0265c88ce7de02a77ed4c967ff875e2e78c69f55d128e499a22a5e715061b555b02ea057b52d
@@ -61,7 +61,7 @@ class RailsApiDoc::Controller::Parameter::Repository::Param
61
61
  super
62
62
  end
63
63
 
64
- def respond_to_missing?(name)
64
+ def respond_to_missing?(name, *)
65
65
  @store.respond_to?(name)
66
66
  end
67
67
 
@@ -1,9 +1,8 @@
1
1
  # author: Vadism Shaveiko <@vshaveyko>
2
2
  # frozen_string_literal: true
3
- require 'action_controller'
4
- require 'action_view'
5
- require 'jquery-rails'
6
- require 'slim'
3
+ require 'jquery-rails' # needed for require in javascript
4
+
5
+ require_relative 'railtie'
7
6
 
8
7
  require_relative 'exception/param_required'
9
8
 
@@ -34,9 +33,4 @@ class RailsApiDoc::Engine < ::Rails::Engine
34
33
  app.config.assets.precompile += %w(application.css application.js api_doc.js rails_api_doc/api_doc.js)
35
34
  end
36
35
 
37
- ActionController::Base.class_eval do
38
- include RailsApiDoc::Controller::StrongParams
39
- extend RailsApiDoc::Controller::Parameter
40
- end
41
-
42
36
  end
@@ -0,0 +1,10 @@
1
+ module RailsApiDoc
2
+ class Railtie < Rails::Railtie
3
+ initializer 'api_doc.controller_additions' do
4
+ ActiveSupport.on_load :action_controller do
5
+ include RailsApiDoc::Controller::StrongParams
6
+ extend RailsApiDoc::Controller::Parameter
7
+ end
8
+ end
9
+ end
10
+ end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
  # author: Vadim Shaveiko <@vshaveyko>
3
3
  module RailsApiDoc
4
- VERSION = '0.2.0'
4
+ VERSION = '0.2.1'
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.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - vs
@@ -174,6 +174,7 @@ files:
174
174
  - lib/rails_api_doc/controller/strong_params.rb
175
175
  - lib/rails_api_doc/engine.rb
176
176
  - lib/rails_api_doc/exception/param_required.rb
177
+ - lib/rails_api_doc/railtie.rb
177
178
  - lib/rails_api_doc/version.rb
178
179
  homepage: https://github.com/vshaveyko/rails_api_doc
179
180
  licenses: