apipie-dsl 2.5.0 → 2.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/public/apipie_dsl/javascripts/bundled/bootstrap-collapse.js +70 -41
- data/app/public/apipie_dsl/javascripts/bundled/bootstrap.js +1033 -479
- data/app/public/apipie_dsl/javascripts/bundled/jquery.js +2 -5
- data/app/public/apipie_dsl/stylesheets/bundled/bootstrap-responsive.min.css +9 -12
- data/app/public/apipie_dsl/stylesheets/bundled/bootstrap.min.css +9 -689
- data/app/views/apipie_dsl/apipie_dsls/_method.html.erb +6 -8
- data/lib/apipie_dsl/configuration.rb +10 -0
- data/lib/apipie_dsl/dsl.rb +1 -1
- data/lib/apipie_dsl/version.rb +1 -1
- metadata +6 -6
@@ -6,17 +6,15 @@
|
|
6
6
|
<a href='<%= meth[:doc_url] %><%= link_extension %>'> >>> </a>
|
7
7
|
</div>
|
8
8
|
<div>
|
9
|
-
|
10
|
-
|
9
|
+
<h2>
|
10
|
+
<% (meth[:signature] || [method_signature(meth)]).each do |signature| %>
|
11
11
|
<a href='#description-<%= escaped_method_name(meth[:name], escaping: '_') %>'
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
class='accordion-toggle'
|
13
|
+
data-toggle='collapse'
|
14
|
+
data-parent='#meth-accordion'>
|
15
15
|
<%= signature %>
|
16
16
|
</a>
|
17
|
-
|
18
|
-
<% end %>
|
19
|
-
<h2>
|
17
|
+
<% end %>
|
20
18
|
<% if meth[:deprecated] %>
|
21
19
|
<code>DEPRECATED</code>
|
22
20
|
<% end %>
|
@@ -10,6 +10,7 @@ module ApipieDSL
|
|
10
10
|
:use_cache, :app_info, :help_layout, :rails
|
11
11
|
attr_writer :validate_value, :ignored, :reload_dsl, :default_section,
|
12
12
|
:dsl_classes_matchers, :cache_dir
|
13
|
+
attr_reader :default_class_description
|
13
14
|
|
14
15
|
alias_method :validate?, :validate
|
15
16
|
alias_method :class_full_names?, :class_full_names
|
@@ -50,6 +51,8 @@ module ApipieDSL
|
|
50
51
|
end
|
51
52
|
|
52
53
|
def reload_dsl?
|
54
|
+
return @reload_dsl unless @reload_dsl.nil?
|
55
|
+
|
53
56
|
@reload_dsl = if rails?
|
54
57
|
Rails.env.development?
|
55
58
|
else
|
@@ -62,6 +65,12 @@ module ApipieDSL
|
|
62
65
|
@default_section || @sections.first
|
63
66
|
end
|
64
67
|
|
68
|
+
def default_class_description=(desc_proc)
|
69
|
+
raise ConfigurationError.new('Default class description must be a proc returning a string') unless desc_proc.is_a?(Proc)
|
70
|
+
|
71
|
+
@default_class_description = desc_proc
|
72
|
+
end
|
73
|
+
|
65
74
|
def initialize
|
66
75
|
@markup = ApipieDSL::Markup::RDoc.new
|
67
76
|
@app_name = 'Another DOC'
|
@@ -87,6 +96,7 @@ module ApipieDSL
|
|
87
96
|
@sections = ['all']
|
88
97
|
@default_section = nil
|
89
98
|
@rails = true
|
99
|
+
@reload_dsl = nil
|
90
100
|
end
|
91
101
|
end
|
92
102
|
end
|
data/lib/apipie_dsl/dsl.rb
CHANGED
@@ -466,7 +466,7 @@ module ApipieDSL
|
|
466
466
|
block = proc {} unless block_given?
|
467
467
|
|
468
468
|
delegatee = Delegatee.instance_for(self).with(&block)
|
469
|
-
delegatee.short(options[:desc])
|
469
|
+
delegatee.short(options[:desc] || ApipieDSL.configuration.default_class_description&.call(self))
|
470
470
|
# Don't eval the block, since it will be evaluated after method is defined
|
471
471
|
return if context == :method
|
472
472
|
|
data/lib/apipie_dsl/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: apipie-dsl
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.
|
4
|
+
version: 2.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Oleh Fedorenko
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-10-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -198,7 +198,7 @@ homepage: https://github.com/ofedoren/apipie-dsl
|
|
198
198
|
licenses:
|
199
199
|
- MIT
|
200
200
|
metadata: {}
|
201
|
-
post_install_message:
|
201
|
+
post_install_message:
|
202
202
|
rdoc_options: []
|
203
203
|
require_paths:
|
204
204
|
- lib
|
@@ -213,8 +213,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
|
-
rubygems_version: 3.1.
|
217
|
-
signing_key:
|
216
|
+
rubygems_version: 3.1.6
|
217
|
+
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Ruby DSL documentation tool
|
220
220
|
test_files:
|