jazzy 0.0.17 → 0.0.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +5 -5
- data/bin/sourcekitten +0 -0
- data/lib/jazzy/doc_builder.rb +23 -1
- data/lib/jazzy/gem_version.rb +1 -1
- data/lib/jazzy/sourcekitten.rb +8 -7
- data/spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/undocumented.txt +18 -0
- data/spec/integration_specs/document_alamofire/after/docs/undocumented.txt +18 -0
- data/spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/undocumented.txt +3 -0
- data/spec/integration_specs/misc_jazzy_features/after/docs/undocumented.txt +3 -0
- metadata +6 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b069018d7703d12f82c015af5684c9e3ca3fbc41
|
4
|
+
data.tar.gz: 7524e6e46b8bd59be148df44ea5fdfb873c0c1a5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3db8afa17755cd9e7e7bc4594fd3ab39e55661b70a3dab637b3732d4647d1866abfc94fb2b2a2910f4b6c5bb0c04e2ee14464fafb8389f19d50e140c5f6bfc5b
|
7
|
+
data.tar.gz: 5c8e88b4b8e53373d7475be94c0bdc718b1eed0bc5b0d4615feebb7370fc2111d2bdf186578026ad4097a95517368f155e405aac8ed31bfb24c66f87e3eb0eca
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jazzy (0.0.
|
4
|
+
jazzy (0.0.18)
|
5
5
|
activesupport (~> 4.1)
|
6
6
|
mustache (~> 0.99)
|
7
7
|
nokogiri (~> 1.6)
|
@@ -13,11 +13,11 @@ PATH
|
|
13
13
|
GEM
|
14
14
|
remote: http://rubygems.org/
|
15
15
|
specs:
|
16
|
-
activesupport (4.
|
17
|
-
i18n (~> 0.
|
16
|
+
activesupport (4.2.0)
|
17
|
+
i18n (~> 0.7)
|
18
18
|
json (~> 1.7, >= 1.7.7)
|
19
19
|
minitest (~> 5.1)
|
20
|
-
thread_safe (~> 0.
|
20
|
+
thread_safe (~> 0.3, >= 0.3.4)
|
21
21
|
tzinfo (~> 1.1)
|
22
22
|
addressable (2.3.6)
|
23
23
|
ast (2.0.0)
|
@@ -31,7 +31,7 @@ GEM
|
|
31
31
|
crack (0.4.2)
|
32
32
|
safe_yaml (~> 1.0.0)
|
33
33
|
diffy (3.0.7)
|
34
|
-
i18n (0.
|
34
|
+
i18n (0.7.0)
|
35
35
|
json (1.8.1)
|
36
36
|
metaclass (0.0.4)
|
37
37
|
mini_portile (0.6.1)
|
data/bin/sourcekitten
CHANGED
Binary file
|
data/lib/jazzy/doc_builder.rb
CHANGED
@@ -97,7 +97,7 @@ module Jazzy
|
|
97
97
|
output_dir = options.output
|
98
98
|
prepare_output_dir(output_dir, options.clean)
|
99
99
|
|
100
|
-
(docs, coverage) = SourceKitten.parse(
|
100
|
+
(docs, coverage, undocumented) = SourceKitten.parse(
|
101
101
|
sourcekitten_output,
|
102
102
|
options.min_acl,
|
103
103
|
)
|
@@ -112,6 +112,8 @@ module Jazzy
|
|
112
112
|
source_module = SourceModule.new(options, docs, structure, coverage)
|
113
113
|
build_docs(output_dir, source_module.docs, source_module)
|
114
114
|
|
115
|
+
write_undocumented_file(undocumented, output_dir)
|
116
|
+
|
115
117
|
copy_assets(output_dir)
|
116
118
|
|
117
119
|
DocsetBuilder.new(output_dir, source_module).build!
|
@@ -119,6 +121,26 @@ module Jazzy
|
|
119
121
|
puts "jam out ♪♫ to your fresh new docs in `#{output_dir}`"
|
120
122
|
end
|
121
123
|
|
124
|
+
def self.write_undocumented_file(undocumented, output_dir)
|
125
|
+
(output_dir + 'undocumented.txt').open('w') do |f|
|
126
|
+
tokens_by_file = undocumented.group_by do |d|
|
127
|
+
if d['key.filepath']
|
128
|
+
Pathname.new(d['key.filepath']).basename.to_s
|
129
|
+
else
|
130
|
+
d['key.modulename'] || ''
|
131
|
+
end
|
132
|
+
end
|
133
|
+
tokens_by_file.each_key do |file|
|
134
|
+
f.write(file + "\n")
|
135
|
+
tokens_by_file[file].each do |token|
|
136
|
+
decl = token['key.parsed_declaration'] ||
|
137
|
+
token['key.annotated_decl'].gsub(/<[^>]+>/, '')
|
138
|
+
f.write("\t" + decl + "\n")
|
139
|
+
end
|
140
|
+
end
|
141
|
+
end
|
142
|
+
end
|
143
|
+
|
122
144
|
def self.copy_assets(destination)
|
123
145
|
origin = Pathname(__FILE__).parent + '../../lib/jazzy/assets/.'
|
124
146
|
FileUtils.cp_r(origin, destination)
|
data/lib/jazzy/gem_version.rb
CHANGED
data/lib/jazzy/sourcekitten.rb
CHANGED
@@ -10,8 +10,8 @@ require 'jazzy/highlighter'
|
|
10
10
|
module Jazzy
|
11
11
|
# This module interacts with the sourcekitten command-line executable
|
12
12
|
module SourceKitten
|
13
|
-
@
|
14
|
-
@
|
13
|
+
@documented_count = 0
|
14
|
+
@undocumented_tokens = []
|
15
15
|
|
16
16
|
# Group root-level docs by type and add as children to a group doc element
|
17
17
|
def self.group_docs(docs, type)
|
@@ -75,7 +75,7 @@ module Jazzy
|
|
75
75
|
end
|
76
76
|
|
77
77
|
def self.process_undocumented_token(doc, declaration)
|
78
|
-
@
|
78
|
+
@undocumented_tokens << doc
|
79
79
|
return nil unless documented_child?(doc)
|
80
80
|
make_default_doc_info(declaration)
|
81
81
|
end
|
@@ -95,7 +95,7 @@ module Jazzy
|
|
95
95
|
return nil unless should_document?(doc)
|
96
96
|
xml_key = 'key.doc.full_as_xml'
|
97
97
|
return process_undocumented_token(doc, declaration) unless doc[xml_key]
|
98
|
-
@
|
98
|
+
@documented_count += 1
|
99
99
|
|
100
100
|
xml = Nokogiri::XML(doc[xml_key]).root
|
101
101
|
declaration.line = XMLHelper.attribute(xml, 'line').to_i
|
@@ -163,8 +163,9 @@ module Jazzy
|
|
163
163
|
# rubocop:enable Metrics/MethodLength
|
164
164
|
|
165
165
|
def self.doc_coverage
|
166
|
-
return 0 if @
|
167
|
-
(100 * @
|
166
|
+
return 0 if @documented_count == 0 && @undocumented_tokens.count == 0
|
167
|
+
(100 * @documented_count) /
|
168
|
+
(@undocumented_tokens.count + @documented_count)
|
168
169
|
end
|
169
170
|
|
170
171
|
# Parse sourcekitten STDOUT output as JSON
|
@@ -176,7 +177,7 @@ module Jazzy
|
|
176
177
|
SourceDeclaration::Type.all.each do |type|
|
177
178
|
docs = group_docs(docs, type)
|
178
179
|
end
|
179
|
-
[make_doc_urls(docs, []), doc_coverage]
|
180
|
+
[make_doc_urls(docs, []), doc_coverage, @undocumented_tokens]
|
180
181
|
end
|
181
182
|
end
|
182
183
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Alamofire.swift
|
2
|
+
func queryComponents(key: String, _ value: AnyObject) -> [(String, String)]
|
3
|
+
func escape(string: String) -> String
|
4
|
+
public var URLString: String
|
5
|
+
public var URLString: String
|
6
|
+
public var URLRequest: NSURLRequest
|
7
|
+
struct Singleton
|
8
|
+
required public init(configuration: NSURLSessionConfiguration? = nil)
|
9
|
+
deinit
|
10
|
+
class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate
|
11
|
+
class TaskDelegate: NSObject, NSURLSessionTaskDelegate
|
12
|
+
class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate
|
13
|
+
class UploadTaskDelegate: DataTaskDelegate
|
14
|
+
class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate
|
15
|
+
func cURLRepresentation() -> String
|
16
|
+
NSURL.h
|
17
|
+
class NSURL : NSObject, NSSecureCoding, NSCoding, NSCopying
|
18
|
+
class NSURLComponents : NSObject, NSCopying
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Alamofire.swift
|
2
|
+
func queryComponents(key: String, _ value: AnyObject) -> [(String, String)]
|
3
|
+
func escape(string: String) -> String
|
4
|
+
public var URLString: String
|
5
|
+
public var URLString: String
|
6
|
+
public var URLRequest: NSURLRequest
|
7
|
+
struct Singleton
|
8
|
+
required public init(configuration: NSURLSessionConfiguration? = nil)
|
9
|
+
deinit
|
10
|
+
class SessionDelegate: NSObject, NSURLSessionDelegate, NSURLSessionTaskDelegate, NSURLSessionDataDelegate, NSURLSessionDownloadDelegate
|
11
|
+
class TaskDelegate: NSObject, NSURLSessionTaskDelegate
|
12
|
+
class DataTaskDelegate: TaskDelegate, NSURLSessionDataDelegate
|
13
|
+
class UploadTaskDelegate: DataTaskDelegate
|
14
|
+
class DownloadTaskDelegate: TaskDelegate, NSURLSessionDownloadDelegate
|
15
|
+
func cURLRepresentation() -> String
|
16
|
+
NSURL.h
|
17
|
+
class NSURL : NSObject, NSSecureCoding, NSCoding, NSCopying
|
18
|
+
class NSURLComponents : NSObject, NSCopying
|
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.0.
|
4
|
+
version: 0.0.18
|
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: 2014-12-
|
13
|
+
date: 2014-12-23 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: mustache
|
@@ -243,6 +243,7 @@ files:
|
|
243
243
|
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/jquery.min.js
|
244
244
|
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jazzy.js
|
245
245
|
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/js/jquery.min.js
|
246
|
+
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/Documents/undocumented.txt
|
246
247
|
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.docset/Contents/Resources/docSet.dsidx.csv
|
247
248
|
- spec/integration_specs/document_alamofire/after/docs/docsets/Alamofire.xml
|
248
249
|
- spec/integration_specs/document_alamofire/after/docs/img/carat.png
|
@@ -251,6 +252,7 @@ files:
|
|
251
252
|
- spec/integration_specs/document_alamofire/after/docs/index.html
|
252
253
|
- spec/integration_specs/document_alamofire/after/docs/js/jazzy.js
|
253
254
|
- spec/integration_specs/document_alamofire/after/docs/js/jquery.min.js
|
255
|
+
- spec/integration_specs/document_alamofire/after/docs/undocumented.txt
|
254
256
|
- spec/integration_specs/document_alamofire/after/execution_output.txt
|
255
257
|
- spec/integration_specs/misc_jazzy_features/after/docs/Classes.html
|
256
258
|
- spec/integration_specs/misc_jazzy_features/after/docs/Classes/ImplicitlyInternalTopLevelClass.html
|
@@ -283,6 +285,7 @@ files:
|
|
283
285
|
- spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/jquery.min.js
|
284
286
|
- spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/js/jazzy.js
|
285
287
|
- spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/js/jquery.min.js
|
288
|
+
- spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/Documents/undocumented.txt
|
286
289
|
- spec/integration_specs/misc_jazzy_features/after/docs/docsets/MiscJazzyFeatures.docset/Contents/Resources/docSet.dsidx.csv
|
287
290
|
- spec/integration_specs/misc_jazzy_features/after/docs/img/carat.png
|
288
291
|
- spec/integration_specs/misc_jazzy_features/after/docs/img/dash.png
|
@@ -290,6 +293,7 @@ files:
|
|
290
293
|
- spec/integration_specs/misc_jazzy_features/after/docs/index.html
|
291
294
|
- spec/integration_specs/misc_jazzy_features/after/docs/js/jazzy.js
|
292
295
|
- spec/integration_specs/misc_jazzy_features/after/docs/js/jquery.min.js
|
296
|
+
- spec/integration_specs/misc_jazzy_features/after/docs/undocumented.txt
|
293
297
|
- spec/integration_specs/misc_jazzy_features/after/execution_output.txt
|
294
298
|
- spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures.xcodeproj/project.pbxproj
|
295
299
|
- spec/integration_specs/misc_jazzy_features/before/MiscJazzyFeatures.xcodeproj/project.xcworkspace/contents.xcworkspacedata
|