ip_to_country 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- data/MIT-LICENSE +20 -0
- data/README.md +16 -0
- data/Rakefile +40 -0
- data/app/models/ip_to_country/geoip.rb +34 -0
- data/lib/generators/geoip/geoip_generator.rb +23 -0
- data/lib/generators/geoip/templates/migration.rb +23 -0
- data/lib/ip_to_country.rb +5 -0
- data/lib/ip_to_country/engine.rb +5 -0
- data/lib/ip_to_country/version.rb +4 -0
- data/lib/tasks/ip_to_country_tasks.rake +4 -0
- data/test/dummy/README.rdoc +261 -0
- data/test/dummy/Rakefile +7 -0
- data/test/dummy/app/assets/javascripts/application.js +15 -0
- data/test/dummy/app/assets/stylesheets/application.css +13 -0
- data/test/dummy/app/controllers/application_controller.rb +4 -0
- data/test/dummy/app/helpers/application_helper.rb +3 -0
- data/test/dummy/app/views/layouts/application.html.erb +14 -0
- data/test/dummy/config.ru +4 -0
- data/test/dummy/config/application.rb +60 -0
- data/test/dummy/config/boot.rb +11 -0
- data/test/dummy/config/database.yml +4 -0
- data/test/dummy/config/environment.rb +6 -0
- data/test/dummy/config/environments/development.rb +38 -0
- data/test/dummy/config/environments/production.rb +68 -0
- data/test/dummy/config/environments/test.rb +38 -0
- data/test/dummy/config/initializers/backtrace_silencers.rb +8 -0
- data/test/dummy/config/initializers/inflections.rb +16 -0
- data/test/dummy/config/initializers/mime_types.rb +6 -0
- data/test/dummy/config/initializers/secret_token.rb +8 -0
- data/test/dummy/config/initializers/session_store.rb +9 -0
- data/test/dummy/config/initializers/wrap_parameters.rb +15 -0
- data/test/dummy/config/locales/en.yml +5 -0
- data/test/dummy/config/routes.rb +5 -0
- data/test/dummy/db/migrate/001_create_geoips.rb +23 -0
- data/test/dummy/log/test.log +322 -0
- data/test/dummy/public/404.html +26 -0
- data/test/dummy/public/422.html +26 -0
- data/test/dummy/public/500.html +25 -0
- data/test/dummy/public/favicon.ico +0 -0
- data/test/dummy/script/rails +6 -0
- data/test/fixtures/geoips.yml +7 -0
- data/test/geoip_test.rb +17 -0
- data/test/ip_to_country_test.rb +8 -0
- data/test/test_helper.rb +28 -0
- metadata +145 -0
data/test/dummy/Rakefile
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
# Add your own tasks in files placed in lib/tasks ending in .rake,
|
3
|
+
# for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
|
4
|
+
|
5
|
+
require File.expand_path('../config/application', __FILE__)
|
6
|
+
|
7
|
+
Dummy::Application.load_tasks
|
@@ -0,0 +1,15 @@
|
|
1
|
+
// This is a manifest file that'll be compiled into application.js, which will include all the files
|
2
|
+
// listed below.
|
3
|
+
//
|
4
|
+
// Any JavaScript/Coffee file within this directory, lib/assets/javascripts, vendor/assets/javascripts,
|
5
|
+
// or vendor/assets/javascripts of plugins, if any, can be referenced here using a relative path.
|
6
|
+
//
|
7
|
+
// It's not advisable to add code directly here, but if you do, it'll appear at the bottom of the
|
8
|
+
// the compiled file.
|
9
|
+
//
|
10
|
+
// WARNING: THE FIRST BLANK LINE MARKS THE END OF WHAT'S TO BE PROCESSED, ANY BLANK LINE SHOULD
|
11
|
+
// GO AFTER THE REQUIRES BELOW.
|
12
|
+
//
|
13
|
+
//= require jquery
|
14
|
+
//= require jquery_ujs
|
15
|
+
//= require_tree .
|
@@ -0,0 +1,13 @@
|
|
1
|
+
/*
|
2
|
+
* This is a manifest file that'll be compiled into application.css, which will include all the files
|
3
|
+
* listed below.
|
4
|
+
*
|
5
|
+
* Any CSS and SCSS file within this directory, lib/assets/stylesheets, vendor/assets/stylesheets,
|
6
|
+
* or vendor/assets/stylesheets of plugins, if any, can be referenced here using a relative path.
|
7
|
+
*
|
8
|
+
* You're free to add application-wide styles to this file and they'll appear at the top of the
|
9
|
+
* compiled file, but it's generally better to create a new file per style scope.
|
10
|
+
*
|
11
|
+
*= require_self
|
12
|
+
*= require_tree .
|
13
|
+
*/
|
@@ -0,0 +1,60 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require File.expand_path('../boot', __FILE__)
|
3
|
+
|
4
|
+
require 'rails/all'
|
5
|
+
|
6
|
+
Bundler.require
|
7
|
+
require "ip_to_country"
|
8
|
+
|
9
|
+
module Dummy
|
10
|
+
class Application < Rails::Application
|
11
|
+
# Settings in config/environments/* take precedence over those specified here.
|
12
|
+
# Application configuration should go into files in config/initializers
|
13
|
+
# -- all .rb files in that directory are automatically loaded.
|
14
|
+
|
15
|
+
# Custom directories with classes and modules you want to be autoloadable.
|
16
|
+
# config.autoload_paths += %W(#{config.root}/extras)
|
17
|
+
|
18
|
+
# Only load the plugins named here, in the order given (default is alphabetical).
|
19
|
+
# :all can be used as a placeholder for all plugins not explicitly named.
|
20
|
+
# config.plugins = [ :exception_notification, :ssl_requirement, :all ]
|
21
|
+
|
22
|
+
# Activate observers that should always be running.
|
23
|
+
# config.active_record.observers = :cacher, :garbage_collector, :forum_observer
|
24
|
+
|
25
|
+
# Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
|
26
|
+
# Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
|
27
|
+
# config.time_zone = 'Central Time (US & Canada)'
|
28
|
+
|
29
|
+
# The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
|
30
|
+
# config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
|
31
|
+
# config.i18n.default_locale = :de
|
32
|
+
|
33
|
+
# Configure the default encoding used in templates for Ruby 1.9.
|
34
|
+
config.encoding = "utf-8"
|
35
|
+
|
36
|
+
# Configure sensitive parameters which will be filtered from the log file.
|
37
|
+
config.filter_parameters += [:password]
|
38
|
+
|
39
|
+
# Enable escaping HTML in JSON.
|
40
|
+
config.active_support.escape_html_entities_in_json = true
|
41
|
+
|
42
|
+
# Use SQL instead of Active Record's schema dumper when creating the database.
|
43
|
+
# This is necessary if your schema can't be completely dumped by the schema dumper,
|
44
|
+
# like if you have constraints or database-specific column types
|
45
|
+
# config.active_record.schema_format = :sql
|
46
|
+
|
47
|
+
# Enforce whitelist mode for mass assignment.
|
48
|
+
# This will create an empty whitelist of attributes available for mass-assignment for all models
|
49
|
+
# in your app. As such, your models will need to explicitly whitelist or blacklist accessible
|
50
|
+
# parameters by using an attr_accessible or attr_protected declaration.
|
51
|
+
config.active_record.whitelist_attributes = false
|
52
|
+
|
53
|
+
# Enable the asset pipeline
|
54
|
+
config.assets.enabled = true
|
55
|
+
|
56
|
+
# Version of your assets, change this if you want to expire all your assets
|
57
|
+
config.assets.version = '1.0'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
|
@@ -0,0 +1,11 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
require 'rubygems'
|
3
|
+
gemfile = File.expand_path('../../../../Gemfile', __FILE__)
|
4
|
+
|
5
|
+
if File.exist?(gemfile)
|
6
|
+
ENV['BUNDLE_GEMFILE'] = gemfile
|
7
|
+
require 'bundler'
|
8
|
+
Bundler.setup
|
9
|
+
end
|
10
|
+
|
11
|
+
$:.unshift File.expand_path('../../../../lib', __FILE__)
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
Dummy::Application.configure do
|
3
|
+
# Settings specified here will take precedence over those in config/application.rb
|
4
|
+
|
5
|
+
# In the development environment your application's code is reloaded on
|
6
|
+
# every request. This slows down response time but is perfect for development
|
7
|
+
# since you don't have to restart the web server when you make code changes.
|
8
|
+
config.cache_classes = false
|
9
|
+
|
10
|
+
# Log error messages when you accidentally call methods on nil.
|
11
|
+
config.whiny_nils = true
|
12
|
+
|
13
|
+
# Show full error reports and disable caching
|
14
|
+
config.consider_all_requests_local = true
|
15
|
+
config.action_controller.perform_caching = false
|
16
|
+
|
17
|
+
# Don't care if the mailer can't send
|
18
|
+
config.action_mailer.raise_delivery_errors = false
|
19
|
+
|
20
|
+
# Print deprecation notices to the Rails logger
|
21
|
+
config.active_support.deprecation = :log
|
22
|
+
|
23
|
+
# Only use best-standards-support built into browsers
|
24
|
+
config.action_dispatch.best_standards_support = :builtin
|
25
|
+
|
26
|
+
# Raise exception on mass assignment protection for Active Record models
|
27
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
28
|
+
|
29
|
+
# Log the query plan for queries taking more than this (works
|
30
|
+
# with SQLite, MySQL, and PostgreSQL)
|
31
|
+
config.active_record.auto_explain_threshold_in_seconds = 0.5
|
32
|
+
|
33
|
+
# Do not compress assets
|
34
|
+
config.assets.compress = false
|
35
|
+
|
36
|
+
# Expands the lines which load the assets
|
37
|
+
config.assets.debug = true
|
38
|
+
end
|
@@ -0,0 +1,68 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
Dummy::Application.configure do
|
3
|
+
# Settings specified here will take precedence over those in config/application.rb
|
4
|
+
|
5
|
+
# Code is not reloaded between requests
|
6
|
+
config.cache_classes = true
|
7
|
+
|
8
|
+
# Full error reports are disabled and caching is turned on
|
9
|
+
config.consider_all_requests_local = false
|
10
|
+
config.action_controller.perform_caching = true
|
11
|
+
|
12
|
+
# Disable Rails's static asset server (Apache or nginx will already do this)
|
13
|
+
config.serve_static_assets = false
|
14
|
+
|
15
|
+
# Compress JavaScripts and CSS
|
16
|
+
config.assets.compress = true
|
17
|
+
|
18
|
+
# Don't fallback to assets pipeline if a precompiled asset is missed
|
19
|
+
config.assets.compile = false
|
20
|
+
|
21
|
+
# Generate digests for assets URLs
|
22
|
+
config.assets.digest = true
|
23
|
+
|
24
|
+
# Defaults to nil and saved in location specified by config.assets.prefix
|
25
|
+
# config.assets.manifest = YOUR_PATH
|
26
|
+
|
27
|
+
# Specifies the header that your server uses for sending files
|
28
|
+
# config.action_dispatch.x_sendfile_header = "X-Sendfile" # for apache
|
29
|
+
# config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for nginx
|
30
|
+
|
31
|
+
# Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
|
32
|
+
# config.force_ssl = true
|
33
|
+
|
34
|
+
# See everything in the log (default is :info)
|
35
|
+
# config.log_level = :debug
|
36
|
+
|
37
|
+
# Prepend all log lines with the following tags
|
38
|
+
# config.log_tags = [ :subdomain, :uuid ]
|
39
|
+
|
40
|
+
# Use a different logger for distributed setups
|
41
|
+
# config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
|
42
|
+
|
43
|
+
# Use a different cache store in production
|
44
|
+
# config.cache_store = :mem_cache_store
|
45
|
+
|
46
|
+
# Enable serving of images, stylesheets, and JavaScripts from an asset server
|
47
|
+
# config.action_controller.asset_host = "http://assets.example.com"
|
48
|
+
|
49
|
+
# Precompile additional assets (application.js, application.css, and all non-JS/CSS are already added)
|
50
|
+
# config.assets.precompile += %w( search.js )
|
51
|
+
|
52
|
+
# Disable delivery errors, bad email addresses will be ignored
|
53
|
+
# config.action_mailer.raise_delivery_errors = false
|
54
|
+
|
55
|
+
# Enable threaded mode
|
56
|
+
# config.threadsafe!
|
57
|
+
|
58
|
+
# Enable locale fallbacks for I18n (makes lookups for any locale fall back to
|
59
|
+
# the I18n.default_locale when a translation can not be found)
|
60
|
+
config.i18n.fallbacks = true
|
61
|
+
|
62
|
+
# Send deprecation notices to registered listeners
|
63
|
+
config.active_support.deprecation = :notify
|
64
|
+
|
65
|
+
# Log the query plan for queries taking more than this (works
|
66
|
+
# with SQLite, MySQL, and PostgreSQL)
|
67
|
+
# config.active_record.auto_explain_threshold_in_seconds = 0.5
|
68
|
+
end
|
@@ -0,0 +1,38 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
Dummy::Application.configure do
|
3
|
+
# Settings specified here will take precedence over those in config/application.rb
|
4
|
+
|
5
|
+
# The test environment is used exclusively to run your application's
|
6
|
+
# test suite. You never need to work with it otherwise. Remember that
|
7
|
+
# your test database is "scratch space" for the test suite and is wiped
|
8
|
+
# and recreated between test runs. Don't rely on the data there!
|
9
|
+
config.cache_classes = true
|
10
|
+
|
11
|
+
# Configure static asset server for tests with Cache-Control for performance
|
12
|
+
config.serve_static_assets = true
|
13
|
+
config.static_cache_control = "public, max-age=3600"
|
14
|
+
|
15
|
+
# Log error messages when you accidentally call methods on nil
|
16
|
+
config.whiny_nils = true
|
17
|
+
|
18
|
+
# Show full error reports and disable caching
|
19
|
+
config.consider_all_requests_local = true
|
20
|
+
config.action_controller.perform_caching = false
|
21
|
+
|
22
|
+
# Raise exceptions instead of rendering exception templates
|
23
|
+
config.action_dispatch.show_exceptions = false
|
24
|
+
|
25
|
+
# Disable request forgery protection in test environment
|
26
|
+
config.action_controller.allow_forgery_protection = false
|
27
|
+
|
28
|
+
# Tell Action Mailer not to deliver emails to the real world.
|
29
|
+
# The :test delivery method accumulates sent emails in the
|
30
|
+
# ActionMailer::Base.deliveries array.
|
31
|
+
config.action_mailer.delivery_method = :test
|
32
|
+
|
33
|
+
# Raise exception on mass assignment protection for Active Record models
|
34
|
+
config.active_record.mass_assignment_sanitizer = :strict
|
35
|
+
|
36
|
+
# Print deprecation notices to the stderr
|
37
|
+
config.active_support.deprecation = :stderr
|
38
|
+
end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
|
4
|
+
# You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
|
5
|
+
# Rails.backtrace_cleaner.add_silencer { |line| line =~ /my_noisy_library/ }
|
6
|
+
|
7
|
+
# You can also remove all the silencers if you're trying to debug a problem that might stem from framework code.
|
8
|
+
# Rails.backtrace_cleaner.remove_silencers!
|
@@ -0,0 +1,16 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
|
4
|
+
# Add new inflection rules using the following format
|
5
|
+
# (all these examples are active by default):
|
6
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
7
|
+
# inflect.plural /^(ox)$/i, '\1en'
|
8
|
+
# inflect.singular /^(ox)en/i, '\1'
|
9
|
+
# inflect.irregular 'person', 'people'
|
10
|
+
# inflect.uncountable %w( fish sheep )
|
11
|
+
# end
|
12
|
+
#
|
13
|
+
# These inflection rules are supported but not enabled by default:
|
14
|
+
# ActiveSupport::Inflector.inflections do |inflect|
|
15
|
+
# inflect.acronym 'RESTful'
|
16
|
+
# end
|
@@ -0,0 +1,8 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
|
4
|
+
# Your secret key for verifying the integrity of signed cookies.
|
5
|
+
# If you change this key, all old signed cookies will become invalid!
|
6
|
+
# Make sure the secret is at least 30 characters and all random,
|
7
|
+
# no regular words or you'll be exposed to dictionary attacks.
|
8
|
+
Dummy::Application.config.secret_token = '3a274874ec4a99e13bea1e833cc6565cfffc0355751a6a21a6db8d6dcbec6694632c9303de445b987c52644e79b6b6419fbe1e3c8011e3598006e3b62ce65169'
|
@@ -0,0 +1,9 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
|
4
|
+
Dummy::Application.config.session_store :cookie_store, key: '_dummy_session'
|
5
|
+
|
6
|
+
# Use the database for sessions instead of the cookie-based default,
|
7
|
+
# which shouldn't be used to store highly confidential information
|
8
|
+
# (create the session table with "rails generate session_migration")
|
9
|
+
# Dummy::Application.config.session_store :active_record_store
|
@@ -0,0 +1,15 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
# Be sure to restart your server when you modify this file.
|
3
|
+
#
|
4
|
+
# This file contains settings for ActionController::ParamsWrapper which
|
5
|
+
# is enabled by default.
|
6
|
+
|
7
|
+
# Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
|
8
|
+
ActiveSupport.on_load(:action_controller) do
|
9
|
+
wrap_parameters format: [:json]
|
10
|
+
end
|
11
|
+
|
12
|
+
# Disable root element in JSON by default.
|
13
|
+
ActiveSupport.on_load(:active_record) do
|
14
|
+
self.include_root_in_json = false
|
15
|
+
end
|
@@ -0,0 +1,23 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
class CreateGeoips < ActiveRecord::Migration
|
4
|
+
def self.up
|
5
|
+
create_table :geoips, id: false do |t|
|
6
|
+
t.string :ip_from_string, null: false, limit: 15
|
7
|
+
t.string :ip_to_string, null: false, limit: 15
|
8
|
+
t.integer :ip_from, null: false, limit: 8
|
9
|
+
t.integer :ip_to, null: false, limit: 8
|
10
|
+
t.string :country_code, null: false, limit: 2
|
11
|
+
t.string :country_name, null: false, limit: 64
|
12
|
+
end
|
13
|
+
|
14
|
+
execute "ALTER TABLE geoips ADD CONSTRAINT geoips_pkey PRIMARY KEY(ip_from, ip_to);"
|
15
|
+
|
16
|
+
add_index :geoips, :ip_from, unique: true
|
17
|
+
add_index :geoips, :ip_to, unique: true
|
18
|
+
end
|
19
|
+
|
20
|
+
def self.down
|
21
|
+
drop_table :geoips
|
22
|
+
end
|
23
|
+
end
|
@@ -0,0 +1,322 @@
|
|
1
|
+
Connecting to database specified by database.yml
|
2
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
3
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
4
|
+
Connecting to database specified by database.yml
|
5
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
6
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
7
|
+
Connecting to database specified by database.yml
|
8
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
9
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
10
|
+
Connecting to database specified by database.yml
|
11
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
12
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
13
|
+
Connecting to database specified by database.yml
|
14
|
+
[1m[36m (0.7ms)[0m [1mbegin transaction[0m
|
15
|
+
[1m[35m (0.2ms)[0m rollback transaction
|
16
|
+
Connecting to database specified by database.yml
|
17
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
18
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
19
|
+
Connecting to database specified by database.yml
|
20
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
21
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
22
|
+
Connecting to database specified by database.yml
|
23
|
+
[1m[36m (0.4ms)[0m [1mbegin transaction[0m
|
24
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
25
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
26
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
27
|
+
Connecting to database specified by database.yml
|
28
|
+
[1m[36m (0.5ms)[0m [1mbegin transaction[0m
|
29
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
30
|
+
[1m[36m (0.1ms)[0m [1mbegin transaction[0m
|
31
|
+
[1m[35m (0.1ms)[0m rollback transaction
|
32
|
+
Connecting to database specified by database.yml
|
33
|
+
Connecting to database specified by database.yml
|
34
|
+
Connecting to database specified by database.yml
|
35
|
+
Connecting to database specified by database.yml
|
36
|
+
Connecting to database specified by database.yml
|
37
|
+
Connecting to database specified by database.yml
|
38
|
+
Connecting to database specified by database.yml
|
39
|
+
Connecting to database specified by database.yml
|
40
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
41
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
42
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
43
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
44
|
+
Connecting to database specified by database.yml
|
45
|
+
[1m[36m (26.8ms)[0m [1mCREATE TABLE "schema_migrations" ("version" character varying(255) NOT NULL) [0m
|
46
|
+
[1m[35m (74.4ms)[0m CREATE UNIQUE INDEX "unique_schema_migrations" ON "schema_migrations" ("version")
|
47
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
48
|
+
Migrating to CreateGeoips (1)
|
49
|
+
[1m[35m (0.2ms)[0m BEGIN
|
50
|
+
[1m[36m (1.8ms)[0m [1mCREATE TABLE "geoips" ("ip_from_string" character varying(15) NOT NULL, "ip_to_string" character varying(15) NOT NULL, "ip_from" bigint NOT NULL, "ip_to" bigint NOT NULL, "country_code" character varying(2) NOT NULL, "country_name" character varying(64) NOT NULL) [0m
|
51
|
+
[1m[35m (114.7ms)[0m ALTER TABLE geoips ADD CONSTRAINT geoips_pkey PRIMARY KEY(ip_from, ip_to);
|
52
|
+
[1m[36m (43.1ms)[0m [1mCREATE UNIQUE INDEX "index_geoips_on_ip_from" ON "geoips" ("ip_from")[0m
|
53
|
+
[1m[35m (66.3ms)[0m CREATE UNIQUE INDEX "index_geoips_on_ip_to" ON "geoips" ("ip_to")
|
54
|
+
[1m[36m (0.4ms)[0m [1mINSERT INTO "schema_migrations" ("version") VALUES ('1')[0m
|
55
|
+
[1m[35m (7.8ms)[0m COMMIT
|
56
|
+
[1m[36m (0.3ms)[0m [1mBEGIN[0m
|
57
|
+
[1m[35m (0.5ms)[0m ROLLBACK
|
58
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
59
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
60
|
+
Connecting to database specified by database.yml
|
61
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
62
|
+
Migrating to CreateGeoips (1)
|
63
|
+
[1m[35m (0.2ms)[0m BEGIN
|
64
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
65
|
+
[1m[35m (0.1ms)[0m BEGIN
|
66
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
67
|
+
[1m[35m (0.1ms)[0m BEGIN
|
68
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
69
|
+
Connecting to database specified by database.yml
|
70
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
71
|
+
Migrating to CreateGeoips (1)
|
72
|
+
[1m[35m (0.4ms)[0m BEGIN
|
73
|
+
[1m[36m (0.8ms)[0m [1mROLLBACK[0m
|
74
|
+
[1m[35m (0.1ms)[0m BEGIN
|
75
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
76
|
+
[1m[35m (0.1ms)[0m BEGIN
|
77
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
78
|
+
Connecting to database specified by database.yml
|
79
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
80
|
+
Migrating to CreateGeoips (1)
|
81
|
+
Connecting to database specified by database.yml
|
82
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
83
|
+
Migrating to CreateGeoips (1)
|
84
|
+
[1m[35m (0.2ms)[0m BEGIN
|
85
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
86
|
+
[1m[35m (0.1ms)[0m BEGIN
|
87
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
88
|
+
[1m[35m (0.1ms)[0m BEGIN
|
89
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
90
|
+
Connecting to database specified by database.yml
|
91
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
92
|
+
Migrating to CreateGeoips (1)
|
93
|
+
[1m[35m (0.1ms)[0m BEGIN
|
94
|
+
[1m[36mIpToCountry::Geoip Load (1.6ms)[0m [1mSELECT "geoips".* FROM "geoips" WHERE (ip_from = (select max(ip_from) from geoips where ip_from <= 3232235778) and ip_to = (select min(ip_to)
|
95
|
+
from geoips where ip_to >= 3232235778)) LIMIT 1[0m
|
96
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
97
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
98
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
99
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
100
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
101
|
+
Connecting to database specified by database.yml
|
102
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
103
|
+
Migrating to CreateGeoips (1)
|
104
|
+
[1m[35m (0.2ms)[0m BEGIN
|
105
|
+
[1m[36mIpToCountry::Geoip Load (1.3ms)[0m [1mSELECT "geoips".* FROM "geoips" WHERE (ip_from = (select max(ip_from) from geoips where ip_from <= 3232235778) and ip_to = (select min(ip_to)
|
106
|
+
from geoips where ip_to >= 3232235778)) LIMIT 1[0m
|
107
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
108
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
109
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
110
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
111
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
112
|
+
Connecting to database specified by database.yml
|
113
|
+
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
114
|
+
Migrating to CreateGeoips (1)
|
115
|
+
[1m[35m (0.2ms)[0m BEGIN
|
116
|
+
[1m[36mIpToCountry::Geoip Load (0.5ms)[0m [1mSELECT "geoips".* FROM "geoips" [0m
|
117
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
118
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
119
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
120
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
121
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
122
|
+
Connecting to database specified by database.yml
|
123
|
+
[1m[36m (0.3ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
124
|
+
Migrating to CreateGeoips (1)
|
125
|
+
[1m[35m (0.2ms)[0m BEGIN
|
126
|
+
[1m[36mIpToCountry::Geoip Load (0.4ms)[0m [1mSELECT "geoips".* FROM "geoips" [0m
|
127
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
128
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
129
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
130
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
131
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
132
|
+
Connecting to database specified by database.yml
|
133
|
+
[1m[36m (0.7ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
134
|
+
Migrating to CreateGeoips (1)
|
135
|
+
[1m[35m (0.2ms)[0m BEGIN
|
136
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
137
|
+
[1m[35m (0.1ms)[0m BEGIN
|
138
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
139
|
+
[1m[35m (0.1ms)[0m BEGIN
|
140
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
141
|
+
Connecting to database specified by database.yml
|
142
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
143
|
+
Migrating to CreateGeoips (1)
|
144
|
+
[1m[35m (0.2ms)[0m BEGIN
|
145
|
+
[1m[36m (0.1ms)[0m [1mSAVEPOINT active_record_1[0m
|
146
|
+
[1m[35mIpToCountry::Geoip Exists (0.8ms)[0m SELECT 1 AS one FROM "geoips" WHERE "geoips"."ip_from" = 3232235777 LIMIT 1
|
147
|
+
[1m[36mIpToCountry::Geoip Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "geoips" WHERE "geoips"."ip_to" = 3232235794 LIMIT 1[0m
|
148
|
+
[1m[35mSQL (5.6ms)[0m INSERT INTO "geoips" ("country_code", "country_name", "ip_from", "ip_from_string", "ip_to", "ip_to_string") VALUES ($1, $2, $3, $4, $5, $6) RETURNING "ip_from" [["country_code", "wd"], ["country_name", "wonderland"], ["ip_from", 3232235777], ["ip_from_string", "192.168.1.1"], ["ip_to", 3232235794], ["ip_to_string", "192.168.1.20"]]
|
149
|
+
[1m[36m (0.1ms)[0m [1mRELEASE SAVEPOINT active_record_1[0m
|
150
|
+
[1m[35mIpToCountry::Geoip Load (0.4ms)[0m SELECT "geoips".* FROM "geoips"
|
151
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
152
|
+
[1m[35m (0.1ms)[0m BEGIN
|
153
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
154
|
+
[1m[35m (0.1ms)[0m BEGIN
|
155
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
156
|
+
Connecting to database specified by database.yml
|
157
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
158
|
+
Migrating to CreateGeoips (1)
|
159
|
+
[1m[35m (0.2ms)[0m BEGIN
|
160
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
161
|
+
[1m[35m (0.1ms)[0m BEGIN
|
162
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
163
|
+
[1m[35m (0.1ms)[0m BEGIN
|
164
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
165
|
+
Connecting to database specified by database.yml
|
166
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
167
|
+
Migrating to CreateGeoips (1)
|
168
|
+
[1m[35m (0.4ms)[0m BEGIN
|
169
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
170
|
+
[1m[35m (0.1ms)[0m BEGIN
|
171
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
172
|
+
[1m[35m (0.1ms)[0m BEGIN
|
173
|
+
[1m[36m (0.1ms)[0m [1mROLLBACK[0m
|
174
|
+
Connecting to database specified by database.yml
|
175
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
176
|
+
Migrating to CreateGeoips (1)
|
177
|
+
Unable to load geoip, underlying cause No such file to load -- geoip
|
178
|
+
|
179
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
|
180
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
|
181
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
|
182
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:767:in `try_to_load_dependency'
|
183
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:782:in `block in require_fixture_classes'
|
184
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `each'
|
185
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `require_fixture_classes'
|
186
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:762:in `fixtures'
|
187
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:26:in `<class:TestCase>'
|
188
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:23:in `<top (required)>'
|
189
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `require'
|
190
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `<top (required)>'
|
191
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `require'
|
192
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
|
193
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `each'
|
194
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `block in <main>'
|
195
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
|
196
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
|
197
|
+
[1m[35m (54.5ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "geoips" DISABLE TRIGGER ALL
|
198
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
199
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "geoips"
|
200
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "geoips" ("ip_from_string", "ip_to_string", "ip_from", "ip_to", "country_code", "country_name") VALUES ('192.168.1.1', '192.168.1.20', 3232235777, 3232235794, 'wd', 'wonderland')[0m
|
201
|
+
[1m[35m (15.3ms)[0m COMMIT
|
202
|
+
[1m[36m (0.3ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "geoips" ENABLE TRIGGER ALL[0m
|
203
|
+
[1m[35m (0.1ms)[0m BEGIN
|
204
|
+
[1m[36m (0.2ms)[0m [1mSAVEPOINT active_record_1[0m
|
205
|
+
[1m[35mIpToCountry::Geoip Exists (0.5ms)[0m SELECT 1 AS one FROM "geoips" WHERE "geoips"."ip_from" = 3232235777 LIMIT 1
|
206
|
+
[1m[36mIpToCountry::Geoip Exists (0.4ms)[0m [1mSELECT 1 AS one FROM "geoips" WHERE "geoips"."ip_to" = 3232235794 LIMIT 1[0m
|
207
|
+
[1m[35m (8.6ms)[0m ROLLBACK TO SAVEPOINT active_record_1
|
208
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
209
|
+
[1m[35m (0.1ms)[0m BEGIN
|
210
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
211
|
+
[1m[35m (0.1ms)[0m BEGIN
|
212
|
+
[1m[36m (0.2ms)[0m [1mROLLBACK[0m
|
213
|
+
Connecting to database specified by database.yml
|
214
|
+
[1m[36m (0.8ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
215
|
+
Migrating to CreateGeoips (1)
|
216
|
+
Unable to load geoip, underlying cause No such file to load -- geoip
|
217
|
+
|
218
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
|
219
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
|
220
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
|
221
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:767:in `try_to_load_dependency'
|
222
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:782:in `block in require_fixture_classes'
|
223
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `each'
|
224
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `require_fixture_classes'
|
225
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:762:in `fixtures'
|
226
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:26:in `<class:TestCase>'
|
227
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:23:in `<top (required)>'
|
228
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `require'
|
229
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `<top (required)>'
|
230
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `require'
|
231
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
|
232
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `each'
|
233
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `block in <main>'
|
234
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
|
235
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
|
236
|
+
[1m[35m (0.3ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "geoips" DISABLE TRIGGER ALL
|
237
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
238
|
+
[1m[35mFixture Delete (0.6ms)[0m DELETE FROM "geoips"
|
239
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "geoips" ("ip_from_string", "ip_to_string", "ip_from", "ip_to", "country_code", "country_name") VALUES ('192.168.1.1', '192.168.1.20', 3232235777, 3232235794, 'wd', 'wonderland')[0m
|
240
|
+
[1m[35m (18.1ms)[0m COMMIT
|
241
|
+
[1m[36m (0.4ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "geoips" ENABLE TRIGGER ALL[0m
|
242
|
+
[1m[35m (0.2ms)[0m BEGIN
|
243
|
+
[1m[36mIpToCountry::Geoip Load (0.2ms)[0m [1mSELECT "geoips".* FROM "geoips" [0m
|
244
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
245
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
246
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
247
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
248
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
249
|
+
Connecting to database specified by database.yml
|
250
|
+
[1m[36m (0.4ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
251
|
+
Migrating to CreateGeoips (1)
|
252
|
+
Unable to load geoip, underlying cause No such file to load -- geoip
|
253
|
+
|
254
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
|
255
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
|
256
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
|
257
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:767:in `try_to_load_dependency'
|
258
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:782:in `block in require_fixture_classes'
|
259
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `each'
|
260
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `require_fixture_classes'
|
261
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:762:in `fixtures'
|
262
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:26:in `<class:TestCase>'
|
263
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:23:in `<top (required)>'
|
264
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `require'
|
265
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `<top (required)>'
|
266
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `require'
|
267
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
|
268
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `each'
|
269
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `block in <main>'
|
270
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
|
271
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
|
272
|
+
[1m[35m (0.4ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "geoips" DISABLE TRIGGER ALL
|
273
|
+
[1m[36m (0.2ms)[0m [1mBEGIN[0m
|
274
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "geoips"
|
275
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "geoips" ("ip_from_string", "ip_to_string", "ip_from", "ip_to", "country_code", "country_name") VALUES ('192.168.1.1', '192.168.1.20', 3232235777, 3232235794, 'wd', 'wonderland')[0m
|
276
|
+
[1m[35m (18.5ms)[0m COMMIT
|
277
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "geoips" ENABLE TRIGGER ALL[0m
|
278
|
+
[1m[35m (0.1ms)[0m BEGIN
|
279
|
+
[1m[36mIpToCountry::Geoip Load (1.0ms)[0m [1mSELECT "geoips".* FROM "geoips" WHERE (ip_from = (select max(ip_from) from geoips where ip_from <= 3232235778) and ip_to = (select min(ip_to)
|
280
|
+
from geoips where ip_to >= 3232235778)) LIMIT 1[0m
|
281
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
282
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
283
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
284
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
285
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|
286
|
+
Connecting to database specified by database.yml
|
287
|
+
[1m[36m (0.5ms)[0m [1mSELECT "schema_migrations"."version" FROM "schema_migrations" [0m
|
288
|
+
Migrating to CreateGeoips (1)
|
289
|
+
Unable to load geoip, underlying cause No such file to load -- geoip
|
290
|
+
|
291
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:317:in `rescue in depend_on'
|
292
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:312:in `depend_on'
|
293
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activesupport-3.2.13/lib/active_support/dependencies.rb:225:in `require_dependency'
|
294
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:767:in `try_to_load_dependency'
|
295
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:782:in `block in require_fixture_classes'
|
296
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `each'
|
297
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:779:in `require_fixture_classes'
|
298
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/activerecord-3.2.13/lib/active_record/fixtures.rb:762:in `fixtures'
|
299
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:26:in `<class:TestCase>'
|
300
|
+
/home/vince/Projets/ip_to_country/test/test_helper.rb:23:in `<top (required)>'
|
301
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `require'
|
302
|
+
/home/vince/Projets/ip_to_country/test/geoip_test.rb:2:in `<top (required)>'
|
303
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `require'
|
304
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:10:in `block (2 levels) in <main>'
|
305
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `each'
|
306
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:9:in `block in <main>'
|
307
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `select'
|
308
|
+
/home/vince/.rvm/gems/ruby-1.9.3-head/gems/rake-10.0.4/lib/rake/rake_test_loader.rb:4:in `<main>'
|
309
|
+
[1m[35m (1.2ms)[0m ALTER TABLE "schema_migrations" DISABLE TRIGGER ALL;ALTER TABLE "geoips" DISABLE TRIGGER ALL
|
310
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
311
|
+
[1m[35mFixture Delete (0.5ms)[0m DELETE FROM "geoips"
|
312
|
+
[1m[36mFixture Insert (0.5ms)[0m [1mINSERT INTO "geoips" ("ip_from_string", "ip_to_string", "ip_from", "ip_to", "country_code", "country_name") VALUES ('192.168.1.1', '192.168.1.20', 3232235777, 3232235794, 'wd', 'wonderland')[0m
|
313
|
+
[1m[35m (41.2ms)[0m COMMIT
|
314
|
+
[1m[36m (0.2ms)[0m [1mALTER TABLE "schema_migrations" ENABLE TRIGGER ALL;ALTER TABLE "geoips" ENABLE TRIGGER ALL[0m
|
315
|
+
[1m[35m (0.1ms)[0m BEGIN
|
316
|
+
[1m[36mIpToCountry::Geoip Load (1.1ms)[0m [1mSELECT "geoips".* FROM "geoips" WHERE (ip_from = (select max(ip_from) from geoips where ip_from <= 3232235778) and ip_to = (select min(ip_to)
|
317
|
+
from geoips where ip_to >= 3232235778)) LIMIT 1[0m
|
318
|
+
[1m[35m (0.3ms)[0m ROLLBACK
|
319
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
320
|
+
[1m[35m (0.1ms)[0m ROLLBACK
|
321
|
+
[1m[36m (0.1ms)[0m [1mBEGIN[0m
|
322
|
+
[1m[35m (0.2ms)[0m ROLLBACK
|