awesome_bot 1.17.2 → 1.18.0
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 +4 -4
- data/CHANGELOG.md +3 -0
- data/Dockerfile +10 -0
- data/README.md +32 -0
- data/bin/assets/test-timeout +1 -1
- data/bin/assets/test-timeout-and-redirect +1 -1
- data/lib/awesome_bot/links.rb +12 -2
- data/lib/awesome_bot/version.rb +1 -1
- data/status/list-travis-ci +2 -0
- data/status/status.md +4 -3
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 43dd3b9aeee72a1780959518bd09adb78c6c4ded
|
4
|
+
data.tar.gz: 2ae8d937309f6b27efe2cecdb5c0565fa0cafb9f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 01e035e7a6d7341556eeef722c3026714ade88c9189720bb7fce6f33444c2bb6aa4ef1f28f2d68f557ae8eebef4c417c7a3d93f17209532fda37388cb5a6d132
|
7
|
+
data.tar.gz: 8aa1a72d5426f3edb108ed9ee051e4258a42e298c7ba4eaf7ba28c9678255a437ba002ecb601f57bea77493e6436152bbb82c842c3b207d2f6fb7e899e0c57de
|
data/CHANGELOG.md
CHANGED
data/Dockerfile
ADDED
data/README.md
CHANGED
@@ -109,6 +109,25 @@ No issues :-)
|
|
109
109
|
Wrote results to ab-results-new-readme.md.json
|
110
110
|
```
|
111
111
|
|
112
|
+
### Docker Examples
|
113
|
+
If you do not want to install Ruby or it's dependencies you can simply use Docker and Docker image.
|
114
|
+
|
115
|
+
Here is the example how you can check the links in your current directory+subdirectories markdown files:
|
116
|
+
```shell
|
117
|
+
docker run -ti --rm -v $PWD:/mnt:ro dkhamsing/awesome_bot --white-list "test.com" --allow-dupe --allow-redirect --skip-save-results `find . -name "*.md"`
|
118
|
+
```
|
119
|
+
|
120
|
+
or check links in just in a single file located in `./templates/ubuntu.md`:
|
121
|
+
|
122
|
+
```shell
|
123
|
+
docker run -ti --rm -v $PWD:/mnt:ro dkhamsing/awesome_bot --allow-dupe --allow-redirect --skip-save-results ./templates/ubuntu.md
|
124
|
+
```
|
125
|
+
|
126
|
+
You always need to specify the path to the file so you can not use simply `*.md` but `ls *.md"`:
|
127
|
+
```shell
|
128
|
+
docker run -ti --rm -v $PWD:/mnt:ro dkhamsing/awesome_bot --white-list "test.com" --allow-dupe --allow-redirect --skip-save-results `ls *.md`
|
129
|
+
```
|
130
|
+
|
112
131
|
### Library
|
113
132
|
|
114
133
|
```ruby
|
@@ -161,6 +180,19 @@ notifications:
|
|
161
180
|
email: false
|
162
181
|
```
|
163
182
|
|
183
|
+
In case you want to use the docker image inside Travis CI follow this example which will check broken links in all `*.md` files in your repository:
|
184
|
+
|
185
|
+
```yml
|
186
|
+
sudo: required
|
187
|
+
|
188
|
+
services:
|
189
|
+
- docker
|
190
|
+
|
191
|
+
script:
|
192
|
+
# Link Checks
|
193
|
+
- docker run -ti --rm -v $PWD:/mnt:ro dkhamsing/awesome_bot --allow-dupe --allow-redirect --skip-save-results `find . -name "*.md"`
|
194
|
+
```
|
195
|
+
|
164
196
|
### CircleCI
|
165
197
|
|
166
198
|
If you prefer CircleCI, it'll work too. [Connect your repo](https://circleci.com/) and create a [`circle.yml` file](https://github.com/tmcw/awesome-geojson).
|
data/bin/assets/test-timeout
CHANGED
@@ -1,2 +1,2 @@
|
|
1
|
-
http://
|
1
|
+
http://1.2.3.4
|
2
2
|
https://github.com
|
data/lib/awesome_bot/links.rb
CHANGED
@@ -1,5 +1,14 @@
|
|
1
1
|
# Get and filter links
|
2
2
|
module AwesomeBot
|
3
|
+
# This matches, from left to right:
|
4
|
+
# a literal [
|
5
|
+
# the link title - i.e. anything up to the next closing bracket
|
6
|
+
# a literal ]
|
7
|
+
# a literal (
|
8
|
+
# the link destination (optionally enclosed in a single pair of angle brackets)
|
9
|
+
# a literal )
|
10
|
+
MARKDOWN_LINK_REGEX = /\[ [^\]]+ \] \( <? ([^)<>]+) >? \)/x
|
11
|
+
|
3
12
|
class << self
|
4
13
|
def links_filter(list)
|
5
14
|
list.reject { |x| x.length < 9 }
|
@@ -45,9 +54,10 @@ module AwesomeBot
|
|
45
54
|
end
|
46
55
|
|
47
56
|
def get_relative_links(content, base)
|
48
|
-
links =
|
57
|
+
links = []
|
58
|
+
content.scan(MARKDOWN_LINK_REGEX) { |groups| links << groups.first }
|
59
|
+
|
49
60
|
links.reject { |x| x.include?('http') || x.include?('#') }
|
50
|
-
.map { |x| x.sub '](', ''}
|
51
61
|
.map { |x| x =~ /\S/ ? x.match(/^\S*/) : x }
|
52
62
|
.map { |x| "#{base}#{x}"}
|
53
63
|
end
|
data/lib/awesome_bot/version.rb
CHANGED
data/status/list-travis-ci
CHANGED
data/status/status.md
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
# Awesome Status
|
2
2
|
|
3
|
-
Build status for **
|
3
|
+
Build status for **132** projects using https://github.com/dkhamsing/awesome_bot
|
4
4
|
|
5
5
|
Status | Config | Repo
|
6
6
|
--- | --- | ---
|
@@ -132,6 +132,7 @@ Status | Config | Repo
|
|
132
132
|
[](https://travis-ci.org/adriagalin/tools) | [`config`](https://github.com/adriagalin/tools/blob/master/.travis.yml) | [adriagalin/tools](https://github.com/adriagalin/tools)
|
133
133
|
[](https://travis-ci.org/arthurwayne/awesome-pentester) | [`config`](https://github.com/arthurwayne/awesome-pentester/blob/master/.travis.yml) | [arthurwayne/awesome-pentester](https://github.com/arthurwayne/awesome-pentester)
|
134
134
|
[](https://travis-ci.org/alister/php-in-london) | [`config`](https://github.com/alister/php-in-london/blob/master/.travis.yml) | [alister/php-in-london](https://github.com/alister/php-in-london)
|
135
|
+
[](https://travis-ci.org/IQDevs/Awesome-IQDevs) | [`config`](https://github.com/IQDevs/Awesome-IQDevs/blob/master/.travis.yml) | [IQDevs/Awesome-IQDevs](https://github.com/IQDevs/Awesome-IQDevs)
|
136
|
+
[](https://travis-ci.org/BubuAnabelas/awesome-markdown) | [`config`](https://github.com/BubuAnabelas/awesome-markdown/blob/master/.travis.yml) | [BubuAnabelas/awesome-markdown](https://github.com/BubuAnabelas/awesome-markdown)
|
137
|
+
[](https://travis-ci.org/serhii-londar/open-source-mac-os-apps) | [`config`](https://github.com/serhii-londar/open-source-mac-os-apps/blob/master/.travis.yml) | [serhii-londar/open-source-mac-os-apps](https://github.com/serhii-londar/open-source-mac-os-apps)
|
135
138
|
[](https://circleci.com/gh/tmcw/awesome-geojson) | [`config`](https://github.com/tmcw/awesome-geojson/blob/master/circle.yml) | [tmcw/awesome-geojson](https://github.com/tmcw/awesome-geojson)
|
136
|
-
[](https://travis-ci.org/IQDevs/Awesome-IQDevs) |[`config`](https://github.com/IQDevs/Awesome-IQDevs/blob/master/.travis.yml) | [IQDevs/Awesome-IQDevs](https://github.com/IQDevs/Awesome-IQDevs)
|
137
|
-
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: awesome_bot
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.18.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Khamsing
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2018-07-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: parallel
|
@@ -35,6 +35,7 @@ files:
|
|
35
35
|
- ".gitignore"
|
36
36
|
- ".travis.yml"
|
37
37
|
- CHANGELOG.md
|
38
|
+
- Dockerfile
|
38
39
|
- Gemfile
|
39
40
|
- LICENSE
|
40
41
|
- README.md
|