Skip to content

Commit

Permalink
fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
tomasc committed Mar 24, 2016
1 parent 3dd7f5a commit ab87b7c
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 9 deletions.
4 changes: 2 additions & 2 deletions Guardfile
Expand Up @@ -2,7 +2,7 @@
# More info at https://github.com/guard/guard#readme

guard :minitest do
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
watch(%r{^test/.+_test\.rb$})
watch(%r{^test/test_helper\.rb$}) { 'test' }
watch(%r{^test/test_helper\.rb$}) { 'test' }
end
8 changes: 4 additions & 4 deletions lib/mongoid_traffic.rb
@@ -1,5 +1,5 @@
require "mongoid_traffic/version"
require 'mongoid_traffic/version'

require "mongoid_traffic/controller_additions"
require "mongoid_traffic/log"
require "mongoid_traffic/logger"
require 'mongoid_traffic/controller_additions'
require 'mongoid_traffic/log'
require 'mongoid_traffic/logger'
2 changes: 1 addition & 1 deletion lib/mongoid_traffic/logger/bots.rb
Expand Up @@ -6,7 +6,7 @@ module MongoidTraffic
class Logger
class Bots
DATA_URL = 'http://www.user-agents.org/allagents.xml'.freeze
FILE_PATH = 'vendor/mongoid_traffic/allagents.xml'.freeze
FILE_PATH = File.join(File.dirname(__dir__), '..', '..', 'vendor', 'mongoid_traffic', 'allagents.xml')

class << self
def list
Expand Down
4 changes: 2 additions & 2 deletions lib/mongoid_traffic/logger/geo_ip.rb
Expand Up @@ -4,11 +4,11 @@ module MongoidTraffic
class Logger
class GeoIp
DATA_URL = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'.freeze
FILE_URL = 'vendor/mongoid_traffic/GeoIP.dat'.freeze
FILE_PATH = File.join(File.dirname(__dir__), '..', '..', 'vendor', 'mongoid_traffic', 'GeoIP.dat')

class << self
def geoip
@geoip ||= ::GeoIP.new(FILE_URL)
@geoip ||= ::GeoIP.new(FILE_PATH)
end

def country_code2(str)
Expand Down

0 comments on commit ab87b7c

Please sign in to comment.