urlscan 0.4.1 → 0.5.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
  SHA256:
3
- metadata.gz: c64c50eef43387533567d006b5a7cc5d91e9756c828d8c2abb0c71fb7cdfd8a0
4
- data.tar.gz: 9804b57e3aa1e639af02f6d251572fde399e244a4978fd215de652451c9301b9
3
+ metadata.gz: cd9f5241757fe9214cf9004eed924fbd98d1739358ed6aed85fdcfe63b0bed22
4
+ data.tar.gz: da1a329d39519094e6fa21e3ba53c52b5c7051cd24d34eeb1aa47fdcadf58b55
5
5
  SHA512:
6
- metadata.gz: f314f8dc01685bc52b4d4e0546cdf121ad26c82615c7021f2eb4341ed034dc4ee2ec6e00970e2749419baccf00991ae6aea92ead472b1ff335a25492d537ac3d
7
- data.tar.gz: 9466cdb9855100e645554851697128a7df854afc1bb1fd34b6561e4ea1eb0d137457b43f694a88dbdd7047cdbcf7b42431774a081357c27717f080ec382c2d7e
6
+ metadata.gz: a120a7c7e56bbc0c2585eab27284e78a31b995ad693497470cf3402a74a2027a878cb2036055c34e17a0cec42779306176594fbc1cbe3e81c7fe68a193924b7b
7
+ data.tar.gz: 85def877ac0d5dc4c6e99917ff9e820cc12414bea83b304a87090c29aa2f7be8f406fc137cf9825850fd134fb1b9fb3d8bbcc364905d67a66209680863548a96
@@ -2,8 +2,5 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 2.5
6
5
  - 2.6
7
- before_install:
8
- - gem update --system
9
- - gem install bundler
6
+ before_install: gem install bundler -v 2.1
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # urlscan
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/urlscan.svg)](https://badge.fury.io/rb/urlscan)
4
- [![Build Status](https://travis-ci.org/ninoseki/urlscan.svg?branch=master)](https://travis-ci.org/ninoseki/urlscan)
4
+ [![Build Status](https://travis-ci.com/ninoseki/urlscan.svg?branch=master)](https://travis-ci.com/ninoseki/urlscan)
5
5
  [![Maintainability](https://api.codeclimate.com/v1/badges/c6625486f2d57039adef/maintainability)](https://codeclimate.com/github/ninoseki/urlscan/maintainability)
6
6
  [![Coverage Status](https://coveralls.io/repos/github/ninoseki/urlscan/badge.svg?branch=master)](https://coveralls.io/github/ninoseki/urlscan?branch=master)
7
7
 
8
8
  ## Description
9
9
 
10
- Ruby API client for [urlscan.io](https://urlscan.io/).
10
+ [urlscan.io](https://urlscan.io/) API wrapper for Ruby.
11
11
 
12
12
  ## Installation
13
13
 
@@ -50,11 +50,12 @@ res = api.search("wikipedia.org")
50
50
 
51
51
  ### Pro
52
52
 
53
- | HTTP Method | URI | API method |
54
- |-------------|---------|-------------------------------------------------------------------|
55
- | GET | /search | `UrlScan::Clients::Pro#search(query: nil, filter: nil, size: 50)` |
56
- | GET | /brands | `UrlScan::Clients::Pro#brands` |
57
- | GET | /kits | `UrlScan::Clients::Pro#kits` |
53
+ | HTTP Method | URI | API method |
54
+ |-------------|------------|-------------------------------------------------------------------|
55
+ | GET | /search | `UrlScan::Clients::Pro#search(query: nil, filter: nil, size: 50)` |
56
+ | GET | /brands | `UrlScan::Clients::Pro#brands` |
57
+ | GET | /kits | `UrlScan::Clients::Pro#kits` |
58
+ | GET | /phishfeed | `UrlScan::Clients::Pro#phishfeed` |
58
59
 
59
60
  ## CLI usage
60
61
 
@@ -32,6 +32,15 @@ module UrlScan
32
32
  get("/kits") { |json| json }
33
33
  end
34
34
 
35
+ # @return [Hash]
36
+ def phishfeed(q: "result.task.time:>now-24h", format: "json")
37
+ raise ArgumentError, "API key is required for this method." if key.nil?
38
+
39
+ params = { q: q, format: format }
40
+ query = URI.encode_www_form(params)
41
+ get("/phishfeed?#{query}") { |json| json }
42
+ end
43
+
35
44
  private
36
45
 
37
46
  def build_filter(filter)
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module UrlScan
4
- VERSION = "0.4.1"
4
+ VERSION = "0.5.0"
5
5
  end
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
23
23
 
24
24
  spec.add_development_dependency "bundler", "~> 2.0"
25
25
  spec.add_development_dependency "coveralls", "~> 0.8"
26
- spec.add_development_dependency "rake", "~> 12.3"
27
- spec.add_development_dependency "rspec", "~> 3.8"
26
+ spec.add_development_dependency "rake", "~> 13.0"
27
+ spec.add_development_dependency "rspec", "~> 3.9"
28
28
  spec.add_development_dependency "vcr", "~> 5.0"
29
29
  spec.add_development_dependency "webmock", "~> 3.7"
30
30
 
31
- spec.add_runtime_dependency "thor", "~> 0.20"
31
+ spec.add_runtime_dependency "thor", "~> 1.0"
32
32
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: urlscan
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.1
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Manabu Niseki
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-09-19 00:00:00.000000000 Z
11
+ date: 2019-12-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -44,28 +44,28 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '12.3'
47
+ version: '13.0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '12.3'
54
+ version: '13.0'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: rspec
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - "~>"
60
60
  - !ruby/object:Gem::Version
61
- version: '3.8'
61
+ version: '3.9'
62
62
  type: :development
63
63
  prerelease: false
64
64
  version_requirements: !ruby/object:Gem::Requirement
65
65
  requirements:
66
66
  - - "~>"
67
67
  - !ruby/object:Gem::Version
68
- version: '3.8'
68
+ version: '3.9'
69
69
  - !ruby/object:Gem::Dependency
70
70
  name: vcr
71
71
  requirement: !ruby/object:Gem::Requirement
@@ -100,14 +100,14 @@ dependencies:
100
100
  requirements:
101
101
  - - "~>"
102
102
  - !ruby/object:Gem::Version
103
- version: '0.20'
103
+ version: '1.0'
104
104
  type: :runtime
105
105
  prerelease: false
106
106
  version_requirements: !ruby/object:Gem::Requirement
107
107
  requirements:
108
108
  - - "~>"
109
109
  - !ruby/object:Gem::Version
110
- version: '0.20'
110
+ version: '1.0'
111
111
  description:
112
112
  email:
113
113
  - manabu.niseki@gmail.com
@@ -157,7 +157,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
157
157
  - !ruby/object:Gem::Version
158
158
  version: '0'
159
159
  requirements: []
160
- rubygems_version: 3.0.4
160
+ rubygems_version: 3.0.3
161
161
  signing_key:
162
162
  specification_version: 4
163
163
  summary: Ruby API client for urlscan.io