Sha256: d75f04da2c650f3c29e3922970d68438aea66879fe8400bdad2df0a57d58130e

Contents?: true

Size: 796 Bytes

Versions: 29

Compression:

Stored size: 796 Bytes

Contents

require 'bundler'
Bundler.setup

require 'will_paginate/active_record'
require 'finders/activerecord_test_connector'

ActiverecordTestConnector.setup

windows = RUBY_PLATFORM =~ /(:?mswin|mingw)/
# used just for the `color` method
log_subscriber = ActiveSupport::LogSubscriber.log_subscribers.first

IGNORE_SQL = /\b(sqlite_master|sqlite_version)\b|^(CREATE TABLE|PRAGMA)\b/

ActiveSupport::Notifications.subscribe(/^sql\./) do |*args|
  data = args.last
  unless data[:name] =~ /^Fixture/ or data[:sql] =~ IGNORE_SQL
    if windows
      puts data[:sql]
    else
      puts log_subscriber.send(:color, data[:sql], :cyan)
    end
  end
end

# load all fixtures
ActiverecordTestConnector::Fixtures.create_fixtures \
  ActiverecordTestConnector::FIXTURES_PATH, ActiveRecord::Base.connection.tables

Version data entries

29 entries across 29 versions & 4 rubygems

Version Path
will_paginate-3.3.1 spec/console_fixtures.rb
will_paginate-3.3.0 spec/console_fixtures.rb
will_paginate-3.2.1 spec/console_fixtures.rb
will_paginate-3.2.0 spec/console_fixtures.rb
will_paginate-3.1.8 spec/console_fixtures.rb
will_paginate-3.1.7 spec/console_fixtures.rb
will_paginate-3.1.6 spec/console_fixtures.rb
will_paginate-3.0.12 spec/console_fixtures.rb
will_paginate-3.1.5 spec/console_fixtures.rb
will_paginate-3.0.11 spec/console_fixtures.rb
will_paginate-3.1.3 spec/console_fixtures.rb
will_paginate-3.0.10 spec/console_fixtures.rb
will_paginate-3.0.9 spec/console_fixtures.rb
will_paginate-3.1.2 spec/console_fixtures.rb
will_paginate-3.1.1 spec/console_fixtures.rb
will_paginate-3.0.8 spec/console_fixtures.rb
will_paginate-3.1.0 spec/console_fixtures.rb
will_paginate_seo-3.0.4 spec/console_fixtures.rb
will_paginate-3.0.7 spec/console_fixtures.rb
will_paginate-3.0.6 spec/console_fixtures.rb