inch 0.5.1 → 0.5.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.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 408e155eeff83178d19dfb49b012504702002e86
4
- data.tar.gz: 0d780703f11ae384ecb4be4a96be3b64b30ae2c5
3
+ metadata.gz: 4c430836d9e77d663202c817594fdea71b13e94c
4
+ data.tar.gz: 9dc7dead07119bdbf0ddbd98c14f3f3604acd262
5
5
  SHA512:
6
- metadata.gz: b14eca931fdf3295dcdee79141f5024874e39f04422dbdc33921ea0c004eca097dbd9507f8b1925073aa60b73b9df305b18dc7b509b76025ce592ba5e5caa2bc
7
- data.tar.gz: a77407ec1fa424c19738bf04c033ab8412c00281eff3bd8ebc0d1815b480f3ef86500fb83ad065dcc194e322b6c5ce65f8a057a080da5c941d4d2c4df289bd8b
6
+ metadata.gz: df94b22d6860ec87ddfcf68df57f6dc82e6b99e77b4bf713f74e8e3e9243cbd089bc8e5720c2db12a3c333e8db7d1be4a5bcbb541a79874cba4d68f60a381f79
7
+ data.tar.gz: 54c90ae79aaa7141ab6f9c2ea6dbe15a0dcf0562e3b13f60a8164c9d61b8ba57d17d00ba8dd35164454016cd40a5cb5768df00bccba49cd88fc02cb23ab2bd31
@@ -76,7 +76,7 @@ module Inch
76
76
 
77
77
  # @return [Docstring]
78
78
  def docstring
79
- @docstring ||= Docstring.new(@hash['doc'])
79
+ @docstring ||= Docstring.new(original_docstring)
80
80
  end
81
81
 
82
82
  def getter?
@@ -184,7 +184,7 @@ module Inch
184
184
  end
185
185
 
186
186
  def undocumented?
187
- @hash['doc'].nil?
187
+ original_docstring.nil? || original_docstring.to_s.strip.empty?
188
188
  end
189
189
 
190
190
  def visibility
@@ -6,6 +6,14 @@ module Inch
6
6
  module Object
7
7
  # Proxy class for modules
8
8
  class ModuleObject < Base
9
+ def original_docstring
10
+ @hash['moduledoc']
11
+ end
12
+
13
+ def nodoc?
14
+ super || @hash['moduledoc'] == false
15
+ end
16
+
9
17
  def fullname
10
18
  @hash['id']
11
19
  end
@@ -1,3 +1,3 @@
1
1
  module Inch
2
- VERSION = '0.5.1'
2
+ VERSION = '0.5.2'
3
3
  end
@@ -1,608 +1,608 @@
1
1
  {
2
2
  "args": [
3
- "inspect",
3
+ "inspect",
4
4
  "InchTest.Functions."
5
- ],
6
- "git_repo_url": "git@github.com:inch-ci/Hello-World-Elixir.git",
7
- "language": "elixir",
5
+ ],
6
+ "git_repo_url": "git@github.com:inch-ci/Hello-World-Elixir.git",
7
+ "language": "elixir",
8
8
  "objects": [
9
9
  {
10
- "id": "InchTest",
11
- "module": "Elixir.InchTest",
12
- "moduledoc": null,
13
- "object_type": "ModuleObject",
14
- "source": null,
15
- "type": null,
10
+ "id": "InchTest",
11
+ "module": "Elixir.InchTest",
12
+ "moduledoc": null,
13
+ "object_type": "ModuleObject",
14
+ "source": null,
15
+ "type": null,
16
16
  "typespecs": []
17
- },
17
+ },
18
18
  {
19
- "id": "InchTest.CodeExamples",
20
- "module": "Elixir.InchTest.CodeExamples",
21
- "moduledoc": null,
22
- "object_type": "ModuleObject",
23
- "source": null,
24
- "type": null,
19
+ "id": "InchTest.CodeExamples",
20
+ "module": "Elixir.InchTest.CodeExamples",
21
+ "moduledoc": null,
22
+ "object_type": "ModuleObject",
23
+ "source": null,
24
+ "type": null,
25
25
  "typespecs": []
26
- },
26
+ },
27
27
  {
28
- "id": "InchTest.Config",
29
- "module": "Elixir.InchTest.Config",
30
- "moduledoc": null,
31
- "object_type": "ModuleObject",
32
- "source": null,
33
- "type": null,
28
+ "id": "InchTest.Config",
29
+ "module": "Elixir.InchTest.Config",
30
+ "moduledoc": null,
31
+ "object_type": "ModuleObject",
32
+ "source": null,
33
+ "type": null,
34
34
  "typespecs": []
35
- },
35
+ },
36
36
  {
37
- "id": "InchTest.Docs.Formatter",
38
- "module": "Elixir.InchTest.Docs.Formatter",
39
- "moduledoc": "Provide JSON-formatted documentation\n",
40
- "object_type": "ModuleObject",
41
- "source": null,
42
- "type": null,
37
+ "id": "InchTest.Docs.Formatter",
38
+ "module": "Elixir.InchTest.Docs.Formatter",
39
+ "moduledoc": "Provide JSON-formatted documentation\n",
40
+ "object_type": "ModuleObject",
41
+ "source": null,
42
+ "type": null,
43
43
  "typespecs": []
44
- },
44
+ },
45
45
  {
46
- "id": "InchTest.Docs.Retriever",
47
- "module": "Elixir.InchTest.Docs.Retriever",
48
- "moduledoc": "Functions to extract documentation information from modules.\n",
49
- "object_type": "ModuleObject",
50
- "source": null,
51
- "type": null,
46
+ "id": "InchTest.Docs.Retriever",
47
+ "module": "Elixir.InchTest.Docs.Retriever",
48
+ "moduledoc": "Functions to extract documentation information from modules.\n",
49
+ "object_type": "ModuleObject",
50
+ "source": null,
51
+ "type": null,
52
52
  "typespecs": []
53
- },
53
+ },
54
54
  {
55
- "id": "InchTest.Docs.Retriever.Error",
56
- "module": "Elixir.InchTest.Docs.Retriever.Error",
57
- "moduledoc": null,
58
- "object_type": "ModuleObject",
59
- "source": null,
60
- "type": "exception",
55
+ "id": "InchTest.Docs.Retriever.Error",
56
+ "module": "Elixir.InchTest.Docs.Retriever.Error",
57
+ "moduledoc": null,
58
+ "object_type": "ModuleObject",
59
+ "source": null,
60
+ "type": "exception",
61
61
  "typespecs": []
62
- },
62
+ },
63
63
  {
64
- "id": "InchTest.FunctionObject",
65
- "module": "Elixir.InchTest.FunctionObject",
66
- "moduledoc": null,
67
- "object_type": "ModuleObject",
68
- "source": null,
69
- "type": null,
64
+ "id": "InchTest.FunctionObject",
65
+ "module": "Elixir.InchTest.FunctionObject",
66
+ "moduledoc": null,
67
+ "object_type": "ModuleObject",
68
+ "source": null,
69
+ "type": null,
70
70
  "typespecs": []
71
- },
71
+ },
72
72
  {
73
- "id": "InchTest.Functions",
74
- "module": "Elixir.InchTest.Functions",
75
- "moduledoc": " In this module we define funs that are \"cases\" for our test suite.\n",
76
- "object_type": "ModuleObject",
77
- "source": null,
78
- "type": null,
73
+ "id": "InchTest.Functions",
74
+ "module": "Elixir.InchTest.Functions",
75
+ "moduledoc": " In this module we define funs that are \"cases\" for our test suite.\n",
76
+ "object_type": "ModuleObject",
77
+ "source": null,
78
+ "type": null,
79
79
  "typespecs": []
80
- },
80
+ },
81
81
  {
82
- "id": "InchTest.ModuleObject",
83
- "module": "Elixir.InchTest.ModuleObject",
84
- "moduledoc": null,
85
- "object_type": "ModuleObject",
86
- "source": null,
87
- "type": null,
82
+ "id": "InchTest.ModuleObject",
83
+ "module": "Elixir.InchTest.ModuleObject",
84
+ "moduledoc": null,
85
+ "object_type": "ModuleObject",
86
+ "source": null,
87
+ "type": null,
88
88
  "typespecs": []
89
- },
89
+ },
90
90
  {
91
- "id": "InchTest.Naming",
92
- "module": "Elixir.InchTest.Naming",
93
- "moduledoc": null,
94
- "object_type": "ModuleObject",
95
- "source": null,
96
- "type": null,
91
+ "id": "InchTest.Naming",
92
+ "module": "Elixir.InchTest.Naming",
93
+ "moduledoc": null,
94
+ "object_type": "ModuleObject",
95
+ "source": null,
96
+ "type": null,
97
97
  "typespecs": []
98
- },
98
+ },
99
99
  {
100
- "id": "InchTest.TypeObject",
101
- "module": "Elixir.InchTest.TypeObject",
102
- "moduledoc": null,
103
- "object_type": "ModuleObject",
104
- "source": null,
105
- "type": null,
100
+ "id": "InchTest.TypeObject",
101
+ "module": "Elixir.InchTest.TypeObject",
102
+ "moduledoc": null,
103
+ "object_type": "ModuleObject",
104
+ "source": null,
105
+ "type": null,
106
106
  "typespecs": []
107
- },
107
+ },
108
108
  {
109
- "arity": 4,
110
- "doc": false,
111
- "id": "generate_docs/4",
112
- "module_id": "InchTest",
113
- "name": "generate_docs",
114
- "object_type": "FunctionObject",
109
+ "arity": 4,
110
+ "doc": false,
111
+ "id": "generate_docs/4",
112
+ "module_id": "InchTest",
113
+ "name": "generate_docs",
114
+ "object_type": "FunctionObject",
115
115
  "signature": [
116
116
  [
117
- "project",
118
- [],
117
+ "project",
118
+ [],
119
119
  null
120
- ],
120
+ ],
121
121
  [
122
- "version",
123
- [],
122
+ "version",
123
+ [],
124
124
  null
125
- ],
125
+ ],
126
126
  [
127
- "args",
128
- [],
127
+ "args",
128
+ [],
129
129
  null
130
- ],
130
+ ],
131
131
  [
132
- "options",
133
- [],
132
+ "options",
133
+ [],
134
134
  null
135
135
  ]
136
- ],
137
- "source": null,
138
- "specs": [],
136
+ ],
137
+ "source": null,
138
+ "specs": [],
139
139
  "type": "def"
140
- },
140
+ },
141
141
  {
142
- "arity": 0,
143
- "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
144
- "id": "multiple_code_examples/0",
145
- "module_id": "InchTest.CodeExamples",
146
- "name": "multiple_code_examples",
147
- "object_type": "FunctionObject",
148
- "signature": [],
149
- "source": null,
150
- "specs": [],
142
+ "arity": 0,
143
+ "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
144
+ "id": "multiple_code_examples/0",
145
+ "module_id": "InchTest.CodeExamples",
146
+ "name": "multiple_code_examples",
147
+ "object_type": "FunctionObject",
148
+ "signature": [],
149
+ "source": null,
150
+ "specs": [],
151
151
  "type": "def"
152
- },
152
+ },
153
153
  {
154
- "arity": 0,
155
- "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
156
- "id": "single_code_example/0",
157
- "module_id": "InchTest.CodeExamples",
158
- "name": "single_code_example",
159
- "object_type": "FunctionObject",
160
- "signature": [],
161
- "source": null,
162
- "specs": [],
154
+ "arity": 0,
155
+ "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
156
+ "id": "single_code_example/0",
157
+ "module_id": "InchTest.CodeExamples",
158
+ "name": "single_code_example",
159
+ "object_type": "FunctionObject",
160
+ "signature": [],
161
+ "source": null,
162
+ "specs": [],
163
163
  "type": "def"
164
- },
164
+ },
165
165
  {
166
- "arity": 3,
167
- "doc": "Generate JSON documentation for the given modules\n",
168
- "id": "run/3",
169
- "module_id": "InchTest.Docs.Formatter",
170
- "name": "run",
171
- "object_type": "FunctionObject",
166
+ "arity": 3,
167
+ "doc": "Generate JSON documentation for the given modules\n",
168
+ "id": "run/3",
169
+ "module_id": "InchTest.Docs.Formatter",
170
+ "name": "run",
171
+ "object_type": "FunctionObject",
172
172
  "signature": [
173
173
  [
174
- "modules",
175
- [],
174
+ "modules",
175
+ [],
176
176
  null
177
- ],
177
+ ],
178
178
  [
179
- "args",
180
- [],
179
+ "args",
180
+ [],
181
181
  null
182
- ],
182
+ ],
183
183
  [
184
- "config",
185
- [],
184
+ "config",
185
+ [],
186
186
  null
187
187
  ]
188
- ],
189
- "source": null,
190
- "specs": [],
188
+ ],
189
+ "source": null,
190
+ "specs": [],
191
191
  "type": "def"
192
- },
192
+ },
193
193
  {
194
- "arity": 2,
195
- "doc": "Extract documentation from all modules in the specified directory\n",
196
- "id": "docs_from_dir/2",
197
- "module_id": "InchTest.Docs.Retriever",
198
- "name": "docs_from_dir",
199
- "object_type": "FunctionObject",
194
+ "arity": 2,
195
+ "doc": "Extract documentation from all modules in the specified directory\n",
196
+ "id": "docs_from_dir/2",
197
+ "module_id": "InchTest.Docs.Retriever",
198
+ "name": "docs_from_dir",
199
+ "object_type": "FunctionObject",
200
200
  "signature": [
201
201
  [
202
- "dir",
203
- [],
202
+ "dir",
203
+ [],
204
204
  null
205
- ],
205
+ ],
206
206
  [
207
- "config",
208
- [],
207
+ "config",
208
+ [],
209
209
  null
210
210
  ]
211
- ],
212
- "source": null,
213
- "specs": [],
211
+ ],
212
+ "source": null,
213
+ "specs": [],
214
214
  "type": "def"
215
- },
215
+ },
216
216
  {
217
- "arity": 2,
218
- "doc": "Extract documentation from all modules in the specified list of files\n",
219
- "id": "docs_from_files/2",
220
- "module_id": "InchTest.Docs.Retriever",
221
- "name": "docs_from_files",
222
- "object_type": "FunctionObject",
217
+ "arity": 2,
218
+ "doc": "Extract documentation from all modules in the specified list of files\n",
219
+ "id": "docs_from_files/2",
220
+ "module_id": "InchTest.Docs.Retriever",
221
+ "name": "docs_from_files",
222
+ "object_type": "FunctionObject",
223
223
  "signature": [
224
224
  [
225
- "files",
226
- [],
225
+ "files",
226
+ [],
227
227
  null
228
- ],
228
+ ],
229
229
  [
230
- "config",
231
- [],
230
+ "config",
231
+ [],
232
232
  null
233
233
  ]
234
- ],
235
- "source": null,
236
- "specs": [],
234
+ ],
235
+ "source": null,
236
+ "specs": [],
237
237
  "type": "def"
238
- },
238
+ },
239
239
  {
240
- "arity": 2,
241
- "doc": "Extract documentation from all modules in the list `modules`\n",
242
- "id": "docs_from_modules/2",
243
- "module_id": "InchTest.Docs.Retriever",
244
- "name": "docs_from_modules",
245
- "object_type": "FunctionObject",
240
+ "arity": 2,
241
+ "doc": "Extract documentation from all modules in the list `modules`\n",
242
+ "id": "docs_from_modules/2",
243
+ "module_id": "InchTest.Docs.Retriever",
244
+ "name": "docs_from_modules",
245
+ "object_type": "FunctionObject",
246
246
  "signature": [
247
247
  [
248
- "modules",
249
- [],
248
+ "modules",
249
+ [],
250
250
  null
251
- ],
251
+ ],
252
252
  [
253
- "config",
254
- [],
253
+ "config",
254
+ [],
255
255
  null
256
256
  ]
257
- ],
258
- "source": null,
259
- "specs": [],
257
+ ],
258
+ "source": null,
259
+ "specs": [],
260
260
  "type": "def"
261
- },
261
+ },
262
262
  {
263
- "arity": 1,
264
- "doc": "Callback implementation of `Exception.exception/1`.",
265
- "id": "exception/1",
266
- "module_id": "InchTest.Docs.Retriever.Error",
267
- "name": "exception",
268
- "object_type": "FunctionObject",
263
+ "arity": 1,
264
+ "doc": "Callback implementation of `Exception.exception/1`.",
265
+ "id": "exception/1",
266
+ "module_id": "InchTest.Docs.Retriever.Error",
267
+ "name": "exception",
268
+ "object_type": "FunctionObject",
269
269
  "signature": [
270
270
  [
271
- "args",
272
- [],
271
+ "args",
272
+ [],
273
273
  null
274
274
  ]
275
- ],
276
- "source": null,
275
+ ],
276
+ "source": null,
277
277
  "specs": [
278
278
  [
279
- "::",
279
+ "::",
280
280
  {
281
281
  "line": 21
282
- },
282
+ },
283
283
  [
284
284
  [
285
- "exception",
285
+ "exception",
286
286
  {
287
287
  "line": 21
288
- },
288
+ },
289
289
  [
290
290
  [
291
291
  [
292
- ".",
292
+ ".",
293
293
  {
294
294
  "line": 21
295
- },
295
+ },
296
296
  [
297
- "Elixir.Keyword",
297
+ "Elixir.Keyword",
298
298
  "t"
299
299
  ]
300
- ],
300
+ ],
301
301
  {
302
302
  "line": 21
303
- },
303
+ },
304
304
  []
305
305
  ]
306
306
  ]
307
- ],
307
+ ],
308
308
  [
309
309
  [
310
- ".",
310
+ ".",
311
311
  {
312
312
  "line": 21
313
- },
313
+ },
314
314
  [
315
- "Elixir.Exception",
315
+ "Elixir.Exception",
316
316
  "t"
317
317
  ]
318
- ],
318
+ ],
319
319
  {
320
320
  "line": 21
321
- },
321
+ },
322
322
  []
323
323
  ]
324
324
  ]
325
325
  ]
326
- ],
326
+ ],
327
327
  "type": "def"
328
- },
328
+ },
329
329
  {
330
- "arity": 1,
331
- "doc": "Callback implementation of `Exception.message/1`.",
332
- "id": "message/1",
333
- "module_id": "InchTest.Docs.Retriever.Error",
334
- "name": "message",
335
- "object_type": "FunctionObject",
330
+ "arity": 1,
331
+ "doc": "Callback implementation of `Exception.message/1`.",
332
+ "id": "message/1",
333
+ "module_id": "InchTest.Docs.Retriever.Error",
334
+ "name": "message",
335
+ "object_type": "FunctionObject",
336
336
  "signature": [
337
337
  [
338
- "exception",
339
- [],
338
+ "exception",
339
+ [],
340
340
  null
341
341
  ]
342
- ],
343
- "source": null,
342
+ ],
343
+ "source": null,
344
344
  "specs": [
345
345
  [
346
- "::",
346
+ "::",
347
347
  {
348
348
  "line": 21
349
- },
349
+ },
350
350
  [
351
351
  [
352
- "message",
352
+ "message",
353
353
  {
354
354
  "line": 21
355
- },
355
+ },
356
356
  [
357
357
  [
358
358
  [
359
- ".",
359
+ ".",
360
360
  {
361
361
  "line": 21
362
- },
362
+ },
363
363
  [
364
- "Elixir.Exception",
364
+ "Elixir.Exception",
365
365
  "t"
366
366
  ]
367
- ],
367
+ ],
368
368
  {
369
369
  "line": 21
370
- },
370
+ },
371
371
  []
372
372
  ]
373
373
  ]
374
- ],
374
+ ],
375
375
  [
376
376
  [
377
- ".",
377
+ ".",
378
378
  {
379
379
  "line": 21
380
- },
380
+ },
381
381
  [
382
- "Elixir.String",
382
+ "Elixir.String",
383
383
  "t"
384
384
  ]
385
- ],
385
+ ],
386
386
  {
387
387
  "line": 21
388
- },
388
+ },
389
389
  []
390
390
  ]
391
391
  ]
392
392
  ]
393
- ],
393
+ ],
394
394
  "type": "def"
395
- },
395
+ },
396
396
  {
397
- "arity": 2,
398
- "doc": "This fun takes `param1` and `param2` as arguments.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
399
- "id": "full_doc/2",
400
- "module_id": "InchTest.Functions",
401
- "name": "full_doc",
402
- "object_type": "FunctionObject",
397
+ "arity": 2,
398
+ "doc": "This fun takes `param1` and `param2` as arguments.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
399
+ "id": "full_doc/2",
400
+ "module_id": "InchTest.Functions",
401
+ "name": "full_doc",
402
+ "object_type": "FunctionObject",
403
403
  "signature": [
404
404
  [
405
- "param1",
406
- [],
405
+ "param1",
406
+ [],
407
407
  null
408
- ],
408
+ ],
409
409
  [
410
- "param2",
411
- [],
410
+ "param2",
411
+ [],
412
412
  null
413
413
  ]
414
- ],
415
- "source": null,
416
- "specs": [],
414
+ ],
415
+ "source": null,
416
+ "specs": [],
417
417
  "type": "def"
418
- },
418
+ },
419
419
  {
420
- "arity": 2,
421
- "doc": "This fun takes a `param1` and a second parameter that is never used\n(maybe, because it is a callback or something like that). However, the\nsecond param should impact the evaluation by Inch.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
422
- "id": "full_doc_second_parameter_unnamed/2",
423
- "module_id": "InchTest.Functions",
424
- "name": "full_doc_second_parameter_unnamed",
425
- "object_type": "FunctionObject",
420
+ "arity": 2,
421
+ "doc": "This fun takes a `param1` and a second parameter that is never used\n(maybe, because it is a callback or something like that). However, the\nsecond param should impact the evaluation by Inch.\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n",
422
+ "id": "full_doc_second_parameter_unnamed/2",
423
+ "module_id": "InchTest.Functions",
424
+ "name": "full_doc_second_parameter_unnamed",
425
+ "object_type": "FunctionObject",
426
426
  "signature": [
427
427
  [
428
- "param1",
429
- [],
428
+ "param1",
429
+ [],
430
430
  null
431
- ],
431
+ ],
432
432
  [
433
- "",
434
- [],
433
+ "",
434
+ [],
435
435
  "Elixir"
436
436
  ]
437
- ],
438
- "source": null,
439
- "specs": [],
437
+ ],
438
+ "source": null,
439
+ "specs": [],
440
440
  "type": "def"
441
- },
441
+ },
442
442
  {
443
- "arity": 1,
444
- "doc": "Converts String to camel case\n\n## Examples\n\n iex> InchTest.Naming.camelize(\"my_app\")\n \"MyApp\"\n\nIn general, `camelize` can be thought of as the reverse of\n`underscore`, however, in some cases formatting may be lost:\n\n InchTest.Naming.underscore \"SAPExample\" #=> \"sap_example\"\n InchTest.Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
445
- "id": "camelize/1",
446
- "module_id": "InchTest.Naming",
447
- "name": "camelize",
448
- "object_type": "FunctionObject",
443
+ "arity": 1,
444
+ "doc": "Converts String to camel case\n\n## Examples\n\n iex> InchTest.Naming.camelize(\"my_app\")\n \"MyApp\"\n\nIn general, `camelize` can be thought of as the reverse of\n`underscore`, however, in some cases formatting may be lost:\n\n InchTest.Naming.underscore \"SAPExample\" #=> \"sap_example\"\n InchTest.Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
445
+ "id": "camelize/1",
446
+ "module_id": "InchTest.Naming",
447
+ "name": "camelize",
448
+ "object_type": "FunctionObject",
449
449
  "signature": [
450
450
  [
451
- "arg1",
452
- [],
451
+ "arg1",
452
+ [],
453
453
  "Elixir"
454
454
  ]
455
- ],
456
- "source": null,
457
- "specs": [],
455
+ ],
456
+ "source": null,
457
+ "specs": [],
458
458
  "type": "def"
459
- },
459
+ },
460
460
  {
461
- "arity": 1,
462
- "doc": null,
463
- "id": "do_camelize/1",
464
- "module_id": "InchTest.Naming",
465
- "name": "do_camelize",
466
- "object_type": "FunctionObject",
461
+ "arity": 1,
462
+ "doc": null,
463
+ "id": "do_camelize/1",
464
+ "module_id": "InchTest.Naming",
465
+ "name": "do_camelize",
466
+ "object_type": "FunctionObject",
467
467
  "signature": [
468
468
  [
469
- "arg1",
470
- [],
469
+ "arg1",
470
+ [],
471
471
  "Elixir"
472
472
  ]
473
- ],
474
- "source": null,
475
- "specs": [],
473
+ ],
474
+ "source": null,
475
+ "specs": [],
476
476
  "type": "def"
477
- },
477
+ },
478
478
  {
479
- "arity": 2,
480
- "doc": null,
481
- "id": "do_underscore/2",
482
- "module_id": "InchTest.Naming",
483
- "name": "do_underscore",
484
- "object_type": "FunctionObject",
479
+ "arity": 2,
480
+ "doc": null,
481
+ "id": "do_underscore/2",
482
+ "module_id": "InchTest.Naming",
483
+ "name": "do_underscore",
484
+ "object_type": "FunctionObject",
485
485
  "signature": [
486
486
  [
487
- "arg1",
488
- [],
487
+ "arg1",
488
+ [],
489
489
  "Elixir"
490
- ],
490
+ ],
491
491
  [
492
- "prev",
493
- [],
492
+ "prev",
493
+ [],
494
494
  null
495
495
  ]
496
- ],
497
- "source": null,
498
- "specs": [],
496
+ ],
497
+ "source": null,
498
+ "specs": [],
499
499
  "type": "def"
500
- },
500
+ },
501
501
  {
502
- "arity": 2,
503
- "doc": null,
504
- "id": "remove_suffix/2",
505
- "module_id": "InchTest.Naming",
506
- "name": "remove_suffix",
507
- "object_type": "FunctionObject",
502
+ "arity": 2,
503
+ "doc": null,
504
+ "id": "remove_suffix/2",
505
+ "module_id": "InchTest.Naming",
506
+ "name": "remove_suffix",
507
+ "object_type": "FunctionObject",
508
508
  "signature": [
509
509
  [
510
- "alias",
511
- [],
510
+ "alias",
511
+ [],
512
512
  null
513
- ],
513
+ ],
514
514
  [
515
- "suffix",
516
- [],
515
+ "suffix",
516
+ [],
517
517
  null
518
518
  ]
519
- ],
520
- "source": null,
521
- "specs": [],
519
+ ],
520
+ "source": null,
521
+ "specs": [],
522
522
  "type": "def"
523
- },
523
+ },
524
524
  {
525
- "arity": 2,
526
- "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n\n",
527
- "id": "resource_name/2",
528
- "module_id": "InchTest.Naming",
529
- "name": "resource_name",
530
- "object_type": "FunctionObject",
525
+ "arity": 2,
526
+ "doc": "Extracts the resource name from an alias\n\n## Examples\n\n iex> InchTest.Naming.resource_name(MyApp.User)\n \"user\"\n iex> InchTest.Naming.resource_name(MyApp.UserView, \"View\")\n \"user\"\n\n",
527
+ "id": "resource_name/2",
528
+ "module_id": "InchTest.Naming",
529
+ "name": "resource_name",
530
+ "object_type": "FunctionObject",
531
531
  "signature": [
532
532
  [
533
- "alias",
534
- [],
533
+ "alias",
534
+ [],
535
535
  null
536
- ],
536
+ ],
537
537
  [
538
- "\\\\",
539
- [],
538
+ "\\\\",
539
+ [],
540
540
  [
541
541
  [
542
- "suffix",
543
- [],
542
+ "suffix",
543
+ [],
544
544
  null
545
- ],
545
+ ],
546
546
  null
547
547
  ]
548
548
  ]
549
- ],
550
- "source": null,
551
- "specs": [],
549
+ ],
550
+ "source": null,
551
+ "specs": [],
552
552
  "type": "def"
553
- },
553
+ },
554
554
  {
555
- "arity": 1,
556
- "doc": null,
557
- "id": "to_lower_char/1",
558
- "module_id": "InchTest.Naming",
559
- "name": "to_lower_char",
560
- "object_type": "FunctionObject",
555
+ "arity": 1,
556
+ "doc": null,
557
+ "id": "to_lower_char/1",
558
+ "module_id": "InchTest.Naming",
559
+ "name": "to_lower_char",
560
+ "object_type": "FunctionObject",
561
561
  "signature": [
562
562
  [
563
- "char",
564
- [],
563
+ "char",
564
+ [],
565
565
  null
566
566
  ]
567
- ],
568
- "source": null,
569
- "specs": [],
567
+ ],
568
+ "source": null,
569
+ "specs": [],
570
570
  "type": "def"
571
- },
571
+ },
572
572
  {
573
- "arity": 1,
574
- "doc": null,
575
- "id": "to_upper_char/1",
576
- "module_id": "InchTest.Naming",
577
- "name": "to_upper_char",
578
- "object_type": "FunctionObject",
573
+ "arity": 1,
574
+ "doc": null,
575
+ "id": "to_upper_char/1",
576
+ "module_id": "InchTest.Naming",
577
+ "name": "to_upper_char",
578
+ "object_type": "FunctionObject",
579
579
  "signature": [
580
580
  [
581
- "char",
582
- [],
581
+ "char",
582
+ [],
583
583
  null
584
584
  ]
585
- ],
586
- "source": null,
587
- "specs": [],
585
+ ],
586
+ "source": null,
587
+ "specs": [],
588
588
  "type": "def"
589
- },
589
+ },
590
590
  {
591
- "arity": 1,
592
- "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
593
- "id": "underscore/1",
594
- "module_id": "InchTest.Naming",
595
- "name": "underscore",
596
- "object_type": "FunctionObject",
591
+ "arity": 1,
592
+ "doc": "Converts String to underscore case\n\n## Examples\n\n iex> InchTest.Naming.underscore(\"MyApp\")\n \"my_app\"\n\n iex> InchTest.Naming.underscore(\"my-app\")\n \"my_app\"\n\nIn general, `underscore` can be thought of as the reverse of\n`camelize`, however, in some cases formatting may be lost:\n\n Naming.underscore \"SAPExample\" #=> \"sap_example\"\n Naming.camelize \"sap_example\" #=> \"SapExample\"\n\n",
593
+ "id": "underscore/1",
594
+ "module_id": "InchTest.Naming",
595
+ "name": "underscore",
596
+ "object_type": "FunctionObject",
597
597
  "signature": [
598
598
  [
599
- "arg1",
600
- [],
599
+ "arg1",
600
+ [],
601
601
  "Elixir"
602
602
  ]
603
- ],
604
- "source": null,
605
- "specs": [],
603
+ ],
604
+ "source": null,
605
+ "specs": [],
606
606
  "type": "def"
607
607
  }
608
608
  ]
@@ -0,0 +1,18 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../../../../test_helper')
2
+
3
+ describe ::Inch::Language::Elixir::CodeObject::ModuleObject do
4
+ before do
5
+ @codebase = fresh_codebase(:elixir, :inch_test, 'all.json')
6
+ @objects = @codebase.objects
7
+ end
8
+
9
+ describe 'Scores' do
10
+ #
11
+ it 'should not' do
12
+ m = @objects.find('InchTest.Functions')
13
+ refute m.docstring.empty?
14
+ refute m.undocumented?
15
+ assert m.score >= 50
16
+ end
17
+ end
18
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: inch
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - René Föhring
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-10-07 00:00:00.000000000 Z
11
+ date: 2014-10-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -365,6 +365,7 @@ files:
365
365
  - test/unit/config_test.rb
366
366
  - test/unit/evaluation/role_test.rb
367
367
  - test/unit/language/elixir/code_object/function_object_test.rb
368
+ - test/unit/language/elixir/code_object/module_object_test.rb
368
369
  - test/unit/language/nodejs/provider/jsdoc/docstring_test.rb
369
370
  - test/unit/language/ruby/code_object/alias_test.rb
370
371
  - test/unit/language/ruby/code_object/method_object_test.rb
@@ -458,6 +459,7 @@ test_files:
458
459
  - test/unit/config_test.rb
459
460
  - test/unit/evaluation/role_test.rb
460
461
  - test/unit/language/elixir/code_object/function_object_test.rb
462
+ - test/unit/language/elixir/code_object/module_object_test.rb
461
463
  - test/unit/language/nodejs/provider/jsdoc/docstring_test.rb
462
464
  - test/unit/language/ruby/code_object/alias_test.rb
463
465
  - test/unit/language/ruby/code_object/method_object_test.rb