From c0f8f6d054c428eaf63489d1047129477a9e73ab Mon Sep 17 00:00:00 2001 From: Guillaume DOTT Date: Fri, 4 Jan 2013 10:05:37 +0100 Subject: [PATCH] Rename project-honeypot to project_honeypot --- lib/project-honeypot.rb | 30 +------------------ lib/project_honeypot.rb | 29 ++++++++++++++++++ ...neypot.gemspec => project_honeypot.gemspec | 2 +- 3 files changed, 31 insertions(+), 30 deletions(-) create mode 100644 lib/project_honeypot.rb rename project-honeypot.gemspec => project_honeypot.gemspec (96%) diff --git a/lib/project-honeypot.rb b/lib/project-honeypot.rb index aa862a1..3db5d09 100644 --- a/lib/project-honeypot.rb +++ b/lib/project-honeypot.rb @@ -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" diff --git a/lib/project_honeypot.rb b/lib/project_honeypot.rb new file mode 100644 index 0000000..aa862a1 --- /dev/null +++ b/lib/project_honeypot.rb @@ -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 diff --git a/project-honeypot.gemspec b/project_honeypot.gemspec similarity index 96% rename from project-honeypot.gemspec rename to project_honeypot.gemspec index 9df0468..b5f6c07 100644 --- a/project-honeypot.gemspec +++ b/project_honeypot.gemspec @@ -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"]