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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 48c3eb9a025f842258ed056e4ef1b435bc99c260
4
- data.tar.gz: 78ccd5f6083cec8c081d217a0265e34c8abf3819
3
+ metadata.gz: 4af0ca80e0eaf133581cc75d5ab900b5205e257f
4
+ data.tar.gz: deae8ab38bb54a8984d7b4f4cac7ef21e941dc6e
5
5
  SHA512:
6
- metadata.gz: da181545b24d5cfd258d21bc71c44f28cd9ffcf0a693c9abee7bb43811c83315492a11f77ddf5ce8ccbaf53b1084d4316141b137d3e144bed06f9ad60b2451a3
7
- data.tar.gz: 815f3e65d468f5a271f2bb1190e0bd373513356770606441f4e303f5c48a6aa3851571bf5395971f9a5372c10089b150962d1c1a44b24366f5ac921dab5e058f
6
+ metadata.gz: c607042bf415f245b22711482d1f239731cbadf989361e080db8ad719238ce4dc79763a96911d2272351e350cd6615b922190d6e474ac4cd982c32374eadbf04
7
+ data.tar.gz: c9b479659973543affd600a52c0ce559340e03c96f0bd53e67508cd1cd4efb61d5bdd530ec7430637813fa15a9c8eb389266ec1bef9b573a68c3ecd7f784eb4c
data/Gemfile.lock CHANGED
@@ -7,7 +7,7 @@ GIT
7
7
  PATH
8
8
  remote: .
9
9
  specs:
10
- mongoid_traffic (0.2.1)
10
+ mongoid_traffic (0.2.2)
11
11
  geoip
12
12
  mongoid (~> 5.1)
13
13
  nokogiri
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$}) { |m| "test/#{m[1]}_test.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$}) { 'test' }
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/mongoid_traffic/allagents.xml'.freeze
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
- FILE_URL = 'vendor/mongoid_traffic/GeoIP.dat'.freeze
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(FILE_URL)
11
+ @geoip ||= ::GeoIP.new(FILE_PATH)
12
12
  end
13
13
 
14
14
  def country_code2(str)
@@ -1,3 +1,3 @@
1
1
  module MongoidTraffic
2
- VERSION = "0.2.1"
2
+ VERSION = "0.2.2"
3
3
  end
@@ -1,5 +1,5 @@
1
- require "mongoid_traffic/version"
1
+ require 'mongoid_traffic/version'
2
2
 
3
- require "mongoid_traffic/controller_additions"
4
- require "mongoid_traffic/log"
5
- require "mongoid_traffic/logger"
3
+ require 'mongoid_traffic/controller_additions'
4
+ require 'mongoid_traffic/log'
5
+ require 'mongoid_traffic/logger'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: mongoid_traffic
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Tomáš Celizna