jazzy 0.9.1 → 0.9.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 319a5e064f71871c4311e5b60e6b2a45a85d2c99
4
- data.tar.gz: 6cbebd00f828e1ef1a08382a2af92e0723126cbd
3
+ metadata.gz: ded8d78313e2fcab8ead87a65f4cf9f35d2584a1
4
+ data.tar.gz: eb426a586c8fce20e5e87c9ccbaac0466bd10d8d
5
5
  SHA512:
6
- metadata.gz: 9bd0c57811ffaaf3b0f1dbf5b15441c3acc461024ac1ce5934faa78d82d049d612c7b5d93970b8a532ecbc71beadb3735d6bf53f264c01a128cbf2cc54654c80
7
- data.tar.gz: de4b36d41306cc0746f21154838793efc3e95b56d86bf4ad26c911f371db0b83318b3db07e770c223007fc43c327eb9deabdc8e89cd21d3049d87c45872cb345
6
+ metadata.gz: 6694288ef466e3f3fa62508ae1905cbb1c76cf9a0a010b46ca167d08aa2d3dbc6951d306bcfb48102fe36758e8f89a45d429a992ac934b2dbe924198f3380891
7
+ data.tar.gz: 56ba55fa32962a163b739455a6f1965aead62019582e3cb8ca81e39f8d26df4723965ab5029fca2db0a3fecf62c11d3c948e93a987ae22d2826d3f67e32e8d02
@@ -23,7 +23,7 @@ jobs:
23
23
 
24
24
  swift:
25
25
  macos:
26
- xcode: "9.2.0"
26
+ xcode: "9.3.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.2.0"
41
+ xcode: "9.3.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.2.0"
56
+ xcode: "9.3.0"
57
57
  environment: *bundler-environment
58
58
  # Used to invoke chruby
59
59
  shell: *shell
@@ -1,3 +1,38 @@
1
+ ## 0.9.2
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * Add a new 'jony' theme similar to the 2017 Apple documentation style.
10
+ [Harshil Shah](https://github.com/HarshilShah)
11
+
12
+ * Add the ability to limit documentation to certain files by passing in an
13
+ `-i`/`--include` argument.
14
+ [Nick Fox](https://github.com/nicholasffox)
15
+ [#949](https://github.com/realm/jazzy/issues/949)
16
+
17
+ * Improve Swift declarations to look more like the Xcode Quick Help version,
18
+ for example including `{ get set }`, and include all attributes.
19
+ [John Fairhurst](https://github.com/johnfairh)
20
+ [#768](https://github.com/realm/jazzy/issues/768)
21
+ [#591](https://github.com/realm/jazzy/issues/591)
22
+
23
+ ##### Bug Fixes
24
+
25
+ * Preserve `MARK` comment headings associated with extensions and enum cases.
26
+ [John Fairhurst](https://github.com/johnfairh)
27
+
28
+ * Fix issue where Overview items were invalidly being referenced with NULL
29
+ types in the generated Dash docset index.
30
+ [Andrew De Ponte](https://github.com/cyphactor)
31
+
32
+ * Don't display FIXME or TODO comments as section markers.
33
+ [John Fairhurst](https://github.com/johnfairh)
34
+ [#658](https://github.com/realm/jazzy/issues/658)
35
+
1
36
  ## 0.9.1
2
37
 
3
38
  ##### Breaking
@@ -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.2 installed to build the integration specs.
52
+ You must have Xcode 9.3 installed to build the integration specs.
53
53
 
54
54
  ## Making changes to SourceKitten
55
55
 
data/Dangerfile CHANGED
@@ -24,5 +24,5 @@ end
24
24
 
25
25
  # Non-trivial amounts of app changes without tests
26
26
  if git.lines_of_code > 50 && has_app_changes && !has_test_changes
27
- warn "This PR may need tests."
27
+ warn "This PR may need tests."
28
28
  end
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.9.1)
4
+ jazzy (0.9.2)
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.6)
17
+ CFPropertyList (3.0.0)
18
18
  activesupport (4.2.10)
19
19
  i18n (~> 0.7)
20
20
  minitest (~> 5.1)
@@ -22,7 +22,8 @@ GEM
22
22
  tzinfo (~> 1.1)
23
23
  addressable (2.5.2)
24
24
  public_suffix (>= 2.0.2, < 4.0)
25
- ast (2.3.0)
25
+ ast (2.4.0)
26
+ atomos (0.1.2)
26
27
  bacon (1.2.0)
27
28
  claide (1.0.2)
28
29
  claide-plugins (0.9.2)
@@ -32,31 +33,31 @@ GEM
32
33
  clintegracon (0.7.0)
33
34
  colored (~> 1.2)
34
35
  diffy
35
- cocoapods (1.3.1)
36
+ cocoapods (1.5.0)
36
37
  activesupport (>= 4.0.2, < 5)
37
38
  claide (>= 1.0.2, < 2.0)
38
- cocoapods-core (= 1.3.1)
39
- cocoapods-deintegrate (>= 1.0.1, < 2.0)
40
- cocoapods-downloader (>= 1.1.3, < 2.0)
39
+ cocoapods-core (= 1.5.0)
40
+ cocoapods-deintegrate (>= 1.0.2, < 2.0)
41
+ cocoapods-downloader (>= 1.2.0, < 2.0)
41
42
  cocoapods-plugins (>= 1.0.0, < 2.0)
42
43
  cocoapods-search (>= 1.0.0, < 2.0)
43
44
  cocoapods-stats (>= 1.0.0, < 2.0)
44
- cocoapods-trunk (>= 1.2.0, < 2.0)
45
+ cocoapods-trunk (>= 1.3.0, < 2.0)
45
46
  cocoapods-try (>= 1.1.0, < 2.0)
46
47
  colored2 (~> 3.1)
47
48
  escape (~> 0.0.4)
48
49
  fourflusher (~> 2.0.1)
49
50
  gh_inspector (~> 1.0)
50
- molinillo (~> 0.5.7)
51
+ molinillo (~> 0.6.5)
51
52
  nap (~> 1.0)
52
53
  ruby-macho (~> 1.1)
53
- xcodeproj (>= 1.5.1, < 2.0)
54
- cocoapods-core (1.3.1)
54
+ xcodeproj (>= 1.5.7, < 2.0)
55
+ cocoapods-core (1.5.0)
55
56
  activesupport (>= 4.0.2, < 6)
56
57
  fuzzy_match (~> 2.0.4)
57
58
  nap (~> 1.0)
58
- cocoapods-deintegrate (1.0.1)
59
- cocoapods-downloader (1.1.3)
59
+ cocoapods-deintegrate (1.0.2)
60
+ cocoapods-downloader (1.2.0)
60
61
  cocoapods-plugins (1.0.0)
61
62
  nap
62
63
  cocoapods-search (1.0.0)
@@ -72,7 +73,7 @@ GEM
72
73
  colored2 (~> 3.1)
73
74
  crack (0.4.3)
74
75
  safe_yaml (~> 1.0.0)
75
- danger (5.5.3)
76
+ danger (5.5.12)
76
77
  claide (~> 1.0)
77
78
  claide-plugins (>= 0.9.2)
78
79
  colored2 (~> 3.1)
@@ -86,51 +87,51 @@ GEM
86
87
  terminal-table (~> 1)
87
88
  diffy (3.2.0)
88
89
  escape (0.0.4)
89
- faraday (0.13.1)
90
+ faraday (0.15.0)
90
91
  multipart-post (>= 1.2, < 3)
91
92
  faraday-http-cache (1.3.1)
92
93
  faraday (~> 0.8)
93
- ffi (1.9.18)
94
+ ffi (1.9.23)
94
95
  fourflusher (2.0.1)
95
96
  fuzzy_match (2.0.4)
96
- gh_inspector (1.0.3)
97
+ gh_inspector (1.1.3)
97
98
  git (1.3.0)
98
99
  hashdiff (0.3.7)
99
- i18n (0.9.1)
100
+ i18n (0.9.5)
100
101
  concurrent-ruby (~> 1.0)
101
- kramdown (1.15.0)
102
+ kramdown (1.16.2)
102
103
  liferaft (0.0.6)
103
104
  metaclass (0.0.4)
104
- minitest (5.11.1)
105
- mocha (1.3.0)
105
+ minitest (5.11.3)
106
+ mocha (1.5.0)
106
107
  metaclass (~> 0.0.1)
107
108
  mocha-on-bacon (0.2.3)
108
109
  mocha (>= 0.13.0)
109
- molinillo (0.5.7)
110
+ molinillo (0.6.5)
110
111
  multipart-post (2.0.0)
111
112
  mustache (0.99.8)
112
- nanaimo (0.2.3)
113
+ nanaimo (0.2.5)
113
114
  nap (1.1.0)
114
115
  netrc (0.11.0)
115
116
  no_proxy_fix (0.1.2)
116
- octokit (4.7.0)
117
+ octokit (4.8.0)
117
118
  sawyer (~> 0.8.0, >= 0.5.3)
118
119
  open4 (1.3.4)
119
- parallel (1.12.0)
120
- parser (2.4.0.0)
121
- ast (~> 2.2)
120
+ parallel (1.12.1)
121
+ parser (2.5.1.0)
122
+ ast (~> 2.4.0)
122
123
  powerpack (0.1.1)
123
124
  prettybacon (0.0.2)
124
125
  bacon (~> 1.2)
125
- public_suffix (3.0.0)
126
+ public_suffix (3.0.2)
126
127
  rainbow (2.2.2)
127
128
  rake
128
129
  rake (10.5.0)
129
- rb-fsevent (0.10.2)
130
+ rb-fsevent (0.10.3)
130
131
  rb-inotify (0.9.10)
131
132
  ffi (>= 0.5.0, < 2)
132
133
  redcarpet (3.4.0)
133
- rouge (3.1.0)
134
+ rouge (3.1.1)
134
135
  rubocop (0.49.0)
135
136
  parallel (~> 1.10)
136
137
  parser (>= 2.3.3.1, < 3.0)
@@ -141,7 +142,7 @@ GEM
141
142
  ruby-macho (1.1.0)
142
143
  ruby-progressbar (1.9.0)
143
144
  safe_yaml (1.0.4)
144
- sass (3.5.5)
145
+ sass (3.5.6)
145
146
  sass-listen (~> 4.0.0)
146
147
  sass-listen (4.0.0)
147
148
  rb-fsevent (~> 0.9, >= 0.9.4)
@@ -153,20 +154,21 @@ GEM
153
154
  terminal-table (1.8.0)
154
155
  unicode-display_width (~> 1.1, >= 1.1.1)
155
156
  thread_safe (0.3.6)
156
- tzinfo (1.2.4)
157
+ tzinfo (1.2.5)
157
158
  thread_safe (~> 0.1)
158
- unicode-display_width (1.3.0)
159
- webmock (3.1.0)
159
+ unicode-display_width (1.3.2)
160
+ webmock (3.3.0)
160
161
  addressable (>= 2.3.6)
161
162
  crack (>= 0.3.2)
162
163
  hashdiff
163
164
  xcinvoke (0.3.0)
164
165
  liferaft (~> 0.0.6)
165
- xcodeproj (1.5.4)
166
- CFPropertyList (~> 2.3.3)
166
+ xcodeproj (1.5.7)
167
+ CFPropertyList (>= 2.3.3, < 4.0)
168
+ atomos (~> 0.1.2)
167
169
  claide (>= 1.0.2, < 2.0)
168
170
  colored2 (~> 3.1)
169
- nanaimo (~> 0.2.3)
171
+ nanaimo (~> 0.2.4)
170
172
 
171
173
  PLATFORMS
172
174
  ruby
data/README.md CHANGED
@@ -35,6 +35,10 @@ document. It must be installed in a location indexed by Spotlight for the
35
35
  [sudo] gem install jazzy
36
36
  ```
37
37
 
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.
41
+
38
42
  ## Usage
39
43
 
40
44
  Run `jazzy` from your command line. Run `jazzy -h` for a list of additional options.
@@ -139,11 +143,11 @@ jazzy \
139
143
 
140
144
  ### Themes
141
145
 
142
- Two themes are provided with jazzy: `apple` (default) and `fullwidth`.
143
-
144
- Here's an example built with `apple`: <https://realm.io/docs/swift/latest/api/>
146
+ Three themes are provided with jazzy: `apple` (default), `fullwidth` and `jony`.
145
147
 
146
- Here's an example built with `fullwidth`: <http://reduxkit.github.io/ReduxKit/>
148
+ * `apple` example: <https://realm.io/docs/swift/latest/api/>
149
+ * `fullwidth` example: <https://reduxkit.github.io/ReduxKit/>
150
+ * `jony` example: <https://harshilshah.github.io/IGListKit/>
147
151
 
148
152
  You can specify which theme to use by passing in the `--theme` option. You can
149
153
  also provide your own custom theme by passing in the path to your theme
@@ -193,21 +197,28 @@ include declarations with a lower access level, set the `--min-acl` flag to `int
193
197
  In Objective-C mode, Jazzy documents all declarations found in the `--umbrella-header`
194
198
  header file and any other header files included by it.
195
199
 
196
- You can then prevent some of these declarations from being documented using `--exclude`
197
- or `:nodoc:`.
200
+ You can control exactly which declarations should be documented using `--exclude`,
201
+ `--include`, or `:nodoc:`.
198
202
 
199
- The `--exclude` flag lists source files to omit from the documentation. Entries in the
200
- list can be absolute pathnames beginning with `/` or relative pathnames. Relative
201
- pathnames are interpreted relative to the directory from where you run `jazzy` or, if the
202
- exclude flag is set in the config file, relative to the directory containing the config
203
- file. Entries in the list can match multiple files using `*` to match any number of
204
- characters including `/`. For example:
205
- * `jazzy --exclude=/Users/fred/project/Sources/Secret.swift` -- exclude a specific file
203
+ The `--include` and `--exclude` flags list source files that should be included/excluded
204
+ respectively in the documentation. Entries in the list can be absolute pathnames beginning
205
+ with `/` or relative pathnames. Relative pathnames are interpreted relative to the
206
+ directory from where you run `jazzy` or, if the flags are set in the config file, relative
207
+ to the directory containing the config file. Entries in the list can match multiple files
208
+ using `*` to match any number of characters including `/`. For example:
209
+ * `jazzy --include=/Users/fred/project/Sources/Secret.swift` -- include a specific file
206
210
  * `jazzy --exclude=/*/Internal*` -- exclude all files with names that begin with *Internal*
207
211
  and any files under any directory with a name beginning *Internal*.
208
212
  * `jazzy --exclude=Impl1/*,Impl2/*` -- exclude all files under the directories *Impl1* and
209
213
  *Impl2* found in the current directory.
210
214
 
215
+ Note that the `--include` option is applied before the `--exclude` option. For example:
216
+
217
+ * `jazzy --include=/*/Internal* --exclude=Impl1/*,Impl2/*` -- include all files with names
218
+ that begin with *Internal* and any files under any directory with a name beginning
219
+ *Internal*, **except** for those under the directories *Impl1* and *Impl2* found in the
220
+ current directory
221
+
211
222
  Declarations with a documentation comment containing `:nodoc:` are excluded from the
212
223
  documentation.
213
224
 
data/Rakefile CHANGED
@@ -106,9 +106,6 @@ begin
106
106
  `swift build -c release -Xswiftc -static-stdlib`
107
107
  end
108
108
  FileUtils.cp_r "#{sk_dir}/.build/release/sourcekitten", 'bin'
109
- system 'install_name_tool', '-delete_rpath',
110
- (Pathname(`xcrun -find swift`) + '../../lib/swift/macosx').to_s,
111
- 'bin/sourcekitten'
112
109
  end
113
110
 
114
111
  rescue LoadError, NameError => e
Binary file
@@ -167,6 +167,15 @@ module Jazzy
167
167
  Array(files).map { |f| expand_path(f).to_s }
168
168
  end
169
169
 
170
+ config_attr :included_files,
171
+ command_line: ['-i', '--include filepath1,filepath2,…filepathN', Array],
172
+ description: 'Source file pathnames to be included in documentation. '\
173
+ 'Supports wildcards.',
174
+ default: [],
175
+ parse: ->(files) do
176
+ Array(files).map { |f| expand_path(f).to_s }
177
+ end
178
+
170
179
  config_attr :swift_version,
171
180
  command_line: '--swift-version VERSION',
172
181
  default: nil,
@@ -302,10 +311,10 @@ module Jazzy
302
311
  default: ''
303
312
 
304
313
  config_attr :theme_directory,
305
- command_line: '--theme [apple | fullwidth | DIRPATH]',
314
+ command_line: '--theme [apple | fullwidth | jony | DIRPATH]',
306
315
  description: "Which theme to use. Specify either 'apple' (default), "\
307
- "'fullwidth' or the path to your mustache templates and " \
308
- 'other assets for a custom theme.',
316
+ "'fullwidth', 'jony' or the path to your mustache " \
317
+ 'templates and other assets for a custom theme.',
309
318
  default: 'apple',
310
319
  parse: ->(t) do
311
320
  if %w[apple fullwidth].include?(t)
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.9.1'.freeze unless defined? Jazzy::VERSION
2
+ VERSION = '0.9.2'.freeze unless defined? Jazzy::VERSION
3
3
  end
@@ -49,6 +49,14 @@ module Jazzy
49
49
  namespace_path.map(&:name).join('.')
50
50
  end
51
51
 
52
+ # :name doesn't include any generic type params.
53
+ # This regexp matches any generic type params in parent names.
54
+ def fully_qualified_name_regexp
55
+ Regexp.new(namespace_path.map(&:name)
56
+ .map { |n| Regexp.escape(n) }
57
+ .join('(?:<.*?>)?\.'))
58
+ end
59
+
52
60
  # If this declaration is an objc category, returns an array with the name
53
61
  # of the extended objc class and the category name itself, i.e.
54
62
  # ["NSString", "MyMethods"], nil otherwise.
@@ -5,7 +5,7 @@ module Jazzy
5
5
  # rubocop:disable Metrics/ClassLength
6
6
  class Type
7
7
  def self.all
8
- TYPES.keys.map { |k| new(k) }
8
+ TYPES.keys.map { |k| new(k) }.reject { |t| t.name.nil? }
9
9
  end
10
10
 
11
11
  attr_reader :kind
@@ -43,9 +43,22 @@ module Jazzy
43
43
  url_name.pluralize
44
44
  end
45
45
 
46
+ def objc_mark?
47
+ kind == 'sourcekitten.source.lang.objc.mark'
48
+ end
49
+
50
+ # covers MARK: TODO: FIXME: comments
51
+ def swift_mark?
52
+ kind == 'source.lang.swift.syntaxtype.comment.mark'
53
+ end
54
+
46
55
  def mark?
47
- kind == 'source.lang.swift.syntaxtype.comment.mark' ||
48
- kind == 'sourcekitten.source.lang.objc.mark'
56
+ objc_mark? || swift_mark?
57
+ end
58
+
59
+ # mark that should start a new task section
60
+ def task_mark?(name)
61
+ objc_mark? || (swift_mark? && name.start_with?('MARK: '))
49
62
  end
50
63
 
51
64
  def objc_enum?
@@ -132,6 +145,11 @@ module Jazzy
132
145
  dash: 'Guide',
133
146
  }.freeze,
134
147
 
148
+ 'Overview' => {
149
+ jazzy: nil,
150
+ dash: 'Section',
151
+ }.freeze,
152
+
135
153
  # Objective-C
136
154
  'sourcekitten.source.lang.objc.decl.unexposed' => {
137
155
  jazzy: 'Unexposed',