jazzy 0.7.1 → 0.7.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: 407cbe5270841f8ec4c1f0bce108b166a11dbf20
4
- data.tar.gz: 5e36875d2c77dae45f19aeb501b5db4ef6b9c1b7
3
+ metadata.gz: d5fffd12cb7f8be3f0c8324d58223c473d448f08
4
+ data.tar.gz: 6d0f919efaff11797da75225f4f2b0e4c5b1465a
5
5
  SHA512:
6
- metadata.gz: 3b39e6b6c7039637d51ab118ff1d2d53e4fff1fe2ca4106d261d75d437f0fbce26430c81b46a0a13d984566d98b1a95403243d271d08453f2e1dfdaea57f79ed
7
- data.tar.gz: f76fe47dd5d5c91b556a7265e72a37cc38aa8f561282db1c9455aa981b36081ccafc839ce5b5c76b60df111ed7138ba1eaf79d9905a9c974012b179ae16af13b
6
+ metadata.gz: 3042eece94b7af43d07cb2282c5571a78729566bc6b42ef4abce1aad65fc58d3345b8067007ec4ac2dd08cea24fc27a67ffe53b11a893a3f5597a389535f06f7
7
+ data.tar.gz: dc9e5769d1f755f176e7d9bd7600fa1f2a12f679ecd4c4c9ef77db7c15dcba7970ca3ceb7b064e827438c20e4baa5fabedeb69aa6e733e35ea38f64f2c922e0e
@@ -1,3 +1,23 @@
1
+ ## 0.7.2
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * None.
10
+
11
+ ##### Bug Fixes
12
+
13
+ * Declarations marked `@available(..., unavailable, ...)` are no longer
14
+ documented.
15
+ [JP Simard](https://github.com/jpsim)
16
+ [#654](https://github.com/realm/jazzy/issues/654)
17
+
18
+ * Treat the `open` ACL as more public than `public`.
19
+ [JP Simard](https://github.com/jpsim)
20
+
1
21
  ## 0.7.1
2
22
 
3
23
  ##### Breaking
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.7.1)
4
+ jazzy (0.7.2)
5
5
  cocoapods (~> 1.0)
6
6
  mustache (~> 0.99)
7
7
  open4
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.7.1'.freeze unless defined? Jazzy::VERSION
2
+ VERSION = '0.7.2'.freeze unless defined? Jazzy::VERSION
3
3
  end
@@ -82,8 +82,8 @@ module Jazzy
82
82
  private: 0,
83
83
  fileprivate: 1,
84
84
  internal: 2,
85
- open: 3,
86
- public: 4,
85
+ public: 3,
86
+ open: 4,
87
87
  }.freeze
88
88
 
89
89
  def <=>(other)
@@ -162,12 +162,27 @@ module Jazzy
162
162
  doc['key.substructure'].any? { |child| documented_child?(child) }
163
163
  end
164
164
 
165
+ def self.availability_attribute?(doc)
166
+ return false unless doc['key.attributes']
167
+ !doc['key.attributes'].select do |attribute|
168
+ attribute.values.first == 'source.decl.attribute.available'
169
+ end.empty?
170
+ end
171
+
172
+ # rubocop:disable Metrics/CyclomaticComplexity
173
+ # rubocop:disable Metrics/PerceivedComplexity
165
174
  def self.should_document?(doc)
166
175
  return false if doc['key.doc.comment'].to_s.include?(':nodoc:')
167
176
 
168
177
  # Always document Objective-C declarations.
169
178
  return true if Config.instance.objc_mode
170
179
 
180
+ # Don't document @available declarations with no USR, since it means
181
+ # they're unavailable.
182
+ if availability_attribute?(doc) && !doc['key.usr']
183
+ return false
184
+ end
185
+
171
186
  # Document extensions & enum elements, since we can't tell their ACL.
172
187
  type = SourceDeclaration::Type.new(doc['key.kind'])
173
188
  return true if type.swift_enum_element?
@@ -180,6 +195,8 @@ module Jazzy
180
195
 
181
196
  SourceDeclaration::AccessControlLevel.from_doc(doc) >= @min_acl
182
197
  end
198
+ # rubocop:enable Metrics/CyclomaticComplexity
199
+ # rubocop:enable Metrics/PerceivedComplexity
183
200
 
184
201
  def self.process_undocumented_token(doc, declaration)
185
202
  source_directory = Config.instance.source_directory.to_s
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.7.1
4
+ version: 0.7.2
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-09-13 00:00:00.000000000 Z
13
+ date: 2016-09-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cocoapods