Rename project-honeypot to project_honeypot

master
Guillaume DOTT 2013-01-04 10:05:37 +01:00
parent 6571e9bef5
commit c0f8f6d054
3 changed files with 31 additions and 30 deletions

View File

@ -1,29 +1 @@
require 'net/dns'
require "project_honeypot/url"
require "project_honeypot/base"
require "project_honeypot/rack/header"
require "project_honeypot/rack/forbidden"
module ProjectHoneypot
class << self
attr_accessor :api_key, :score, :last_activity
def api_key
raise "ProjectHoneypot really needs its api_key set to work" unless @api_key
@api_key
end
def configure(&block)
class_eval(&block)
end
end
def self.lookup(api_key_or_url, url=nil)
if url.nil?
url = api_key_or_url
api_key_or_url = ProjectHoneypot.api_key
end
searcher = Base.new(api_key_or_url)
searcher.lookup(url)
end
end
require "project_honeypot"

View File

@ -0,0 +1,29 @@
require 'net/dns'
require "project_honeypot/url"
require "project_honeypot/base"
require "project_honeypot/rack/header"
require "project_honeypot/rack/forbidden"
module ProjectHoneypot
class << self
attr_accessor :api_key, :score, :last_activity
def api_key
raise "ProjectHoneypot really needs its api_key set to work" unless @api_key
@api_key
end
def configure(&block)
class_eval(&block)
end
end
def self.lookup(api_key_or_url, url=nil)
if url.nil?
url = api_key_or_url
api_key_or_url = ProjectHoneypot.api_key
end
searcher = Base.new(api_key_or_url)
searcher.lookup(url)
end
end

View File

@ -4,7 +4,7 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
require 'project_honeypot/version'
Gem::Specification.new do |s|
s.name = %q{project-honeypot}
s.name = %q{project_honeypot}
s.version = ProjectHoneypot::VERSION
s.authors = ["Charles Max Wood", "Guillaume DOTT"]
s.email = ["chuck@teachmetocode.com", "guillaume+github@dott.fr"]