apipie-rails 0.7.1 → 0.8.1

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: ca6da3e428a5c61d9015882992836106ba91778cda6a833fca9ddced24378ebc
4
- data.tar.gz: 6268486cd2419034400e32020ed6869cb361ee997ec60f22170b97758b941c00
3
+ metadata.gz: 551be0cd702443cd00ab6f07e8b5d5d34c7465f32550b55b6e4cd7198d41d274
4
+ data.tar.gz: be966a1768f9839e57c5347bc7c46b40b651cea1c4c5e590feb9c4f365f56ff4
5
5
  SHA512:
6
- metadata.gz: 84ff46aa072d18ae94a7ceb5710c27ee085cfc2662d6da76dcd06457ea966be2b57a23e0d314922dc092ba1ffc786a6c861faaf71411088e3623ad34aa3c080b
7
- data.tar.gz: 4bf22cb4b69ce75fbe795f21843baf25d4c2c7d545c36923cf884372fae2a0db80b01c52eecb1b9d3a838c137948f5bcb4eea1bf61941d6dc605e97c17bc8057
6
+ metadata.gz: 1d2c1845c417378ceda213d9f452efbf33fa4c78926b689866d3559331c495940580dcc34c03840d294bcdb5327c1dd873182c9ea332b081da1b6c7fbf893707
7
+ data.tar.gz: 00f2a6787774e81bdab55b9e2de74cef25cceec92d908353db88ce6c384ec643cd3f3972c95b59232ad0bc03b707f7af12c5699aa1c8b2c0f696306af8100a4c
@@ -26,6 +26,7 @@ jobs:
26
26
  - Gemfile.rails52 # Min ruby 2.2.2
27
27
  - Gemfile.rails60 # Min ruby 2.5.0
28
28
  - Gemfile.rails61 # Min ruby 2.5.0
29
+ - Gemfile.rails70 # Min ruby 2.7.0
29
30
  exclude:
30
31
  - gemfile: Gemfile.rails50
31
32
  ruby: 2.7
@@ -45,6 +46,8 @@ jobs:
45
46
  ruby: '3.0'
46
47
  - gemfile: Gemfile.rails52
47
48
  ruby: 3.1
49
+ - gemfile: Gemfile.rails70
50
+ ruby: 2.6
48
51
 
49
52
  env:
50
53
  BUNDLE_GEMFILE: ${{ github.workspace }}/gemfiles/${{ matrix.gemfile }}
data/CHANGELOG.md CHANGED
@@ -1,6 +1,27 @@
1
1
  Changelog
2
2
  ===========
3
3
 
4
+ Also deleted the `Gemfile` that was now a broken symlink.
5
+ please use `export BUNDLE_GEMFILE='gemfiles/Gemfile.rails61'; bundle exec rspec` to run the test suite
6
+
7
+ ## [v0.8.1](https://github.com/Apipie/apipie-rails/tree/v0.8.1) (2022-05-26)
8
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.8.0...v0.8.1)
9
+ * Remove warning that came back as of [#752](https://github.com/Apipie/apipie-rails/pull/752). [#761](https://github.com/Apipie/apipie-rails/pull/761) (Jorge Santos / Mathieu Jobin)
10
+
11
+ ## [v0.8.0](https://github.com/Apipie/apipie-rails/tree/v0.8.0) (2022-05-24)
12
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.7.2...v0.8.0)
13
+ * Add support for scheme definition in Swagger docs. [#710](https://github.com/Apipie/apipie-rails/pull/710) (Dan Leyden)
14
+ * Add support for Rails 7 [#760](https://github.com/Apipie/apipie-rails/pull/760) (Mathieu Jobin)
15
+ * Clean up code base, removing all trace of unsupported Rails 4.x [#752](https://github.com/Apipie/apipie-rails/pull/752) (Mathieu Jobin)
16
+ * fix: Controller resource set before version [#744](https://github.com/Apipie/apipie-rails/pull/744) (LuukvH)
17
+ * fix: enable swagger generator to add referenced schema for an array of hashes param [#689](https://github.com/Apipie/apipie-rails/pull/689) (Francis San Juan)
18
+
19
+ ## [v0.7.2](https://github.com/Apipie/apipie-rails/tree/v0.7.2) (2022-04-19)
20
+ [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.7.1...v0.7.2)
21
+ * Added Korean locale. [#480](https://github.com/Apipie/apipie-rails/pull/480) (Jaehyun Shin ) [#757](https://github.com/Apipie/apipie-rails/pull/757) (Jorge Santos)
22
+ * `Security` Upgraded Bootstrap from 2.0.2 to 2.3.2, JQuery from 1.11.3 to 1.12.4 [#708](https://github.com/Apipie/apipie-rails/pull/708) (Nicolas Waissbluth)
23
+ * Fix ruby2 keyword argument warning [#756](https://github.com/Apipie/apipie-rails/pull/756) (Jorge Santos)
24
+
4
25
  ## [v0.7.1](https://github.com/Apipie/apipie-rails/tree/v0.7.1) (2022-04-06)
5
26
  [Full Changelog](https://github.com/Apipie/apipie-rails/compare/v0.7.0...v0.7.1)
6
27
  * Skip extra parameters while validating the keys. [#690](https://github.com/Apipie/apipie-rails/pull/690) (Omkar Joshi)
data/README.rst CHANGED
@@ -1660,6 +1660,11 @@ There are several configuration parameters that determine the structure of the g
1660
1660
 
1661
1661
  If ``true``: the ``additional-properties: false`` field will not be included in response object descriptions
1662
1662
 
1663
+ ``config.swagger_schemes``
1664
+ An array of transport schemes that the API supports.
1665
+ This can include any combination of ``http``, ``https``, ``ws`` and ``wss``.
1666
+ By default to encourage good security practices, ``['https']`` is specified.
1667
+
1663
1668
 
1664
1669
  ``config:swagger_security_definitions``
1665
1670
  If the API requires authentication, you can specify details of the authentication mechanisms supported as a (Hash) value here.
@@ -34,7 +34,7 @@ module Apipie
34
34
 
35
35
  @language = get_language
36
36
 
37
- Apipie.load_documentation if Apipie.configuration.reload_controllers? || (Rails.version.to_i >= 4.0 && !Rails.application.config.eager_load)
37
+ Apipie.load_documentation if Apipie.configuration.reload_controllers? || !Rails.application.config.eager_load
38
38
 
39
39
  I18n.locale = @language
40
40
 
@@ -1,8 +1,8 @@
1
1
  /* =============================================================
2
- * bootstrap-collapse.js v2.0.2
3
- * http://twitter.github.com/bootstrap/javascript.html#collapse
2
+ * bootstrap-collapse.js v2.3.2
3
+ * http://getbootstrap.com/2.3.2/javascript.html#collapse
4
4
  * =============================================================
5
- * Copyright 2012 Twitter, Inc.
5
+ * Copyright 2013 Twitter, Inc.
6
6
  *
7
7
  * Licensed under the Apache License, Version 2.0 (the "License");
8
8
  * you may not use this file except in compliance with the License.
@@ -17,16 +17,21 @@
17
17
  * limitations under the License.
18
18
  * ============================================================ */
19
19
 
20
- !function( $ ){
21
20
 
22
- "use strict"
21
+ !function ($) {
23
22
 
24
- var Collapse = function ( element, options ) {
25
- this.$element = $(element)
23
+ "use strict"; // jshint ;_;
24
+
25
+
26
+ /* COLLAPSE PUBLIC CLASS DEFINITION
27
+ * ================================ */
28
+
29
+ var Collapse = function (element, options) {
30
+ this.$element = $(element)
26
31
  this.options = $.extend({}, $.fn.collapse.defaults, options)
27
32
 
28
- if (this.options["parent"]) {
29
- this.$parent = $(this.options["parent"])
33
+ if (this.options.parent) {
34
+ this.$parent = $(this.options.parent)
30
35
  }
31
36
 
32
37
  this.options.toggle && this.toggle()
@@ -42,31 +47,39 @@
42
47
  }
43
48
 
44
49
  , show: function () {
45
- var dimension = this.dimension()
46
- , scroll = $.camelCase(['scroll', dimension].join('-'))
47
- , actives = this.$parent && this.$parent.find('.in')
50
+ var dimension
51
+ , scroll
52
+ , actives
48
53
  , hasData
49
54
 
55
+ if (this.transitioning || this.$element.hasClass('in')) return
56
+
57
+ dimension = this.dimension()
58
+ scroll = $.camelCase(['scroll', dimension].join('-'))
59
+ actives = this.$parent && this.$parent.find('> .accordion-group > .in')
60
+
50
61
  if (actives && actives.length) {
51
62
  hasData = actives.data('collapse')
63
+ if (hasData && hasData.transitioning) return
52
64
  actives.collapse('hide')
53
65
  hasData || actives.data('collapse', null)
54
66
  }
55
67
 
56
68
  this.$element[dimension](0)
57
- this.transition('addClass', 'show', 'shown')
58
- this.$element[dimension](this.$element[0][scroll])
59
-
69
+ this.transition('addClass', $.Event('show'), 'shown')
70
+ $.support.transition && this.$element[dimension](this.$element[0][scroll])
60
71
  }
61
72
 
62
73
  , hide: function () {
63
- var dimension = this.dimension()
74
+ var dimension
75
+ if (this.transitioning || !this.$element.hasClass('in')) return
76
+ dimension = this.dimension()
64
77
  this.reset(this.$element[dimension]())
65
- this.transition('removeClass', 'hide', 'hidden')
78
+ this.transition('removeClass', $.Event('hide'), 'hidden')
66
79
  this.$element[dimension](0)
67
80
  }
68
81
 
69
- , reset: function ( size ) {
82
+ , reset: function (size) {
70
83
  var dimension = this.dimension()
71
84
 
72
85
  this.$element
@@ -74,41 +87,49 @@
74
87
  [dimension](size || 'auto')
75
88
  [0].offsetWidth
76
89
 
77
- this.$element[size ? 'addClass' : 'removeClass']('collapse')
90
+ this.$element[size !== null ? 'addClass' : 'removeClass']('collapse')
78
91
 
79
92
  return this
80
93
  }
81
94
 
82
- , transition: function ( method, startEvent, completeEvent ) {
95
+ , transition: function (method, startEvent, completeEvent) {
83
96
  var that = this
84
97
  , complete = function () {
85
- if (startEvent == 'show') that.reset()
98
+ if (startEvent.type == 'show') that.reset()
99
+ that.transitioning = 0
86
100
  that.$element.trigger(completeEvent)
87
101
  }
88
102
 
89
- this.$element
90
- .trigger(startEvent)
91
- [method]('in')
103
+ this.$element.trigger(startEvent)
104
+
105
+ if (startEvent.isDefaultPrevented()) return
106
+
107
+ this.transitioning = 1
108
+
109
+ this.$element[method]('in')
92
110
 
93
111
  $.support.transition && this.$element.hasClass('collapse') ?
94
112
  this.$element.one($.support.transition.end, complete) :
95
113
  complete()
96
- }
114
+ }
97
115
 
98
116
  , toggle: function () {
99
117
  this[this.$element.hasClass('in') ? 'hide' : 'show']()
100
- }
118
+ }
101
119
 
102
120
  }
103
121
 
104
- /* COLLAPSIBLE PLUGIN DEFINITION
105
- * ============================== */
106
122
 
107
- $.fn.collapse = function ( option ) {
123
+ /* COLLAPSE PLUGIN DEFINITION
124
+ * ========================== */
125
+
126
+ var old = $.fn.collapse
127
+
128
+ $.fn.collapse = function (option) {
108
129
  return this.each(function () {
109
130
  var $this = $(this)
110
131
  , data = $this.data('collapse')
111
- , options = typeof option == 'object' && option
132
+ , options = $.extend({}, $.fn.collapse.defaults, $this.data(), typeof option == 'object' && option)
112
133
  if (!data) $this.data('collapse', (data = new Collapse(this, options)))
113
134
  if (typeof option == 'string') data[option]()
114
135
  })
@@ -121,18 +142,26 @@
121
142
  $.fn.collapse.Constructor = Collapse
122
143
 
123
144
 
124
- /* COLLAPSIBLE DATA-API
145
+ /* COLLAPSE NO CONFLICT
125
146
  * ==================== */
126
147
 
127
- $(function () {
128
- $('body').on('click.collapse.data-api', '[data-toggle=collapse]', function ( e ) {
129
- var $this = $(this), href
130
- , target = $this.attr('data-target')
131
- || e.preventDefault()
132
- || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
133
- , option = $(target).data('collapse') ? 'toggle' : $this.data()
134
- $(target).collapse(option)
135
- })
148
+ $.fn.collapse.noConflict = function () {
149
+ $.fn.collapse = old
150
+ return this
151
+ }
152
+
153
+
154
+ /* COLLAPSE DATA-API
155
+ * ================= */
156
+
157
+ $(document).on('click.collapse.data-api', '[data-toggle=collapse]', function (e) {
158
+ var $this = $(this), href
159
+ , target = $this.attr('data-target')
160
+ || e.preventDefault()
161
+ || (href = $this.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') //strip for ie7
162
+ , option = $(target).data('collapse') ? 'toggle' : $this.data()
163
+ $this[$(target).hasClass('in') ? 'addClass' : 'removeClass']('collapsed')
164
+ $(target).collapse(option)
136
165
  })
137
166
 
138
- }( window.jQuery );
167
+ }(window.jQuery);