jazzy 0.2.0 → 0.2.1

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: d06338c65161e748c8e95e6fe8b9270101f5edc6
4
- data.tar.gz: 7cc9150d00cb56fd6139df4b3ed0ecd8abe310bd
3
+ metadata.gz: b3cc2b3e13ef93280c2e11e9b9548da39d8e40bb
4
+ data.tar.gz: 937ed6490fdea1d878db269434c06ed59ff99e30
5
5
  SHA512:
6
- metadata.gz: 5de22817988a276354c66ad51274dd0f61e86f2ce8ae3020d4e85313d16d325ecc5e1f941bf846d42dc8819f2644aa213a5e80ab7b2cc69608f499d069e73fe5
7
- data.tar.gz: 0f832259dadb561daeebeaf7967114b17e821a5021e04eb012db9a6ba46afbb12c5677bf41bc9a1843411ab70aee77d061dd41cea8f33c8690c88b8c7edd15fd
6
+ metadata.gz: 816b616754d2f7536dce72710ee0678395e105f5df4e2bbcc44c8c7ad531db8e52b32d10eb69cec34634dca07177da1f78ea9212e42ba7228f9a4b9e48b9d247
7
+ data.tar.gz: feccf1fa4d0bc838694a924aeefb0baa999b88d721dba4dbe6a92e55806f6a4b042b04cca9b2acf63319acd0cabcc393cdf40b28cdeaf6568400b5c44f001184
@@ -1,3 +1,21 @@
1
+ ## 0.2.1
2
+
3
+ ##### Breaking
4
+
5
+ * None.
6
+
7
+ ##### Enhancements
8
+
9
+ * Added the ability to ignore certain files by passing in an `-e`/`--exclude`
10
+ argument to jazzy.
11
+ [JP Simard](https://github.com/jpsim)
12
+ [#173](https://github.com/realm/jazzy/issues/173)
13
+
14
+ ##### Bug Fixes
15
+
16
+ * None.
17
+
18
+
1
19
  ## 0.2.0
2
20
 
3
21
  ##### Breaking
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jazzy (0.2.0)
5
- cocoapods (~> 0.36.0.rc.1)
4
+ jazzy (0.2.1)
5
+ cocoapods (~> 0.37)
6
6
  mustache (~> 0.99)
7
7
  open4
8
8
  redcarpet (~> 3.2)
@@ -28,21 +28,20 @@ GEM
28
28
  clintegracon (0.5.3)
29
29
  colored (~> 1.2)
30
30
  diffy
31
- cocoapods (0.36.4)
31
+ cocoapods (0.37.0)
32
32
  activesupport (>= 3.2.15)
33
33
  claide (~> 0.8.1)
34
- cocoapods-core (= 0.36.4)
34
+ cocoapods-core (= 0.37.0)
35
35
  cocoapods-downloader (~> 0.9.0)
36
- cocoapods-plugins (~> 0.4.1)
36
+ cocoapods-plugins (~> 0.4.2)
37
37
  cocoapods-trunk (~> 0.6.0)
38
38
  cocoapods-try (~> 0.4.3)
39
39
  colored (~> 1.2)
40
40
  escape (~> 0.0.4)
41
- molinillo (~> 0.2.1)
41
+ molinillo (~> 0.2.3)
42
42
  nap (~> 0.8)
43
- open4 (~> 1.3)
44
- xcodeproj (~> 0.23.1)
45
- cocoapods-core (0.36.4)
43
+ xcodeproj (~> 0.24.1)
44
+ cocoapods-core (0.37.0)
46
45
  activesupport (>= 3.2.15)
47
46
  fuzzy_match (~> 2.0.4)
48
47
  nap (~> 0.8.0)
@@ -62,7 +61,7 @@ GEM
62
61
  i18n (0.7.0)
63
62
  json (1.8.2)
64
63
  metaclass (0.0.4)
65
- minitest (5.6.0)
64
+ minitest (5.6.1)
66
65
  mocha (1.1.0)
67
66
  metaclass (~> 0.0.1)
68
67
  mocha-on-bacon (0.2.2)
@@ -99,7 +98,7 @@ GEM
99
98
  webmock (1.20.0)
100
99
  addressable (>= 2.3.6)
101
100
  crack (>= 0.3.2)
102
- xcodeproj (0.23.1)
101
+ xcodeproj (0.24.1)
103
102
  activesupport (>= 3)
104
103
  colored (~> 1.2)
105
104
 
data/README.md CHANGED
@@ -2,8 +2,6 @@
2
2
 
3
3
  ![analytics](https://ga-beacon.appspot.com/UA-50247013-2/jazzy/README?pixel)
4
4
 
5
- ![Test Status](https://travis-ci.org/realm/jazzy.svg?branch=master)
6
-
7
5
  jazzy is a command-line utility that generates documentation for your Swift or
8
6
  Objective-C projects.
9
7
 
@@ -19,7 +19,7 @@ Gem::Specification.new do |spec|
19
19
 
20
20
  spec.extensions = ['lib/jazzy/SourceKitten/Rakefile']
21
21
 
22
- spec.add_runtime_dependency 'cocoapods', '~> 0.36.0.rc.1'
22
+ spec.add_runtime_dependency 'cocoapods', '~> 0.37'
23
23
  spec.add_runtime_dependency 'mustache', '~> 0.99'
24
24
  spec.add_runtime_dependency 'open4'
25
25
  spec.add_runtime_dependency 'redcarpet', '~> 3.2'
@@ -17,7 +17,7 @@
17
17
  <key>CFBundlePackageType</key>
18
18
  <string>FMWK</string>
19
19
  <key>CFBundleShortVersionString</key>
20
- <string>0.4.0</string>
20
+ <string>0.4.1</string>
21
21
  <key>CFBundleSignature</key>
22
22
  <string>????</string>
23
23
  <key>CFBundleVersion</key>
@@ -28,6 +28,7 @@ module Jazzy
28
28
  attr_accessor :docset_icon
29
29
  attr_accessor :docset_path
30
30
  attr_accessor :source_directory
31
+ attr_accessor :excluded_files
31
32
 
32
33
  def initialize
33
34
  PodspecDocumenter.configure(self, Dir['*.podspec{,.json}'].first)
@@ -42,6 +43,7 @@ module Jazzy
42
43
  self.min_acl = SourceDeclaration::AccessControlLevel.public
43
44
  self.skip_undocumented = false
44
45
  self.source_directory = Pathname.pwd
46
+ self.excluded_files = []
45
47
  end
46
48
 
47
49
  def podspec=(podspec)
@@ -164,6 +166,11 @@ module Jazzy
164
166
  config.readme_path = Pathname(readme)
165
167
  end
166
168
 
169
+ opt.on('-e', '--exclude file1,file2,…fileN', Array,
170
+ 'Files to be excluded from documentation') do |files|
171
+ config.excluded_files = files
172
+ end
173
+
167
174
  opt.on('-v', '--version', 'Print version number') do
168
175
  puts 'jazzy version: ' + Jazzy::VERSION
169
176
  exit
@@ -30,7 +30,7 @@ module Jazzy
30
30
  status = Open4.spawn(bin, *args, options)
31
31
  unless status.success?
32
32
  full_command = "#{bin.shellescape} #{args.map(&:shellescape)}"
33
- output = stdout.to_s << stderr.to_S
33
+ output = stdout.to_s << stderr.to_s
34
34
  if raise_on_failure
35
35
  raise "#{full_command}\n\n#{output}"
36
36
  else
@@ -1,3 +1,3 @@
1
1
  module Jazzy
2
- VERSION = '0.2.0' unless defined? Jazzy::VERSION
2
+ VERSION = '0.2.1' unless defined? Jazzy::VERSION
3
3
  end
@@ -44,9 +44,10 @@ module Jazzy
44
44
  id = doc.name || 'unknown'
45
45
  warn "`#{id}` has no USR. First make sure all modules used in " \
46
46
  'your project have been imported. If all used modules are ' \
47
- 'imported, please report this by filing an issue at ' \
47
+ 'imported, please report this problem by filing an issue at ' \
48
48
  'https://github.com/realm/jazzy/issues along with your Xcode ' \
49
- 'project.'
49
+ 'project. If this token is declared in an `#if` block, please ' \
50
+ 'ignore this message.'
50
51
  end
51
52
  doc.url = parents.join('/') + '.html#/' + id
52
53
  end
@@ -239,12 +240,20 @@ module Jazzy
239
240
  end
240
241
  end
241
242
 
243
+ def self.filter_excluded_files(json)
244
+ excluded_files = Config.instance.excluded_files
245
+ json.map do |doc|
246
+ key = doc.keys.first
247
+ doc[key] unless excluded_files.include?(key)
248
+ end.compact
249
+ end
250
+
242
251
  # Parse sourcekitten STDOUT output as JSON
243
252
  # @return [Hash] structured docs
244
253
  def self.parse(sourcekitten_output, min_acl, skip_undocumented)
245
254
  @min_acl = min_acl
246
255
  @skip_undocumented = skip_undocumented
247
- sourcekitten_json = JSON.parse(sourcekitten_output)
256
+ sourcekitten_json = filter_excluded_files(JSON.parse(sourcekitten_output))
248
257
  docs = make_source_declarations(sourcekitten_json)
249
258
  docs = deduplicate_declarations(docs)
250
259
  SourceDeclaration::Type.all.each do |type|
@@ -75,8 +75,9 @@ describe_cli 'jazzy' do
75
75
  subject do |s|
76
76
  s.executable = "ruby #{ROOT + 'bin/jazzy'}"
77
77
  s.environment_vars = {
78
- 'JAZZY_FAKE_DATE' => 'YYYY-MM-DD',
79
- 'JAZZY_FAKE_VERSION' => 'X.X.X',
78
+ 'JAZZY_FAKE_DATE' => 'YYYY-MM-DD',
79
+ 'JAZZY_FAKE_VERSION' => 'X.X.X',
80
+ 'COCOAPODS_SKIP_NEW_VERSION' => 'TRUE',
80
81
  }
81
82
  s.default_args = []
82
83
  s.replace_path ROOT.to_s, 'ROOT'
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.2.0
4
+ version: 0.2.1
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-04-23 00:00:00.000000000 Z
13
+ date: 2015-05-06 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: cocoapods
@@ -18,14 +18,14 @@ dependencies:
18
18
  requirements:
19
19
  - - "~>"
20
20
  - !ruby/object:Gem::Version
21
- version: 0.36.0.rc.1
21
+ version: '0.37'
22
22
  type: :runtime
23
23
  prerelease: false
24
24
  version_requirements: !ruby/object:Gem::Requirement
25
25
  requirements:
26
26
  - - "~>"
27
27
  - !ruby/object:Gem::Version
28
- version: 0.36.0.rc.1
28
+ version: '0.37'
29
29
  - !ruby/object:Gem::Dependency
30
30
  name: mustache
31
31
  requirement: !ruby/object:Gem::Requirement
@@ -151,7 +151,6 @@ files:
151
151
  - ".gitignore"
152
152
  - ".gitmodules"
153
153
  - ".rubocop.yml"
154
- - ".travis.yml"
155
154
  - CHANGELOG.md
156
155
  - Gemfile
157
156
  - Gemfile.lock
@@ -1,17 +0,0 @@
1
- language: objective-c
2
- osx_image: xcode611
3
- cache: bundler
4
- rvm:
5
- - system
6
- before_install:
7
- - "mkdir -p ~/.cocoapods && echo -e \"---\\nnew_version_message: false\" > ~/.cocoapods/config.yaml"
8
- - sudo gem install bundler
9
- - git submodule update --init --recursive
10
- script:
11
- - bundle exec rake spec
12
- notifications:
13
- email: false
14
- slack: realmio:vPdpsG9NLDo2DNlbqtcMAQuE
15
- branches:
16
- except:
17
- - swift1p2