udup 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/udup/main.rb +2 -4
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e296841fa56c01bcb5f7058d1f4b00044428d7fbccb6f3d8cc9985d458c3ae44
4
- data.tar.gz: 02a5465ef4ea9d977df642260f785f2b66a8031a2cb05909fceee7a8518d6767
3
+ metadata.gz: e0547bade9bfbb824417c7e7cd2ef94a24765ab1e6bd5e187969f67d4c5fec6b
4
+ data.tar.gz: 621b668409f97f40156941bcaa9b8eff799ffb36c1dba316bb236da1dd31eb83
5
5
  SHA512:
6
- metadata.gz: d97d34c0c3acb7adefed17e3fea1ed7f191958cbe7369054825e543d06687073a57a5dd1c5b3a0f8237407bb0cde063dc011145fca69e3dc7ac5f6b010898ab3
7
- data.tar.gz: 030daa8e0c638265758637f086efbfc276b928c030977b8f1aea6498f8f6a91c8727c5d048b2181be7c36cf017e1976578bbdccddea96e24c78e8cc77ec57bde
6
+ metadata.gz: d31c66dd8053ab084a8033320435206cb1fc61b0812ffe090eefce4454fcad140f839d9f000504d0901c42d2b8c8619ecc48caa9ae99a49ad8f6e873ece1c473
7
+ data.tar.gz: 2c807c6005dbea210f9454c5bf0f8b3adc843835d17c3968aea059bbdca3f74cf766d1eee059cbc79bd2c0e1d6838c1a996faeb482be4242408be45aa1db8f65
data/lib/udup/main.rb CHANGED
@@ -8,12 +8,10 @@ class Udup
8
8
  @valid_urls = {}
9
9
  @skip_exts = options[:skip_exts] || %w[.css .png .jpg .jpeg .svg .ico .webp .ttf .otf .woff .woff2 .gif .pdf .bmp
10
10
  .eot .mp3 .mp4 .avi]
11
- @content_to_skip = options[:content_to_skip] || %w[blog docs post support]
11
+ @content_to_skip = %r{blog|docs|post|support|pages?/\d+|articles?/\d+|\d{2,}}i
12
12
  @bad_char_path = options[:bad_char_path] || %w[+ ' " ( ) \\ <]
13
13
  end
14
14
 
15
- # filter : Filter URLS <img src=x onerror=alert(1)>
16
- # @param [Array
17
15
  def filter(urls)
18
16
  final_urls = Set[]
19
17
 
@@ -75,6 +73,6 @@ class Udup
75
73
  end
76
74
 
77
75
  def content_to_skip?(path)
78
- @content_to_skip.any? { |content| path.include?(content) }
76
+ path.match?(@content_to_skip)
79
77
  end
80
78
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: udup
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE