UrlCategorise 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +56 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +6 -0
- data/Gemfile.lock +112 -0
- data/LICENSE +21 -0
- data/README.md +50 -0
- data/Rakefile +10 -0
- data/bin/console +11 -0
- data/bin/setup +8 -0
- data/lib/url_categorise/client.rb +69 -0
- data/lib/url_categorise/constants.rb +36 -0
- data/lib/url_categorise/version.rb +3 -0
- data/lib/url_categorise.rb +13 -0
- data/url_categorise.gemspec +36 -0
- metadata +184 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 9ed8fbd044a6405977b3e720454c6eb3bfebdc6ee38e6b00f860ac2e3d49d3da
|
4
|
+
data.tar.gz: c795f83ee5ce691af751f19681eaec865c2a01aadc27ef120c87ed7bf9ce339f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: e4aa69b7edecd520db0a2df0ea48498f730f6ddd49d6f0d3d116954aaa7b486ae87c395b655aa81523e43a4189536f7b3d5033443e5f5ecae649c445ff2b178f
|
7
|
+
data.tar.gz: c00b7d76d298538dcb55314cbda83dde5daa5bc78c2661bf44d818a62d663050957a6ff2d9063ec46c4cece3b92a18c14a471fdf67534b073f8a20fa560ad01d
|
data/.gitignore
ADDED
@@ -0,0 +1,56 @@
|
|
1
|
+
*.gem
|
2
|
+
*.rbc
|
3
|
+
/.config
|
4
|
+
/coverage/
|
5
|
+
/InstalledFiles
|
6
|
+
/pkg/
|
7
|
+
/spec/reports/
|
8
|
+
/spec/examples.txt
|
9
|
+
/test/tmp/
|
10
|
+
/test/version_tmp/
|
11
|
+
/tmp/
|
12
|
+
|
13
|
+
# Used by dotenv library to load environment variables.
|
14
|
+
# .env
|
15
|
+
|
16
|
+
# Ignore Byebug command history file.
|
17
|
+
.byebug_history
|
18
|
+
|
19
|
+
## Specific to RubyMotion:
|
20
|
+
.dat*
|
21
|
+
.repl_history
|
22
|
+
build/
|
23
|
+
*.bridgesupport
|
24
|
+
build-iPhoneOS/
|
25
|
+
build-iPhoneSimulator/
|
26
|
+
|
27
|
+
## Specific to RubyMotion (use of CocoaPods):
|
28
|
+
#
|
29
|
+
# We recommend against adding the Pods directory to your .gitignore. However
|
30
|
+
# you should judge for yourself, the pros and cons are mentioned at:
|
31
|
+
# https://guides.cocoapods.org/using/using-cocoapods.html#should-i-check-the-pods-directory-into-source-control
|
32
|
+
#
|
33
|
+
# vendor/Pods/
|
34
|
+
|
35
|
+
## Documentation cache and generated files:
|
36
|
+
/.yardoc/
|
37
|
+
/_yardoc/
|
38
|
+
/doc/
|
39
|
+
/rdoc/
|
40
|
+
|
41
|
+
## Environment normalization:
|
42
|
+
/.bundle/
|
43
|
+
/vendor/bundle
|
44
|
+
/lib/bundler/man/
|
45
|
+
|
46
|
+
# for a library or gem, you might want to ignore these files since the code is
|
47
|
+
# intended to run in multiple environments; otherwise, check them in:
|
48
|
+
# Gemfile.lock
|
49
|
+
# .ruby-version
|
50
|
+
# .ruby-gemset
|
51
|
+
|
52
|
+
# unless supporting rvm < 1.11.0 or doing something fancy, ignore this:
|
53
|
+
.rvmrc
|
54
|
+
|
55
|
+
# Used by RuboCop. Remote config files pulled in from inherit_from directive.
|
56
|
+
# .rubocop-https?--*
|
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at contact@jasonchalom.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,112 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
UrlCategorise (0.0.1)
|
5
|
+
api_pattern (~> 0.0.4)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: https://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (7.0.4.3)
|
11
|
+
actionview (= 7.0.4.3)
|
12
|
+
activesupport (= 7.0.4.3)
|
13
|
+
rack (~> 2.0, >= 2.2.0)
|
14
|
+
rack-test (>= 0.6.3)
|
15
|
+
rails-dom-testing (~> 2.0)
|
16
|
+
rails-html-sanitizer (~> 1.0, >= 1.2.0)
|
17
|
+
actionview (7.0.4.3)
|
18
|
+
activesupport (= 7.0.4.3)
|
19
|
+
builder (~> 3.1)
|
20
|
+
erubi (~> 1.4)
|
21
|
+
rails-dom-testing (~> 2.0)
|
22
|
+
rails-html-sanitizer (~> 1.1, >= 1.2.0)
|
23
|
+
active_attr (0.15.4)
|
24
|
+
actionpack (>= 3.0.2, < 7.1)
|
25
|
+
activemodel (>= 3.0.2, < 7.1)
|
26
|
+
activesupport (>= 3.0.2, < 7.1)
|
27
|
+
activemodel (7.0.4.3)
|
28
|
+
activesupport (= 7.0.4.3)
|
29
|
+
activesupport (7.0.4.3)
|
30
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
31
|
+
i18n (>= 1.6, < 2)
|
32
|
+
minitest (>= 5.1)
|
33
|
+
tzinfo (~> 2.0)
|
34
|
+
addressable (2.8.4)
|
35
|
+
public_suffix (>= 2.0.2, < 6.0)
|
36
|
+
ansi (1.5.0)
|
37
|
+
api_pattern (0.0.4)
|
38
|
+
active_attr (~> 0.15.4)
|
39
|
+
httparty (~> 0.21.0)
|
40
|
+
nokogiri (~> 1.14.3)
|
41
|
+
builder (3.2.4)
|
42
|
+
coderay (1.1.3)
|
43
|
+
concurrent-ruby (1.2.2)
|
44
|
+
crack (0.4.5)
|
45
|
+
rexml
|
46
|
+
crass (1.0.6)
|
47
|
+
erubi (1.12.0)
|
48
|
+
hashdiff (1.0.1)
|
49
|
+
httparty (0.21.0)
|
50
|
+
mini_mime (>= 1.0.0)
|
51
|
+
multi_xml (>= 0.5.2)
|
52
|
+
i18n (1.13.0)
|
53
|
+
concurrent-ruby (~> 1.0)
|
54
|
+
loofah (2.21.3)
|
55
|
+
crass (~> 1.0.2)
|
56
|
+
nokogiri (>= 1.12.0)
|
57
|
+
method_source (1.0.0)
|
58
|
+
mini_mime (1.1.2)
|
59
|
+
minitest (5.18.0)
|
60
|
+
minitest-focus (1.3.1)
|
61
|
+
minitest (>= 4, < 6)
|
62
|
+
minitest-reporters (1.6.0)
|
63
|
+
ansi
|
64
|
+
builder
|
65
|
+
minitest (>= 5.0)
|
66
|
+
ruby-progressbar
|
67
|
+
mocha (2.0.2)
|
68
|
+
ruby2_keywords (>= 0.0.5)
|
69
|
+
multi_xml (0.6.0)
|
70
|
+
nokogiri (1.14.4-arm64-darwin)
|
71
|
+
racc (~> 1.4)
|
72
|
+
pry (0.14.2)
|
73
|
+
coderay (~> 1.1)
|
74
|
+
method_source (~> 1.0)
|
75
|
+
public_suffix (5.0.1)
|
76
|
+
racc (1.6.2)
|
77
|
+
rack (2.2.7)
|
78
|
+
rack-test (2.1.0)
|
79
|
+
rack (>= 1.3)
|
80
|
+
rails-dom-testing (2.0.3)
|
81
|
+
activesupport (>= 4.2.0)
|
82
|
+
nokogiri (>= 1.6)
|
83
|
+
rails-html-sanitizer (1.5.0)
|
84
|
+
loofah (~> 2.19, >= 2.19.1)
|
85
|
+
rake (13.0.6)
|
86
|
+
rexml (3.2.5)
|
87
|
+
ruby-progressbar (1.13.0)
|
88
|
+
ruby2_keywords (0.0.5)
|
89
|
+
timecop (0.9.6)
|
90
|
+
tzinfo (2.0.6)
|
91
|
+
concurrent-ruby (~> 1.0)
|
92
|
+
webmock (3.18.1)
|
93
|
+
addressable (>= 2.8.0)
|
94
|
+
crack (>= 0.3.2)
|
95
|
+
hashdiff (>= 0.4.0, < 2.0.0)
|
96
|
+
|
97
|
+
PLATFORMS
|
98
|
+
arm64-darwin-20
|
99
|
+
|
100
|
+
DEPENDENCIES
|
101
|
+
UrlCategorise!
|
102
|
+
minitest (~> 5.18.0)
|
103
|
+
minitest-focus (~> 1.3.1)
|
104
|
+
minitest-reporters (~> 1.6.0)
|
105
|
+
mocha (~> 2.0.2)
|
106
|
+
pry (~> 0.14.2)
|
107
|
+
rake (~> 13.0.6)
|
108
|
+
timecop (~> 0.9.6)
|
109
|
+
webmock (~> 3.18.1)
|
110
|
+
|
111
|
+
BUNDLED WITH
|
112
|
+
2.3.16
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2023 Jason Chalom
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
13
|
+
copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
21
|
+
SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,50 @@
|
|
1
|
+
# URL Categorise
|
2
|
+
A tool which makes use of a set of domain host lists, and is then able to classify a given URL.
|
3
|
+
|
4
|
+
## Installation
|
5
|
+
|
6
|
+
Add this line to your application's Gemfile:
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'url_categorise'
|
10
|
+
```
|
11
|
+
|
12
|
+
And then execute:
|
13
|
+
|
14
|
+
$ bundle
|
15
|
+
|
16
|
+
Or install it yourself as:
|
17
|
+
|
18
|
+
$ gem install url_categorise
|
19
|
+
|
20
|
+
## Usage
|
21
|
+
|
22
|
+
```ruby
|
23
|
+
require 'url_categorise'
|
24
|
+
client = UrlCategorise::Client.new
|
25
|
+
|
26
|
+
|
27
|
+
```
|
28
|
+
|
29
|
+
## Development
|
30
|
+
|
31
|
+
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake test` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
32
|
+
|
33
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
34
|
+
|
35
|
+
### Tests
|
36
|
+
To run tests execute:
|
37
|
+
|
38
|
+
$ rake test
|
39
|
+
|
40
|
+
## Contributing
|
41
|
+
|
42
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/trex22/url_categorise. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
43
|
+
|
44
|
+
## License
|
45
|
+
|
46
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
47
|
+
|
48
|
+
## Code of Conduct
|
49
|
+
|
50
|
+
Everyone interacting in the UrlCategorise: project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/trex22/url_categorise/blob/master/CODE_OF_CONDUCT.md).
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "url_categorise"
|
5
|
+
|
6
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
+
# with your gem easier. You can also use a different console, if you like.
|
8
|
+
|
9
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
+
require "pry"
|
11
|
+
Pry.start
|
data/bin/setup
ADDED
@@ -0,0 +1,69 @@
|
|
1
|
+
module UrlCategorise
|
2
|
+
class Client < ApiPattern::Client
|
3
|
+
include ::UrlCategorise::Constants
|
4
|
+
|
5
|
+
attr_reader :host_urls, :hosts
|
6
|
+
|
7
|
+
# TODO: Sanctioned IPs
|
8
|
+
# TODO: More default lists
|
9
|
+
# TODO: ActiveRecord support
|
10
|
+
# TODO: List of abuse IPs
|
11
|
+
# TODO: https://github.com/blocklistproject/Lists
|
12
|
+
# TODO: https://github.com/nickoppen/pihole-blocklists
|
13
|
+
def initialize(host_urls: DEFAULT_HOST_URLS)
|
14
|
+
@host_urls = host_urls
|
15
|
+
# @hosts = fetch_and_build_host_lists
|
16
|
+
end
|
17
|
+
|
18
|
+
def self.compatible_api_version
|
19
|
+
'v1'
|
20
|
+
end
|
21
|
+
|
22
|
+
def self.api_version
|
23
|
+
'v2 2023-05-19'
|
24
|
+
end
|
25
|
+
|
26
|
+
def categorise(url)
|
27
|
+
host = (URI.parse(url).host || url).downcase
|
28
|
+
|
29
|
+
@hosts.keys.select do |category|
|
30
|
+
@hosts[category].include?(host)
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def count_of_hosts
|
35
|
+
@hosts.keys.map do |category|
|
36
|
+
@hosts[category].size
|
37
|
+
end.sum
|
38
|
+
end
|
39
|
+
|
40
|
+
def count_of_categories
|
41
|
+
@hosts.keys.size
|
42
|
+
end
|
43
|
+
|
44
|
+
def size_of_data
|
45
|
+
|
46
|
+
end
|
47
|
+
|
48
|
+
def fetch_and_build_host_lists
|
49
|
+
@hosts = {}
|
50
|
+
|
51
|
+
host_urls.keys.each do |category|
|
52
|
+
@hosts[category] = build_host_data(host_urls[category])
|
53
|
+
end
|
54
|
+
|
55
|
+
@hosts
|
56
|
+
end
|
57
|
+
|
58
|
+
def build_host_data(urls)
|
59
|
+
urls.map do |url|
|
60
|
+
raw_data = HTTParty.get(url)
|
61
|
+
raw_data.split("\n").reject do |line|
|
62
|
+
line.include?("#")
|
63
|
+
end.map do |line|
|
64
|
+
line.gsub("0.0.0.0 ", "")
|
65
|
+
end
|
66
|
+
end.flatten.compact.sort
|
67
|
+
end
|
68
|
+
end
|
69
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
module UrlCategorise
|
2
|
+
module Constants
|
3
|
+
# Resources used:
|
4
|
+
# https://blocklist.site/#
|
5
|
+
# https://github.com/lightswitch05/hosts
|
6
|
+
#
|
7
|
+
DEFAULT_HOST_URLS = {
|
8
|
+
advertising: ["https://blocklistproject.github.io/Lists/ads.txt"],
|
9
|
+
amp_hosts: ["https://www.github.developerdan.com/hosts/lists/amp-hosts-extended.txt"],
|
10
|
+
dating_services: ["https://www.github.developerdan.com/hosts/lists/dating-services-extended.txt"],
|
11
|
+
facebook: ["https://github.com/blocklistproject/Lists/raw/master/facebook.txt", "https://www.github.developerdan.com/hosts/lists/facebook-extended.txt", "https://raw.githubusercontent.com/blocklistproject/Lists/master/facebook.txt"],
|
12
|
+
fraud: ["https://blocklistproject.github.io/Lists/fraud.txt"],
|
13
|
+
gambling: ["https://blocklistproject.github.io/Lists/gambling.txt"],
|
14
|
+
hate: [],
|
15
|
+
junk: [],
|
16
|
+
malware: ["https://blocklistproject.github.io/Lists/malware.txt"],
|
17
|
+
phishing: ["https://blocklistproject.github.io/Lists/phishing.txt"],
|
18
|
+
pornography: ["https://blocklistproject.github.io/Lists/porn.txt"],
|
19
|
+
scam: ["https://blocklistproject.github.io/Lists/scam.txt"],
|
20
|
+
tiktok: ["https://blocklistproject.github.io/Lists/tiktok.txt"],
|
21
|
+
tracking: ["https://blocklistproject.github.io/Lists/tracking.txt"],
|
22
|
+
twitter: ["https://github.com/blocklistproject/Lists/raw/master/twitter.txt"],
|
23
|
+
vaping: ["https://github.com/blocklistproject/Lists/raw/master/vaping.txt"],
|
24
|
+
whatsapp: ["https://github.com/blocklistproject/Lists/raw/master/whatsapp.txt"],
|
25
|
+
youtube: ["https://github.com/blocklistproject/Lists/raw/master/youtube.txt"],
|
26
|
+
torrent: ["https://github.com/blocklistproject/Lists/raw/master/torrent.txt"],
|
27
|
+
smart_tv: ["https://github.com/blocklistproject/Lists/raw/master/smart-tv.txt"],
|
28
|
+
redirect: ["https://github.com/blocklistproject/Lists/raw/master/redirect.txt"],
|
29
|
+
piracy: ["https://github.com/blocklistproject/Lists/raw/master/piracy.txt"],
|
30
|
+
drugs: ["https://github.com/blocklistproject/Lists/raw/master/drugs.txt"],
|
31
|
+
crypto: ["https://github.com/blocklistproject/Lists/raw/master/crypto.txt"],
|
32
|
+
adobe: ["https://github.com/blocklistproject/Lists/raw/master/adobe.txt"],
|
33
|
+
abuse: ["https://github.com/blocklistproject/Lists/raw/master/abuse.txt"],
|
34
|
+
}
|
35
|
+
end
|
36
|
+
end
|
@@ -0,0 +1,36 @@
|
|
1
|
+
lib = File.expand_path("../lib", __FILE__)
|
2
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
+
require "url_categorise/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "UrlCategorise"
|
7
|
+
spec.version = UrlCategorise::VERSION
|
8
|
+
spec.authors = ["trex22"]
|
9
|
+
spec.email = ["contact@jasonchalom.com"]
|
10
|
+
|
11
|
+
spec.summary = "A client for using the UrlCategorise API in Ruby."
|
12
|
+
spec.description = "A client for using the UrlCategorise API in Ruby. Built from their api documentation. This is an unofficial project."
|
13
|
+
spec.homepage = "https://github.com/TRex22/UrlCategorise"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
# Specify which files should be added to the gem when it is released.
|
17
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
18
|
+
spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
|
19
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
|
20
|
+
end
|
21
|
+
spec.bindir = "exe"
|
22
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
23
|
+
spec.require_paths = ["lib"]
|
24
|
+
|
25
|
+
spec.add_dependency "api_pattern", "~> 0.0.4"
|
26
|
+
|
27
|
+
# Development dependancies
|
28
|
+
spec.add_development_dependency "rake", "~> 13.0.6"
|
29
|
+
spec.add_development_dependency "minitest", "~> 5.18.0"
|
30
|
+
spec.add_development_dependency "minitest-focus", "~> 1.3.1"
|
31
|
+
spec.add_development_dependency "minitest-reporters", "~> 1.6.0"
|
32
|
+
spec.add_development_dependency "timecop", "~> 0.9.6"
|
33
|
+
spec.add_development_dependency "mocha", "~> 2.0.2"
|
34
|
+
spec.add_development_dependency "pry", "~> 0.14.2"
|
35
|
+
spec.add_development_dependency "webmock", "~> 3.18.1"
|
36
|
+
end
|
metadata
ADDED
@@ -0,0 +1,184 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: UrlCategorise
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- trex22
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2023-05-19 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: api_pattern
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.0.4
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.0.4
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rake
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 13.0.6
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 13.0.6
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: minitest
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 5.18.0
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 5.18.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest-focus
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - "~>"
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: 1.3.1
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - "~>"
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: 1.3.1
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-reporters
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 1.6.0
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - "~>"
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: 1.6.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: timecop
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - "~>"
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: 0.9.6
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - "~>"
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: 0.9.6
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: mocha
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - "~>"
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: 2.0.2
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - "~>"
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: 2.0.2
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: pry
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - "~>"
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: 0.14.2
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - "~>"
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: 0.14.2
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: webmock
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - "~>"
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: 3.18.1
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - "~>"
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: 3.18.1
|
139
|
+
description: A client for using the UrlCategorise API in Ruby. Built from their api
|
140
|
+
documentation. This is an unofficial project.
|
141
|
+
email:
|
142
|
+
- contact@jasonchalom.com
|
143
|
+
executables: []
|
144
|
+
extensions: []
|
145
|
+
extra_rdoc_files: []
|
146
|
+
files:
|
147
|
+
- ".gitignore"
|
148
|
+
- CODE_OF_CONDUCT.md
|
149
|
+
- Gemfile
|
150
|
+
- Gemfile.lock
|
151
|
+
- LICENSE
|
152
|
+
- README.md
|
153
|
+
- Rakefile
|
154
|
+
- bin/console
|
155
|
+
- bin/setup
|
156
|
+
- lib/url_categorise.rb
|
157
|
+
- lib/url_categorise/client.rb
|
158
|
+
- lib/url_categorise/constants.rb
|
159
|
+
- lib/url_categorise/version.rb
|
160
|
+
- url_categorise.gemspec
|
161
|
+
homepage: https://github.com/TRex22/UrlCategorise
|
162
|
+
licenses:
|
163
|
+
- MIT
|
164
|
+
metadata: {}
|
165
|
+
post_install_message:
|
166
|
+
rdoc_options: []
|
167
|
+
require_paths:
|
168
|
+
- lib
|
169
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
175
|
+
requirements:
|
176
|
+
- - ">="
|
177
|
+
- !ruby/object:Gem::Version
|
178
|
+
version: '0'
|
179
|
+
requirements: []
|
180
|
+
rubygems_version: 3.3.4
|
181
|
+
signing_key:
|
182
|
+
specification_version: 4
|
183
|
+
summary: A client for using the UrlCategorise API in Ruby.
|
184
|
+
test_files: []
|