inch 0.5.6 → 0.5.7

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: 14108473ee83283cca8d56b272807810ab09056e
4
- data.tar.gz: a51660cc84f73f11717335bb48d2c48b61c13d8c
3
+ metadata.gz: 66c43ca8174a8055673d9e535152eb2e74fd7b45
4
+ data.tar.gz: 703f6df47f294043330e98a63fcdb98f7194dcdd
5
5
  SHA512:
6
- metadata.gz: fbc22fb1dd913d5b77ddd6097a079a060f1eb0bb2fe4ed801b057794e442e4ea6b6ef406727b7cae78e044f371682b29e69c91c1c6493d58cbd45bd3c49c7ed6
7
- data.tar.gz: 7bb0049037d2abc2814e63934df47571afb9bf91a1f863bea16b303503fd120ff34286ad024a6e73da6782e869c1fe8c5dc2b814cc395dba5750e4cbdef18243
6
+ metadata.gz: fa6524451d1e4f9025b3838c76627d6f3e2dcb44df058238af3a09a378be973e385eb7f7b4f5593b8c92f2869ca2019ad3c42b90647f5a73560c80388dec8204
7
+ data.tar.gz: d2c6c94f942e26c5d8a265ab68f30f2bb501f10007ad2467afd5ea83546859009c6dac6e045cc7043ee2c41b8b5a7f6f9632f88353ed084706f08b1437c023ed
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## 0.5.7
4
+
5
+ - NodeJS: Add support for JSDoc's ClassObject
6
+
3
7
  ## 0.5.6
4
8
 
5
9
  - NodeJS: Fix bug regarding visibility of objects
@@ -27,6 +27,15 @@ Inch::Config.register(:nodejs) do
27
27
  unconsidered_tag 0.2
28
28
  end
29
29
 
30
+ schema(:ClassObject) do
31
+ docstring 1.0
32
+
33
+ # optional:
34
+ code_example_single 0.1
35
+ code_example_multi 0.2
36
+ unconsidered_tag 0.2
37
+ end
38
+
30
39
  schema(:FunctionObject) do
31
40
  docstring 0.5
32
41
  parameters 0.4
@@ -23,7 +23,8 @@ module Inch
23
23
  end
24
24
 
25
25
  def criteria_for(constant_name)
26
- @criteria_blocks[constant_name.to_s]
26
+ @criteria_blocks[constant_name.to_s] ||
27
+ raise("No criteria for #{constant_name}")
27
28
  end
28
29
 
29
30
  # An Criteria describes how important certain parts of the docs are
@@ -0,0 +1,11 @@
1
+ module Inch
2
+ module Language
3
+ module Nodejs
4
+ module CodeObject
5
+ # Proxy class for modules
6
+ class ClassObject < ModuleObject
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module Inch
2
+ module Language
3
+ module Nodejs
4
+ module Evaluation
5
+ # Proxy class for classes
6
+ class ClassObject < ModuleObject
7
+ end
8
+ end
9
+ end
10
+ end
11
+ end
@@ -9,11 +9,13 @@ require 'inch/language/nodejs/provider/jsdoc'
9
9
 
10
10
  require 'inch/language/nodejs/code_object/base'
11
11
  require 'inch/language/nodejs/code_object/module_object'
12
+ require 'inch/language/nodejs/code_object/class_object'
12
13
  require 'inch/language/nodejs/code_object/function_object'
13
14
  require 'inch/language/nodejs/code_object/member_object'
14
15
 
15
16
  require 'inch/language/nodejs/evaluation/base'
16
17
  require 'inch/language/nodejs/evaluation/module_object'
18
+ require 'inch/language/nodejs/evaluation/class_object'
17
19
  require 'inch/language/nodejs/evaluation/function_object'
18
20
  require 'inch/language/nodejs/evaluation/member_object'
19
21
 
@@ -1,6 +1,7 @@
1
1
  require 'inch/language/nodejs/provider/jsdoc/object/base'
2
2
  require 'inch/language/nodejs/provider/jsdoc/object/function_object'
3
3
  require 'inch/language/nodejs/provider/jsdoc/object/module_object'
4
+ require 'inch/language/nodejs/provider/jsdoc/object/class_object'
4
5
  require 'inch/language/nodejs/provider/jsdoc/object/member_object'
5
6
 
6
7
  module Inch
@@ -220,7 +220,7 @@ module Inch
220
220
  protected
221
221
 
222
222
  def meta?
223
- !meta.nil?
223
+ !meta.nil? && meta.is_a?(Hash)
224
224
  end
225
225
 
226
226
  def meta
@@ -0,0 +1,18 @@
1
+ module Inch
2
+ module Language
3
+ module Nodejs
4
+ module Provider
5
+ module JSDoc
6
+ module Object
7
+ # Proxy class for classes
8
+ class ClassObject < Base
9
+ def namespace?
10
+ true
11
+ end
12
+ end
13
+ end
14
+ end
15
+ end
16
+ end
17
+ end
18
+ end
@@ -8,7 +8,8 @@ module Inch
8
8
  module JSDoc
9
9
  # Parses the source tree (using JSDoc)
10
10
  class Parser
11
- IGNORE_TYPES = %w(member package)
11
+ # TODO: should we remove constant and namespace from this list?
12
+ IGNORE_TYPES = %w(member package constant namespace)
12
13
 
13
14
  attr_reader :parsed_objects
14
15
 
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = '0.5.6'
2
+ VERSION = '0.5.7'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.6
4
+ version: 0.5.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
@@ -235,11 +235,13 @@ files:
235
235
  - lib/inch/language/elixir/roles/object.rb
236
236
  - lib/inch/language/elixir/roles/type.rb
237
237
  - lib/inch/language/nodejs/code_object/base.rb
238
+ - lib/inch/language/nodejs/code_object/class_object.rb
238
239
  - lib/inch/language/nodejs/code_object/function_object.rb
239
240
  - lib/inch/language/nodejs/code_object/function_parameter_object.rb
240
241
  - lib/inch/language/nodejs/code_object/member_object.rb
241
242
  - lib/inch/language/nodejs/code_object/module_object.rb
242
243
  - lib/inch/language/nodejs/evaluation/base.rb
244
+ - lib/inch/language/nodejs/evaluation/class_object.rb
243
245
  - lib/inch/language/nodejs/evaluation/function_object.rb
244
246
  - lib/inch/language/nodejs/evaluation/member_object.rb
245
247
  - lib/inch/language/nodejs/evaluation/module_object.rb
@@ -248,6 +250,7 @@ files:
248
250
  - lib/inch/language/nodejs/provider/jsdoc/docstring.rb
249
251
  - lib/inch/language/nodejs/provider/jsdoc/object.rb
250
252
  - lib/inch/language/nodejs/provider/jsdoc/object/base.rb
253
+ - lib/inch/language/nodejs/provider/jsdoc/object/class_object.rb
251
254
  - lib/inch/language/nodejs/provider/jsdoc/object/function_object.rb
252
255
  - lib/inch/language/nodejs/provider/jsdoc/object/function_parameter_object.rb
253
256
  - lib/inch/language/nodejs/provider/jsdoc/object/member_object.rb