jazzy 0.3.1 → 0.3.2

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.
Files changed (22) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -0
  3. data/Gemfile.lock +4 -4
  4. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/SourceKittenFramework +0 -0
  5. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant +0 -0
  6. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant +0 -0
  7. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist +4 -4
  8. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result +0 -0
  9. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist +4 -4
  10. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result +0 -0
  11. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist +4 -4
  12. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SwiftXPC.framework/Versions/A/Resources/Info.plist +4 -4
  13. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist +5 -5
  14. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework +0 -0
  15. data/lib/jazzy/SourceKitten/bin/sourcekitten +0 -0
  16. data/lib/jazzy/config.rb +8 -0
  17. data/lib/jazzy/doc_builder.rb +6 -4
  18. data/lib/jazzy/gem_version.rb +1 -1
  19. data/lib/jazzy/sourcekitten.rb +15 -2
  20. data/lib/jazzy/templates/header.mustache +1 -1
  21. data/spec/integration_spec.rb +2 -1
  22. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: eb21ccc6282d1d4495ad8959db04ada3404dd060
4
- data.tar.gz: 9d241f8a3d561bb49888290a672b9e95e7652217
3
+ metadata.gz: 09d1714bfe2ecc1fa4759c51094866893caf0e1d
4
+ data.tar.gz: 6e447e7da342c775039b2816f0a3838fe3e3bdae
5
5
  SHA512:
6
- metadata.gz: 1126cc4f6733015c768f19be81a950b513532a4a296b5dbe33a627c5809938575c930e945f49830c0d5b13b05830207c8a3a3b34207b4b111c5ad0fcea46f307
7
- data.tar.gz: 0bd4c2847a2534271ff3d123b2b62aff6e9560f47e019edf6753190aaacaeaa7f78493c5fd9a2127aa5afaf42e1c4d9b6a000c0d0c6265179d77497274e08c99
6
+ metadata.gz: cacce7a31c93f19765926d5f40462cac358c573d7312e74f784590ce38c0c918acaa812f15c5c5e37b90b6cc27e9f8123f6b88a1dce8e207a544523402787b45
7
+ data.tar.gz: 6a362da7dd06266d0374aee0f8e50f5d3afbc52cf3e30bfa6520590b7782d371f599f70ac4eb277b695a05b6b130386455525f577d7b8b4f0b226247ceae57d5
@@ -1,3 +1,29 @@
1
+ ## 0.3.2
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * None.
10
+
11
+ ##### Bug Fixes
12
+
13
+ * Fixed an issue that prevented building projects with different schema & module
14
+ names.
15
+ [JP Simard](https://github.com/jpsim)
16
+ [#259](https://github.com/realm/jazzy/issues/259)
17
+
18
+ * Hide documentation coverage from header using `--hide-documentation-coverage`.
19
+ [mbogh](https://github.com/mbogh)
20
+ [#129](https://github.com/realm/jazzy/issues/297)
21
+
22
+ * Print a more informative error when unable to find an Xcode that has the
23
+ requested Swift version.
24
+ [Samuel Giddins])https://github.com/segiddins
25
+
26
+
1
27
  ## 0.3.1
2
28
 
3
29
  ##### Breaking
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.3.1)
4
+ jazzy (0.3.2)
5
5
  cocoapods (~> 0.38)
6
6
  mustache (~> 0.99)
7
7
  open4
@@ -66,7 +66,7 @@ GEM
66
66
  json (1.8.3)
67
67
  liferaft (0.0.4)
68
68
  metaclass (0.0.4)
69
- minitest (5.8.0)
69
+ minitest (5.8.1)
70
70
  mocha (1.1.0)
71
71
  metaclass (~> 0.0.1)
72
72
  mocha-on-bacon (0.2.2)
@@ -84,8 +84,8 @@ GEM
84
84
  bacon (~> 1.2)
85
85
  rainbow (2.0.0)
86
86
  rake (10.3.2)
87
- redcarpet (3.3.2)
88
- rouge (1.9.0)
87
+ redcarpet (3.3.3)
88
+ rouge (1.10.1)
89
89
  rubocop (0.26.1)
90
90
  astrolabe (~> 1.3)
91
91
  parser (>= 2.2.0.pre.4, < 3.0)
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>15A282b</string>
6
+ <string>15B30a</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -29,7 +29,7 @@
29
29
  <key>DTCompiler</key>
30
30
  <string>com.apple.compilers.llvm.clang.1_0</string>
31
31
  <key>DTPlatformBuild</key>
32
- <string>7A218</string>
32
+ <string>7A1001</string>
33
33
  <key>DTPlatformVersion</key>
34
34
  <string>GM</string>
35
35
  <key>DTSDKBuild</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx10.11</string>
39
39
  <key>DTXcode</key>
40
- <string>0700</string>
40
+ <string>0701</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>7A218</string>
42
+ <string>7A1001</string>
43
43
  <key>NSHumanReadableCopyright</key>
44
44
  <string>Copyright © 2014 Carthage. All rights reserved.</string>
45
45
  </dict>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>15A282b</string>
6
+ <string>15B30a</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -29,7 +29,7 @@
29
29
  <key>DTCompiler</key>
30
30
  <string>com.apple.compilers.llvm.clang.1_0</string>
31
31
  <key>DTPlatformBuild</key>
32
- <string>7A218</string>
32
+ <string>7A1001</string>
33
33
  <key>DTPlatformVersion</key>
34
34
  <string>GM</string>
35
35
  <key>DTSDKBuild</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx10.11</string>
39
39
  <key>DTXcode</key>
40
- <string>0700</string>
40
+ <string>0701</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>7A218</string>
42
+ <string>7A1001</string>
43
43
  <key>NSHumanReadableCopyright</key>
44
44
  <string>Copyright © 2015 Rob Rix. All rights reserved.</string>
45
45
  </dict>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>15A282b</string>
6
+ <string>15B30a</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -29,7 +29,7 @@
29
29
  <key>DTCompiler</key>
30
30
  <string>com.apple.compilers.llvm.clang.1_0</string>
31
31
  <key>DTPlatformBuild</key>
32
- <string>7A218</string>
32
+ <string>7A1001</string>
33
33
  <key>DTPlatformVersion</key>
34
34
  <string>GM</string>
35
35
  <key>DTSDKBuild</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx10.11</string>
39
39
  <key>DTXcode</key>
40
- <string>0700</string>
40
+ <string>0701</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>7A218</string>
42
+ <string>7A1001</string>
43
43
  <key>UIDeviceFamily</key>
44
44
  <array>
45
45
  <integer>1</integer>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>15A282b</string>
6
+ <string>15B30a</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -29,7 +29,7 @@
29
29
  <key>DTCompiler</key>
30
30
  <string>com.apple.compilers.llvm.clang.1_0</string>
31
31
  <key>DTPlatformBuild</key>
32
- <string>7A218</string>
32
+ <string>7A1001</string>
33
33
  <key>DTPlatformVersion</key>
34
34
  <string>GM</string>
35
35
  <key>DTSDKBuild</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx10.11</string>
39
39
  <key>DTXcode</key>
40
- <string>0700</string>
40
+ <string>0701</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>7A218</string>
42
+ <string>7A1001</string>
43
43
  <key>NSHumanReadableCopyright</key>
44
44
  <string>Copyright © 2014 JP Simard. All rights reserved.</string>
45
45
  </dict>
@@ -3,7 +3,7 @@
3
3
  <plist version="1.0">
4
4
  <dict>
5
5
  <key>BuildMachineOSBuild</key>
6
- <string>15A282b</string>
6
+ <string>15B30a</string>
7
7
  <key>CFBundleDevelopmentRegion</key>
8
8
  <string>en</string>
9
9
  <key>CFBundleExecutable</key>
@@ -17,7 +17,7 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>FMWK</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>0.5.0</string>
20
+ <string>0.5.1</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleSupportedPlatforms</key>
@@ -29,7 +29,7 @@
29
29
  <key>DTCompiler</key>
30
30
  <string>com.apple.compilers.llvm.clang.1_0</string>
31
31
  <key>DTPlatformBuild</key>
32
- <string>7A218</string>
32
+ <string>7A1001</string>
33
33
  <key>DTPlatformVersion</key>
34
34
  <string>GM</string>
35
35
  <key>DTSDKBuild</key>
@@ -37,9 +37,9 @@
37
37
  <key>DTSDKName</key>
38
38
  <string>macosx10.11</string>
39
39
  <key>DTXcode</key>
40
- <string>0700</string>
40
+ <string>0701</string>
41
41
  <key>DTXcodeBuild</key>
42
- <string>7A218</string>
42
+ <string>7A1001</string>
43
43
  <key>NSHumanReadableCopyright</key>
44
44
  <string>Copyright © 2015 SourceKitten. All rights reserved.</string>
45
45
  </dict>
@@ -25,6 +25,7 @@ module Jazzy
25
25
  attr_accessor :version
26
26
  attr_accessor :min_acl
27
27
  attr_accessor :skip_undocumented
28
+ attr_accessor :hide_documentation_coverage
28
29
  attr_accessor :podspec
29
30
  attr_accessor :docset_icon
30
31
  attr_accessor :docset_path
@@ -48,6 +49,7 @@ module Jazzy
48
49
  self.version = '1.0'
49
50
  self.min_acl = SourceDeclaration::AccessControlLevel.public
50
51
  self.skip_undocumented = false
52
+ self.hide_documentation_coverage = false
51
53
  self.source_directory = Pathname.pwd
52
54
  self.excluded_files = []
53
55
  self.custom_categories = {}
@@ -158,6 +160,12 @@ module Jazzy
158
160
  config.skip_undocumented = skip_undocumented
159
161
  end
160
162
 
163
+ opt.on('--[no-]hide-documentation-coverage',
164
+ "Hide \"(X\% documented)\" from the generated documents",
165
+ ) do |hide_documentation_coverage|
166
+ config.hide_documentation_coverage = hide_documentation_coverage
167
+ end
168
+
161
169
  opt.on('--podspec FILEPATH') do |podspec|
162
170
  config.podspec = Pathname(podspec)
163
171
  end
@@ -51,8 +51,8 @@ module Jazzy
51
51
  if podspec = options.podspec
52
52
  stdout = PodspecDocumenter.new(podspec).sourcekitten_output
53
53
  else
54
- stdout = Dir.chdir(Config.instance.source_directory) do
55
- arguments = ['doc'] + options.xcodebuild_arguments
54
+ stdout = Dir.chdir(options.source_directory) do
55
+ arguments = SourceKitten.arguments_from_options(options)
56
56
  SourceKitten.run_sourcekitten(arguments)
57
57
  end
58
58
  end
@@ -183,7 +183,8 @@ module Jazzy
183
183
  doc = Doc.new # Mustache model instance
184
184
  doc[:name] = source_module.name
185
185
  doc[:overview] = ReadmeGenerator.generate(source_module)
186
- doc[:doc_coverage] = source_module.doc_coverage
186
+ doc[:doc_coverage] = source_module.doc_coverage unless
187
+ Config.instance.hide_documentation_coverage
187
188
  doc[:structure] = source_module.doc_structure
188
189
  doc[:module_name] = source_module.name
189
190
  doc[:author_name] = source_module.author_name
@@ -283,7 +284,8 @@ module Jazzy
283
284
  end
284
285
 
285
286
  doc = Doc.new # Mustache model instance
286
- doc[:doc_coverage] = source_module.doc_coverage
287
+ doc[:doc_coverage] = source_module.doc_coverage unless
288
+ Config.instance.hide_documentation_coverage
287
289
  doc[:name] = doc_model.name
288
290
  doc[:kind] = doc_model.type.name
289
291
  doc[:dash_type] = doc_model.type.dash_type
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.3.1' unless defined? Jazzy::VERSION
2
+ VERSION = '0.3.2' unless defined? Jazzy::VERSION
3
3
  end
@@ -108,9 +108,22 @@ module Jazzy
108
108
  end
109
109
  end
110
110
 
111
+ # Builds SourceKitten arguments based on Jazzy options
112
+ def self.arguments_from_options(options)
113
+ arguments = ['doc']
114
+ unless options.module_name.empty?
115
+ arguments += ['--module-name', options.module_name]
116
+ end
117
+ arguments += options.xcodebuild_arguments
118
+ arguments
119
+ end
120
+
111
121
  # Run sourcekitten with given arguments and return STDOUT
112
122
  def self.run_sourcekitten(arguments)
113
- xcode = XCInvoke::Xcode.find_swift_version(Config.instance.swift_version)
123
+ swift_version = Config.instance.swift_version
124
+ unless xcode = XCInvoke::Xcode.find_swift_version(swift_version)
125
+ raise "Unable to find an Xcode with swift version #{swift_version}."
126
+ end
114
127
  bin_path = Pathname(__FILE__).parent + 'SourceKitten/bin/sourcekitten'
115
128
  output, _ = Executable.execute_command(bin_path, arguments, true,
116
129
  env: xcode.as_env)
@@ -230,7 +243,7 @@ module Jazzy
230
243
  def self.make_source_declarations(docs)
231
244
  declarations = []
232
245
  current_mark = SourceMark.new
233
- docs.each do |doc|
246
+ Array(docs).each do |doc|
234
247
  if doc.key?('key.diagnostic_stage')
235
248
  declarations += make_source_declarations(doc['key.substructure'])
236
249
  next
@@ -1,6 +1,6 @@
1
1
  <header>
2
2
  <div class="content-wrapper">
3
- <p><a href="{{path_to_root}}index.html">{{module_name}} Docs</a> ({{doc_coverage}}% documented)</p>
3
+ <p><a href="{{path_to_root}}index.html">{{module_name}} Docs</a>{{#doc_coverage}} ({{doc_coverage}}% documented){{/doc_coverage}}</p>
4
4
  {{#github_url}}
5
5
  <p class="header-right"><a href="{{github_url}}"><img src="{{path_to_root}}img/gh.png"/>View on GitHub</a></p>
6
6
  {{/github_url}}
@@ -177,7 +177,8 @@ describe_cli 'jazzy' do
177
177
  '-u https://github.com/realm/jazzy ' \
178
178
  '-g https://github.com/realm/jazzy ' \
179
179
  '-x -dry-run ' \
180
- '--min-acl private'
180
+ '--min-acl private ' \
181
+ '--hide-documentation-coverage'
181
182
  end
182
183
  end if !travis_swift || travis_swift == '2.0'
183
184
  end
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.3.1
4
+ version: 0.3.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: 2015-09-11 00:00:00.000000000 Z
13
+ date: 2015-10-14 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cocoapods