mongoid_traffic 0.2.1 → 0.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/Guardfile +2 -2
- data/lib/mongoid_traffic/logger/bots.rb +1 -1
- data/lib/mongoid_traffic/logger/geo_ip.rb +2 -2
- data/lib/mongoid_traffic/version.rb +1 -1
- data/lib/mongoid_traffic.rb +4 -4
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4af0ca80e0eaf133581cc75d5ab900b5205e257f
|
4
|
+
data.tar.gz: deae8ab38bb54a8984d7b4f4cac7ef21e941dc6e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: c607042bf415f245b22711482d1f239731cbadf989361e080db8ad719238ce4dc79763a96911d2272351e350cd6615b922190d6e474ac4cd982c32374eadbf04
|
7
|
+
data.tar.gz: c9b479659973543affd600a52c0ce559340e03c96f0bd53e67508cd1cd4efb61d5bdd530ec7430637813fa15a9c8eb389266ec1bef9b573a68c3ecd7f784eb4c
|
data/Gemfile.lock
CHANGED
data/Guardfile
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
# More info at https://github.com/guard/guard#readme
|
3
3
|
|
4
4
|
guard :minitest do
|
5
|
-
watch(%r{^lib/(.+)\.rb$})
|
5
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "test/#{m[1]}_test.rb" }
|
6
6
|
watch(%r{^test/.+_test\.rb$})
|
7
|
-
watch(%r{^test/test_helper\.rb$})
|
7
|
+
watch(%r{^test/test_helper\.rb$}) { 'test' }
|
8
8
|
end
|
@@ -6,7 +6,7 @@ module MongoidTraffic
|
|
6
6
|
class Logger
|
7
7
|
class Bots
|
8
8
|
DATA_URL = 'http://www.user-agents.org/allagents.xml'.freeze
|
9
|
-
FILE_PATH = 'vendor
|
9
|
+
FILE_PATH = File.join(File.dirname(__dir__), '..', '..', 'vendor', 'mongoid_traffic', 'allagents.xml')
|
10
10
|
|
11
11
|
class << self
|
12
12
|
def list
|
@@ -4,11 +4,11 @@ module MongoidTraffic
|
|
4
4
|
class Logger
|
5
5
|
class GeoIp
|
6
6
|
DATA_URL = 'http://geolite.maxmind.com/download/geoip/database/GeoLiteCountry/GeoIP.dat.gz'.freeze
|
7
|
-
|
7
|
+
FILE_PATH = File.join(File.dirname(__dir__), '..', '..', 'vendor', 'mongoid_traffic', 'GeoIP.dat')
|
8
8
|
|
9
9
|
class << self
|
10
10
|
def geoip
|
11
|
-
@geoip ||= ::GeoIP.new(
|
11
|
+
@geoip ||= ::GeoIP.new(FILE_PATH)
|
12
12
|
end
|
13
13
|
|
14
14
|
def country_code2(str)
|
data/lib/mongoid_traffic.rb
CHANGED
@@ -1,5 +1,5 @@
|
|
1
|
-
require
|
1
|
+
require 'mongoid_traffic/version'
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
5
|
-
require
|
3
|
+
require 'mongoid_traffic/controller_additions'
|
4
|
+
require 'mongoid_traffic/log'
|
5
|
+
require 'mongoid_traffic/logger'
|