lib/freemail.rb in freemail-0.1.0 vs lib/freemail.rb in freemail-0.1.1

- old
+ new

@@ -1,9 +1,10 @@ require 'freemail/version' module Freemail - DISPOSABLE = Hash[File.readlines('data/disposable.txt').map { |d| [d.strip.downcase] }] - FREE = Hash[File.readlines('data/free.txt').map { |d| [d.strip.downcase] }] + ROOT = File.join(File.dirname(File.expand_path(__FILE__)), '../') + DISPOSABLE = Hash[File.readlines("#{ROOT}/data/disposable.txt").map { |d| [d.strip.downcase] }] + FREE = Hash[File.readlines("#{ROOT}/data/free.txt").map { |d| [d.strip.downcase] }] def self.free?(email) FREE.key?(get_domain(email)) end