jazzy 0.5.0 → 0.6.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +11 -1
- data/.travis.yml +2 -2
- data/CHANGELOG.md +51 -9
- data/Gemfile.lock +19 -22
- data/README.md +3 -3
- data/Rakefile +3 -2
- data/jazzy.gemspec +1 -1
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/SourceKittenFramework +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist +6 -6
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist +6 -6
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist +5 -5
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDispatch.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftFoundation.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist +6 -6
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework +0 -0
- data/lib/jazzy/SourceKitten/bin/sourcekitten +0 -0
- data/lib/jazzy/config.rb +44 -9
- data/lib/jazzy/doc_builder.rb +80 -34
- data/lib/jazzy/gem_version.rb +1 -1
- data/lib/jazzy/jazzy_markdown.rb +3 -5
- data/lib/jazzy/podspec_documenter.rb +8 -8
- data/lib/jazzy/source_declaration.rb +7 -0
- data/lib/jazzy/source_declaration/access_control_level.rb +3 -3
- data/lib/jazzy/source_declaration/type.rb +35 -3
- data/lib/jazzy/source_mark.rb +1 -1
- data/lib/jazzy/sourcekitten.rb +28 -13
- data/spec/integration_spec.rb +12 -5
- metadata +4 -11
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Curry +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Versions/A/Curry +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Versions/A/Resources/Info.plist +0 -49
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC +0 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist +0 -46
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC +0 -0
data/lib/jazzy/source_mark.rb
CHANGED
data/lib/jazzy/sourcekitten.rb
CHANGED
@@ -78,11 +78,11 @@ module Jazzy
|
|
78
78
|
# Don't create HTML page for this doc if it doesn't have children
|
79
79
|
# Instead, make its link a hash-link on its parent's page
|
80
80
|
if doc.typename == '<<error type>>'
|
81
|
-
warn 'A compile error prevented ' +
|
82
|
-
|
83
|
-
|
84
|
-
|
85
|
-
|
81
|
+
warn 'A compile error prevented ' + doc.fully_qualified_name +
|
82
|
+
' from receiving a unique USR. Documentation may be ' \
|
83
|
+
'incomplete. Please check for compile errors by running ' \
|
84
|
+
'`xcodebuild ' \
|
85
|
+
"#{Config.instance.xcodebuild_arguments.shelljoin}`."
|
86
86
|
end
|
87
87
|
id = doc.usr
|
88
88
|
unless id
|
@@ -119,13 +119,15 @@ module Jazzy
|
|
119
119
|
arguments = ['doc']
|
120
120
|
if options.objc_mode
|
121
121
|
if options.xcodebuild_arguments.empty?
|
122
|
-
arguments += ['--objc', options.umbrella_header.to_s, '-x',
|
122
|
+
arguments += ['--objc', options.umbrella_header.to_s, '--', '-x',
|
123
123
|
'objective-c', '-isysroot',
|
124
124
|
`xcrun --show-sdk-path --sdk #{options.sdk}`.chomp,
|
125
125
|
'-I', options.framework_root.to_s]
|
126
126
|
end
|
127
127
|
elsif !options.module_name.empty?
|
128
|
-
arguments += ['--module-name', options.module_name]
|
128
|
+
arguments += ['--module-name', options.module_name, '--']
|
129
|
+
else
|
130
|
+
arguments += ['--']
|
129
131
|
end
|
130
132
|
arguments + options.xcodebuild_arguments
|
131
133
|
end
|
@@ -319,20 +321,25 @@ module Jazzy
|
|
319
321
|
# Two declarations get merged if they have the same deduplication key.
|
320
322
|
def self.deduplication_key(decl)
|
321
323
|
if decl.type.swift_extensible? || decl.type.swift_extension?
|
322
|
-
[decl.usr]
|
324
|
+
[decl.usr, decl.name]
|
325
|
+
elsif decl.type.objc_class? || decl.type.objc_category?
|
326
|
+
name, _ = decl.objc_category_name || decl.name
|
327
|
+
[name, :objc_class_and_categories]
|
323
328
|
else
|
324
|
-
[decl.usr, decl.type.kind]
|
329
|
+
[decl.usr, decl.name, decl.type.kind]
|
325
330
|
end
|
326
331
|
end
|
327
332
|
|
333
|
+
# rubocop:disable Metrics/MethodLength
|
328
334
|
# Merges all of the given types and extensions into a single document.
|
329
335
|
def self.merge_declarations(decls)
|
330
|
-
extensions, typedecls = decls.partition { |d| d.type.
|
336
|
+
extensions, typedecls = decls.partition { |d| d.type.extension? }
|
331
337
|
|
332
338
|
if typedecls.size > 1
|
333
339
|
warn 'Found conflicting type declarations with the same name, which ' \
|
334
340
|
'may indicate a build issue or a bug in Jazzy: ' +
|
335
|
-
|
341
|
+
typedecls.map { |t| "#{t.type.name.downcase} #{t.name}" }
|
342
|
+
.join(', ')
|
336
343
|
end
|
337
344
|
typedecl = typedecls.first
|
338
345
|
|
@@ -340,6 +347,13 @@ module Jazzy
|
|
340
347
|
merge_default_implementations_into_protocol(typedecl, extensions)
|
341
348
|
mark_members_from_protocol_extension(extensions)
|
342
349
|
extensions.reject! { |ext| ext.children.empty? }
|
350
|
+
elsif typedecl && typedecl.type.objc_class?
|
351
|
+
# Mark children merged from categories with the name of category
|
352
|
+
# (unless they already have a mark)
|
353
|
+
extensions.each do |ext|
|
354
|
+
_, category_name = ext.objc_category_name
|
355
|
+
ext.children.each { |c| c.mark.name ||= category_name }
|
356
|
+
end
|
343
357
|
end
|
344
358
|
|
345
359
|
decls = typedecls + extensions
|
@@ -351,6 +365,7 @@ module Jazzy
|
|
351
365
|
end
|
352
366
|
end
|
353
367
|
end
|
368
|
+
# rubocop:enable Metrics/MethodLength
|
354
369
|
|
355
370
|
# If any of the extensions provide default implementations for methods in
|
356
371
|
# the given protocol, merge those members into the protocol doc instead of
|
@@ -392,8 +407,8 @@ module Jazzy
|
|
392
407
|
def self.name_match(name_part, docs)
|
393
408
|
return nil unless name_part
|
394
409
|
wildcard_expansion = Regexp.escape(name_part)
|
395
|
-
|
396
|
-
|
410
|
+
.gsub('\.\.\.', '[^)]*')
|
411
|
+
.gsub(/<.*>/, '')
|
397
412
|
whole_name_pat = /\A#{wildcard_expansion}\Z/
|
398
413
|
docs.find do |doc|
|
399
414
|
whole_name_pat =~ doc.name
|
data/spec/integration_spec.rb
CHANGED
@@ -91,7 +91,6 @@ describe_cli 'jazzy' do
|
|
91
91
|
travis_swift = ENV['TRAVIS_SWIFT_VERSION']
|
92
92
|
|
93
93
|
require 'shellwords'
|
94
|
-
# rubocop:disable Metrics/LineLength
|
95
94
|
realm_head = <<-HTML
|
96
95
|
<link rel="icon" href="https://realm.io/img/favicon.ico">
|
97
96
|
<link rel="apple-touch-icon-precomposed" sizes="57x57" href="https://realm.io/img/favicon-57x57.png" />
|
@@ -111,7 +110,6 @@ describe_cli 'jazzy' do
|
|
111
110
|
ga('send', 'pageview');
|
112
111
|
</script>
|
113
112
|
HTML
|
114
|
-
# rubocop:enable Metrics/LineLength
|
115
113
|
|
116
114
|
describe 'jazzy objective-c' do
|
117
115
|
describe 'Creates Realm Objective-C docs' do
|
@@ -138,9 +136,14 @@ describe_cli 'jazzy' do
|
|
138
136
|
'--framework-root . ' \
|
139
137
|
"--head #{realm_head.shellescape}"
|
140
138
|
end
|
139
|
+
|
140
|
+
describe 'Creates docs for ObjC project with a variety of contents' do
|
141
|
+
behaves_like cli_spec 'misc_jazzy_objc_features',
|
142
|
+
'--theme fullwidth'
|
143
|
+
end
|
141
144
|
end
|
142
145
|
|
143
|
-
describe 'jazzy swift 2.
|
146
|
+
describe 'jazzy swift 2.2' do
|
144
147
|
describe 'Creates docs for a podspec with dependencies and subspecs' do
|
145
148
|
behaves_like cli_spec 'document_moya_podspec', '--podspec=Moya.podspec'
|
146
149
|
end
|
@@ -163,7 +166,6 @@ describe_cli 'jazzy' do
|
|
163
166
|
realm_version = ''
|
164
167
|
Dir.chdir(ROOT + 'spec/integration_specs/document_realm_swift/before') do
|
165
168
|
realm_version = `./build.sh get-version`.chomp
|
166
|
-
`REALM_SWIFT_VERSION=2.1.1 ./build.sh set-swift-version`
|
167
169
|
end
|
168
170
|
behaves_like cli_spec 'document_realm_swift',
|
169
171
|
'--author Realm ' \
|
@@ -181,9 +183,14 @@ describe_cli 'jazzy' do
|
|
181
183
|
"--head #{realm_head.shellescape}"
|
182
184
|
end
|
183
185
|
|
186
|
+
describe 'Creates Siesta docs' do
|
187
|
+
behaves_like cli_spec 'document_siesta',
|
188
|
+
'--output api-docs' # Siesta already has Docs/
|
189
|
+
end
|
190
|
+
|
184
191
|
describe 'Creates docs for Swift project with a variety of contents' do
|
185
192
|
behaves_like cli_spec 'misc_jazzy_features',
|
186
193
|
'-x -dry-run --theme fullwidth'
|
187
194
|
end
|
188
|
-
end if !travis_swift || travis_swift == '2.
|
195
|
+
end if !travis_swift || travis_swift == '2.2'
|
189
196
|
end
|
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.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Simard
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2016-
|
13
|
+
date: 2016-04-06 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: cocoapods
|
@@ -116,14 +116,14 @@ dependencies:
|
|
116
116
|
requirements:
|
117
117
|
- - "~>"
|
118
118
|
- !ruby/object:Gem::Version
|
119
|
-
version: 0.2.
|
119
|
+
version: 0.2.1
|
120
120
|
type: :runtime
|
121
121
|
prerelease: false
|
122
122
|
version_requirements: !ruby/object:Gem::Requirement
|
123
123
|
requirements:
|
124
124
|
- - "~>"
|
125
125
|
- !ruby/object:Gem::Version
|
126
|
-
version: 0.2.
|
126
|
+
version: 0.2.1
|
127
127
|
- !ruby/object:Gem::Dependency
|
128
128
|
name: bundler
|
129
129
|
requirement: !ruby/object:Gem::Requirement
|
@@ -180,18 +180,12 @@ files:
|
|
180
180
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant
|
181
181
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant
|
182
182
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist
|
183
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Curry
|
184
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Versions/A/Curry
|
185
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Curry.framework/Versions/A/Resources/Info.plist
|
186
183
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result
|
187
184
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist
|
188
185
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result
|
189
186
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash
|
190
187
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist
|
191
188
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash
|
192
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/SwiftXPC
|
193
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist
|
194
|
-
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/SwiftXPC
|
195
189
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib
|
196
190
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib
|
197
191
|
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftDarwin.dylib
|
@@ -279,4 +273,3 @@ signing_key:
|
|
279
273
|
specification_version: 4
|
280
274
|
summary: Soulful docs for Swift & Objective-C.
|
281
275
|
test_files: []
|
282
|
-
has_rdoc:
|
Binary file
|
Binary file
|
@@ -1,49 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
-
<plist version="1.0">
|
4
|
-
<dict>
|
5
|
-
<key>BuildMachineOSBuild</key>
|
6
|
-
<string>15C50</string>
|
7
|
-
<key>CFBundleDevelopmentRegion</key>
|
8
|
-
<string>en</string>
|
9
|
-
<key>CFBundleExecutable</key>
|
10
|
-
<string>Curry</string>
|
11
|
-
<key>CFBundleIdentifier</key>
|
12
|
-
<string>com.thoughtbot.Curry</string>
|
13
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
-
<string>6.0</string>
|
15
|
-
<key>CFBundleName</key>
|
16
|
-
<string>Curry</string>
|
17
|
-
<key>CFBundlePackageType</key>
|
18
|
-
<string>FMWK</string>
|
19
|
-
<key>CFBundleShortVersionString</key>
|
20
|
-
<string>1.4.0</string>
|
21
|
-
<key>CFBundleSignature</key>
|
22
|
-
<string>????</string>
|
23
|
-
<key>CFBundleSupportedPlatforms</key>
|
24
|
-
<array>
|
25
|
-
<string>MacOSX</string>
|
26
|
-
</array>
|
27
|
-
<key>CFBundleVersion</key>
|
28
|
-
<string>1</string>
|
29
|
-
<key>DTCompiler</key>
|
30
|
-
<string>com.apple.compilers.llvm.clang.1_0</string>
|
31
|
-
<key>DTPlatformBuild</key>
|
32
|
-
<string>7C68</string>
|
33
|
-
<key>DTPlatformVersion</key>
|
34
|
-
<string>GM</string>
|
35
|
-
<key>DTSDKBuild</key>
|
36
|
-
<string>15C43</string>
|
37
|
-
<key>DTSDKName</key>
|
38
|
-
<string>macosx10.11</string>
|
39
|
-
<key>DTXcode</key>
|
40
|
-
<string>0720</string>
|
41
|
-
<key>DTXcodeBuild</key>
|
42
|
-
<string>7C68</string>
|
43
|
-
<key>UIDeviceFamily</key>
|
44
|
-
<array>
|
45
|
-
<integer>1</integer>
|
46
|
-
<integer>2</integer>
|
47
|
-
</array>
|
48
|
-
</dict>
|
49
|
-
</plist>
|
Binary file
|
@@ -1,46 +0,0 @@
|
|
1
|
-
<?xml version="1.0" encoding="UTF-8"?>
|
2
|
-
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
|
3
|
-
<plist version="1.0">
|
4
|
-
<dict>
|
5
|
-
<key>BuildMachineOSBuild</key>
|
6
|
-
<string>15C50</string>
|
7
|
-
<key>CFBundleDevelopmentRegion</key>
|
8
|
-
<string>en</string>
|
9
|
-
<key>CFBundleExecutable</key>
|
10
|
-
<string>SwiftXPC</string>
|
11
|
-
<key>CFBundleIdentifier</key>
|
12
|
-
<string>com.jpsim.SwiftXPC</string>
|
13
|
-
<key>CFBundleInfoDictionaryVersion</key>
|
14
|
-
<string>6.0</string>
|
15
|
-
<key>CFBundleName</key>
|
16
|
-
<string>SwiftXPC</string>
|
17
|
-
<key>CFBundlePackageType</key>
|
18
|
-
<string>FMWK</string>
|
19
|
-
<key>CFBundleShortVersionString</key>
|
20
|
-
<string>1.1.0</string>
|
21
|
-
<key>CFBundleSignature</key>
|
22
|
-
<string>????</string>
|
23
|
-
<key>CFBundleSupportedPlatforms</key>
|
24
|
-
<array>
|
25
|
-
<string>MacOSX</string>
|
26
|
-
</array>
|
27
|
-
<key>CFBundleVersion</key>
|
28
|
-
<string>1</string>
|
29
|
-
<key>DTCompiler</key>
|
30
|
-
<string>com.apple.compilers.llvm.clang.1_0</string>
|
31
|
-
<key>DTPlatformBuild</key>
|
32
|
-
<string>7C68</string>
|
33
|
-
<key>DTPlatformVersion</key>
|
34
|
-
<string>GM</string>
|
35
|
-
<key>DTSDKBuild</key>
|
36
|
-
<string>15C43</string>
|
37
|
-
<key>DTSDKName</key>
|
38
|
-
<string>macosx10.11</string>
|
39
|
-
<key>DTXcode</key>
|
40
|
-
<string>0720</string>
|
41
|
-
<key>DTXcodeBuild</key>
|
42
|
-
<string>7C68</string>
|
43
|
-
<key>NSHumanReadableCopyright</key>
|
44
|
-
<string>Copyright © 2014 JP Simard. All rights reserved.</string>
|
45
|
-
</dict>
|
46
|
-
</plist>
|