mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
❄️
This commit is contained in:
parent
f2a76b8199
commit
106cf8071c
32 changed files with 32 additions and 0 deletions
|
@ -1,4 +1,5 @@
|
|||
# coding: utf-8
|
||||
# frozen_string_literal: true
|
||||
lib = File.expand_path('../lib', __FILE__)
|
||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||
require 'kaminari/core/version'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module Generators
|
||||
class ConfigGenerator < Rails::Generators::Base
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
Kaminari.configure do |config|
|
||||
# config.default_per_page = 25
|
||||
# config.max_per_page = nil
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module Generators
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'active_support/configurable'
|
||||
|
||||
module Kaminari
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
end
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module Core
|
||||
VERSION = "0.1.0"
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari #:nodoc:
|
||||
class Engine < ::Rails::Engine #:nodoc:
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
class ZeroPerPageOperation < ZeroDivisionError; end
|
||||
end
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'active_support/inflector'
|
||||
require 'kaminari/helpers/tags'
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module Helpers
|
||||
PARAM_KEY_BLACKLIST = :authenticity_token, :commit, :utf8, :_method, :script_name
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'active_support/core_ext/module'
|
||||
module Kaminari
|
||||
# Kind of Array that can paginate
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module ConfigurationMethods
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module PageScopeMethods
|
||||
# Specify the <tt>per_page</tt> value for the preceding <tt>page</tt> scope
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
class Railtie < ::Rails::Railtie #:nodoc:
|
||||
# Doesn't actually do anything. Just keeping this hook point, mainly for compatibility
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
describe Kaminari::Configuration do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
# database
|
||||
ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
|
||||
ActiveRecord::Base.establish_connection :test
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
# models
|
||||
class User < ActiveRecord::Base
|
||||
has_many :authorships
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
# require 'rails/all'
|
||||
require 'action_controller/railtie'
|
||||
require 'action_view/railtie'
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
module Kaminari
|
||||
module FakeGem
|
||||
extend ActiveSupport::Concern
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
if defined?(::Rails::Railtie)
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
describe 'Kaminari::ActionViewExtension', :if => defined?(::Rails::Railtie) && defined?(::ActionView) do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
include Kaminari::Helpers
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
include Kaminari::Helpers
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
if defined? ActiveRecord
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
if defined? ActiveRecord
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
if defined? ActiveRecord
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
describe Kaminari::PaginatableArray do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
describe "configuration methods" do
|
||||
|
|
|
@ -1,4 +1,5 @@
|
|||
# encoding: UTF-8
|
||||
# frozen_string_literal: true
|
||||
require 'spec_helper'
|
||||
|
||||
feature 'Users' do
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
|
||||
|
||||
RSpec.configure do |config|
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
# frozen_string_literal: true
|
||||
RSpec::Matchers.define :contain_tag do |klass|
|
||||
match do |collection|
|
||||
if @num.blank?
|
||||
|
|
Loading…
Reference in a new issue