apipie-rails 0.5.20 → 0.7.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
  SHA256:
3
- metadata.gz: f03c36e5a39960d1394d5c46fbda7dc5b95394860b31e9850746b35cf54069d2
4
- data.tar.gz: ef86bead84c3da5b9f51f2064ea9572b04c8bc1dc361f82a2c074d6b895ea57b
3
+ metadata.gz: ca6da3e428a5c61d9015882992836106ba91778cda6a833fca9ddced24378ebc
4
+ data.tar.gz: 6268486cd2419034400e32020ed6869cb361ee997ec60f22170b97758b941c00
5
5
  SHA512:
6
- metadata.gz: 0a6fc972abb448496bbed54576bb6afceeda7aa555caa2836134435b6047c9dccd0b0b5f9d4256301ee06954f850fc84e1dee0b8b615428ca3029cb302f4be18
7
- data.tar.gz: 541f09ee30bd58ef7a88da099d68cb095ad3c0e1929bb9fe75d1f41320daf7188161b2bcdfe36a1017e81777f0cf181c1253be4cf53878acf7291f6c3974463f
6
+ metadata.gz: 84ff46aa072d18ae94a7ceb5710c27ee085cfc2662d6da76dcd06457ea966be2b57a23e0d314922dc092ba1ffc786a6c861faaf71411088e3623ad34aa3c080b
7
+ data.tar.gz: 4bf22cb4b69ce75fbe795f21843baf25d4c2c7d545c36923cf884372fae2a0db80b01c52eecb1b9d3a838c137948f5bcb4eea1bf61941d6dc605e97c17bc8057
@@ -16,18 +16,35 @@ jobs:
16
16
  fail-fast: false
17
17
  matrix:
18
18
  ruby:
19
- - 2.7
20
19
  - 2.6
20
+ - 2.7
21
+ - '3.0'
22
+ - 3.1
21
23
  gemfile:
22
- - Gemfile.rails42
24
+ - Gemfile.rails50
25
+ - Gemfile.rails51
23
26
  - Gemfile.rails52 # Min ruby 2.2.2
24
27
  - Gemfile.rails60 # Min ruby 2.5.0
25
28
  - Gemfile.rails61 # Min ruby 2.5.0
26
29
  exclude:
27
- - gemfile: Gemfile.rails42
30
+ - gemfile: Gemfile.rails50
31
+ ruby: 2.7
32
+ - gemfile: Gemfile.rails50
33
+ ruby: '3.0'
34
+ - gemfile: Gemfile.rails50
35
+ ruby: 3.1
36
+ - gemfile: Gemfile.rails51
28
37
  ruby: 2.7
38
+ - gemfile: Gemfile.rails51
39
+ ruby: '3.0'
40
+ - gemfile: Gemfile.rails51
41
+ ruby: 3.1
29
42
  - gemfile: Gemfile.rails52
30
43
  ruby: 2.7
44
+ - gemfile: Gemfile.rails52
45
+ ruby: '3.0'
46
+ - gemfile: Gemfile.rails52
47
+ ruby: 3.1
31
48
 
32
49
  env:
33
50
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
data/CHANGELOG.md CHANGED
@@ -1,5 +1,31 @@
1
1
  Changelog
2
2
  ===========
3
+
4
+ ## [v0.7.1](https://github.com/Apipie/apipie-rails/tree/v0.7.1) (2022-04-06)
5
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.7.0...v0.7.1)
6
+ * Skip extra parameters while validating the keys. [#690](https://github.com/Apipie/apipie-rails/pull/690) (Omkar Joshi)
7
+ * Support defining security mechanisms for Swagger [#711](https://github.com/Apipie/apipie-rails/pull/711) (Dan Leyden)
8
+ * Update boolean handling of false [#749](https://github.com/Apipie/apipie-rails/pull/749) (Colin Bruce)
9
+
10
+ Note: Up until and including v0.6.x, apipie-rails was silently ignoring allow_blank == false on String validation.
11
+ when allow_blank is not specified, it default to false. to allow blank strings, you must specify it as a parameter.
12
+
13
+ Alternatively, if you want to revert to the previous behavior, you can set this configuration option:
14
+ `Apipie.configuration.ignore_allow_blank_false = true`.
15
+
16
+ ## [v0.7.0](https://github.com/Apipie/apipie-rails/tree/v0.7.0) (2022-03-30)
17
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.6.0...v0.7.0)
18
+ * ArgumentError (invalid byte sequence in UTF-8) [#746](https://github.com/Apipie/apipie-rails/pull/746) (David Milanese)
19
+ * Fix allow_blank does not work [#733](https://github.com/Apipie/apipie-rails/pull/733) (CHEN Song)
20
+ * Fix schema generation for param descriptions using the array validator in option [#732](https://github.com/Apipie/apipie-rails/pull/732) (Frank Hock)
21
+ * Remove support for Rails 4 and Ruby <= 2.5 [#747](https://github.com/Apipie/apipie-rails/pull/747) (Mathieu Jobin)
22
+
23
+ ## [v0.6.0](https://github.com/Apipie/apipie-rails/tree/v0.6.0) (2022-03-29)
24
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.20...v0.6.0)
25
+ * Ruby 3.0 fixes [#716](https://github.com/Apipie/apipie-rails/pull/716) (hank-spokeo)
26
+ * only depends on actionpack and activesupport [#741](https://github.com/Apipie/apipie-rails/pull/741) (Mathieu Jobin)
27
+ * language fix, fallback to default locale [#726](https://github.com/Apipie/apipie-rails/pull/726) (Alex Coomans)
28
+
3
29
  ## [v0.5.20](https://github.com/Apipie/apipie-rails/tree/v0.5.20) (2022-03-16)
4
30
  [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.5.19...v0.5.20)
5
31
  * Update rel-eng (Oleh Fedorenko)
data/README.rst CHANGED
@@ -966,6 +966,9 @@ validate_presence
966
966
  validate_key
967
967
  Check the received params to ensure they are defined in the API. (false by default)
968
968
 
969
+ action_on_non_validated_keys
970
+ Either `:raise` or `:skip`. If `validate_key` fails, raise error or delete the non-validated key from the params and log the key (`:raise` by default)
971
+
969
972
  process_params
970
973
  Process and extract the parameter defined from the params of the request
971
974
  to the api_params variable
@@ -1021,6 +1024,10 @@ authorize
1021
1024
  show_all_examples
1022
1025
  Set this to true to set show_in_doc=1 in all recorded examples
1023
1026
 
1027
+ ignore_allow_blank_false
1028
+ `allow_blank: false` was incorrectly ignored up until version 0.6.0, this bug was fixed in 0.7.0
1029
+ if you need the old behavior, set this to true
1030
+
1024
1031
  link_extension
1025
1032
  The extension to use for API pages ('.html' by default). Link extensions
1026
1033
  in static API docs cannot be changed from '.html'.
@@ -1654,6 +1661,18 @@ There are several configuration parameters that determine the structure of the g
1654
1661
  If ``true``: the ``additional-properties: false`` field will not be included in response object descriptions
1655
1662
 
1656
1663
 
1664
+ ``config:swagger_security_definitions``
1665
+ If the API requires authentication, you can specify details of the authentication mechanisms supported as a (Hash) value here.
1666
+ See [https://swagger.io/docs/specification/2-0/authentication/] for details of what values can be specified
1667
+ By default, no security is defined.
1668
+
1669
+ ``config.swagger_global_security``
1670
+ If the API requires authentication, you can specify which of the authentication mechanisms are supported by all API operations as an Array of hashes here.
1671
+ This should be used in conjunction with the mechanisms defined by ``swagger_security_definitions``.
1672
+ See [https://swagger.io/docs/specification/2-0/authentication/] for details of what values can be specified
1673
+ By default, no security is defined.
1674
+
1675
+
1657
1676
  Known limitations of the current implementation
1658
1677
  -------------------------------------------------
1659
1678
  * There is currently no way to document the structure and content-type of the data returned from a method
@@ -1663,6 +1682,7 @@ Known limitations of the current implementation
1663
1682
  * It is not possible to leverage all of the parameter type/format capabilities of swagger
1664
1683
  * Only OpenAPI 2.0 is supported
1665
1684
  * Responses are defined inline and not as a $ref
1685
+ * It is not possible to specify per-operation security requirements (only global)
1666
1686
 
1667
1687
  ====================================
1668
1688
  Dynamic Swagger generation
data/apipie-rails.gemspec CHANGED
@@ -10,13 +10,14 @@ Gem::Specification.new do |s|
10
10
  s.homepage = "http://github.com/Apipie/apipie-rails"
11
11
  s.summary = %q{Rails REST API documentation tool}
12
12
  s.description = %q{Rails REST API documentation tool}
13
- s.required_ruby_version = '>= 2.0.0'
13
+ s.required_ruby_version = '>= 2.6.0'
14
14
 
15
15
  s.files = `git ls-files`.split("\n")
16
16
  s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
17
17
  s.require_paths = ["lib"]
18
18
 
19
- s.add_dependency "rails", ">= 4.1"
19
+ s.add_dependency "actionpack", ">= 5.0"
20
+ s.add_dependency "activesupport", ">= 5.0"
20
21
  s.add_development_dependency "rspec-rails", "~> 3.0"
21
22
  s.add_development_dependency "sqlite3"
22
23
  s.add_development_dependency "minitest"
@@ -100,7 +100,7 @@ module Apipie
100
100
  [:resource, :method, :version].each do |par|
101
101
  if params[par]
102
102
  splitted = params[par].split('.')
103
- if splitted.length > 1 && Apipie.configuration.languages.include?(splitted.last)
103
+ if splitted.length > 1 && (Apipie.configuration.languages.include?(splitted.last) || Apipie.configuration.default_locale == splitted.last)
104
104
  lang = splitted.last
105
105
  params[par].sub!(".#{lang}", '')
106
106
  end
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '..'
4
+
5
+ gem 'actionpack', '~> 5.0.0'
6
+ gem 'activesupport', '~> 5.0.0'
7
+ gem 'mime-types', '~> 2.99.3'
8
+ gem 'rails-controller-testing'
9
+
10
+ gem 'test_engine', path: '../spec/dummy/components/test_engine', group: :test
@@ -0,0 +1,10 @@
1
+ source "https://rubygems.org"
2
+
3
+ gemspec path: '..'
4
+
5
+ gem 'actionpack', '~> 5.1.0'
6
+ gem 'activesupport', '~> 5.1.0'
7
+ gem 'mime-types', '~> 2.99.3'
8
+ gem 'rails-controller-testing'
9
+
10
+ gem 'test_engine', path: '../spec/dummy/components/test_engine', group: :test
@@ -2,7 +2,8 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 5.2.6'
5
+ gem 'actionpack', '~> 5.2.6'
6
+ gem 'activesupport', '~> 5.2.6'
6
7
  gem 'mime-types', '~> 2.99.3'
7
8
  gem 'rails-controller-testing'
8
9
 
@@ -2,9 +2,16 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 6.0.2'
6
- gem 'mime-types', '~> 2.99.3'
5
+ gem 'actionpack', '~> 6.0.4'
6
+ gem 'activesupport', '~> 6.0.4'
7
+ gem 'mime-types', '~> 3.0'
7
8
  gem 'rails-controller-testing'
8
- gem 'rspec-rails', '~> 4.0.2'
9
+ gem 'rspec-rails', '~> 5.0'
10
+
11
+ # net-smtp not included by default in Ruby 3.1
12
+ # Will be fixed by https://github.com/mikel/mail/pull/1439
13
+ if Gem.ruby_version >= Gem::Version.new("3.1.0")
14
+ gem 'net-smtp', require: false
15
+ end
9
16
 
10
17
  gem 'test_engine', path: '../spec/dummy/components/test_engine', group: :test
@@ -2,9 +2,16 @@ source "https://rubygems.org"
2
2
 
3
3
  gemspec path: '..'
4
4
 
5
- gem 'rails', '~> 6.1.1'
6
- gem 'mime-types', '~> 2.99.3'
5
+ gem 'actionpack', '~> 6.1.5'
6
+ gem 'activesupport', '~> 6.1.5'
7
+ gem 'mime-types', '~> 3.0'
7
8
  gem 'rails-controller-testing'
8
- gem 'rspec-rails', '~> 4.0.2'
9
+ gem 'rspec-rails', '~> 5.0'
10
+
11
+ # net-smtp not included by default in Ruby 3.1
12
+ # Will be fixed by https://github.com/mikel/mail/pull/1439
13
+ if Gem.ruby_version >= Gem::Version.new("3.1.0")
14
+ gem 'net-smtp', require: false
15
+ end
9
16
 
10
17
  gem 'test_engine', path: '../spec/dummy/components/test_engine', group: :test
@@ -5,13 +5,14 @@ module Apipie
5
5
  :markup, :disqus_shortname,
6
6
  :api_base_url, :doc_base_url, :required_by_default, :layout,
7
7
  :default_version, :debug, :version_in_url, :namespaced_resources,
8
- :validate, :validate_value, :validate_presence, :validate_key, :authenticate, :doc_path,
8
+ :validate, :validate_value, :validate_presence, :validate_key, :action_on_non_validated_keys, :authenticate, :doc_path,
9
9
  :show_all_examples, :process_params, :update_checksum, :checksum_path,
10
10
  :link_extension, :record, :languages, :translate, :locale, :default_locale,
11
- :persist_show_in_doc, :authorize,
11
+ :persist_show_in_doc, :authorize, :ignore_allow_blank_false,
12
12
  :swagger_include_warning_tags, :swagger_content_type_input, :swagger_json_input_uses_refs,
13
13
  :swagger_suppress_warnings, :swagger_api_host, :swagger_generate_x_computed_id_field,
14
- :swagger_allow_additional_properties_in_response, :swagger_responses_use_refs
14
+ :swagger_allow_additional_properties_in_response, :swagger_responses_use_refs,
15
+ :swagger_security_definitions, :swagger_global_security
15
16
 
16
17
  alias_method :validate?, :validate
17
18
  alias_method :required_by_default?, :required_by_default
@@ -152,6 +153,7 @@ module Apipie
152
153
  @validate_value = true
153
154
  @validate_presence = true
154
155
  @validate_key = false
156
+ @action_on_non_validated_keys = :raise
155
157
  @required_by_default = false
156
158
  @api_base_url = HashWithIndifferentAccess.new
157
159
  @doc_base_url = "/apipie"
@@ -159,6 +161,7 @@ module Apipie
159
161
  @disqus_shortname = nil
160
162
  @default_version = "1.0"
161
163
  @debug = false
164
+ @ignore_allow_blank_false = false
162
165
  @version_in_url = true
163
166
  @namespaced_resources = false
164
167
  @doc_path = "doc"
@@ -181,6 +184,8 @@ module Apipie
181
184
  @swagger_generate_x_computed_id_field = false
182
185
  @swagger_allow_additional_properties_in_response = false
183
186
  @swagger_responses_use_refs = true
187
+ @swagger_security_definitions = {}
188
+ @swagger_global_security = []
184
189
  end
185
190
  end
186
191
  end
@@ -262,7 +262,9 @@ module Apipie
262
262
  if Apipie.configuration.validate_key?
263
263
  params.reject{|k,_| %w[format controller action].include?(k.to_s) }.each_pair do |param, _|
264
264
  # params allowed
265
- raise UnknownParam.new(param) if method_params.select {|_,p| p.name.to_s == param.to_s}.empty?
265
+ if method_params.select {|_,p| p.name.to_s == param.to_s}.empty?
266
+ self.class._apipie_handle_validate_key_error params, param
267
+ end
266
268
  end
267
269
  end
268
270
 
@@ -290,6 +292,15 @@ module Apipie
290
292
  end
291
293
  end
292
294
 
295
+ def _apipie_handle_validate_key_error params, param
296
+ if Apipie.configuration.action_on_non_validated_keys == :raise
297
+ raise UnknownParam, param
298
+ elsif Apipie.configuration.action_on_non_validated_keys == :skip
299
+ params.delete(param)
300
+ Rails.logger.warn(UnknownParam.new(param).to_s)
301
+ end
302
+ end
303
+
293
304
  def _apipie_save_method_params(method, params)
294
305
  @method_params ||= {}
295
306
  @method_params[method] = params
@@ -160,6 +160,7 @@ module Apipie
160
160
  ensure
161
161
  Apipie::Extractor.clean_call_recorder
162
162
  end
163
+ ruby2_keywords :process if respond_to?(:ruby2_keywords, true)
163
164
  end
164
165
  end
165
166
  end
@@ -114,16 +114,20 @@ module Apipie
114
114
  end
115
115
 
116
116
  def validate(value)
117
- return true if @allow_nil && value.nil?
118
- return true if @allow_blank && value.blank?
117
+ return true if allow_nil && value.nil?
118
+ return true if allow_blank && value.blank?
119
119
  value = normalized_value(value)
120
- if (!@allow_nil && value.nil?) || !@validator.valid?(value)
121
- error = @validator.error
120
+ if (!allow_nil && value.nil?) || (blank_forbidden? && value.blank?) || !validator.valid?(value)
121
+ error = validator.error
122
122
  error = ParamError.new(error) unless error.is_a? StandardError
123
123
  raise error
124
124
  end
125
125
  end
126
126
 
127
+ def blank_forbidden?
128
+ !Apipie.configuration.ignore_allow_blank_false && !allow_blank && !validator.is_a?(Validator::BooleanValidator)
129
+ end
130
+
127
131
  def process_value(value)
128
132
  value = normalized_value(value)
129
133
  if @validator.respond_to?(:process_value)
@@ -9,7 +9,9 @@ module Apipie
9
9
 
10
10
  def match?(path)
11
11
  # Replace all null bytes
12
- path = ::Rack::Utils.unescape(path || '').gsub(/\x0/, '')
12
+ path = ::Rack::Utils.unescape(path || '')
13
+ .encode(Encoding::UTF_8, invalid: :replace, replace: '')
14
+ .gsub(/\x0/, '')
13
15
 
14
16
  full_path = path.empty? ? @root : File.join(@root, path)
15
17
  paths = "#{full_path}#{ext}"
@@ -74,6 +74,8 @@ module Apipie
74
74
  paths: {},
75
75
  definitions: {},
76
76
  tags: [],
77
+ securityDefinitions: Apipie.configuration.swagger_security_definitions,
78
+ security: Apipie.configuration.swagger_global_security
77
79
  }
78
80
 
79
81
  if Apipie.configuration.swagger_api_host
@@ -476,6 +478,9 @@ module Apipie
476
478
 
477
479
  if swagger_def[:type] == "array"
478
480
  swagger_def[:items] = {type: "string"}
481
+ enum = param_desc.options.fetch(:in, [])
482
+
483
+ swagger_def[:items][:enum] = enum if enum.any?
479
484
  end
480
485
 
481
486
  if swagger_def[:type] == "enum"
@@ -504,7 +509,8 @@ module Apipie
504
509
  end
505
510
 
506
511
  if !in_schema
507
- swagger_def[:in] = param_desc.options.fetch(:in, @default_value_for_param_in)
512
+ # the "name" and "in" keys can only be set on root parameters (non-nested)
513
+ swagger_def[:in] = @default_value_for_param_in if name.present?
508
514
  swagger_def[:required] = param_desc.required if param_desc.required
509
515
  end
510
516
 
@@ -1,3 +1,3 @@
1
1
  module Apipie
2
- VERSION = "0.5.20"
2
+ VERSION = "0.7.1"
3
3
  end
data/lib/apipie-rails.rb CHANGED
@@ -23,7 +23,3 @@ require "apipie/railtie"
23
23
  require 'apipie/extractor'
24
24
  require "apipie/version"
25
25
  require "apipie/swagger_generator"
26
-
27
- if Rails.version.start_with?("3.0")
28
- warn 'Warning: apipie-rails is not going to support Rails 3.0 anymore in future versions'
29
- end
@@ -47,6 +47,31 @@ describe Apipie::ApipiesController do
47
47
 
48
48
  assert_response :not_found
49
49
  end
50
+
51
+ it "succeeds on method details with a supported language" do
52
+ allow(Apipie.configuration).to receive(:languages).and_return(%w[en es])
53
+
54
+ get :index, :params => { :version => "2.0", :resource => "architectures", :method => "index.es" }
55
+
56
+ assert_response :success
57
+ end
58
+
59
+ it "succeeds on method details with the default language" do
60
+ allow(Apipie.configuration).to receive(:default_locale).and_return("en")
61
+ allow(Apipie.configuration).to receive(:languages).and_return([])
62
+
63
+ get :index, :params => { :version => "2.0", :resource => "architectures", :method => "index.en" }
64
+
65
+ assert_response :success
66
+ end
67
+
68
+ it "returns not_found on a method with an unsupported language" do
69
+ allow(Apipie.configuration).to receive(:languages).and_return(%w[en es])
70
+
71
+ get :index, :params => { :version => "2.0", :resource => "architectures", :method => "index.jp" }
72
+
73
+ assert_response :not_found
74
+ end
50
75
  end
51
76
 
52
77
  describe "reload_controllers" do
@@ -124,6 +124,29 @@ describe UsersController do
124
124
  end
125
125
  end
126
126
 
127
+ context "key validations are enabled and skip on non-validated keys" do
128
+ before do
129
+ Apipie.configuration.validate_value = false
130
+ Apipie.configuration.validate_presence = true
131
+ Apipie.configuration.validate_key = true
132
+ Apipie.configuration.action_on_non_validated_keys = :skip
133
+ end
134
+
135
+ it "should reply to valid request" do
136
+ expect { get :show, :params => { :id => 5, :session => 'secret_hash' }}.not_to raise_error
137
+ assert_response :success
138
+ end
139
+
140
+ it "should delete the param and not fail if an extra parameter is passed." do
141
+ expect { get :show, :params => { :id => 5 , :badparam => 'badfoo', :session => "secret_hash" }}.not_to raise_error
142
+ expect(controller.params.as_json).to eq({"session"=>"secret_hash", "id"=>"5", "controller"=>"users", "action"=>"show"})
143
+ end
144
+
145
+ after do
146
+ Apipie.configuration.action_on_non_validated_keys = :raise
147
+ end
148
+ end
149
+
127
150
  context "presence and value validations are enabled" do
128
151
  before do
129
152
  Apipie.configuration.validate_value = true
@@ -274,6 +274,12 @@ class UsersController < ApplicationController
274
274
  render :plain => 'nothing to see here'
275
275
  end
276
276
 
277
+ api :GET, '/users/in_departments', 'show users from specific departments'
278
+ param :departments, Array, in: ["finance", "operations", "sales", "marketing", "HR"], default_value: ['sales']
279
+ def get_in_departments
280
+ render :plain => 'nothing to see here'
281
+ end
282
+
277
283
  api :GET, '/users/desc_from_file', 'desc from file'
278
284
  document 'users/desc_from_file.md'
279
285
  def desc_from_file
@@ -1,10 +1,7 @@
1
1
  require File.expand_path('../boot', __FILE__)
2
2
 
3
- require "active_model/railtie"
4
- require "active_record/railtie"
5
3
  require "action_controller/railtie"
6
4
  require "action_view/railtie"
7
- require "action_mailer/railtie"
8
5
 
9
6
  Bundler.require
10
7
  require "apipie-rails"
@@ -13,9 +13,6 @@ Dummy::Application.configure do
13
13
  config.consider_all_requests_local = true
14
14
  config.action_controller.perform_caching = false
15
15
 
16
- # Don't care if the mailer can't send
17
- config.action_mailer.raise_delivery_errors = false
18
-
19
16
  # Print deprecation notices to the Rails logger
20
17
  config.active_support.deprecation = :log
21
18
 
@@ -34,9 +34,6 @@ Dummy::Application.configure do
34
34
  # Enable serving of images, stylesheets, and javascripts from an asset server
35
35
  # config.action_controller.asset_host = "http://assets.example.com"
36
36
 
37
- # Disable delivery errors, bad email addresses will be ignored
38
- # config.action_mailer.raise_delivery_errors = false
39
-
40
37
  # Enable threaded mode
41
38
  # config.threadsafe!
42
39
 
@@ -20,11 +20,6 @@ Dummy::Application.configure do
20
20
  # Disable request forgery protection in test environment
21
21
  config.action_controller.allow_forgery_protection = false
22
22
 
23
- # Tell Action Mailer not to deliver emails to the real world.
24
- # The :test delivery method accumulates sent emails in the
25
- # ActionMailer::Base.deliveries array.
26
- config.action_mailer.delivery_method = :test
27
-
28
23
  # Use SQL instead of Active Record's schema dumper when creating the test database.
29
24
  # This is necessary if your schema can't be completely dumped by the schema dumper,
30
25
  # like if you have constraints or database-specific column types
@@ -14,5 +14,12 @@ describe Apipie::FileHandler do
14
14
  it { expect(file_handler.match? path).to be_falsy }
15
15
  it { expect { file_handler.match? path }.to_not raise_error }
16
16
  end
17
+
18
+ context 'when the path contans an invalid byte sequence in UTF-8' do
19
+ let(:path) { "%B6" }
20
+
21
+ it { expect(file_handler.match? path).to be_falsy }
22
+ it { expect { file_handler.match? path }.to_not raise_error }
23
+ end
17
24
  end
18
25
  end
@@ -113,6 +113,74 @@ describe Apipie::ParamDescription do
113
113
 
114
114
  end
115
115
 
116
+ describe 'validate' do
117
+ context 'when allow_blank is ignored, as it was before 0.7.0' do
118
+ before do
119
+ Apipie.configuration.ignore_allow_blank_false = true
120
+ end
121
+
122
+ context 'when the parameter is a boolean' do
123
+ it "should not throw an exception when passed false" do
124
+ expect { Apipie::ParamDescription.new(method_desc, :param, :boolean).validate(false) }.to_not raise_error
125
+ end
126
+
127
+ it "should throw an exception when passed an empty value" do
128
+ expect { Apipie::ParamDescription.new(method_desc, :param, :boolean).validate('') }.to raise_error(Apipie::ParamInvalid)
129
+ end
130
+ end
131
+
132
+ context 'when the parameter is a string' do
133
+ context 'when allow_blank is specified as true' do
134
+ it "should throw an exception when passed an empty value" do
135
+ expect { Apipie::ParamDescription.new(method_desc, :param, String, allow_blank: true).validate('') }.to_not raise_error
136
+ end
137
+ end
138
+ context 'when allow_blank is specified as false' do
139
+ it "should throw an exception when passed an empty value" do
140
+ expect { Apipie::ParamDescription.new(method_desc, :param, String, allow_blank: false).validate('') }.to_not raise_error
141
+ end
142
+ end
143
+ context 'when allow_blank is not specified' do
144
+ it "should throw an exception when passed an empty value" do
145
+ expect { Apipie::ParamDescription.new(method_desc, :param, String).validate('') }.to_not raise_error
146
+ end
147
+ end
148
+ end
149
+
150
+ after do
151
+ Apipie.configuration.ignore_allow_blank_false = false
152
+ end
153
+ end
154
+
155
+ context 'when the parameter is a boolean' do
156
+ it "should not throw an exception when passed false" do
157
+ expect { Apipie::ParamDescription.new(method_desc, :param, :boolean).validate(false) }.to_not raise_error
158
+ end
159
+
160
+ it "should throw an exception when passed an empty value" do
161
+ expect { Apipie::ParamDescription.new(method_desc, :param, :boolean).validate('') }.to raise_error(Apipie::ParamInvalid)
162
+ end
163
+ end
164
+
165
+ context 'when the parameter is a string' do
166
+ context 'when allow_blank is specified as true' do
167
+ it "should throw an exception when passed an empty value" do
168
+ expect { Apipie::ParamDescription.new(method_desc, :param, String, allow_blank: true).validate('') }.to_not raise_error
169
+ end
170
+ end
171
+ context 'when allow_blank is specified as false' do
172
+ it "should throw an exception when passed an empty value" do
173
+ expect { Apipie::ParamDescription.new(method_desc, :param, String, allow_blank: false).validate('') }.to raise_error(Apipie::ParamInvalid)
174
+ end
175
+ end
176
+ context 'when allow_blank is not specified' do
177
+ it "should throw an exception when passed an empty value" do
178
+ expect { Apipie::ParamDescription.new(method_desc, :param, String).validate('') }.to raise_error(Apipie::ParamInvalid)
179
+ end
180
+ end
181
+ end
182
+ end
183
+
116
184
  describe "concern substitution" do
117
185
 
118
186
  let(:concern_dsl_data) { dsl_data.merge(:from_concern => true) }
@@ -51,6 +51,17 @@ describe 'rake tasks' do
51
51
  expect(param[field]).to eq(value)
52
52
  end
53
53
 
54
+ def expect_array_param_def(http_method, path, param_name, value)
55
+ params = apidoc_swagger["paths"][path][http_method]["parameters"]
56
+ param = params.select { |p| p if p["name"] == param_name }[0]
57
+
58
+ expect(param['type']).to eq('array')
59
+ expect(param['items']).to eq(
60
+ 'type' => 'string',
61
+ 'enum' => value
62
+ )
63
+ end
64
+
54
65
  def expect_tags_def(http_method, path, value)
55
66
  params = apidoc_swagger["paths"][path][http_method]["tags"]
56
67
  expect(params).to eq(value)
@@ -119,6 +130,10 @@ describe 'rake tasks' do
119
130
  expect_param_def("get", "/users/by_department", "department", "enum",
120
131
  ["finance", "operations", "sales", "marketing", "HR"])
121
132
 
133
+ expect_param_def("get", "/users/in_departments", "departments", "in", "query")
134
+ expect_array_param_def("get", "/users/in_departments", "departments",
135
+ ["finance", "operations", "sales", "marketing", "HR"])
136
+
122
137
  expect_tags_def("get", "/twitter_example/{id}/followers", %w[twitter_example following index search])
123
138
 
124
139
  end
@@ -10,78 +10,78 @@ RSpec.describe PetsController, :type => :controller do
10
10
  end
11
11
 
12
12
  it "does not raise error when rendered output matches the described response" do
13
- response = get :return_and_validate_expected_response, {format: :json}
13
+ response = get :return_and_validate_expected_response, format: :json
14
14
  expect(response).to match_declared_responses
15
15
  end
16
16
 
17
17
  it "does not raise error when rendered output (array) matches the described response" do
18
- response = get :return_and_validate_expected_array_response, {format: :json}
18
+ response = get :return_and_validate_expected_array_response, format: :json
19
19
  expect(response).to match_declared_responses
20
20
  end
21
21
 
22
22
  it "does not raises error when rendered output includes null in the response" do
23
- response = get :return_and_validate_expected_response_with_null, {format: :json}
23
+ response = get :return_and_validate_expected_response_with_null, format: :json
24
24
  expect(response).to match_declared_responses
25
25
  end
26
26
 
27
27
  it "does not raise error when rendered output includes null (instead of an object) in the response" do
28
- response = get :return_and_validate_expected_response_with_null_object, {format: :json}
28
+ response = get :return_and_validate_expected_response_with_null_object, format: :json
29
29
  expect(response).to match_declared_responses
30
30
  end
31
31
 
32
32
  it "raises error when a response field has the wrong type" do
33
- response = get :return_and_validate_type_mismatch, {format: :json}
33
+ response = get :return_and_validate_type_mismatch, format: :json
34
34
  expect(response).not_to match_declared_responses
35
35
  end
36
36
 
37
37
  it "raises error when a response has a missing field" do
38
- response = get :return_and_validate_missing_field, {format: :json}
38
+ response = get :return_and_validate_missing_field, format: :json
39
39
  expect(response).not_to match_declared_responses
40
40
  end
41
41
 
42
42
  it "raises error when a response has an extra property and 'swagger_allow_additional_properties_in_response' is false" do
43
- response = get :return_and_validate_extra_property, {format: :json}
43
+ response = get :return_and_validate_extra_property, format: :json
44
44
  expect(response).not_to match_declared_responses
45
45
  end
46
46
 
47
47
  it "raises error when a response has is array instead of object" do
48
48
  # note: this action returns HTTP 201, not HTTP 200!
49
- response = get :return_and_validate_unexpected_array_response, {format: :json}
49
+ response = get :return_and_validate_unexpected_array_response, format: :json
50
50
  expect(response).not_to match_declared_responses
51
51
  end
52
52
 
53
53
  it "does not raise error when a response has an extra property and 'swagger_allow_additional_properties_in_response' is true" do
54
54
  Apipie.configuration.swagger_allow_additional_properties_in_response = true
55
- response = get :return_and_validate_extra_property, {format: :json}
55
+ response = get :return_and_validate_extra_property, format: :json
56
56
  expect(response).to match_declared_responses
57
57
  end
58
58
 
59
59
  it "does not raise error when a response has an extra field and 'additional_properties' is specified in the response" do
60
60
  Apipie.configuration.swagger_allow_additional_properties_in_response = false
61
- response = get :return_and_validate_allowed_extra_property, {format: :json}
61
+ response = get :return_and_validate_allowed_extra_property, format: :json
62
62
  expect(response).to match_declared_responses
63
63
  end
64
64
 
65
65
  it "raises error when a response sub-object has an extra field and 'additional_properties' is not specified on it, but specified on the top level of the response" do
66
66
  Apipie.configuration.swagger_allow_additional_properties_in_response = false
67
- response = get :sub_object_invalid_extra_property, {format: :json}
67
+ response = get :sub_object_invalid_extra_property, format: :json
68
68
  expect(response).not_to match_declared_responses
69
69
  end
70
70
 
71
- it "does not rais error when a response sub-object has an extra field and 'additional_properties' is specified on it" do
71
+ it "does not raise error when a response sub-object has an extra field and 'additional_properties' is specified on it" do
72
72
  Apipie.configuration.swagger_allow_additional_properties_in_response = false
73
- response = get :sub_object_allowed_extra_property, {format: :json}
73
+ response = get :sub_object_allowed_extra_property, format: :json
74
74
  expect(response).to match_declared_responses
75
75
  end
76
76
 
77
77
  describe "auto validation" do
78
78
  auto_validate_rendered_views
79
79
  it "raises exception when a response field has the wrong type and auto validation is turned on" do
80
- expect { get :return_and_validate_type_mismatch, {format: :json} }.to raise_error(Apipie::ResponseDoesNotMatchSwaggerSchema)
80
+ expect { get :return_and_validate_type_mismatch, format: :json }.to raise_error(Apipie::ResponseDoesNotMatchSwaggerSchema)
81
81
  end
82
82
 
83
83
  it "does not raise an exception when calling an undocumented method" do
84
- expect { get :undocumented_method, {format: :json} }.not_to raise_error
84
+ expect { get :undocumented_method, format: :json }.not_to raise_error
85
85
  end
86
86
 
87
87
  end
@@ -89,12 +89,12 @@ RSpec.describe PetsController, :type => :controller do
89
89
 
90
90
  describe "with array field" do
91
91
  it "no error for valid response" do
92
- response = get :returns_response_with_valid_array, {format: :json}
92
+ response = get :returns_response_with_valid_array, format: :json
93
93
  expect(response).to match_declared_responses
94
94
  end
95
95
 
96
96
  it "error if type of element in the array is wrong" do
97
- response = get :returns_response_with_invalid_array, {format: :json}
97
+ response = get :returns_response_with_invalid_array, format: :json
98
98
  expect(response).not_to match_declared_responses
99
99
  end
100
100
  end
data/spec/spec_helper.rb CHANGED
@@ -13,7 +13,13 @@ require 'test_engine'
13
13
  module Rails4Compatibility
14
14
  module Testing
15
15
  def process(*args)
16
- compatible_request(*args) { |*new_args| super(*new_args) }
16
+ compatible_request(*args) do |*new_args|
17
+ if Gem.ruby_version < Gem::Version.new('3.0.0')
18
+ super(*new_args)
19
+ else
20
+ super(new_args[0], **new_args[1])
21
+ end
22
+ end
17
23
  end
18
24
 
19
25
  def compatible_request(method, action, hash = {})
metadata CHANGED
@@ -1,30 +1,44 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: apipie-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.20
4
+ version: 0.7.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pavel Pokorny
8
8
  - Ivan Necas
9
- autorequire:
9
+ autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2022-03-16 00:00:00.000000000 Z
12
+ date: 2022-04-07 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
- name: rails
15
+ name: actionpack
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
18
  - - ">="
19
19
  - !ruby/object:Gem::Version
20
- version: '4.1'
20
+ version: '5.0'
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - ">="
26
26
  - !ruby/object:Gem::Version
27
- version: '4.1'
27
+ version: '5.0'
28
+ - !ruby/object:Gem::Dependency
29
+ name: activesupport
30
+ requirement: !ruby/object:Gem::Requirement
31
+ requirements:
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '5.0'
35
+ type: :runtime
36
+ prerelease: false
37
+ version_requirements: !ruby/object:Gem::Requirement
38
+ requirements:
39
+ - - ">="
40
+ - !ruby/object:Gem::Version
41
+ version: '5.0'
28
42
  - !ruby/object:Gem::Dependency
29
43
  name: rspec-rails
30
44
  requirement: !ruby/object:Gem::Requirement
@@ -150,7 +164,6 @@ files:
150
164
  - ".rspec"
151
165
  - APACHE-LICENSE-2.0
152
166
  - CHANGELOG.md
153
- - Gemfile
154
167
  - MIT-LICENSE
155
168
  - NOTICE
156
169
  - PROPOSAL_FOR_RESPONSE_DESCRIPTIONS.md
@@ -197,8 +210,8 @@ files:
197
210
  - config/locales/tr.yml
198
211
  - config/locales/zh-CN.yml
199
212
  - config/locales/zh-TW.yml
200
- - gemfiles/Gemfile.rails42
201
- - gemfiles/Gemfile.rails42.lock
213
+ - gemfiles/Gemfile.rails50
214
+ - gemfiles/Gemfile.rails51
202
215
  - gemfiles/Gemfile.rails52
203
216
  - gemfiles/Gemfile.rails60
204
217
  - gemfiles/Gemfile.rails61
@@ -328,7 +341,7 @@ files:
328
341
  homepage: http://github.com/Apipie/apipie-rails
329
342
  licenses: []
330
343
  metadata: {}
331
- post_install_message:
344
+ post_install_message:
332
345
  rdoc_options: []
333
346
  require_paths:
334
347
  - lib
@@ -336,97 +349,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
336
349
  requirements:
337
350
  - - ">="
338
351
  - !ruby/object:Gem::Version
339
- version: 2.0.0
352
+ version: 2.6.0
340
353
  required_rubygems_version: !ruby/object:Gem::Requirement
341
354
  requirements:
342
355
  - - ">="
343
356
  - !ruby/object:Gem::Version
344
357
  version: '0'
345
358
  requirements: []
346
- rubygems_version: 3.1.2
347
- signing_key:
359
+ rubygems_version: 3.1.6
360
+ signing_key:
348
361
  specification_version: 4
349
362
  summary: Rails REST API documentation tool
350
- test_files:
351
- - spec/controllers/api/v1/architectures_controller_spec.rb
352
- - spec/controllers/api/v2/architectures_controller_spec.rb
353
- - spec/controllers/api/v2/nested/resources_controller_spec.rb
354
- - spec/controllers/apipies_controller_spec.rb
355
- - spec/controllers/concerns_controller_spec.rb
356
- - spec/controllers/extended_controller_spec.rb
357
- - spec/controllers/memes_controller_spec.rb
358
- - spec/controllers/users_controller_spec.rb
359
- - spec/dummy/Rakefile
360
- - spec/dummy/app/controllers/api/base_controller.rb
361
- - spec/dummy/app/controllers/api/v1/architectures_controller.rb
362
- - spec/dummy/app/controllers/api/v1/base_controller.rb
363
- - spec/dummy/app/controllers/api/v2/architectures_controller.rb
364
- - spec/dummy/app/controllers/api/v2/base_controller.rb
365
- - spec/dummy/app/controllers/api/v2/nested/architectures_controller.rb
366
- - spec/dummy/app/controllers/api/v2/nested/resources_controller.rb
367
- - spec/dummy/app/controllers/application_controller.rb
368
- - spec/dummy/app/controllers/concerns/extending_concern.rb
369
- - spec/dummy/app/controllers/concerns/sample_controller.rb
370
- - spec/dummy/app/controllers/concerns_controller.rb
371
- - spec/dummy/app/controllers/extended_controller.rb
372
- - spec/dummy/app/controllers/files_controller.rb
373
- - spec/dummy/app/controllers/overridden_concerns_controller.rb
374
- - spec/dummy/app/controllers/pets_controller.rb
375
- - spec/dummy/app/controllers/pets_using_auto_views_controller.rb
376
- - spec/dummy/app/controllers/pets_using_self_describing_classes_controller.rb
377
- - spec/dummy/app/controllers/tagged_cats_controller.rb
378
- - spec/dummy/app/controllers/tagged_dogs_controller.rb
379
- - spec/dummy/app/controllers/twitter_example_controller.rb
380
- - spec/dummy/app/controllers/users_controller.rb
381
- - spec/dummy/app/views/layouts/application.html.erb
382
- - spec/dummy/components/test_engine/Gemfile
383
- - spec/dummy/components/test_engine/app/controllers/test_engine/application_controller.rb
384
- - spec/dummy/components/test_engine/app/controllers/test_engine/memes_controller.rb
385
- - spec/dummy/components/test_engine/config/routes.rb
386
- - spec/dummy/components/test_engine/db/.gitkeep
387
- - spec/dummy/components/test_engine/lib/test_engine.rb
388
- - spec/dummy/components/test_engine/test_engine.gemspec
389
- - spec/dummy/config.ru
390
- - spec/dummy/config/application.rb
391
- - spec/dummy/config/boot.rb
392
- - spec/dummy/config/database.yml
393
- - spec/dummy/config/environment.rb
394
- - spec/dummy/config/environments/development.rb
395
- - spec/dummy/config/environments/production.rb
396
- - spec/dummy/config/environments/test.rb
397
- - spec/dummy/config/initializers/apipie.rb
398
- - spec/dummy/config/initializers/backtrace_silencers.rb
399
- - spec/dummy/config/initializers/inflections.rb
400
- - spec/dummy/config/initializers/mime_types.rb
401
- - spec/dummy/config/initializers/secret_token.rb
402
- - spec/dummy/config/initializers/session_store.rb
403
- - spec/dummy/config/locales/en.yml
404
- - spec/dummy/config/routes.rb
405
- - spec/dummy/db/.gitkeep
406
- - spec/dummy/doc/apipie_examples.json
407
- - spec/dummy/doc/users/desc_from_file.md
408
- - spec/dummy/public/404.html
409
- - spec/dummy/public/422.html
410
- - spec/dummy/public/500.html
411
- - spec/dummy/public/favicon.ico
412
- - spec/dummy/public/stylesheets/.gitkeep
413
- - spec/dummy/script/rails
414
- - spec/lib/application_spec.rb
415
- - spec/lib/extractor/extractor_spec.rb
416
- - spec/lib/extractor/middleware_spec.rb
417
- - spec/lib/extractor/writer_spec.rb
418
- - spec/lib/file_handler_spec.rb
419
- - spec/lib/method_description_spec.rb
420
- - spec/lib/param_description_spec.rb
421
- - spec/lib/param_group_spec.rb
422
- - spec/lib/rake_spec.rb
423
- - spec/lib/resource_description_spec.rb
424
- - spec/lib/swagger/openapi_2_0_schema.json
425
- - spec/lib/swagger/rake_swagger_spec.rb
426
- - spec/lib/swagger/response_validation_spec.rb
427
- - spec/lib/swagger/swagger_dsl_spec.rb
428
- - spec/lib/validator_spec.rb
429
- - spec/lib/validators/array_validator_spec.rb
430
- - spec/spec_helper.rb
431
- - spec/support/rails-42-ruby-26.rb
432
- - spec/support/rake.rb
363
+ test_files: []
data/Gemfile DELETED
@@ -1 +0,0 @@
1
- ./Gemfile.rails61
@@ -1,14 +0,0 @@
1
- source "https://rubygems.org"
2
-
3
- gemspec path: '..'
4
-
5
- gem 'rails', '~> 4.2.5'
6
- gem 'mime-types', '~> 2.99.3'
7
- gem 'sqlite3', '~> 1.3.6'
8
-
9
- if Gem::Version.new(RUBY_VERSION) < Gem::Version.new('2.1.0')
10
- gem 'nokogiri', '~> 1.6.8'
11
- gem 'rdoc', '~> 4.2.2'
12
- end
13
-
14
- gem 'test_engine', path: '../spec/dummy/components/test_engine', group: :test
@@ -1,160 +0,0 @@
1
- PATH
2
- remote: ../spec/dummy/components/test_engine
3
- specs:
4
- test_engine (0.0.1)
5
-
6
- PATH
7
- remote: ..
8
- specs:
9
- apipie-rails (0.5.19)
10
- rails (>= 4.1)
11
-
12
- GEM
13
- remote: https://rubygems.org/
14
- specs:
15
- RedCloth (4.3.2)
16
- actionmailer (4.2.11.3)
17
- actionpack (= 4.2.11.3)
18
- actionview (= 4.2.11.3)
19
- activejob (= 4.2.11.3)
20
- mail (~> 2.5, >= 2.5.4)
21
- rails-dom-testing (~> 1.0, >= 1.0.5)
22
- actionpack (4.2.11.3)
23
- actionview (= 4.2.11.3)
24
- activesupport (= 4.2.11.3)
25
- rack (~> 1.6)
26
- rack-test (~> 0.6.2)
27
- rails-dom-testing (~> 1.0, >= 1.0.5)
28
- rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (4.2.11.3)
30
- activesupport (= 4.2.11.3)
31
- builder (~> 3.1)
32
- erubis (~> 2.7.0)
33
- rails-dom-testing (~> 1.0, >= 1.0.5)
34
- rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (4.2.11.3)
36
- activesupport (= 4.2.11.3)
37
- globalid (>= 0.3.0)
38
- activemodel (4.2.11.3)
39
- activesupport (= 4.2.11.3)
40
- builder (~> 3.1)
41
- activerecord (4.2.11.3)
42
- activemodel (= 4.2.11.3)
43
- activesupport (= 4.2.11.3)
44
- arel (~> 6.0)
45
- activesupport (4.2.11.3)
46
- i18n (~> 0.7)
47
- minitest (~> 5.1)
48
- thread_safe (~> 0.3, >= 0.3.4)
49
- tzinfo (~> 1.1)
50
- addressable (2.8.0)
51
- public_suffix (>= 2.0.2, < 5.0)
52
- arel (6.0.4)
53
- builder (3.2.4)
54
- concurrent-ruby (1.1.9)
55
- crass (1.0.6)
56
- diff-lcs (1.5.0)
57
- erubis (2.7.0)
58
- globalid (0.4.2)
59
- activesupport (>= 4.2.0)
60
- i18n (0.9.5)
61
- concurrent-ruby (~> 1.0)
62
- json-schema (2.8.1)
63
- addressable (>= 2.4)
64
- loofah (2.13.0)
65
- crass (~> 1.0.2)
66
- nokogiri (>= 1.5.9)
67
- mail (2.7.1)
68
- mini_mime (>= 0.1.1)
69
- maruku (0.7.3)
70
- mime-types (2.99.3)
71
- mini_mime (1.1.2)
72
- mini_portile2 (2.7.1)
73
- minitest (5.15.0)
74
- nokogiri (1.13.1)
75
- mini_portile2 (~> 2.7.0)
76
- racc (~> 1.4)
77
- psych (4.0.3)
78
- stringio
79
- public_suffix (4.0.6)
80
- racc (1.6.0)
81
- rack (1.6.13)
82
- rack-test (0.6.3)
83
- rack (>= 1.0)
84
- rails (4.2.11.3)
85
- actionmailer (= 4.2.11.3)
86
- actionpack (= 4.2.11.3)
87
- actionview (= 4.2.11.3)
88
- activejob (= 4.2.11.3)
89
- activemodel (= 4.2.11.3)
90
- activerecord (= 4.2.11.3)
91
- activesupport (= 4.2.11.3)
92
- bundler (>= 1.3.0, < 2.0)
93
- railties (= 4.2.11.3)
94
- sprockets-rails
95
- rails-deprecated_sanitizer (1.0.4)
96
- activesupport (>= 4.2.0.alpha)
97
- rails-dom-testing (1.0.9)
98
- activesupport (>= 4.2.0, < 5.0)
99
- nokogiri (~> 1.6)
100
- rails-deprecated_sanitizer (>= 1.0.1)
101
- rails-html-sanitizer (1.4.2)
102
- loofah (~> 2.3)
103
- railties (4.2.11.3)
104
- actionpack (= 4.2.11.3)
105
- activesupport (= 4.2.11.3)
106
- rake (>= 0.8.7)
107
- thor (>= 0.18.1, < 2.0)
108
- rake (13.0.6)
109
- rdoc (6.4.0)
110
- psych (>= 4.0.0)
111
- rspec-core (3.9.3)
112
- rspec-support (~> 3.9.3)
113
- rspec-expectations (3.9.4)
114
- diff-lcs (>= 1.2.0, < 2.0)
115
- rspec-support (~> 3.9.0)
116
- rspec-mocks (3.9.1)
117
- diff-lcs (>= 1.2.0, < 2.0)
118
- rspec-support (~> 3.9.0)
119
- rspec-rails (3.9.1)
120
- actionpack (>= 3.0)
121
- activesupport (>= 3.0)
122
- railties (>= 3.0)
123
- rspec-core (~> 3.9.0)
124
- rspec-expectations (~> 3.9.0)
125
- rspec-mocks (~> 3.9.0)
126
- rspec-support (~> 3.9.0)
127
- rspec-support (3.9.4)
128
- sprockets (4.0.2)
129
- concurrent-ruby (~> 1.0)
130
- rack (> 1, < 3)
131
- sprockets-rails (3.2.2)
132
- actionpack (>= 4.0)
133
- activesupport (>= 4.0)
134
- sprockets (>= 3.0.0)
135
- sqlite3 (1.3.13)
136
- stringio (3.0.1)
137
- thor (1.2.1)
138
- thread_safe (0.3.6)
139
- tzinfo (1.2.9)
140
- thread_safe (~> 0.1)
141
-
142
- PLATFORMS
143
- ruby
144
-
145
- DEPENDENCIES
146
- RedCloth
147
- apipie-rails!
148
- json-schema (~> 2.8)
149
- maruku
150
- mime-types (~> 2.99.3)
151
- minitest
152
- rails (~> 4.2.5)
153
- rake
154
- rdoc
155
- rspec-rails (~> 3.0)
156
- sqlite3 (~> 1.3.6)
157
- test_engine!
158
-
159
- BUNDLED WITH
160
- 1.17.3