mirror of
https://github.com/kaminari/kaminari.git
synced 2022-11-09 13:44:37 -05:00
Format
This commit is contained in:
parent
1a59c17cd9
commit
acbcbc8beb
46 changed files with 46 additions and 0 deletions
1
Gemfile
1
Gemfile
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
source 'https://rubygems.org'
|
source 'https://rubygems.org'
|
||||||
|
|
||||||
# Specify your gem's dependencies in kaminari.gemspec
|
# Specify your gem's dependencies in kaminari.gemspec
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib = File.expand_path('../lib', __FILE__)
|
lib = File.expand_path('../lib', __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require 'kaminari/actionview/version'
|
require 'kaminari/actionview/version'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "kaminari/actionview/version"
|
require "kaminari/actionview/version"
|
||||||
require 'active_support/lazy_load_hooks'
|
require 'active_support/lazy_load_hooks'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'action_view'
|
require 'action_view'
|
||||||
require 'action_view/log_subscriber'
|
require 'action_view/log_subscriber'
|
||||||
require 'action_view/context'
|
require 'action_view/context'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Actionview
|
module Actionview
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.1'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib = File.expand_path('../lib', __FILE__)
|
lib = File.expand_path('../lib', __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require 'kaminari/activerecord/version'
|
require 'kaminari/activerecord/version'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require "kaminari/activerecord/version"
|
require "kaminari/activerecord/version"
|
||||||
require 'active_support/lazy_load_hooks'
|
require 'active_support/lazy_load_hooks'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'kaminari/activerecord/active_record_model_extension'
|
require 'kaminari/activerecord/active_record_model_extension'
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'kaminari/activerecord/active_record_relation_methods'
|
require 'kaminari/activerecord/active_record_relation_methods'
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
# Active Record specific page scope methods implementations
|
# Active Record specific page scope methods implementations
|
||||||
module ActiveRecordRelationMethods
|
module ActiveRecordRelationMethods
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Activerecord
|
module Activerecord
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.1'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
lib = File.expand_path('../lib', __FILE__)
|
lib = File.expand_path('../lib', __FILE__)
|
||||||
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
||||||
require 'kaminari/core/version'
|
require 'kaminari/core/version'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Generators
|
module Generators
|
||||||
# rails g kaminari:config
|
# rails g kaminari:config
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
Kaminari.configure do |config|
|
Kaminari.configure do |config|
|
||||||
# config.default_per_page = 25
|
# config.default_per_page = 25
|
||||||
# config.max_per_page = nil
|
# config.max_per_page = nil
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Generators
|
module Generators
|
||||||
# rails g kaminari:views THEME
|
# rails g kaminari:views THEME
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Core
|
module Core
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.1'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari #:nodoc:
|
module Kaminari #:nodoc:
|
||||||
class Engine < ::Rails::Engine #:nodoc:
|
class Engine < ::Rails::Engine #:nodoc:
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
class ZeroPerPageOperation < ZeroDivisionError; end
|
class ZeroPerPageOperation < ZeroDivisionError; end
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'active_support/inflector'
|
require 'active_support/inflector'
|
||||||
require 'kaminari/helpers/tags'
|
require 'kaminari/helpers/tags'
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module Helpers
|
module Helpers
|
||||||
PARAM_KEY_BLACKLIST = [:authenticity_token, :commit, :utf8, :_method, :script_name].freeze
|
PARAM_KEY_BLACKLIST = [:authenticity_token, :commit, :utf8, :_method, :script_name].freeze
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'active_support/core_ext/module'
|
require 'active_support/core_ext/module'
|
||||||
module Kaminari
|
module Kaminari
|
||||||
# Kind of Array that can paginate
|
# Kind of Array that can paginate
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module ConfigurationMethods #:nodoc:
|
module ConfigurationMethods #:nodoc:
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module PageScopeMethods
|
module PageScopeMethods
|
||||||
# Specify the <tt>per_page</tt> value for the preceding <tt>page</tt> scope
|
# Specify the <tt>per_page</tt> value for the preceding <tt>page</tt> scope
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
class Railtie < ::Rails::Railtie #:nodoc:
|
class Railtie < ::Rails::Railtie #:nodoc:
|
||||||
# Doesn't actually do anything. Just keeping this hook point, mainly for compatibility
|
# Doesn't actually do anything. Just keeping this hook point, mainly for compatibility
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class ConfigurationTest < ::Test::Unit::TestCase
|
class ConfigurationTest < ::Test::Unit::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# models
|
# models
|
||||||
class User < ActiveRecord::Base
|
class User < ActiveRecord::Base
|
||||||
has_many :authorships
|
has_many :authorships
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
# require 'rails/all'
|
# require 'rails/all'
|
||||||
require 'action_controller/railtie'
|
require 'action_controller/railtie'
|
||||||
require 'action_view/railtie'
|
require 'action_view/railtie'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
module FakeGem
|
module FakeGem
|
||||||
extend ActiveSupport::Concern
|
extend ActiveSupport::Concern
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined?(::Rails::Railtie) && ENV['GENERATOR_SPEC']
|
if defined?(::Rails::Railtie) && ENV['GENERATOR_SPEC']
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined?(::Rails::Railtie) && defined?(::ActionView)
|
if defined?(::Rails::Railtie) && defined?(::ActionView)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class PaginatorHelperTest < ActiveSupport::TestCase
|
class PaginatorHelperTest < ActiveSupport::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined? ::Kaminari::ActionView
|
if defined? ::Kaminari::ActionView
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined?(::Rails::Railtie) && defined?(ActionView)
|
if defined?(::Rails::Railtie) && defined?(ActionView)
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined? ActiveRecord
|
if defined? ActiveRecord
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined? ActiveRecord
|
if defined? ActiveRecord
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined? ActiveRecord
|
if defined? ActiveRecord
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
if defined? ActiveRecord
|
if defined? ActiveRecord
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class PaginatableArrayTest < ActiveSupport::TestCase
|
class PaginatableArrayTest < ActiveSupport::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class ConfigurationMethodsTest < ActiveSupport::TestCase
|
class ConfigurationMethodsTest < ActiveSupport::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class NavigationTest < Test::Unit::TestCase
|
class NavigationTest < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'test_helper'
|
require 'test_helper'
|
||||||
|
|
||||||
class RenderingWithFormatOptionTest < Test::Unit::TestCase
|
class RenderingWithFormatOptionTest < Test::Unit::TestCase
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$:.push File.expand_path("../lib", __FILE__)
|
$:.push File.expand_path("../lib", __FILE__)
|
||||||
require "kaminari/version"
|
require "kaminari/version"
|
||||||
|
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
require 'kaminari/core'
|
require 'kaminari/core'
|
||||||
require 'kaminari/actionview'
|
require 'kaminari/actionview'
|
||||||
require 'kaminari/activerecord'
|
require 'kaminari/activerecord'
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
module Kaminari
|
module Kaminari
|
||||||
VERSION = '1.1.1'
|
VERSION = '1.1.1'
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,4 +1,5 @@
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
$LOAD_PATH.unshift(File.join(File.dirname(__FILE__), '..', 'lib'))
|
||||||
$LOAD_PATH.unshift(File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'test'))
|
$LOAD_PATH.unshift(File.join(Gem.loaded_specs['kaminari-core'].gem_dir, 'test'))
|
||||||
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
$LOAD_PATH.unshift(File.dirname(__FILE__))
|
||||||
|
|
Loading…
Reference in a new issue