jazzy 0.7.4 → 0.7.5

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 (27) hide show
  1. checksums.yaml +4 -4
  2. data/CHANGELOG.md +26 -1
  3. data/Gemfile.lock +1 -1
  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/Result.framework/Result +0 -0
  7. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash +0 -0
  8. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Yams +0 -0
  9. data/lib/jazzy/config.rb +13 -3
  10. data/lib/jazzy/gem_version.rb +1 -1
  11. data/lib/jazzy/sourcekitten.rb +34 -11
  12. metadata +3 -13
  13. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Resources +0 -1
  14. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/SourceKittenFramework +0 -1
  15. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant +0 -1
  16. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources +0 -1
  17. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current +0 -1
  18. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources +0 -1
  19. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result +0 -1
  20. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current +0 -1
  21. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources +0 -1
  22. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash +0 -1
  23. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current +0 -1
  24. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Resources +0 -1
  25. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Versions/Current +0 -1
  26. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Yams +0 -1
  27. data/lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current +0 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 5ca696c264b7d1fb8815ad306c4d00a38b590762
4
- data.tar.gz: ae530a97b56831e98b9ddd84b5cc5d48f927f86e
3
+ metadata.gz: a9754b8ad015ab378ddfb5ab40c230511104d3bc
4
+ data.tar.gz: 3f0c52c2516d07f1bf88836b61ef2f820ff715fc
5
5
  SHA512:
6
- metadata.gz: 7f8be594e771a90d3a82e353c0ba070d927a09ebd566466d0677ed09ba50c728411812aea9a58be0abe8494efea3ee0490a2f227f7bf88c36c854a037db237a9
7
- data.tar.gz: c8fd9cd72d6aeb4de45c35992af945fb85cf5940d32461da6d63af0ba64e0d63e39cf4c7fb7dbb27dadaffb77d8c80811b6f1a3de49ace84ba6a428c14cbbf6c
6
+ metadata.gz: 84f40dafc121c96a64eb76a6054a6da077aef3156eca4e9519c31556d98311408e19c5cb39c23bae5328f017e942f28d468a90e19a38eb602275f4e9c63242ff
7
+ data.tar.gz: a03ffdcbb9c68338019cbb784cd9ad6c8cc971a48e05c58f889b460b7961974058e71600eb12a23595c76e0d366acad6fd4b3bc965010f3f3264677d04aa1e96
data/CHANGELOG.md CHANGED
@@ -1,3 +1,28 @@
1
+ ## 0.7.5
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * None.
10
+
11
+ ##### Bug Fixes
12
+
13
+ * Fix issue where using a custom theme would crash jazzy when using Ruby 2.4.
14
+ [Jason Wray](https://github.com/friedbunny)
15
+ [#752](https://github.com/realm/jazzy/issues/752)
16
+
17
+ * Fix support for Ruby 2.0.0.
18
+ [Jason Wray](https://github.com/friedbunny)
19
+ [#747](https://github.com/realm/jazzy/issues/747)
20
+
21
+ * Fix issue where header files are not found if inside subdirectories of the
22
+ framework_root specified folder.
23
+ [Christopher Gretzki](https://github.com/gretzki)
24
+ [#518](https://github.com/realm/jazzy/issues/518)
25
+
1
26
  ## 0.7.4
2
27
 
3
28
  ##### Breaking
@@ -147,7 +172,7 @@
147
172
  [Shmuel Kallner](https://github.com/shmuelk)
148
173
  [#645](https://github.com/realm/jazzy/issues/645)
149
174
  [#646](https://github.com/realm/jazzy/issues/646)
150
-
175
+
151
176
  ##### Bug Fixes
152
177
 
153
178
  * Fix issue where jazzy could not be installed from Gemfile due to
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.7.4)
4
+ jazzy (0.7.5)
5
5
  cocoapods (~> 1.0)
6
6
  mustache (~> 0.99)
7
7
  open4
data/lib/jazzy/config.rb CHANGED
@@ -295,8 +295,11 @@ module Jazzy
295
295
  'other assets for a custom theme.',
296
296
  default: 'apple',
297
297
  parse: ->(t) do
298
- return expand_path(t) unless t == 'apple' || t == 'fullwidth'
299
- Pathname(__FILE__).parent + 'themes' + t
298
+ if t == 'apple' || t == 'fullwidth'
299
+ Pathname(__FILE__).parent + 'themes' + t
300
+ else
301
+ expand_path(t)
302
+ end
300
303
  end
301
304
 
302
305
  config_attr :use_safe_filenames,
@@ -428,7 +431,14 @@ module Jazzy
428
431
  def read_config_file(file)
429
432
  case File.extname(file)
430
433
  when '.json' then JSON.parse(File.read(file))
431
- when '.yaml', '.yml' then YAML.safe_load(File.read(file))
434
+ when '.yaml', '.yml' then
435
+ if YAML.respond_to?('safe_load') # ruby >= 2.1.0
436
+ YAML.safe_load(File.read(file))
437
+ else
438
+ # rubocop:disable Security/YAMLLoad
439
+ YAML.load(File.read(file))
440
+ # rubocop:enable Security/YAMLLoad
441
+ end
432
442
  else raise "Config file must be .yaml or .json, but got #{file.inspect}"
433
443
  end
434
444
  end
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.7.4'.freeze unless defined? Jazzy::VERSION
2
+ VERSION = '0.7.5'.freeze unless defined? Jazzy::VERSION
3
3
  end
@@ -161,22 +161,45 @@ module Jazzy
161
161
  end
162
162
  end
163
163
 
164
+ # returns all subdirectories of specified path
165
+ def self.rec_path(path)
166
+ path.children.collect do |child|
167
+ if child.directory?
168
+ rec_path(child) + [child]
169
+ end
170
+ end.select { |x| x }.flatten(1)
171
+ end
172
+
164
173
  # Builds SourceKitten arguments based on Jazzy options
165
174
  def self.arguments_from_options(options)
166
175
  arguments = ['doc']
167
- if options.objc_mode
168
- if options.xcodebuild_arguments.empty?
169
- arguments += ['--objc', options.umbrella_header.to_s, '--', '-x',
170
- 'objective-c', '-isysroot',
171
- `xcrun --show-sdk-path --sdk #{options.sdk}`.chomp,
172
- '-I', options.framework_root.to_s]
176
+ arguments += if options.objc_mode
177
+ objc_arguments_from_options(options)
178
+ elsif !options.module_name.empty?
179
+ ['--module-name', options.module_name, '--']
180
+ else
181
+ ['--']
182
+ end
183
+ arguments + options.xcodebuild_arguments
184
+ end
185
+
186
+ def self.objc_arguments_from_options(options)
187
+ arguments = []
188
+ if options.xcodebuild_arguments.empty?
189
+ arguments += ['--objc', options.umbrella_header.to_s, '--', '-x',
190
+ 'objective-c', '-isysroot',
191
+ `xcrun --show-sdk-path --sdk #{options.sdk}`.chomp,
192
+ '-I', options.framework_root.to_s]
193
+ end
194
+ # add additional -I arguments for each subdirectory of framework_root
195
+ unless options.framework_root.nil?
196
+ rec_path(Pathname.new(options.framework_root.to_s)).collect do |child|
197
+ if child.directory?
198
+ arguments += ['-I', child.to_s]
199
+ end
173
200
  end
174
- elsif !options.module_name.empty?
175
- arguments += ['--module-name', options.module_name, '--']
176
- else
177
- arguments += ['--']
178
201
  end
179
- arguments + options.xcodebuild_arguments
202
+ arguments
180
203
  end
181
204
 
182
205
  # Run sourcekitten with given arguments and return STDOUT
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.4
4
+ version: 0.7.5
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: 2017-02-08 00:00:00.000000000 Z
13
+ date: 2017-03-21 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cocoapods
@@ -181,27 +181,18 @@ files:
181
181
  - images/screenshot.jpg
182
182
  - jazzy.gemspec
183
183
  - lib/jazzy.rb
184
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Resources
185
184
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/SourceKittenFramework
186
185
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Commandant
187
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Resources
188
186
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Commandant
189
187
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/A/Resources/Info.plist
190
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.framework/Versions/Current
191
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Resources
192
188
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Result
193
189
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Resources/Info.plist
194
190
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/A/Result
195
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.framework/Versions/Current
196
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Resources
197
191
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/SWXMLHash
198
192
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/Resources/Info.plist
199
193
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/A/SWXMLHash
200
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.framework/Versions/Current
201
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Resources
202
194
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Versions/A/Resources/Info.plist
203
195
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Versions/A/Yams
204
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Versions/Current
205
196
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framework/Yams
206
197
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCore.dylib
207
198
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftCoreGraphics.dylib
@@ -212,7 +203,6 @@ files:
212
203
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/libswiftObjectiveC.dylib
213
204
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Resources/Info.plist
214
205
  - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/SourceKittenFramework
215
- - lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current
216
206
  - lib/jazzy/SourceKitten/Rakefile
217
207
  - lib/jazzy/SourceKitten/bin/sourcekitten
218
208
  - lib/jazzy/config.rb
@@ -291,7 +281,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
291
281
  version: '0'
292
282
  requirements: []
293
283
  rubyforge_project:
294
- rubygems_version: 2.6.8
284
+ rubygems_version: 2.4.5.1
295
285
  signing_key:
296
286
  specification_version: 4
297
287
  summary: Soulful docs for Swift & Objective-C.
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current/Resources
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/Current/SourceKittenFrame
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Commandant.f
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Result.frame
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/SWXMLHash.fr
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A/Frameworks/Yams.framewo
@@ -1 +0,0 @@
1
- lib/jazzy/SourceKitten/Frameworks/SourceKittenFramework.framework/Versions/A