jazzy 0.7.3 → 0.7.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +6 -0
- data/CHANGELOG.md +72 -0
- data/CONTRIBUTING.md +3 -1
- data/Gemfile.lock +31 -29
- data/README.md +11 -10
- data/circle.yml +12 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Resources +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/SourceKittenFramework +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Resources +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Versions/Current +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Yams +1 -0
- data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current +1 -0
- data/lib/jazzy/config.rb +16 -2
- data/lib/jazzy/doc_builder.rb +60 -8
- data/lib/jazzy/gem_version.rb +1 -1
- data/lib/jazzy/jazzy_markdown.rb +37 -25
- data/lib/jazzy/podspec_documenter.rb +3 -4
- data/lib/jazzy/search_builder.rb +21 -0
- data/lib/jazzy/source_declaration.rb +1 -1
- data/lib/jazzy/source_declaration/type.rb +7 -0
- data/lib/jazzy/source_document.rb +9 -0
- data/lib/jazzy/sourcekitten.rb +112 -60
- data/lib/jazzy/themes/apple/assets/js/jazzy.js +6 -0
- data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +62 -0
- data/lib/jazzy/themes/fullwidth/assets/img/spinner.gif +0 -0
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.js +6 -0
- data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +62 -0
- data/lib/jazzy/themes/fullwidth/assets/js/lunr.min.js +6 -0
- data/lib/jazzy/themes/fullwidth/assets/js/typeahead.jquery.js +1538 -0
- data/lib/jazzy/themes/fullwidth/templates/doc.mustache +5 -0
- data/lib/jazzy/themes/fullwidth/templates/header.mustache +8 -0
- data/spec/integration_spec.rb +11 -9
- metadata +19 -4
- data/.travis.yml +0 -17
- 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/Result.framework/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/Yams.framework/Yams +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5ca696c264b7d1fb8815ad306c4d00a38b590762
|
4
|
+
data.tar.gz: ae530a97b56831e98b9ddd84b5cc5d48f927f86e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f8be594e771a90d3a82e353c0ba070d927a09ebd566466d0677ed09ba50c728411812aea9a58be0abe8494efea3ee0490a2f227f7bf88c36c854a037db237a9
|
7
|
+
data.tar.gz: c8fd9cd72d6aeb4de45c35992af945fb85cf5940d32461da6d63af0ba64e0d63e39cf4c7fb7dbb27dadaffb77d8c80811b6f1a3de49ace84ba6a428c14cbbf6c
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,75 @@
|
|
1
|
+
## 0.7.4
|
2
|
+
|
3
|
+
##### Breaking
|
4
|
+
|
5
|
+
* None.
|
6
|
+
|
7
|
+
##### Enhancements
|
8
|
+
|
9
|
+
* Generate shields.io badge for documentation coverage, unless
|
10
|
+
`hide_documentation_coverage` is set.
|
11
|
+
[Harlan Haskins](https://github.com/harlanhaskins)
|
12
|
+
[#723](https://github.com/realm/jazzy/issues/723)
|
13
|
+
|
14
|
+
* Add support for searching docs when using the `fullwidth` theme. A new option,
|
15
|
+
`--disable-search`, lets you turn this off.
|
16
|
+
[Esad Hajdarevic](https://github.com/esad)
|
17
|
+
[Tom MacWright](https://github.com/tmcw)
|
18
|
+
[Nadia Barbosa](https://github.com/captainbarbosa)
|
19
|
+
[#14](https://github.com/realm/jazzy/issues/14)
|
20
|
+
|
21
|
+
* New config option `use_safe_filenames` encodes unsafe characters when
|
22
|
+
generating filenames. By default, documentation may receive filenames like
|
23
|
+
`/(_:_:).html`. With `use_safe_filenames`, the same file will receive the name
|
24
|
+
`_2F_28_5F_3A_5F_3A_29.html` instead.
|
25
|
+
[Jeremy David Giesbrecht](https://github.com/SDGGiesbrecht)
|
26
|
+
[#699](https://github.com/realm/jazzy/issues/699)
|
27
|
+
[#146](https://github.com/realm/jazzy/issues/146)
|
28
|
+
[#361](https://github.com/realm/jazzy/issues/361)
|
29
|
+
[#547](https://github.com/realm/jazzy/issues/547)
|
30
|
+
|
31
|
+
* References to Objective-C methods are now autolinked.
|
32
|
+
[Minh Nguyễn](https://github.com/1ec5)
|
33
|
+
[#362](https://github.com/realm/jazzy/issues/362)
|
34
|
+
|
35
|
+
* Print documentation coverage percentage and the number of undocumented
|
36
|
+
methods to the command line when running jazzy.
|
37
|
+
[Jason Wray](https://github.com/friedbunny)
|
38
|
+
|
39
|
+
##### Bug Fixes
|
40
|
+
|
41
|
+
* Fix issue where existing abstracts for non custom sections would be completely
|
42
|
+
overwritten when using extra abstract injection with --abstract.
|
43
|
+
[Thibaud Robelain](https://github.com/thibaudrobelain)
|
44
|
+
[#600](https://github.com/realm/jazzy/issues/600)
|
45
|
+
|
46
|
+
* Fix issue where generic type parameters registered as undocumented symbols.
|
47
|
+
[Jeremy David Giesbrecht](https://github.com/SDGGiesbrecht)
|
48
|
+
[#429](https://github.com/realm/jazzy/issues/429)
|
49
|
+
|
50
|
+
* Fix issue where parameter and return callouts were duplicated in documentation.
|
51
|
+
[Jeremy David Giesbrecht](https://github.com/SDGGiesbrecht)
|
52
|
+
[#673](https://github.com/realm/jazzy/issues/673)
|
53
|
+
|
54
|
+
* Fix issue where Objective-C superclass in declaration was unlinked.
|
55
|
+
[Minh Nguyễn](https://github.com/1ec5)
|
56
|
+
[#706](https://github.com/realm/jazzy/issues/706)
|
57
|
+
|
58
|
+
* Fix issue where multiple Objective-C categories of the same external class
|
59
|
+
in different files were merged into one and named after the first category
|
60
|
+
found.
|
61
|
+
[Minh Nguyễn](https://github.com/1ec5)
|
62
|
+
[#539](https://github.com/realm/jazzy/issues/539)
|
63
|
+
|
64
|
+
* String literals in code listings are no longer wrapped in `<q>` tags (`apple`
|
65
|
+
and `fullwidth` themes only).
|
66
|
+
[Minh Nguyễn](https://github.com/1ec5)
|
67
|
+
[#714](https://github.com/realm/jazzy/issues/714)
|
68
|
+
|
69
|
+
* Fix issue where passing a `--podspec` argument would use a malformed
|
70
|
+
`SWIFT_VERSION` value, causing compilation to fail.
|
71
|
+
[JP Simard](https://github.com/jpsim)
|
72
|
+
|
1
73
|
## 0.7.3
|
2
74
|
|
3
75
|
##### Breaking
|
data/CONTRIBUTING.md
CHANGED
@@ -35,7 +35,7 @@ git checkout master
|
|
35
35
|
git pull
|
36
36
|
git checkout -
|
37
37
|
git rebase master
|
38
|
-
|
38
|
+
rake bootstrap
|
39
39
|
bundle exec rake rebuild_integration_fixtures
|
40
40
|
cd spec/integration_specs
|
41
41
|
git checkout -b $jazzy_branch_name
|
@@ -49,6 +49,8 @@ git push
|
|
49
49
|
You'll need push access to the integration specs repo to do this. You can
|
50
50
|
request access from one of the maintainers when filing your PR.
|
51
51
|
|
52
|
+
You must have Xcode 8.2 installed to build the integration specs.
|
53
|
+
|
52
54
|
## Making changes to SourceKitten
|
53
55
|
|
54
56
|
When changes are landed in the https://github.com/jpsim/SourceKitten repo the
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jazzy (0.7.
|
4
|
+
jazzy (0.7.4)
|
5
5
|
cocoapods (~> 1.0)
|
6
6
|
mustache (~> 0.99)
|
7
7
|
open4
|
@@ -14,7 +14,7 @@ PATH
|
|
14
14
|
GEM
|
15
15
|
remote: https://rubygems.org/
|
16
16
|
specs:
|
17
|
-
CFPropertyList (2.3.
|
17
|
+
CFPropertyList (2.3.5)
|
18
18
|
activesupport (4.2.7.1)
|
19
19
|
i18n (~> 0.7)
|
20
20
|
json (~> 1.7, >= 1.7.7)
|
@@ -23,7 +23,7 @@ GEM
|
|
23
23
|
tzinfo (~> 1.1)
|
24
24
|
addressable (2.5.0)
|
25
25
|
public_suffix (~> 2.0, >= 2.0.2)
|
26
|
-
ast (2.
|
26
|
+
ast (2.3.0)
|
27
27
|
bacon (1.2.0)
|
28
28
|
claide (1.0.1)
|
29
29
|
claide-plugins (0.9.2)
|
@@ -33,35 +33,36 @@ GEM
|
|
33
33
|
clintegracon (0.7.0)
|
34
34
|
colored (~> 1.2)
|
35
35
|
diffy
|
36
|
-
cocoapods (1.
|
36
|
+
cocoapods (1.2.0)
|
37
37
|
activesupport (>= 4.0.2, < 5)
|
38
38
|
claide (>= 1.0.1, < 2.0)
|
39
|
-
cocoapods-core (= 1.
|
39
|
+
cocoapods-core (= 1.2.0)
|
40
40
|
cocoapods-deintegrate (>= 1.0.1, < 2.0)
|
41
|
-
cocoapods-downloader (>= 1.1.
|
41
|
+
cocoapods-downloader (>= 1.1.3, < 2.0)
|
42
42
|
cocoapods-plugins (>= 1.0.0, < 2.0)
|
43
43
|
cocoapods-search (>= 1.0.0, < 2.0)
|
44
44
|
cocoapods-stats (>= 1.0.0, < 2.0)
|
45
|
-
cocoapods-trunk (>= 1.1.
|
45
|
+
cocoapods-trunk (>= 1.1.2, < 2.0)
|
46
46
|
cocoapods-try (>= 1.1.0, < 2.0)
|
47
47
|
colored (~> 1.2)
|
48
48
|
escape (~> 0.0.4)
|
49
49
|
fourflusher (~> 2.0.1)
|
50
50
|
gh_inspector (~> 1.0)
|
51
|
-
molinillo (~> 0.5.
|
51
|
+
molinillo (~> 0.5.5)
|
52
52
|
nap (~> 1.0)
|
53
|
-
|
54
|
-
|
53
|
+
ruby-macho (~> 0.2.5)
|
54
|
+
xcodeproj (>= 1.4.1, < 2.0)
|
55
|
+
cocoapods-core (1.2.0)
|
55
56
|
activesupport (>= 4.0.2, < 5)
|
56
57
|
fuzzy_match (~> 2.0.4)
|
57
58
|
nap (~> 1.0)
|
58
59
|
cocoapods-deintegrate (1.0.1)
|
59
|
-
cocoapods-downloader (1.1.
|
60
|
+
cocoapods-downloader (1.1.3)
|
60
61
|
cocoapods-plugins (1.0.0)
|
61
62
|
nap
|
62
63
|
cocoapods-search (1.0.0)
|
63
64
|
cocoapods-stats (1.0.0)
|
64
|
-
cocoapods-trunk (1.1.
|
65
|
+
cocoapods-trunk (1.1.2)
|
65
66
|
nap (>= 0.8, < 2.0)
|
66
67
|
netrc (= 0.7.8)
|
67
68
|
cocoapods-try (1.1.0)
|
@@ -89,20 +90,20 @@ GEM
|
|
89
90
|
faraday (~> 0.8)
|
90
91
|
fourflusher (2.0.1)
|
91
92
|
fuzzy_match (2.0.4)
|
92
|
-
gh_inspector (1.0.
|
93
|
+
gh_inspector (1.0.3)
|
93
94
|
git (1.3.0)
|
94
95
|
hashdiff (0.3.0)
|
95
|
-
i18n (0.
|
96
|
-
json (1.8.
|
96
|
+
i18n (0.8.0)
|
97
|
+
json (1.8.6)
|
97
98
|
kramdown (1.13.1)
|
98
99
|
liferaft (0.0.6)
|
99
100
|
metaclass (0.0.4)
|
100
|
-
minitest (5.10.
|
101
|
+
minitest (5.10.1)
|
101
102
|
mocha (1.1.0)
|
102
103
|
metaclass (~> 0.0.1)
|
103
104
|
mocha-on-bacon (0.2.2)
|
104
105
|
mocha (>= 0.13.0)
|
105
|
-
molinillo (0.5.
|
106
|
+
molinillo (0.5.6)
|
106
107
|
multipart-post (2.0.0)
|
107
108
|
mustache (0.99.8)
|
108
109
|
nanaimo (0.2.3)
|
@@ -111,46 +112,47 @@ GEM
|
|
111
112
|
octokit (4.6.2)
|
112
113
|
sawyer (~> 0.8.0, >= 0.5.3)
|
113
114
|
open4 (1.3.4)
|
114
|
-
parser (2.3.
|
115
|
+
parser (2.3.3.1)
|
115
116
|
ast (~> 2.2)
|
116
117
|
powerpack (0.1.1)
|
117
118
|
prettybacon (0.0.2)
|
118
119
|
bacon (~> 1.2)
|
119
120
|
public_suffix (2.0.4)
|
120
|
-
rainbow (2.1
|
121
|
+
rainbow (2.2.1)
|
121
122
|
rake (10.5.0)
|
122
|
-
redcarpet (3.
|
123
|
+
redcarpet (3.4.0)
|
123
124
|
rouge (1.11.1)
|
124
|
-
rubocop (0.
|
125
|
-
parser (>= 2.3.
|
125
|
+
rubocop (0.47.1)
|
126
|
+
parser (>= 2.3.3.1, < 3.0)
|
126
127
|
powerpack (~> 0.1)
|
127
128
|
rainbow (>= 1.99.1, < 3.0)
|
128
129
|
ruby-progressbar (~> 1.7)
|
129
130
|
unicode-display_width (~> 1.0, >= 1.0.1)
|
130
|
-
ruby-
|
131
|
+
ruby-macho (0.2.6)
|
132
|
+
ruby-progressbar (1.8.1)
|
131
133
|
safe_yaml (1.0.4)
|
132
|
-
sass (3.4.
|
134
|
+
sass (3.4.23)
|
133
135
|
sawyer (0.8.1)
|
134
136
|
addressable (>= 2.3.5, < 2.6)
|
135
137
|
faraday (~> 0.8, < 1.0)
|
136
|
-
sqlite3 (1.3.
|
138
|
+
sqlite3 (1.3.13)
|
137
139
|
terminal-table (1.6.0)
|
138
140
|
thread_safe (0.3.5)
|
139
141
|
tzinfo (1.2.2)
|
140
142
|
thread_safe (~> 0.1)
|
141
|
-
unicode-display_width (1.
|
143
|
+
unicode-display_width (1.1.3)
|
142
144
|
webmock (1.24.2)
|
143
145
|
addressable (>= 2.3.6)
|
144
146
|
crack (>= 0.3.2)
|
145
147
|
hashdiff
|
146
148
|
xcinvoke (0.3.0)
|
147
149
|
liferaft (~> 0.0.6)
|
148
|
-
xcodeproj (1.4.
|
150
|
+
xcodeproj (1.4.2)
|
149
151
|
CFPropertyList (~> 2.3.3)
|
150
152
|
activesupport (>= 3)
|
151
153
|
claide (>= 1.0.1, < 2.0)
|
152
154
|
colored (~> 1.2)
|
153
|
-
nanaimo (~> 0.2.
|
155
|
+
nanaimo (~> 0.2.3)
|
154
156
|
|
155
157
|
PLATFORMS
|
156
158
|
ruby
|
@@ -170,4 +172,4 @@ DEPENDENCIES
|
|
170
172
|
webmock
|
171
173
|
|
172
174
|
BUNDLED WITH
|
173
|
-
1.
|
175
|
+
1.14.3
|
data/README.md
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
![analytics](https://ga-beacon.appspot.com/UA-50247013-2/jazzy/README?pixel)
|
4
4
|
|
5
|
-
[![Build Status](https://
|
5
|
+
[![Build Status](https://circleci.com/gh/realm/jazzy.svg?style=svg)](https://circleci.com/gh/realm/jazzy)
|
6
6
|
|
7
7
|
*jazzy is a command-line utility that generates documentation for Swift or Objective-C*
|
8
8
|
|
@@ -25,8 +25,9 @@ unacceptable behavior to [info@realm.io](mailto:info@realm.io).
|
|
25
25
|
|
26
26
|
## Requirements
|
27
27
|
|
28
|
-
* A version of [Xcode][xcode]
|
29
|
-
|
28
|
+
* A version of [Xcode][xcode] capable of building the project you wish to
|
29
|
+
document. It must be installed in a location indexed by Spotlight for the
|
30
|
+
`--swift-version` configuration option to succeed.
|
30
31
|
|
31
32
|
## Installation
|
32
33
|
|
@@ -49,7 +50,8 @@ all available options, run `jazzy --help config`.
|
|
49
50
|
### Supported keywords
|
50
51
|
|
51
52
|
Swift header documentation is written in markdown and supports a number of special keywords.
|
52
|
-
For a complete list and examples, see Erica Sadun's post on [*Swift header documentation in Xcode 7*](http://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/)
|
53
|
+
For a complete list and examples, see Erica Sadun's post on [*Swift header documentation in Xcode 7*](http://ericasadun.com/2015/06/14/swift-header-documentation-in-xcode-7/)
|
54
|
+
and her [book on Swift Documentation Markup](https://itunes.apple.com/us/book/swift-documentation-markup/id1049010423).
|
53
55
|
|
54
56
|
For Objective-C documentation the same keywords are supported, but note that the format
|
55
57
|
is slightly different. In Swift you would write `- returns:`, but in Objective-C you write `@return`. See Apple's [*HeaderDoc User Guide*](https://developer.apple.com/legacy/library/documentation/DeveloperTools/Conceptual/HeaderDoc/tags/tags.html) for more details. **Note: `jazzy` currently does not support _all_ Objective-C keywords listed in this document.**
|
@@ -99,14 +101,13 @@ jazzy \
|
|
99
101
|
--author Realm \
|
100
102
|
--author_url https://realm.io \
|
101
103
|
--github_url https://github.com/realm/realm-cocoa \
|
102
|
-
--github-file-prefix https://github.com/realm/realm-cocoa/tree/
|
103
|
-
--module-version
|
104
|
-
--
|
105
|
-
--framework-root . \
|
104
|
+
--github-file-prefix https://github.com/realm/realm-cocoa/tree/v2.2.0 \
|
105
|
+
--module-version 2.2.0 \
|
106
|
+
--xcodebuild-arguments --objc,Realm/Realm.h,--,-x,objective-c,-isysroot,$(xcrun --show-sdk-path),-I,$(pwd) \
|
106
107
|
--module Realm \
|
107
|
-
--root-url https://realm.io/docs/objc/
|
108
|
+
--root-url https://realm.io/docs/objc/2.2.0/api/ \
|
108
109
|
--output docs/objc_output \
|
109
|
-
--
|
110
|
+
--head "$(cat docs/custom_head.html)"
|
110
111
|
```
|
111
112
|
|
112
113
|
This is how the AFNetworking docs are generated:
|
data/circle.yml
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current/Resources
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current/SourceKittenFrame
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
|
@@ -0,0 +1 @@
|
|
1
|
+
lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A
|
data/lib/jazzy/config.rb
CHANGED
@@ -246,6 +246,11 @@ module Jazzy
|
|
246
246
|
'https://github.com/realm/realm-cocoa/tree/v0.87.1)'
|
247
247
|
|
248
248
|
# ──────── Doc generation options ────────
|
249
|
+
config_attr :disable_search,
|
250
|
+
command_line: '--disable-search',
|
251
|
+
description: ['Avoid generating a search index. '\
|
252
|
+
'Search is available in some themes.'],
|
253
|
+
default: false
|
249
254
|
|
250
255
|
config_attr :skip_documentation,
|
251
256
|
command_line: '--skip-documentation',
|
@@ -294,6 +299,14 @@ module Jazzy
|
|
294
299
|
Pathname(__FILE__).parent + 'themes' + t
|
295
300
|
end
|
296
301
|
|
302
|
+
config_attr :use_safe_filenames,
|
303
|
+
command_line: '--use-safe-filenames',
|
304
|
+
description: 'Replace unsafe characters in filenames with an encoded '\
|
305
|
+
'representation. This will reduce human readability of '\
|
306
|
+
'some URLs, but may be necessary for projects that '\
|
307
|
+
'expose filename-unfriendly functions such as /(_:_:)',
|
308
|
+
default: false
|
309
|
+
|
297
310
|
config_attr :template_directory,
|
298
311
|
command_line: ['-t', '--template-directory DIRPATH'],
|
299
312
|
description: 'DEPRECATED: Use --theme instead.',
|
@@ -331,7 +344,8 @@ module Jazzy
|
|
331
344
|
if config.root_url
|
332
345
|
config.dash_url ||= URI.join(
|
333
346
|
config.root_url,
|
334
|
-
"docsets/#{config.module_name}.xml"
|
347
|
+
"docsets/#{config.module_name}.xml",
|
348
|
+
)
|
335
349
|
end
|
336
350
|
|
337
351
|
config
|
@@ -414,7 +428,7 @@ module Jazzy
|
|
414
428
|
def read_config_file(file)
|
415
429
|
case File.extname(file)
|
416
430
|
when '.json' then JSON.parse(File.read(file))
|
417
|
-
when '.yaml', '.yml' then YAML.
|
431
|
+
when '.yaml', '.yml' then YAML.safe_load(File.read(file))
|
418
432
|
else raise "Config file must be .yaml or .json, but got #{file.inspect}"
|
419
433
|
end
|
420
434
|
end
|
data/lib/jazzy/doc_builder.rb
CHANGED
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'fileutils'
|
2
2
|
require 'mustache'
|
3
3
|
require 'uri'
|
4
|
+
require 'net/http'
|
4
5
|
require 'pathname'
|
5
6
|
require 'sass'
|
6
7
|
|
@@ -8,6 +9,7 @@ require 'jazzy/config'
|
|
8
9
|
require 'jazzy/doc'
|
9
10
|
require 'jazzy/docset_builder'
|
10
11
|
require 'jazzy/documentation_generator'
|
12
|
+
require 'jazzy/search_builder'
|
11
13
|
require 'jazzy/jazzy_markdown'
|
12
14
|
require 'jazzy/podspec_documenter'
|
13
15
|
require 'jazzy/readme_generator'
|
@@ -112,22 +114,24 @@ module Jazzy
|
|
112
114
|
|
113
115
|
structure = doc_structure_for_docs(docs)
|
114
116
|
|
115
|
-
docs << SourceDocument.
|
116
|
-
sd.name = 'index'
|
117
|
-
sd.children = []
|
118
|
-
sd.type = SourceDeclaration::Type.new 'document.markdown'
|
119
|
-
sd.readme_path = options.readme_path
|
120
|
-
end
|
117
|
+
docs << SourceDocument.make_index(options.readme_path)
|
121
118
|
|
122
119
|
source_module = SourceModule.new(options, docs, structure, coverage)
|
123
120
|
|
124
121
|
output_dir = options.output
|
125
122
|
build_docs(output_dir, source_module.docs, source_module)
|
126
123
|
|
124
|
+
unless options.disable_search
|
125
|
+
warn 'building search index'
|
126
|
+
SearchBuilder.build(source_module, output_dir)
|
127
|
+
end
|
128
|
+
|
127
129
|
copy_assets(output_dir)
|
128
130
|
|
129
131
|
DocsetBuilder.new(output_dir, source_module).build!
|
130
132
|
|
133
|
+
download_badge(source_module.doc_coverage, options)
|
134
|
+
|
131
135
|
friendly_path = relative_path_if_inside(output_dir, Pathname.pwd)
|
132
136
|
puts "jam out ♪♫ to your fresh new docs in `#{friendly_path}`"
|
133
137
|
|
@@ -143,11 +147,16 @@ module Jazzy
|
|
143
147
|
sourcekitten_output,
|
144
148
|
options.min_acl,
|
145
149
|
options.skip_undocumented,
|
146
|
-
DocumentationGenerator.source_docs
|
150
|
+
DocumentationGenerator.source_docs,
|
151
|
+
)
|
147
152
|
|
148
153
|
prepare_output_dir(options.output, options.clean)
|
149
154
|
write_lint_report(undocumented, options)
|
150
155
|
|
156
|
+
puts "#{coverage}\% documentation coverage " \
|
157
|
+
"with #{undocumented.count} undocumented symbol" \
|
158
|
+
"#{undocumented.count == 1 ? '' : 's'}"
|
159
|
+
|
151
160
|
unless options.skip_documentation
|
152
161
|
build_site(docs, coverage, options)
|
153
162
|
end
|
@@ -212,6 +221,7 @@ module Jazzy
|
|
212
221
|
doc[:name] = name
|
213
222
|
doc[:overview] = Jazzy.markdown.render(doc_model.content(source_module))
|
214
223
|
doc[:custom_head] = Config.instance.custom_head
|
224
|
+
doc[:disable_search] = Config.instance.disable_search
|
215
225
|
doc[:doc_coverage] = source_module.doc_coverage unless
|
216
226
|
Config.instance.hide_documentation_coverage
|
217
227
|
doc[:structure] = source_module.doc_structure
|
@@ -224,6 +234,44 @@ module Jazzy
|
|
224
234
|
doc.render
|
225
235
|
end
|
226
236
|
|
237
|
+
# Returns the appropriate color for the provided percentage,
|
238
|
+
# used for generating a badge on shields.io
|
239
|
+
# @param [Number] coverage The documentation coverage percentage
|
240
|
+
def self.color_for_coverage(coverage)
|
241
|
+
if coverage < 10
|
242
|
+
'red'
|
243
|
+
elsif coverage < 30
|
244
|
+
'orange'
|
245
|
+
elsif coverage < 60
|
246
|
+
'yellow'
|
247
|
+
elsif coverage < 85
|
248
|
+
'yellowgreen'
|
249
|
+
elsif coverage < 90
|
250
|
+
'green'
|
251
|
+
else
|
252
|
+
'brightgreen'
|
253
|
+
end
|
254
|
+
end
|
255
|
+
|
256
|
+
# Downloads an SVG from shields.io displaying the documentation percentage
|
257
|
+
# @param [Number] coverage The documentation coverage percentage
|
258
|
+
# @param [Config] options Build options
|
259
|
+
def self.download_badge(coverage, options)
|
260
|
+
if options.hide_documentation_coverage
|
261
|
+
return
|
262
|
+
end
|
263
|
+
warn 'downloading coverage badge'
|
264
|
+
color = color_for_coverage(coverage)
|
265
|
+
uri = URI.parse('https://img.shields.io')
|
266
|
+
url_path = "/badge/documentation-#{coverage}%25-#{color}.svg"
|
267
|
+
Net::HTTP.start(uri.host, uri.port, use_ssl: true) do |http|
|
268
|
+
resp = http.get url_path
|
269
|
+
File.open(options.output + 'badge.svg', 'wb') do |file|
|
270
|
+
file.write resp.body
|
271
|
+
end
|
272
|
+
end
|
273
|
+
end
|
274
|
+
|
227
275
|
def self.should_link_to_github(file)
|
228
276
|
return unless file
|
229
277
|
file = file.realpath.to_path
|
@@ -243,7 +291,8 @@ module Jazzy
|
|
243
291
|
"#L#{item.line}"
|
244
292
|
end
|
245
293
|
relative_file_path = item.file.realpath.relative_path_from(
|
246
|
-
source_module.root_path
|
294
|
+
source_module.root_path,
|
295
|
+
)
|
247
296
|
"#{github_prefix}/#{relative_file_path}#{gh_line}"
|
248
297
|
end
|
249
298
|
|
@@ -306,6 +355,7 @@ module Jazzy
|
|
306
355
|
end
|
307
356
|
end
|
308
357
|
|
358
|
+
# rubocop:disable Metrics/MethodLength
|
309
359
|
# Build Mustache document from single parsed doc
|
310
360
|
# @param [Config] options Build options
|
311
361
|
# @param [Hash] doc_model Parsed doc. @see SourceKitten.parse
|
@@ -319,6 +369,7 @@ module Jazzy
|
|
319
369
|
|
320
370
|
doc = Doc.new # Mustache model instance
|
321
371
|
doc[:custom_head] = Config.instance.custom_head
|
372
|
+
doc[:disable_search] = Config.instance.disable_search
|
322
373
|
doc[:doc_coverage] = source_module.doc_coverage unless
|
323
374
|
Config.instance.hide_documentation_coverage
|
324
375
|
doc[:name] = doc_model.name
|
@@ -335,5 +386,6 @@ module Jazzy
|
|
335
386
|
doc[:path_to_root] = path_to_root
|
336
387
|
doc.render.gsub(ELIDED_AUTOLINK_TOKEN, path_to_root)
|
337
388
|
end
|
389
|
+
# rubocop:enable Metrics/MethodLength
|
338
390
|
end
|
339
391
|
end
|