awesome_bot 1.17.2 → 1.18.0

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: 4819586cc231910efb36899c34ed06e06b574444
4
- data.tar.gz: 1bf138d33e2a7aa678efe6d1b5422861dd7080dd
3
+ metadata.gz: 43dd3b9aeee72a1780959518bd09adb78c6c4ded
4
+ data.tar.gz: 2ae8d937309f6b27efe2cecdb5c0565fa0cafb9f
5
5
  SHA512:
6
- metadata.gz: dc190f7116a59e28a3bb8d351b0aa486ee5d6648e0b9980395329b8201a9f555beceef67b4695ae8754740be4246bd693b659a1614bf8168d11426e93d117a8a
7
- data.tar.gz: b97a26ff88d84dfb477601425dffbce11b73d003d039d809a3e360c871757a0a849af4c9f63ec65bd275a29364f790eb917181c682ffeee5911e4f3e59a48794
6
+ metadata.gz: 01e035e7a6d7341556eeef722c3026714ade88c9189720bb7fce6f33444c2bb6aa4ef1f28f2d68f557ae8eebef4c417c7a3d93f17209532fda37388cb5a6d132
7
+ data.tar.gz: 8aa1a72d5426f3edb108ed9ee051e4258a42e298c7ba4eaf7ba28c9678255a437ba002ecb601f57bea77493e6436152bbb82c842c3b207d2f6fb7e899e0c57de
@@ -2,6 +2,9 @@
2
2
 
3
3
  Changes by [Daniel Khamsing][] unless otherwise noted.
4
4
 
5
+ # 1.18.0
6
+
7
+ - [parse] stricter parsing of relative urls by [Mat Moore](https://github.com/MatMoore)
5
8
 
6
9
  # 1.17.2
7
10
 
@@ -0,0 +1,10 @@
1
+ FROM ruby
2
+
3
+ RUN gem install awesome_bot --no-format-exec
4
+
5
+ VOLUME /mnt
6
+
7
+ WORKDIR /mnt
8
+
9
+ ENTRYPOINT ["awesome_bot"]
10
+ CMD ["--help"]
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).
@@ -1,2 +1,2 @@
1
- http://www.cmr.osu.edu/browse/datasets
1
+ http://1.2.3.4
2
2
  https://github.com
@@ -1,3 +1,3 @@
1
- http://www.cmr.osu.edu/browse/datasets
1
+ http://1.2.3.4
2
2
  https://github.com
3
3
  https://github.com/supermarin/Alcatraz
@@ -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 = content.scan /\].*?\)/
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
@@ -5,5 +5,5 @@ module AwesomeBot
5
5
  'Great for "awesome" projects.'
6
6
  PROJECT_URL = 'https://github.com/dkhamsing/awesome_bot'
7
7
 
8
- VERSION = '1.17.2'
8
+ VERSION = '1.18.0'
9
9
  end
@@ -127,3 +127,5 @@ adriagalin/tools
127
127
  arthurwayne/awesome-pentester
128
128
  alister/php-in-london
129
129
  IQDevs/Awesome-IQDevs
130
+ BubuAnabelas/awesome-markdown
131
+ serhii-londar/open-source-mac-os-apps
@@ -1,6 +1,6 @@
1
1
  # Awesome Status
2
2
 
3
- Build status for **129** projects using https://github.com/dkhamsing/awesome_bot
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
  [![Build Status](https://travis-ci.org/adriagalin/tools.svg)](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
  [![Build Status](https://travis-ci.org/arthurwayne/awesome-pentester.svg)](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
  [![Build Status](https://travis-ci.org/alister/php-in-london.svg)](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
+ [![Build Status](https://travis-ci.org/IQDevs/Awesome-IQDevs.svg)](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
+ [![Build Status](https://travis-ci.org/BubuAnabelas/awesome-markdown.svg)](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
+ [![Build Status](https://travis-ci.org/serhii-londar/open-source-mac-os-apps.svg)](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
  [![Circle CI](https://img.shields.io/circleci/project/tmcw/awesome-geojson.svg)](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
- [![Build Status](https://travis-ci.org/IQDevs/Awesome-IQDevs.svg?branch=master)](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.17.2
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: 2017-11-03 00:00:00.000000000 Z
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