udup 0.1.1 → 0.1.2

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 +3 -1
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 20ee3984f04fb5fe081bee65ec87de8a3bd438f1c11a5ce3633b19be4d19c385
4
- data.tar.gz: 50cb8645139050e85171cc9299872729e7a04d8c1f9c8f62df05832b7b920e30
3
+ metadata.gz: bcfb036e5503e400a084d0be36c188563ab03aff902ff57772d24c69ee7a614e
4
+ data.tar.gz: b7129006a5108e82dd338ef02f32614c6e8789a13f9203145e9e3f1aa94e3d0d
5
5
  SHA512:
6
- metadata.gz: 3458241d00c36a56921b5446db20277a60e7cbd78a99089ddb54934b871bed1541c268b6c8aa76f24472c1a89c9bf2042037c81368ba5bc1bad4b4bbb19ca2dd
7
- data.tar.gz: a971306b5b88ab86022555b9a93229f7d7d1ccc5c004986a28aee64d699bd580cacb167b4277fdd6ea053e8d596a5ea1940cf7c41706f0e06ed4d7a659e13fc6
6
+ metadata.gz: e500c3fd7e72e910937a8268342d0ddcac1e30511dfd7ccdc9c8f29696ca8a2338fad4e5857c2aed9bd7d86591d93faad7b3354c17d1a6023aef6d3b41b14de6
7
+ data.tar.gz: 04e3ea7fdab96d27d622ead800756986672686fe6af31b8e882cc7ab3c365d9fb7edc58997bedc037faa9bc154654e3cdb63d86d9a4f99078eae8208217f3421
data/lib/udup/main.rb CHANGED
@@ -9,6 +9,7 @@ class Udup
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
11
  @content_to_skip = options[:content_to_skip] || %w[blog docs post support]
12
+ @bad_char_path = options[:bad_char_path] || %w[+ ' " ( ) \\ <]
12
13
  end
13
14
 
14
15
  def filter(urls)
@@ -23,6 +24,7 @@ class Udup
23
24
  next
24
25
  end
25
26
  next unless uri
27
+ next if @bad_char_path.any? { |char| uri.path.include?(char) }
26
28
 
27
29
  uri_ext = File.extname(uri.path)
28
30
  next if @skip_exts.include?(uri_ext) || human_content?(uri.path) || content_to_skip?(uri.path)
@@ -31,7 +33,7 @@ class Udup
31
33
  params = uri_params(uri.query)
32
34
 
33
35
  if @valid_urls.key?(base_url)
34
- @valid_urls[url] = { params: {} } if @valid_urls[base_url][:params].empty?
36
+ @valid_urls[uri.to_s] = { params: {} } if @valid_urls[base_url][:params].empty?
35
37
  @valid_urls[base_url][:params].merge!(params)
36
38
  else
37
39
  @valid_urls[base_url] = { params: params }
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.1
4
+ version: 0.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joshua MARTINELLE