jazzy 0.9.3 → 0.9.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (33) hide show
  1. checksums.yaml +4 -4
  2. data/.circleci/config.yml +3 -3
  3. data/CHANGELOG.md +52 -0
  4. data/CONTRIBUTING.md +1 -1
  5. data/Gemfile.lock +44 -44
  6. data/README.md +44 -6
  7. data/bin/sourcekitten +0 -0
  8. data/jazzy.gemspec +5 -5
  9. data/lib/jazzy/config.rb +8 -3
  10. data/lib/jazzy/doc_builder.rb +12 -4
  11. data/lib/jazzy/documentation_generator.rb +0 -7
  12. data/lib/jazzy/gem_version.rb +1 -1
  13. data/lib/jazzy/podspec_documenter.rb +19 -2
  14. data/lib/jazzy/source_declaration.rb +15 -4
  15. data/lib/jazzy/source_declaration/type.rb +11 -1
  16. data/lib/jazzy/source_document.rb +18 -2
  17. data/lib/jazzy/sourcekitten.rb +41 -17
  18. data/lib/jazzy/themes/apple/assets/css/jazzy.css.scss +9 -5
  19. data/lib/jazzy/themes/apple/templates/deprecation.mustache +12 -0
  20. data/lib/jazzy/themes/apple/templates/doc.mustache +1 -0
  21. data/lib/jazzy/themes/apple/templates/task.mustache +12 -0
  22. data/lib/jazzy/themes/fullwidth/assets/css/jazzy.css.scss +10 -4
  23. data/lib/jazzy/themes/fullwidth/assets/js/jazzy.search.js +2 -1
  24. data/lib/jazzy/themes/fullwidth/templates/deprecation.mustache +12 -0
  25. data/lib/jazzy/themes/fullwidth/templates/doc.mustache +1 -0
  26. data/lib/jazzy/themes/fullwidth/templates/task.mustache +12 -0
  27. data/lib/jazzy/themes/jony/assets/css/jazzy.css.scss +5 -2
  28. data/lib/jazzy/themes/jony/templates/deprecation.mustache +12 -0
  29. data/lib/jazzy/themes/jony/templates/doc.mustache +1 -0
  30. data/lib/jazzy/themes/jony/templates/task.mustache +12 -0
  31. data/spec/integration_spec.rb +1 -1
  32. metadata +16 -14
  33. data/lib/jazzy/readme_generator.rb +0 -61
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: accd6c9ed649bd4be1a4bbc78ad1d0bce7c426de
4
- data.tar.gz: 7b3d85bc26cef54041f0b9536e9273f283e952d6
3
+ metadata.gz: f5a0f16d2a7503e43f28a7eff101228617d44ed4
4
+ data.tar.gz: e423b906a68d413d3c8e63ce0c7961b5e88da272
5
5
  SHA512:
6
- metadata.gz: f738c74fb08575c110f13407de425ad988b582f56798fa09899a8e87735c62d966faf4e519eeae349a97393ee69b6c8ece48b1a2df3c2fc9623976dc4d1289d1
7
- data.tar.gz: 77fd0c7d2d0ca3af3c284c04c1789747bff4e1dee6c7dfa567092bd3539ee3a1f9e67bf2438bda43f96aa572c4374ac21534006fb17b2df72f54984eaa171dfb
6
+ metadata.gz: ceff92f660c07d63dfd1bf95c6b9928c7ab56fbe8ec8899d37d275248510d2a79c691fc8c83cdb5dfe5516926009ddd10162c48e74898a37613be2cbfd043299
7
+ data.tar.gz: 21f47afdaadb40618d31c8b0597c698688adc7c2cd64a152d58d3feea0cf47e5607720ac743730bb5b9191cd970c8fdfb63c5270b8775fe6754e813e04a06985
data/.circleci/config.yml CHANGED
@@ -23,7 +23,7 @@ jobs:
23
23
 
24
24
  swift:
25
25
  macos:
26
- xcode: "9.3.0"
26
+ xcode: "10.0.0"
27
27
  environment: *bundler-environment
28
28
  # Used to invoke chruby
29
29
  shell: *shell
@@ -38,7 +38,7 @@ jobs:
38
38
 
39
39
  objc:
40
40
  macos:
41
- xcode: "9.3.0"
41
+ xcode: "10.0.0"
42
42
  environment: *bundler-environment
43
43
  # Used to invoke chruby
44
44
  shell: *shell
@@ -53,7 +53,7 @@ jobs:
53
53
 
54
54
  cocoapods:
55
55
  macos:
56
- xcode: "9.3.0"
56
+ xcode: "10.0.0"
57
57
  environment: *bundler-environment
58
58
  # Used to invoke chruby
59
59
  shell: *shell
data/CHANGELOG.md CHANGED
@@ -1,3 +1,55 @@
1
+ ## 0.9.5
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * Link to documentation pages from contents pages.
10
+ [John Fairhurst](https://github.com/johnfairh)
11
+ [#730](https://github.com/realm/jazzy/issues/730)
12
+
13
+ * Call out unavailable and deprecated Objective-C declarations.
14
+ [Stefan Kieleithner](https://github.com/steviki)
15
+ [John Fairhurst](https://github.com/johnfairh)
16
+ [#843](https://github.com/realm/jazzy/issues/843)
17
+
18
+ ##### Bug Fixes
19
+
20
+ * Support Swift 4.2 with `--podspec`.
21
+ [John Fairhurst](https://github.com/johnfairh)
22
+ [#1015](https://github.com/realm/jazzy/issues/1015)
23
+
24
+ * Fix multiline copyright for `apple` theme.
25
+ [Fabien Lydoire](https://github.com/fabienlydoire)
26
+ [John Fairhurst](https://github.com/johnfairh)
27
+ [#1016](https://github.com/realm/jazzy/issues/1016)
28
+
29
+ ## 0.9.4
30
+
31
+ ##### Breaking
32
+
33
+ * None.
34
+
35
+ ##### Enhancements
36
+
37
+ * None.
38
+
39
+ ##### Bug Fixes
40
+
41
+ * Fix crash with pre-existing `Docs` directory.
42
+ [John Fairhurst](https://github.com/johnfairh)
43
+ [#965](https://github.com/realm/jazzy/issues/965)
44
+
45
+ * Fix crash with unicode scalars in string literals.
46
+ [John Fairhurst](https://github.com/johnfairh)
47
+ [#972](https://github.com/realm/jazzy/issues/972)
48
+
49
+ * Fix error compiling a Swift podspec in Xcode 10.
50
+ [Minh Nguyễn](https://github.com/1ec5)
51
+ [#970](https://github.com/realm/jazzy/issues/970)
52
+
1
53
  ## 0.9.3
2
54
 
3
55
  ##### Breaking
data/CONTRIBUTING.md CHANGED
@@ -49,7 +49,7 @@ 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 9.3 installed to build the integration specs.
52
+ You must have Xcode 10.0 installed to build the integration specs.
53
53
 
54
54
  ## Making changes to SourceKitten
55
55
 
data/Gemfile.lock CHANGED
@@ -1,21 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.9.3)
5
- cocoapods (~> 1.0)
6
- mustache (~> 0.99)
4
+ jazzy (0.9.5)
5
+ cocoapods (~> 1.5.3)
6
+ mustache (~> 1.1.0)
7
7
  open4
8
- redcarpet (~> 3.2)
8
+ redcarpet (~> 3.4.0)
9
9
  rouge (>= 2.0.6, < 4.0)
10
- sass (~> 3.4)
11
- sqlite3 (~> 1.3)
10
+ sass (~> 3.6.0)
11
+ sqlite3 (~> 1.3.13)
12
12
  xcinvoke (~> 0.3.0)
13
13
 
14
14
  GEM
15
15
  remote: https://rubygems.org/
16
16
  specs:
17
17
  CFPropertyList (3.0.0)
18
- activesupport (4.2.10)
18
+ activesupport (4.2.11)
19
19
  i18n (~> 0.7)
20
20
  minitest (~> 5.1)
21
21
  thread_safe (~> 0.3, >= 0.3.4)
@@ -23,7 +23,7 @@ GEM
23
23
  addressable (2.5.2)
24
24
  public_suffix (>= 2.0.2, < 4.0)
25
25
  ast (2.4.0)
26
- atomos (0.1.2)
26
+ atomos (0.1.3)
27
27
  bacon (1.2.0)
28
28
  claide (1.0.2)
29
29
  claide-plugins (0.9.2)
@@ -33,10 +33,10 @@ GEM
33
33
  clintegracon (0.7.0)
34
34
  colored (~> 1.2)
35
35
  diffy
36
- cocoapods (1.5.0)
36
+ cocoapods (1.5.3)
37
37
  activesupport (>= 4.0.2, < 5)
38
38
  claide (>= 1.0.2, < 2.0)
39
- cocoapods-core (= 1.5.0)
39
+ cocoapods-core (= 1.5.3)
40
40
  cocoapods-deintegrate (>= 1.0.2, < 2.0)
41
41
  cocoapods-downloader (>= 1.2.0, < 2.0)
42
42
  cocoapods-plugins (>= 1.0.0, < 2.0)
@@ -52,86 +52,86 @@ GEM
52
52
  nap (~> 1.0)
53
53
  ruby-macho (~> 1.1)
54
54
  xcodeproj (>= 1.5.7, < 2.0)
55
- cocoapods-core (1.5.0)
55
+ cocoapods-core (1.5.3)
56
56
  activesupport (>= 4.0.2, < 6)
57
57
  fuzzy_match (~> 2.0.4)
58
58
  nap (~> 1.0)
59
59
  cocoapods-deintegrate (1.0.2)
60
- cocoapods-downloader (1.2.0)
60
+ cocoapods-downloader (1.2.2)
61
61
  cocoapods-plugins (1.0.0)
62
62
  nap
63
63
  cocoapods-search (1.0.0)
64
- cocoapods-stats (1.0.0)
65
- cocoapods-trunk (1.3.0)
64
+ cocoapods-stats (1.1.0)
65
+ cocoapods-trunk (1.3.1)
66
66
  nap (>= 0.8, < 2.0)
67
67
  netrc (~> 0.11)
68
68
  cocoapods-try (1.1.0)
69
69
  colored (1.2)
70
70
  colored2 (3.1.2)
71
- concurrent-ruby (1.0.5)
71
+ concurrent-ruby (1.1.4)
72
72
  cork (0.3.0)
73
73
  colored2 (~> 3.1)
74
74
  crack (0.4.3)
75
75
  safe_yaml (~> 1.0.0)
76
- danger (5.5.12)
76
+ danger (5.11.1)
77
77
  claide (~> 1.0)
78
78
  claide-plugins (>= 0.9.2)
79
79
  colored2 (~> 3.1)
80
80
  cork (~> 0.1)
81
81
  faraday (~> 0.9)
82
82
  faraday-http-cache (~> 1.0)
83
- git (~> 1)
83
+ git (~> 1.5)
84
84
  kramdown (~> 1.5)
85
85
  no_proxy_fix
86
86
  octokit (~> 4.7)
87
87
  terminal-table (~> 1)
88
- diffy (3.2.0)
88
+ diffy (3.3.0)
89
89
  escape (0.0.4)
90
- faraday (0.15.0)
90
+ faraday (0.15.4)
91
91
  multipart-post (>= 1.2, < 3)
92
92
  faraday-http-cache (1.3.1)
93
93
  faraday (~> 0.8)
94
- ffi (1.9.23)
94
+ ffi (1.10.0)
95
95
  fourflusher (2.0.1)
96
96
  fuzzy_match (2.0.4)
97
97
  gh_inspector (1.1.3)
98
- git (1.3.0)
99
- hashdiff (0.3.7)
98
+ git (1.5.0)
99
+ hashdiff (0.3.8)
100
100
  i18n (0.9.5)
101
101
  concurrent-ruby (~> 1.0)
102
- kramdown (1.16.2)
102
+ kramdown (1.17.0)
103
103
  liferaft (0.0.6)
104
104
  metaclass (0.0.4)
105
105
  minitest (5.11.3)
106
- mocha (1.5.0)
106
+ mocha (1.8.0)
107
107
  metaclass (~> 0.0.1)
108
108
  mocha-on-bacon (0.2.3)
109
109
  mocha (>= 0.13.0)
110
- molinillo (0.6.5)
110
+ molinillo (0.6.6)
111
111
  multipart-post (2.0.0)
112
- mustache (0.99.8)
113
- nanaimo (0.2.5)
112
+ mustache (1.1.0)
113
+ nanaimo (0.2.6)
114
114
  nap (1.1.0)
115
115
  netrc (0.11.0)
116
116
  no_proxy_fix (0.1.2)
117
- octokit (4.8.0)
117
+ octokit (4.13.0)
118
118
  sawyer (~> 0.8.0, >= 0.5.3)
119
119
  open4 (1.3.4)
120
- parallel (1.12.1)
121
- parser (2.5.1.0)
120
+ parallel (1.13.0)
121
+ parser (2.6.0.0)
122
122
  ast (~> 2.4.0)
123
- powerpack (0.1.1)
123
+ powerpack (0.1.2)
124
124
  prettybacon (0.0.2)
125
125
  bacon (~> 1.2)
126
- public_suffix (3.0.2)
126
+ public_suffix (3.0.3)
127
127
  rainbow (2.2.2)
128
128
  rake
129
129
  rake (10.5.0)
130
130
  rb-fsevent (0.10.3)
131
- rb-inotify (0.9.10)
132
- ffi (>= 0.5.0, < 2)
131
+ rb-inotify (0.10.0)
132
+ ffi (~> 1.0)
133
133
  redcarpet (3.4.0)
134
- rouge (3.1.1)
134
+ rouge (3.3.0)
135
135
  rubocop (0.49.0)
136
136
  parallel (~> 1.10)
137
137
  parser (>= 2.3.3.1, < 3.0)
@@ -139,10 +139,10 @@ GEM
139
139
  rainbow (>= 1.99.1, < 3.0)
140
140
  ruby-progressbar (~> 1.7)
141
141
  unicode-display_width (~> 1.0, >= 1.0.1)
142
- ruby-macho (1.1.0)
143
- ruby-progressbar (1.9.0)
142
+ ruby-macho (1.3.1)
143
+ ruby-progressbar (1.10.0)
144
144
  safe_yaml (1.0.4)
145
- sass (3.5.6)
145
+ sass (3.6.0)
146
146
  sass-listen (~> 4.0.0)
147
147
  sass-listen (4.0.0)
148
148
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -156,19 +156,19 @@ GEM
156
156
  thread_safe (0.3.6)
157
157
  tzinfo (1.2.5)
158
158
  thread_safe (~> 0.1)
159
- unicode-display_width (1.3.2)
160
- webmock (3.3.0)
159
+ unicode-display_width (1.4.1)
160
+ webmock (3.5.1)
161
161
  addressable (>= 2.3.6)
162
162
  crack (>= 0.3.2)
163
163
  hashdiff
164
164
  xcinvoke (0.3.0)
165
165
  liferaft (~> 0.0.6)
166
- xcodeproj (1.5.7)
166
+ xcodeproj (1.7.0)
167
167
  CFPropertyList (>= 2.3.3, < 4.0)
168
- atomos (~> 0.1.2)
168
+ atomos (~> 0.1.3)
169
169
  claide (>= 1.0.2, < 2.0)
170
170
  colored2 (~> 3.1)
171
- nanaimo (~> 0.2.4)
171
+ nanaimo (~> 0.2.6)
172
172
 
173
173
  PLATFORMS
174
174
  ruby
@@ -188,4 +188,4 @@ DEPENDENCIES
188
188
  webmock
189
189
 
190
190
  BUNDLED WITH
191
- 1.16.0
191
+ 1.17.3
data/README.md CHANGED
@@ -1,7 +1,5 @@
1
1
  ![jazzy](images/logo.jpg)
2
2
 
3
- ![analytics](https://ga-beacon.appspot.com/UA-50247013-2/jazzy/README?pixel)
4
-
5
3
  [![Build Status](https://circleci.com/gh/realm/jazzy.svg?style=svg)](https://circleci.com/gh/realm/jazzy)
6
4
 
7
5
  *jazzy is a command-line utility that generates documentation for Swift or Objective-C*
@@ -35,9 +33,8 @@ document. It must be installed in a location indexed by Spotlight for the
35
33
  [sudo] gem install jazzy
36
34
  ```
37
35
 
38
- The Xcode command-line developer tools must be installed to successfully build
39
- the gems that `jazzy` depends on: try `xcode-select --install` if you see build
40
- errors.
36
+ See [Installation Problems](#installation-problems) for solutions to some
37
+ common problems.
41
38
 
42
39
  ## Usage
43
40
 
@@ -168,7 +165,7 @@ Any files found matching the file pattern will be parsed and included as a docum
168
165
 
169
166
  There are a few limitations:
170
167
  - File names must be unique from source files.
171
- - Readme should be specified separately using the `readme_path` option.
168
+ - Readme should be specified separately using the `readme` option.
172
169
 
173
170
  ### Section description abstracts
174
171
 
@@ -222,6 +219,20 @@ Note that the `--include` option is applied before the `--exclude` option. For e
222
219
  Declarations with a documentation comment containing `:nodoc:` are excluded from the
223
220
  documentation.
224
221
 
222
+ ### Choosing the Swift language version
223
+
224
+ Jazzy normally uses the Swift compiler from the Xcode currently configured by
225
+ `xcode-select`. Use the `--swift-version` flag to compile with a different
226
+ Xcode.
227
+
228
+ The value you pass to `--swift-version` must be the Swift language version given
229
+ by `swift --version` in the Xcode you want to use.
230
+
231
+ For example to use Xcode 9.4:
232
+ ```shell
233
+ jazzy --swift-version 4.1.2
234
+ ```
235
+
225
236
  ## Troubleshooting
226
237
 
227
238
  #### Swift
@@ -230,6 +241,33 @@ documentation.
230
241
 
231
242
  Check the `--min-acl` setting -- see [above](#controlling-what-is-documented).
232
243
 
244
+ **Unable to find an Xcode with swift version X**
245
+
246
+ 1. The value passed with `--swift-version` must exactly match the version
247
+ number from `swiftc --version`. For example Xcode 10.1 needs
248
+ `--swift-version 4.2.1`. See [the flag documentation](#choosing-the-swift-language-version).
249
+ 2. The Xcode you want to use must be in the Spotlight index. You can check
250
+ this using `mdfind 'kMDItemCFBundleIdentifier == com.apple.dt.Xcode'`.
251
+ Some users have reported this issue being fixed by a reboot; `mdutil -E`
252
+ may also help. If none of these work then you can set the `DEVELOPER_DIR`
253
+ environment variable to point to the Xcode you want before running Jazzy
254
+ without the `--swift-version` flag.
255
+
256
+ #### Installation Problems
257
+
258
+ **Can't find header files / clang**
259
+
260
+ Some of the Ruby gems that Jazzy depends on have native C extensions. This
261
+ means you need the Xcode command-line developer tools installed to build
262
+ them: run `xcode-select --install` to install the tools.
263
+
264
+ **/Applications/Xcode: No such file or directory**
265
+
266
+ The path of your active Xcode installation must not contain spaces. So
267
+ `/Applications/Xcode.app/` is fine, `/Applications/Xcode-10.2.app/` is fine,
268
+ but `/Applications/Xcode 10.2.app/` is not. This restriction applies only
269
+ when *installing* Jazzy, not running it.
270
+
233
271
  ## Development
234
272
 
235
273
  Please review jazzy's [contributing guidelines](https://github.com/realm/jazzy/blob/master/CONTRIBUTING.md) when submitting pull requests.
data/bin/sourcekitten CHANGED
Binary file
data/jazzy.gemspec CHANGED
@@ -17,13 +17,13 @@ Gem::Specification.new do |spec|
17
17
  spec.files = `git ls-files`.split($/)
18
18
  spec.executables << 'jazzy'
19
19
 
20
- spec.add_runtime_dependency 'cocoapods', '~> 1.0'
21
- spec.add_runtime_dependency 'mustache', '~> 0.99'
20
+ spec.add_runtime_dependency 'cocoapods', '~> 1.5.3'
21
+ spec.add_runtime_dependency 'mustache', '~> 1.1.0'
22
22
  spec.add_runtime_dependency 'open4'
23
- spec.add_runtime_dependency 'redcarpet', '~> 3.2'
23
+ spec.add_runtime_dependency 'redcarpet', '~> 3.4.0'
24
24
  spec.add_runtime_dependency 'rouge', ['>= 2.0.6', '< 4.0']
25
- spec.add_runtime_dependency 'sass', '~> 3.4'
26
- spec.add_runtime_dependency 'sqlite3', '~> 1.3'
25
+ spec.add_runtime_dependency 'sass', '~> 3.6.0'
26
+ spec.add_runtime_dependency 'sqlite3', '~> 1.3.13'
27
27
  spec.add_runtime_dependency 'xcinvoke', '~> 0.3.0'
28
28
 
29
29
  spec.add_development_dependency 'bundler', '~> 1.7'
data/lib/jazzy/config.rb CHANGED
@@ -86,10 +86,15 @@ module Jazzy
86
86
 
87
87
  attr_accessor :base_path
88
88
 
89
- def expand_path(path)
89
+ def expand_glob_path(path)
90
90
  Pathname(path).expand_path(base_path) # nil means Pathname.pwd
91
91
  end
92
92
 
93
+ def expand_path(path)
94
+ abs_path = expand_glob_path(path)
95
+ Pathname(Dir[abs_path][0] || abs_path) # Use existing filesystem spelling
96
+ end
97
+
93
98
  # ──────── Build ────────
94
99
 
95
100
  # rubocop:disable Layout/AlignParameters
@@ -164,7 +169,7 @@ module Jazzy
164
169
  'Supports wildcards.',
165
170
  default: [],
166
171
  parse: ->(files) do
167
- Array(files).map { |f| expand_path(f).to_s }
172
+ Array(files).map { |f| expand_glob_path(f).to_s }
168
173
  end
169
174
 
170
175
  config_attr :included_files,
@@ -173,7 +178,7 @@ module Jazzy
173
178
  'Supports wildcards.',
174
179
  default: [],
175
180
  parse: ->(files) do
176
- Array(files).map { |f| expand_path(f).to_s }
181
+ Array(files).map { |f| expand_glob_path(f).to_s }
177
182
  end
178
183
 
179
184
  config_attr :swift_version,