1
0
Fork 0
mirror of https://github.com/kaminari/kaminari.git synced 2022-11-09 13:44:37 -05:00
This commit is contained in:
Akira Matsuda 2016-10-12 05:44:41 +09:00
parent f2a76b8199
commit 106cf8071c
32 changed files with 32 additions and 0 deletions

View file

@ -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'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module Generators
class ConfigGenerator < Rails::Generators::Base

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
Kaminari.configure do |config|
# config.default_per_page = 25
# config.max_per_page = nil

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module Generators

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'active_support/configurable'
module Kaminari

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module Core
VERSION = "0.1.0"

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari #:nodoc:
class Engine < ::Rails::Engine #:nodoc:
end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
class ZeroPerPageOperation < ZeroDivisionError; end
end

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'active_support/inflector'
require 'kaminari/helpers/tags'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module Helpers
PARAM_KEY_BLACKLIST = :authenticity_token, :commit, :utf8, :_method, :script_name

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'active_support/core_ext/module'
module Kaminari
# Kind of Array that can paginate

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module ConfigurationMethods
extend ActiveSupport::Concern

View file

@ -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

View file

@ -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

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
describe Kaminari::Configuration do

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
# database
ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}}
ActiveRecord::Base.establish_connection :test

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
# models
class User < ActiveRecord::Base
has_many :authorships

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
# require 'rails/all'
require 'action_controller/railtie'
require 'action_view/railtie'

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
module Kaminari
module FakeGem
extend ActiveSupport::Concern

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
if defined?(::Rails::Railtie)

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
describe 'Kaminari::ActionViewExtension', :if => defined?(::Rails::Railtie) && defined?(::ActionView) do

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
include Kaminari::Helpers

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
include Kaminari::Helpers

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
if defined? ActiveRecord

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
if defined? ActiveRecord

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
if defined? ActiveRecord

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
describe Kaminari::PaginatableArray do

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
require 'spec_helper'
describe "configuration methods" do

View file

@ -1,4 +1,5 @@
# encoding: UTF-8
# frozen_string_literal: true
require 'spec_helper'
feature 'Users' do

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord
RSpec.configure do |config|

View file

@ -1,3 +1,4 @@
# frozen_string_literal: true
RSpec::Matchers.define :contain_tag do |klass|
match do |collection|
if @num.blank?