jazzy 0.13.7 → 0.14.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/workflows/Tests.yml +2 -2
- data/.rubocop.yml +123 -24
- data/CHANGELOG.md +34 -0
- data/Dangerfile +11 -8
- data/Gemfile +3 -1
- data/Gemfile.lock +49 -34
- data/README.md +23 -11
- data/Rakefile +13 -12
- data/bin/jazzy +3 -2
- data/jazzy.gemspec +8 -6
- data/lib/jazzy.rb +2 -0
- data/lib/jazzy/config.rb +116 -69
- data/lib/jazzy/doc.rb +3 -1
- data/lib/jazzy/doc_builder.rb +63 -81
- data/lib/jazzy/docset_builder.rb +3 -1
- data/lib/jazzy/documentation_generator.rb +6 -2
- data/lib/jazzy/executable.rb +3 -0
- data/lib/jazzy/extensions/bitbucket/img/bitbucket.svg +11 -0
- data/lib/jazzy/{themes/apple/assets → extensions/github}/img/gh.png +0 -0
- data/lib/jazzy/extensions/gitlab/img/gitlab.svg +23 -0
- data/lib/jazzy/gem_version.rb +3 -1
- data/lib/jazzy/highlighter.rb +5 -3
- data/lib/jazzy/jazzy_markdown.rb +63 -30
- data/lib/jazzy/podspec_documenter.rb +14 -16
- data/lib/jazzy/search_builder.rb +4 -3
- data/lib/jazzy/source_declaration.rb +9 -3
- data/lib/jazzy/source_declaration/access_control_level.rb +7 -5
- data/lib/jazzy/source_declaration/type.rb +3 -1
- data/lib/jazzy/source_document.rb +8 -5
- data/lib/jazzy/source_host.rb +111 -0
- data/lib/jazzy/source_mark.rb +8 -6
- data/lib/jazzy/source_module.rb +6 -6
- data/lib/jazzy/sourcekitten.rb +98 -72
- data/lib/jazzy/stats.rb +4 -2
- data/lib/jazzy/symbol_graph.rb +15 -15
- data/lib/jazzy/symbol_graph/constraint.rb +5 -1
- data/lib/jazzy/symbol_graph/ext_node.rb +3 -1
- data/lib/jazzy/symbol_graph/graph.rb +13 -11
- data/lib/jazzy/symbol_graph/relationship.rb +3 -0
- data/lib/jazzy/symbol_graph/sym_node.rb +11 -6
- data/lib/jazzy/symbol_graph/symbol.rb +18 -15
- data/lib/jazzy/themes/apple/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +5 -1
- data/lib/jazzy/themes/apple/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/apple/assets/js/jazzy.search.js +4 -0
- data/lib/jazzy/themes/apple/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/apple/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/apple/templates/header.mustache +3 -3
- data/lib/jazzy/themes/apple/templates/task.mustache +3 -3
- data/lib/jazzy/themes/fullwidth/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +6 -2
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +4 -0
- data/lib/jazzy/themes/fullwidth/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/fullwidth/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/fullwidth/templates/header.mustache +5 -5
- data/lib/jazzy/themes/fullwidth/templates/task.mustache +3 -3
- data/lib/jazzy/themes/jony/assets/css/highlight.css.scss +63 -59
- data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +5 -1
- data/lib/jazzy/themes/jony/assets/js/jazzy.js +4 -0
- data/lib/jazzy/themes/jony/templates/doc.mustache +3 -3
- data/lib/jazzy/themes/jony/templates/footer.mustache +1 -1
- data/lib/jazzy/themes/jony/templates/header.mustache +5 -5
- data/lib/jazzy/themes/jony/templates/task.mustache +3 -3
- data/spec/integration_spec.rb +39 -36
- data/spec/spec_helper.rb +3 -1
- data/spec/spec_helper/pre_flight.rb +2 -0
- metadata +27 -13
- data/lib/jazzy/themes/fullwidth/assets/img/gh.png +0 -0
- data/lib/jazzy/themes/jony/assets/img/gh.png +0 -0
- data/spec/sourcekitten_spec.rb +0 -6
@@ -73,11 +73,11 @@
|
|
73
73
|
{{{return}}}
|
74
74
|
</div>
|
75
75
|
{{/return}}
|
76
|
-
{{#
|
76
|
+
{{#source_host_item_url}}
|
77
77
|
<div class="slightly-smaller">
|
78
|
-
<a href="{{{
|
78
|
+
<a href="{{{.}}}">Show on {{source_host_name}}</a>
|
79
79
|
</div>
|
80
|
-
{{/
|
80
|
+
{{/source_host_item_url}}
|
81
81
|
</section>
|
82
82
|
{{> tasks}}
|
83
83
|
</section>
|
@@ -1,4 +1,4 @@
|
|
1
1
|
<section id="footer">
|
2
2
|
{{{copyright}}}
|
3
|
-
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="external">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="https://realm.io" target="_blank" rel="external">Realm</a> project.</p>
|
3
|
+
<p>Generated by <a class="link" href="https://github.com/realm/jazzy" target="_blank" rel="noopener" rel="external">jazzy ♪♫ v{{jazzy_version}}</a>, a <a class="link" href="https://realm.io" target="_blank" rel="noopener" rel="external">Realm</a> project.</p>
|
4
4
|
</section>
|
@@ -5,14 +5,14 @@
|
|
5
5
|
<span class="no-mobile">{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}</span>
|
6
6
|
</p>
|
7
7
|
|
8
|
-
{{#
|
8
|
+
{{#source_host_url}}
|
9
9
|
<p class="header-right">
|
10
|
-
<a href="{{
|
11
|
-
<img src="{{path_to_root}}img/
|
12
|
-
<span class="no-mobile">View on
|
10
|
+
<a href="{{.}}">
|
11
|
+
<img src="{{path_to_root}}img/{{source_host_image}}"/>
|
12
|
+
<span class="no-mobile">View on {{source_host_name}}</span>
|
13
13
|
</a>
|
14
14
|
</p>
|
15
|
-
{{/
|
15
|
+
{{/source_host_url}}
|
16
16
|
|
17
17
|
{{#dash_url}}
|
18
18
|
<p class="header-right">
|
@@ -91,11 +91,11 @@
|
|
91
91
|
{{{return}}}
|
92
92
|
</div>
|
93
93
|
{{/return}}
|
94
|
-
{{#
|
94
|
+
{{#source_host_item_url}}
|
95
95
|
<div class="slightly-smaller">
|
96
|
-
<a href="{{{
|
96
|
+
<a href="{{{.}}}">Show on {{source_host_name}}</a>
|
97
97
|
</div>
|
98
|
-
{{/
|
98
|
+
{{/source_host_item_url}}
|
99
99
|
</section>
|
100
100
|
{{/direct_link}}
|
101
101
|
</div>
|
data/spec/integration_spec.rb
CHANGED
@@ -1,3 +1,4 @@
|
|
1
|
+
# frozen_string_literal: true
|
1
2
|
|
2
3
|
# ------------------------------------ #
|
3
4
|
# Jazzy Integration tests #
|
@@ -39,7 +40,7 @@
|
|
39
40
|
|
40
41
|
# @return [Pathname] The root of the repo.
|
41
42
|
#
|
42
|
-
ROOT = Pathname.new(File.expand_path('
|
43
|
+
ROOT = Pathname.new(File.expand_path('..', __dir__)) unless defined? ROOT
|
43
44
|
$:.unshift((ROOT + 'spec').to_s)
|
44
45
|
|
45
46
|
require 'rubygems'
|
@@ -98,15 +99,15 @@ describe_cli 'jazzy' do
|
|
98
99
|
subject do |s|
|
99
100
|
s.executable = "ruby #{ROOT + 'bin/jazzy'}"
|
100
101
|
s.environment_vars = {
|
101
|
-
'JAZZY_FAKE_DATE'
|
102
|
-
'JAZZY_FAKE_VERSION'
|
102
|
+
'JAZZY_FAKE_DATE' => 'YYYY-MM-DD',
|
103
|
+
'JAZZY_FAKE_VERSION' => 'X.X.X',
|
103
104
|
'COCOAPODS_SKIP_UPDATE_MESSAGE' => 'TRUE',
|
104
105
|
'JAZZY_INTEGRATION_SPECS' => 'TRUE',
|
105
106
|
'JAZZY_FAKE_MODULE_VERSION' => 'Y.Y.Y',
|
106
107
|
}
|
107
108
|
s.default_args = []
|
108
109
|
s.replace_path ROOT.to_s, 'ROOT'
|
109
|
-
s.replace_pattern /^[\d\s:.-]+ ruby\[\d+:\d+\] warning
|
110
|
+
s.replace_pattern /^[\d\s:.-]+ ruby\[\d+:\d+\] warning:.*$\n?/, ''
|
110
111
|
# Remove version numbers from CocoaPods dependencies
|
111
112
|
# to make specs resilient against dependecy updates.
|
112
113
|
s.replace_pattern(/(Installing \w+ )\((.*)\)/, '\1(X.Y.Z)')
|
@@ -148,19 +149,19 @@ describe_cli 'jazzy' do
|
|
148
149
|
end
|
149
150
|
behaves_like cli_spec 'document_realm_objc',
|
150
151
|
'--objc ' \
|
151
|
-
|
152
|
-
|
153
|
-
|
154
|
-
|
155
|
-
|
156
|
-
|
157
|
-
|
158
|
-
|
159
|
-
|
160
|
-
|
161
|
-
|
162
|
-
|
163
|
-
|
152
|
+
'--author Realm ' \
|
153
|
+
'--author_url "https://realm.io" ' \
|
154
|
+
'--source-host-url ' \
|
155
|
+
'https://github.com/realm/realm-cocoa ' \
|
156
|
+
'--source-host-files-url https://github.com/realm/' \
|
157
|
+
"realm-cocoa/tree/v#{realm_version} " \
|
158
|
+
'--module Realm ' \
|
159
|
+
"--module-version #{realm_version} " \
|
160
|
+
'--root-url https://realm.io/docs/objc/' \
|
161
|
+
"#{realm_version}/api/ " \
|
162
|
+
'--umbrella-header Realm/Realm.h ' \
|
163
|
+
'--framework-root . ' \
|
164
|
+
"--head #{realm_head.shellescape}"
|
164
165
|
end
|
165
166
|
|
166
167
|
describe 'Creates docs for ObjC-Swift project with a variety of contents' do
|
@@ -169,17 +170,17 @@ describe_cli 'jazzy' do
|
|
169
170
|
sourcekitten = ROOT + 'bin/sourcekitten'
|
170
171
|
sdk = `xcrun --show-sdk-path --sdk iphonesimulator`.chomp
|
171
172
|
objc_args = "#{base}/MiscJazzyObjCFeatures/MiscJazzyObjCFeatures.h " \
|
172
|
-
|
173
|
-
|
174
|
-
|
175
|
-
|
173
|
+
'-- -x objective-c ' \
|
174
|
+
"-isysroot #{sdk} " \
|
175
|
+
"-I #{base} " \
|
176
|
+
'-fmodules'
|
176
177
|
`#{sourcekitten} doc --objc #{objc_args} > objc.json`
|
177
178
|
`#{sourcekitten} doc -- clean build > swift.json`
|
178
179
|
end
|
179
180
|
|
180
181
|
behaves_like cli_spec 'misc_jazzy_objc_features',
|
181
182
|
'--theme fullwidth '\
|
182
|
-
|
183
|
+
'-s objc.json,swift.json'
|
183
184
|
end
|
184
185
|
end if !spec_subset || spec_subset == 'objc'
|
185
186
|
|
@@ -199,18 +200,18 @@ describe_cli 'jazzy' do
|
|
199
200
|
end
|
200
201
|
behaves_like cli_spec 'document_realm_swift',
|
201
202
|
'--author Realm ' \
|
202
|
-
|
203
|
-
|
204
|
-
|
205
|
-
|
206
|
-
|
207
|
-
|
208
|
-
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
203
|
+
'--author_url "https://realm.io" ' \
|
204
|
+
'--source-host-url ' \
|
205
|
+
'https://github.com/realm/realm-cocoa ' \
|
206
|
+
'--source-host-files-url https://github.com/realm/' \
|
207
|
+
"realm-cocoa/tree/v#{realm_version} " \
|
208
|
+
'--module RealmSwift ' \
|
209
|
+
"--module-version #{realm_version} " \
|
210
|
+
'--root-url https://realm.io/docs/swift/' \
|
211
|
+
"#{realm_version}/api/ " \
|
212
|
+
'--xcodebuild-arguments ' \
|
213
|
+
'-scheme,RealmSwift,SWIFT_VERSION=4.2 ' \
|
214
|
+
"--head #{realm_head.shellescape}"
|
214
215
|
end
|
215
216
|
|
216
217
|
describe 'Creates Siesta docs' do
|
@@ -218,7 +219,7 @@ describe_cli 'jazzy' do
|
|
218
219
|
# Use the default Swift version rather than the specified 4.0
|
219
220
|
behaves_like cli_spec 'document_siesta',
|
220
221
|
'--output api-docs ' \
|
221
|
-
|
222
|
+
'--swift-version= '
|
222
223
|
end
|
223
224
|
|
224
225
|
describe 'Creates docs for Swift project with a variety of contents' do
|
@@ -233,7 +234,7 @@ describe_cli 'jazzy' do
|
|
233
234
|
module_path = `swift build --build-path #{build_path} --show-bin-path`
|
234
235
|
behaves_like cli_spec 'misc_jazzy_symgraph_features',
|
235
236
|
'--swift-build-tool symbolgraph ' \
|
236
|
-
|
237
|
+
"--build-tool-arguments -I,#{module_path} "
|
237
238
|
end
|
238
239
|
end if !spec_subset || spec_subset == 'swift'
|
239
240
|
|
@@ -244,4 +245,6 @@ describe_cli 'jazzy' do
|
|
244
245
|
'--podspec=Moya.podspec'
|
245
246
|
end
|
246
247
|
end if !spec_subset || spec_subset == 'cocoapods'
|
248
|
+
|
249
|
+
# rubocop:enable Style/MultilineIfModifier
|
247
250
|
end
|
data/spec/spec_helper.rb
CHANGED
@@ -1,3 +1,5 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
1
3
|
require 'rubygems'
|
2
4
|
require 'bundler/setup'
|
3
5
|
require 'bacon'
|
@@ -5,7 +7,7 @@ require 'mocha-on-bacon'
|
|
5
7
|
require 'pretty_bacon'
|
6
8
|
require 'pathname'
|
7
9
|
|
8
|
-
ROOT = Pathname.new(File.expand_path('
|
10
|
+
ROOT = Pathname.new(File.expand_path('..', __dir__))
|
9
11
|
$LOAD_PATH.unshift((ROOT + 'lib').to_s)
|
10
12
|
$LOAD_PATH.unshift((ROOT + 'spec').to_s)
|
11
13
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jazzy
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.14.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Simard
|
@@ -11,7 +11,7 @@ authors:
|
|
11
11
|
autorequire:
|
12
12
|
bindir: bin
|
13
13
|
cert_chain: []
|
14
|
-
date: 2021-
|
14
|
+
date: 2021-08-14 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: cocoapods
|
@@ -45,16 +45,16 @@ dependencies:
|
|
45
45
|
name: open4
|
46
46
|
requirement: !ruby/object:Gem::Requirement
|
47
47
|
requirements:
|
48
|
-
- - "
|
48
|
+
- - "~>"
|
49
49
|
- !ruby/object:Gem::Version
|
50
|
-
version: '
|
50
|
+
version: '1.3'
|
51
51
|
type: :runtime
|
52
52
|
prerelease: false
|
53
53
|
version_requirements: !ruby/object:Gem::Requirement
|
54
54
|
requirements:
|
55
|
-
- - "
|
55
|
+
- - "~>"
|
56
56
|
- !ruby/object:Gem::Version
|
57
|
-
version: '
|
57
|
+
version: '1.3'
|
58
58
|
- !ruby/object:Gem::Dependency
|
59
59
|
name: redcarpet
|
60
60
|
requirement: !ruby/object:Gem::Requirement
|
@@ -69,6 +69,20 @@ dependencies:
|
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
71
|
version: '3.4'
|
72
|
+
- !ruby/object:Gem::Dependency
|
73
|
+
name: rexml
|
74
|
+
requirement: !ruby/object:Gem::Requirement
|
75
|
+
requirements:
|
76
|
+
- - "~>"
|
77
|
+
- !ruby/object:Gem::Version
|
78
|
+
version: '3.2'
|
79
|
+
type: :runtime
|
80
|
+
prerelease: false
|
81
|
+
version_requirements: !ruby/object:Gem::Requirement
|
82
|
+
requirements:
|
83
|
+
- - "~>"
|
84
|
+
- !ruby/object:Gem::Version
|
85
|
+
version: '3.2'
|
72
86
|
- !ruby/object:Gem::Dependency
|
73
87
|
name: rouge
|
74
88
|
requirement: !ruby/object:Gem::Requirement
|
@@ -137,14 +151,14 @@ dependencies:
|
|
137
151
|
requirements:
|
138
152
|
- - "~>"
|
139
153
|
- !ruby/object:Gem::Version
|
140
|
-
version: '1
|
154
|
+
version: '2.1'
|
141
155
|
type: :development
|
142
156
|
prerelease: false
|
143
157
|
version_requirements: !ruby/object:Gem::Requirement
|
144
158
|
requirements:
|
145
159
|
- - "~>"
|
146
160
|
- !ruby/object:Gem::Version
|
147
|
-
version: '1
|
161
|
+
version: '2.1'
|
148
162
|
- !ruby/object:Gem::Dependency
|
149
163
|
name: rake
|
150
164
|
requirement: !ruby/object:Gem::Requirement
|
@@ -198,6 +212,9 @@ files:
|
|
198
212
|
- lib/jazzy/docset_builder/info_plist.mustache
|
199
213
|
- lib/jazzy/documentation_generator.rb
|
200
214
|
- lib/jazzy/executable.rb
|
215
|
+
- lib/jazzy/extensions/bitbucket/img/bitbucket.svg
|
216
|
+
- lib/jazzy/extensions/github/img/gh.png
|
217
|
+
- lib/jazzy/extensions/gitlab/img/gitlab.svg
|
201
218
|
- lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.ttf
|
202
219
|
- lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff
|
203
220
|
- lib/jazzy/extensions/katex/css/fonts/KaTeX_AMS-Regular.woff2
|
@@ -269,6 +286,7 @@ files:
|
|
269
286
|
- lib/jazzy/source_declaration/access_control_level.rb
|
270
287
|
- lib/jazzy/source_declaration/type.rb
|
271
288
|
- lib/jazzy/source_document.rb
|
289
|
+
- lib/jazzy/source_host.rb
|
272
290
|
- lib/jazzy/source_mark.rb
|
273
291
|
- lib/jazzy/source_module.rb
|
274
292
|
- lib/jazzy/sourcekitten.rb
|
@@ -284,7 +302,6 @@ files:
|
|
284
302
|
- lib/jazzy/themes/apple/assets/css/jazzy.css.scss
|
285
303
|
- lib/jazzy/themes/apple/assets/img/carat.png
|
286
304
|
- lib/jazzy/themes/apple/assets/img/dash.png
|
287
|
-
- lib/jazzy/themes/apple/assets/img/gh.png
|
288
305
|
- lib/jazzy/themes/apple/assets/img/spinner.gif
|
289
306
|
- lib/jazzy/themes/apple/assets/js/jazzy.js
|
290
307
|
- lib/jazzy/themes/apple/assets/js/jazzy.search.js
|
@@ -303,7 +320,6 @@ files:
|
|
303
320
|
- lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss
|
304
321
|
- lib/jazzy/themes/fullwidth/assets/img/carat.png
|
305
322
|
- lib/jazzy/themes/fullwidth/assets/img/dash.png
|
306
|
-
- lib/jazzy/themes/fullwidth/assets/img/gh.png
|
307
323
|
- lib/jazzy/themes/fullwidth/assets/img/spinner.gif
|
308
324
|
- lib/jazzy/themes/fullwidth/assets/js/jazzy.js
|
309
325
|
- lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js
|
@@ -322,7 +338,6 @@ files:
|
|
322
338
|
- lib/jazzy/themes/jony/assets/css/jazzy.css.scss
|
323
339
|
- lib/jazzy/themes/jony/assets/img/carat.png
|
324
340
|
- lib/jazzy/themes/jony/assets/img/dash.png
|
325
|
-
- lib/jazzy/themes/jony/assets/img/gh.png
|
326
341
|
- lib/jazzy/themes/jony/assets/js/jazzy.js
|
327
342
|
- lib/jazzy/themes/jony/assets/js/jquery.min.js
|
328
343
|
- lib/jazzy/themes/jony/templates/deprecation.mustache
|
@@ -334,7 +349,6 @@ files:
|
|
334
349
|
- lib/jazzy/themes/jony/templates/task.mustache
|
335
350
|
- lib/jazzy/themes/jony/templates/tasks.mustache
|
336
351
|
- spec/integration_spec.rb
|
337
|
-
- spec/sourcekitten_spec.rb
|
338
352
|
- spec/spec_helper.rb
|
339
353
|
- spec/spec_helper/pre_flight.rb
|
340
354
|
homepage: https://github.com/realm/jazzy
|
@@ -349,7 +363,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
349
363
|
requirements:
|
350
364
|
- - ">="
|
351
365
|
- !ruby/object:Gem::Version
|
352
|
-
version: 2.
|
366
|
+
version: 2.6.3
|
353
367
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
354
368
|
requirements:
|
355
369
|
- - ">="
|
Binary file
|
Binary file
|