miteru 0.14.0 → 0.14.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/miteru/feeds.rb +12 -1
- data/lib/miteru/version.rb +1 -1
- data/miteru.gemspec +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: cbb47828d938e86289f845435bd9d342e18d7c50090e486b5681bf212dfcd84b
|
4
|
+
data.tar.gz: c416439bc1c80cfd4cf2de8bc9a7a6abb6ff46bb1af5d0a58ec0e71954584a4c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f15f1770d870404e7b50cddb2e20d7e5d90adfab04283d5cb4364a2480f210b9c4869717d647bdc0174b5d0f0a9323903aac101f77d140ebad0c9523688b43d0
|
7
|
+
data.tar.gz: cb4a8e2c561aa53265362beec7e45445f6a6825bf991c7c4c559d40279dc84e138f54e300ab163f9db19dc891f2fe0a30c874d620d0464c9451c1e6c0e6e729e
|
data/lib/miteru/feeds.rb
CHANGED
@@ -10,6 +10,7 @@ require_relative "./feeds/urlscan_pro"
|
|
10
10
|
module Miteru
|
11
11
|
class Feeds
|
12
12
|
IGNORE_EXTENSIONS = %w(.htm .html .php .asp .aspx .exe .txt).freeze
|
13
|
+
VALID_EXTENSIONS = [".zip", ".rar", ".7z", ".tar", ".gz"].freeze
|
13
14
|
|
14
15
|
def initialize
|
15
16
|
@feeds = [
|
@@ -48,7 +49,17 @@ module Miteru
|
|
48
49
|
segments = uri.path.split("/")
|
49
50
|
return [base] if segments.length.zero?
|
50
51
|
|
51
|
-
urls = (0...segments.length).map
|
52
|
+
urls = (0...segments.length).map do |idx|
|
53
|
+
breakdowned_url = "#{base}#{segments[0..idx].join('/')}"
|
54
|
+
breakdown = [breakdowned_url]
|
55
|
+
if idx > 0 && idx < segments.length - 1
|
56
|
+
VALID_EXTENSIONS.each do |ext|
|
57
|
+
breakdown << "#{base}#{segments[0..idx - 1].join('/')}/#{segments[idx]}#{ext}"
|
58
|
+
end
|
59
|
+
end
|
60
|
+
breakdown
|
61
|
+
end.flatten
|
62
|
+
|
52
63
|
urls.reject do |breakdowned_url|
|
53
64
|
# Reject a url which ends with specific extension names
|
54
65
|
invalid_extension? breakdowned_url
|
data/lib/miteru/version.rb
CHANGED
data/miteru.gemspec
CHANGED
@@ -29,7 +29,7 @@ Gem::Specification.new do |spec|
|
|
29
29
|
spec.add_development_dependency "glint", "~> 0.1"
|
30
30
|
spec.add_development_dependency "rake", "~> 13.0"
|
31
31
|
spec.add_development_dependency "rspec", "~> 3.9"
|
32
|
-
spec.add_development_dependency "vcr", "~>
|
32
|
+
spec.add_development_dependency "vcr", "~> 6.0"
|
33
33
|
spec.add_development_dependency "webmock", "~> 3.8"
|
34
34
|
|
35
35
|
spec.add_dependency "colorize", "~> 0.8"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: miteru
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.14.
|
4
|
+
version: 0.14.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manabu Niseki
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2020-
|
11
|
+
date: 2020-06-23 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -86,14 +86,14 @@ dependencies:
|
|
86
86
|
requirements:
|
87
87
|
- - "~>"
|
88
88
|
- !ruby/object:Gem::Version
|
89
|
-
version: '
|
89
|
+
version: '6.0'
|
90
90
|
type: :development
|
91
91
|
prerelease: false
|
92
92
|
version_requirements: !ruby/object:Gem::Requirement
|
93
93
|
requirements:
|
94
94
|
- - "~>"
|
95
95
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
96
|
+
version: '6.0'
|
97
97
|
- !ruby/object:Gem::Dependency
|
98
98
|
name: webmock
|
99
99
|
requirement: !ruby/object:Gem::Requirement
|