jazzy 0.13.0 → 0.13.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: d55202d57dfdb0b3aad10b90f122d34e10a529bf73dde92ce2d0063473c011fe
4
- data.tar.gz: 221dd32f5dac077431fe1d449b857966b2b9dcfc8a5f4cd0cefd61e1862558c9
3
+ metadata.gz: a9f442a5c42736d08f2dcde8ca4b20745529e9c5327a47ab7ae18d49310dc115
4
+ data.tar.gz: 663672fbbca84610d3164ca0d9ecd69bade0f500df05b1c11f8d38366cea04ad
5
5
  SHA512:
6
- metadata.gz: cf1b7616ead246ea0e45a0c1e3148fc8cf3a04600c295c5bec0c7b5cff530296b9deb50f6b9c429940c1bf12dce036d4863038e55b3f892e748e5e99e7f3fc65
7
- data.tar.gz: e7725d323d9550f97f27a6bd2e0c89d674cda5d4199dc6433e38f7b78e01f58388d8af8842c28293abb9ce4434068e24fbf1483941e2ab771787db7220dd788a
6
+ metadata.gz: efdb407e43e83ccfdf1efbb75193101307bcc92cbf1180bd69ad849b80d14d18392e223b56691a29c11217066fb8487f1503e80b18d10458c81ce0cfca2f677c
7
+ data.tar.gz: 62117927494054f86f4bb3c81d3840c2fc6609095dffdc8e673dbea44a4e0c4fd7ade038e3572335e96bafdb7055061b1492509dcf3a709596ef00129c94afe7
@@ -1,3 +1,40 @@
1
+ ## Master
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * Allow inline html tags in ObjC doc comments.
10
+ [Chris Williams](https://github.com/ultramiraculous)
11
+ [#976](https://github.com/realm/jazzy/issues/976)
12
+
13
+ * Support code formatting in ObjC doc comments with `@c`, `@code` and
14
+ `@endcode`.
15
+ [Bryce Pauken](https://github.com/brycepauken)
16
+ [jpsim/SourceKitten#631](https://github.com/jpsim/SourceKitten/issues/631)
17
+
18
+ * Add `custom_categories_unlisted_prefix` configuration setting. This
19
+ is the prefix for navigation section names that aren't explicitly
20
+ listed in `custom_categories`. Defaults to 'Other '.
21
+ [JP Simard](https://github.com/jpsim)
22
+
23
+ * Add `hide_unlisted_documentation` configuration setting. Setting this
24
+ to `true` hides documentation entries in the sidebar from the
25
+ `documentation` config value that aren't explicitly listed in
26
+ `custom_categories`.
27
+ [JP Simard](https://github.com/jpsim)
28
+
29
+ ##### Bug Fixes
30
+
31
+ * Fix crash when SourceKit returns out of bounds string byte offsets.
32
+ [JP Simard](https://github.com/jpsim)
33
+
34
+ * Pick the right version of declarations with type attributes.
35
+ [John Fairhurst](https://github.com/johnfairh)
36
+ [#1148](https://github.com/realm/jazzy/issues/1148)
37
+
1
38
  ## 0.13.0
2
39
 
3
40
  ##### Breaking
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.13.0)
4
+ jazzy (0.13.1)
5
5
  cocoapods (~> 1.5)
6
6
  mustache (~> 1.1)
7
7
  open4
@@ -93,7 +93,7 @@ GEM
93
93
  terminal-table (~> 1)
94
94
  diffy (3.3.0)
95
95
  escape (0.0.4)
96
- faraday (0.17.1)
96
+ faraday (0.17.3)
97
97
  multipart-post (>= 1.2, < 3)
98
98
  faraday-http-cache (2.0.0)
99
99
  faraday (~> 0.8)
@@ -106,13 +106,13 @@ GEM
106
106
  httpclient (2.8.3)
107
107
  i18n (0.9.5)
108
108
  concurrent-ruby (~> 1.0)
109
- json (2.2.0)
109
+ json (2.3.0)
110
110
  kramdown (2.1.0)
111
111
  kramdown-parser-gfm (1.1.0)
112
112
  kramdown (~> 2.0)
113
113
  liferaft (0.0.6)
114
114
  minitest (5.13.0)
115
- mocha (1.10.1)
115
+ mocha (1.11.2)
116
116
  mocha-on-bacon (0.2.3)
117
117
  mocha (>= 0.13.0)
118
118
  molinillo (0.6.6)
@@ -122,21 +122,22 @@ GEM
122
122
  nap (1.1.0)
123
123
  netrc (0.11.0)
124
124
  no_proxy_fix (0.1.2)
125
- octokit (4.14.0)
125
+ octokit (4.15.0)
126
+ faraday (>= 0.9)
126
127
  sawyer (~> 0.8.0, >= 0.5.3)
127
128
  open4 (1.3.4)
128
129
  parallel (1.19.1)
129
- parser (2.6.5.0)
130
+ parser (2.7.0.1)
130
131
  ast (~> 2.4.0)
131
132
  powerpack (0.1.2)
132
133
  prettybacon (0.0.2)
133
134
  bacon (~> 1.2)
134
- public_suffix (4.0.1)
135
+ public_suffix (4.0.3)
135
136
  rainbow (2.2.2)
136
137
  rake
137
138
  rake (10.5.0)
138
139
  redcarpet (3.5.0)
139
- rouge (3.13.0)
140
+ rouge (3.14.0)
140
141
  rubocop (0.49.0)
141
142
  parallel (~> 1.10)
142
143
  parser (>= 2.3.3.1, < 3.0)
@@ -152,11 +153,11 @@ GEM
152
153
  sawyer (0.8.2)
153
154
  addressable (>= 2.3.5)
154
155
  faraday (> 0.8, < 2.0)
155
- sqlite3 (1.4.1)
156
+ sqlite3 (1.4.2)
156
157
  terminal-table (1.8.0)
157
158
  unicode-display_width (~> 1.1, >= 1.1.1)
158
159
  thread_safe (0.3.6)
159
- tzinfo (1.2.5)
160
+ tzinfo (1.2.6)
160
161
  thread_safe (~> 0.1)
161
162
  unicode-display_width (1.6.0)
162
163
  webmock (3.7.6)
@@ -165,7 +166,7 @@ GEM
165
166
  hashdiff (>= 0.4.0, < 2.0.0)
166
167
  xcinvoke (0.3.0)
167
168
  liferaft (~> 0.0.6)
168
- xcodeproj (1.13.0)
169
+ xcodeproj (1.14.0)
169
170
  CFPropertyList (>= 2.3.3, < 4.0)
170
171
  atomos (~> 0.1.3)
171
172
  claide (>= 1.0.2, < 2.0)
Binary file
@@ -5,8 +5,8 @@ require File.expand_path('lib/jazzy/gem_version.rb', File.dirname(__FILE__))
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'jazzy'
7
7
  spec.version = Jazzy::VERSION
8
- spec.authors = ['JP Simard', 'Tim Anglade', 'Samuel Giddins']
9
- spec.email = ['jp@realm.io']
8
+ spec.authors = ['JP Simard', 'Tim Anglade', 'Samuel Giddins', 'John Fairhurst']
9
+ spec.email = ['jp@jpsim.com']
10
10
  spec.summary = 'Soulful docs for Swift & Objective-C.'
11
11
  spec.description = 'Soulful docs for Swift & Objective-C. ' \
12
12
  "Run in your Xcode project's root directory for " \
@@ -355,6 +355,18 @@ module Jazzy
355
355
  'Example: https://git.io/v4Bcp'],
356
356
  default: []
357
357
 
358
+ config_attr :custom_categories_unlisted_prefix,
359
+ description: "Prefix for navigation section names that aren't "\
360
+ 'explicitly listed in `custom_categories`.',
361
+ default: 'Other '
362
+
363
+ config_attr :hide_unlisted_documentation,
364
+ command_line: '--[no-]hide-unlisted-documentation',
365
+ description: "Don't include documentation in the sidebar from the "\
366
+ "`documentation` config value that aren't explicitly "\
367
+ 'listed in `custom_categories`.',
368
+ default: false
369
+
358
370
  config_attr :custom_head,
359
371
  command_line: '--head HTML',
360
372
  description: 'Custom HTML to inject into <head></head>.',
@@ -29,23 +29,36 @@ module Jazzy
29
29
  # @return [Array] doc structure comprised of
30
30
  # section names & child names & URLs
31
31
  def self.doc_structure_for_docs(docs)
32
- docs.map do |doc|
33
- children = doc.children
34
- .sort_by { |c| [c.nav_order, c.name, c.usr || ''] }
35
- .flat_map do |child|
36
- # FIXME: include arbitrarily nested extensible types
37
- [{ name: child.name, url: child.url }] +
38
- Array(child.children.select do |sub_child|
39
- sub_child.type.swift_extensible? || sub_child.type.extension?
40
- end).map do |sub_child|
41
- { name: "– #{sub_child.name}", url: sub_child.url }
42
- end
32
+ docs
33
+ .map do |doc|
34
+ children = children_for_doc(doc)
35
+ {
36
+ section: doc.name,
37
+ url: doc.url,
38
+ children: children,
39
+ }
43
40
  end
44
- {
45
- section: doc.name,
46
- url: doc.url,
47
- children: children,
48
- }
41
+ .select do |structure|
42
+ if Config.instance.hide_unlisted_documentation
43
+ unlisted_prefix = Config.instance.custom_categories_unlisted_prefix
44
+ structure[:section] != "#{unlisted_prefix}Guides"
45
+ else
46
+ true
47
+ end
48
+ end
49
+ end
50
+
51
+ def self.children_for_doc(doc)
52
+ doc.children
53
+ .sort_by { |c| [c.nav_order, c.name, c.usr || ''] }
54
+ .flat_map do |child|
55
+ # FIXME: include arbitrarily nested extensible types
56
+ [{ name: child.name, url: child.url }] +
57
+ Array(child.children.select do |sub_child|
58
+ sub_child.type.swift_extensible? || sub_child.type.extension?
59
+ end).map do |sub_child|
60
+ { name: "– #{sub_child.name}", url: sub_child.url }
61
+ end
49
62
  end
50
63
  end
51
64
 
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.13.0'.freeze unless defined? Jazzy::VERSION
2
+ VERSION = '0.13.1'.freeze unless defined? Jazzy::VERSION
3
3
  end
@@ -62,8 +62,9 @@ module Jazzy
62
62
  # Group root-level docs by custom categories (if any) and type
63
63
  def self.group_docs(docs)
64
64
  custom_categories, docs = group_custom_categories(docs)
65
+ unlisted_prefix = Config.instance.custom_categories_unlisted_prefix
65
66
  type_categories, uncategorized = group_type_categories(
66
- docs, custom_categories.any? ? 'Other ' : ''
67
+ docs, custom_categories.any? ? unlisted_prefix : ''
67
68
  )
68
69
  custom_categories + merge_categories(type_categories) + uncategorized
69
70
  end
@@ -440,7 +441,8 @@ module Jazzy
440
441
  annotated.empty? ||
441
442
  parsed &&
442
443
  (annotated.include?(' = default') || # SR-2608
443
- parsed.match('@autoclosure|@escaping') || # SR-6321
444
+ (parsed.scan(/@autoclosure|@escaping/).count >
445
+ annotated.scan(/@autoclosure|@escaping/).count) || # SR-6321
444
446
  parsed.include?("\n"))
445
447
  end
446
448
 
metadata CHANGED
@@ -1,16 +1,17 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jazzy
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.13.0
4
+ version: 0.13.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Simard
8
8
  - Tim Anglade
9
9
  - Samuel Giddins
10
+ - John Fairhurst
10
11
  autorequire:
11
12
  bindir: bin
12
13
  cert_chain: []
13
- date: 2019-12-09 00:00:00.000000000 Z
14
+ date: 2020-01-07 00:00:00.000000000 Z
14
15
  dependencies:
15
16
  - !ruby/object:Gem::Dependency
16
17
  name: cocoapods
@@ -161,7 +162,7 @@ dependencies:
161
162
  description: Soulful docs for Swift & Objective-C. Run in your Xcode project's root
162
163
  directory for instant HTML docs.
163
164
  email:
164
- - jp@realm.io
165
+ - jp@jpsim.com
165
166
  executables:
166
167
  - jazzy
167
168
  extensions: []
@@ -279,8 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
279
280
  - !ruby/object:Gem::Version
280
281
  version: '0'
281
282
  requirements: []
282
- rubyforge_project:
283
- rubygems_version: 2.7.3
283
+ rubygems_version: 3.0.6
284
284
  signing_key:
285
285
  specification_version: 4
286
286
  summary: Soulful docs for Swift & Objective-C.