moocher 0.1.1pre → 0.1.1.1pre

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
  SHA1:
3
- metadata.gz: ae4e0a950365647d972bdc89eeb4b256a29c02a1
4
- data.tar.gz: c9b702dd83a13c930dba2402acfde8c42f89da3a
3
+ metadata.gz: fc1b08d746f13e868f4ecca9807c8af8c42ea8ac
4
+ data.tar.gz: 906f86bf9e1e9e9e3ca498154b0d453d655d6528
5
5
  SHA512:
6
- metadata.gz: 70d2e3573752edec7cd38675550137849e039135c3560e83da23d9266c2d7d5291e7bdcc129e6f320003a6bdacc62f96a7b3a8a8ebab301bf0a705790ce99b0f
7
- data.tar.gz: f140db67500334ae9bd2c708ea43d09c4ce66c68880f7285185b7b030a60d0e16a45b71d61de2ded2542657a654a6674e752ae613b85f58f2f6ec9a1adc29ff0
6
+ metadata.gz: 2c78c5bd5f6829e693f2cc2fd43a052ebc040b3568465ddeb779556c41b86b1b177844755eede268b1e38d9a73947c1e28e74b704acb73f445cf513c615e1275
7
+ data.tar.gz: 4388c4c5297c236777ed6c55353a22328fbc58936d35b27bc1fb25e9458208afb8c074cc0ab3425ede17ea74cad229284e3db78378bb6abab3ca18b2a3d3aea5
data/README.md CHANGED
@@ -1 +1,17 @@
1
- Coming soon
1
+ ## Moocher - Keep Moochers Out
2
+
3
+ This is Ruby interface for Moocher api, A Reputation API and Anti-Abuse Service. Still in developmental phase.
4
+ Currently functioning features are listed below.
5
+
6
+
7
+ ## Check Blacklisted IP
8
+
9
+ ```ruby
10
+ require 'moocher'
11
+
12
+ ip_blacklisted? "8.8.8.8"
13
+
14
+ #=> false
15
+
16
+ # If IP is found in blacklisted database it will return true.
17
+ ```
data/lib/moocher/as.rb ADDED
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
data/lib/moocher/ip.rb ADDED
@@ -0,0 +1,17 @@
1
+ require 'httparty'
2
+ require 'ipaddress'
3
+
4
+
5
+ module Moocher
6
+ module Ip
7
+ def ip_blacklisted?(ipaddress)
8
+ base_url = 'https://api.moocher.io/badip/IPV4/'
9
+ if IPAddress.valid? ipaddress
10
+ response = HTTParty.get(base_url + ipaddress)
11
+ response.success?
12
+ else
13
+ "IP Address doesn't seem to be valid."
14
+ end
15
+ end
16
+ end
17
+ end
@@ -0,0 +1,2 @@
1
+ module Moocher
2
+ end
@@ -1,3 +1,3 @@
1
1
  module Moocher
2
- VERSION = "0.1.1pre"
2
+ VERSION = "0.1.1.1pre"
3
3
  end
data/lib/moocher.rb CHANGED
@@ -1,5 +1,10 @@
1
1
  require "moocher/version"
2
+ require "moocher/as"
3
+ require "moocher/creditcards"
4
+ require "moocher/domains"
5
+ require "moocher/emails"
6
+ require "moocher/geo_ip"
7
+ require "moocher/ip"
8
+ require "moocher/passwords"
2
9
 
3
- module Moocher
4
- # Your code goes here...
5
- end
10
+ include Moocher::Ip
data/moocher.gemspec CHANGED
@@ -32,4 +32,6 @@ Gem::Specification.new do |spec|
32
32
 
33
33
  spec.add_development_dependency "bundler", "~> 1.13"
34
34
  spec.add_development_dependency "rake", "~> 10.0"
35
+ spec.add_dependency 'httparty', '~> 0.14.0'
36
+ spec.add_dependency 'ipaddress', '~> 0.8.3'
35
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: moocher
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1pre
4
+ version: 0.1.1.1pre
5
5
  platform: ruby
6
6
  authors:
7
7
  - Suyesh Bhandari
@@ -38,6 +38,34 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: httparty
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: 0.14.0
48
+ type: :runtime
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: 0.14.0
55
+ - !ruby/object:Gem::Dependency
56
+ name: ipaddress
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: 0.8.3
62
+ type: :runtime
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: 0.8.3
41
69
  description: 'PLACEHOLDER ONLY: doesn''t work.'
42
70
  email:
43
71
  - suyeshb@gmail.com
@@ -54,6 +82,13 @@ files:
54
82
  - bin/console
55
83
  - bin/setup
56
84
  - lib/moocher.rb
85
+ - lib/moocher/as.rb
86
+ - lib/moocher/creditcards.rb
87
+ - lib/moocher/domains.rb
88
+ - lib/moocher/emails.rb
89
+ - lib/moocher/geo_ip.rb
90
+ - lib/moocher/ip.rb
91
+ - lib/moocher/passwords.rb
57
92
  - lib/moocher/version.rb
58
93
  - moocher.gemspec
59
94
  homepage: https://github.com/suyesh/moocher