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?