appium_doc_lint 0.0.8 → 0.0.9

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: 7db3e1b388facaa63c87131d99f10ed6ce96bb20
4
- data.tar.gz: 20d1a901aff559fe701668df86680718ce8043b7
3
+ metadata.gz: 3cf34820e15746a7650f52dd18f56506d191b401
4
+ data.tar.gz: b86c445e31a5d4cdd56c261d63608ac2fe1844a5
5
5
  SHA512:
6
- metadata.gz: 9deecffaf2b9893cba1a43b044fa1d5aa368c32b2cf1df52cfd10dafccccccdf5c9ad593751727480e1f87058b718a449a3fa40bd10bf8975e37ce69283a498d
7
- data.tar.gz: 35caf3baca6118ba6aa4360f1249cbfb1a82271db05361f5f77be410e1355a96eb2e80db295ec1c340b822ec21df57a105c16e296ccbd126964b75e6e58bb300
6
+ metadata.gz: 04a73f49c502c5b16b9ac0d1e346d7062e092170bdade13858ec84a35d404e7ab353911049488fd24fb6c5700a5533bd174ba697daf93708f25c12bb3b407b9c
7
+ data.tar.gz: 313669c69f1502bebdc5d33e425ab09d367ada994a9b44851c782e9965cf48fee51ce44acd6e2e8dfafd9d6147cd5d654bf9368713ff1c1fc65af00ca1959eda
@@ -23,7 +23,10 @@ module Appium
23
23
  # process docs/en/filename.md#testing links
24
24
  link_target = trim_link link_target
25
25
 
26
- if link_target && !link_target.include?('/')
26
+ no_slash = !link_target.include?('/')
27
+ not_link_to_self = link_target != '#'
28
+
29
+ if link_target && no_slash && not_link_to_self
27
30
  ext = File.extname link_target
28
31
  if invalid_ext?(ext, link_target)
29
32
  warn index, full
@@ -37,12 +40,18 @@ module Appium
37
40
  warnings
38
41
  end
39
42
 
43
+ # from github.com/appium/api-docs/lib/api_docs.rb
40
44
  def invalid_ext? ext, link_target
41
45
  ext.empty? && ! link_target.end_with?('/')
42
46
  end
43
47
 
48
+ # process docs/en/filename.md#testing links
49
+ # handle relative links [getting started](../../README.md)
44
50
  def trim_link link_target
45
- trim = link_target.start_with?('docs/') && ! link_target.end_with?('/')
51
+ link_target = link_target.strip if link_target
52
+ return link_target if link_target.end_with?('/')
53
+ # trim doc and relative
54
+ trim = link_target.start_with?('docs/') || link_target.start_with?('../')
46
55
  trim ? File.basename(link_target) : link_target
47
56
  end
48
57
 
@@ -1,6 +1,6 @@
1
1
  module Appium
2
2
  class Lint
3
- VERSION = '0.0.8' unless defined? ::Appium::Lint::VERSION
3
+ VERSION = '0.0.9' unless defined? ::Appium::Lint::VERSION
4
4
  DATE = '2014-04-27' unless defined? ::Appium::Lint::DATE
5
5
  end
6
6
  end
data/release_notes.md CHANGED
@@ -1,3 +1,10 @@
1
+ #### v0.0.8 2014-04-27
2
+
3
+ - [2d3bfe1](https://github.com/appium/appium_doc_lint/commit/2d3bfe186204455c1c19f714748d369345216d75) Release 0.0.8
4
+ - [2b9a5d1](https://github.com/appium/appium_doc_lint/commit/2b9a5d1b434eb85fb03a1e91930c45b2fd65d4a9) Detect missing links in docs/ folder
5
+ - [1171ec6](https://github.com/appium/appium_doc_lint/commit/1171ec69632382382cedbf7596dec06aac7f3168) Add link to folder to test
6
+
7
+
1
8
  #### v0.0.7 2014-04-26
2
9
 
3
10
  - [9a9eaa9](https://github.com/appium/appium_doc_lint/commit/9a9eaa9854c2f16409d06333b120937995a42af0) Release 0.0.7
data/spec/lint_spec.rb CHANGED
@@ -291,7 +291,7 @@ markdown--
291
291
  [link to read](readme)
292
292
  [ok](ok#ok)
293
293
  [intro](intro#start)
294
- [testing](docs/en/ok) en should be .md
294
+ [testing](docs/en/ok) ok should be ok.md
295
295
  MARKDOWN
296
296
  rule = ExtMissing.new data: data
297
297
  expected = { 1 => [rule.fail + ' [link to read](readme)'],
@@ -310,6 +310,8 @@ markdown--
310
310
  [intro](intro.md#start)
311
311
  [example](https://example.com/)
312
312
  [testing](docs/en/)
313
+ [getting started doc](../../README.md)
314
+ [link to self is valid](#)
313
315
  MARKDOWN
314
316
  rule = ExtMissing.new data: data
315
317
  expected = {}
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: appium_doc_lint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.8
4
+ version: 0.0.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - code@bootstraponline.com