apipie-dsl 2.4.0 → 2.6.0
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 +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/tasks_utils.rb +2 -1
- data/lib/apipie_dsl/version.rb +1 -1
- metadata +3 -3
@@ -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
|
|
@@ -25,7 +25,8 @@ module ApipieDSL
|
|
25
25
|
layouts_paths.unshift("#{Rails.root}/app/views/layouts")
|
26
26
|
end
|
27
27
|
paths = ActionView::PathSet.new(base_paths + layouts_paths)
|
28
|
-
|
28
|
+
lookup_context = ActionView::LookupContext.new(paths)
|
29
|
+
@renderer = ActionView::Base.with_empty_template_cache.new(lookup_context, {}, nil)
|
29
30
|
@renderer.singleton_class.send(:include, ::ApipieDslHelper)
|
30
31
|
@renderer
|
31
32
|
end
|
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
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
|
@@ -213,7 +213,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
213
213
|
- !ruby/object:Gem::Version
|
214
214
|
version: '0'
|
215
215
|
requirements: []
|
216
|
-
rubygems_version: 3.
|
216
|
+
rubygems_version: 3.1.6
|
217
217
|
signing_key:
|
218
218
|
specification_version: 4
|
219
219
|
summary: Ruby DSL documentation tool
|