From 106cf8071cdf119c0c63bd1d9ed2f2cf16d1da7b Mon Sep 17 00:00:00 2001 From: Akira Matsuda Date: Wed, 12 Oct 2016 05:44:41 +0900 Subject: [PATCH] :snowflake: --- kaminari-core/kaminari-core.gemspec | 1 + kaminari-core/lib/generators/kaminari/config_generator.rb | 1 + .../lib/generators/kaminari/templates/kaminari_config.rb | 1 + kaminari-core/lib/generators/kaminari/views_generator.rb | 1 + kaminari-core/lib/kaminari/config.rb | 1 + kaminari-core/lib/kaminari/core.rb | 1 + kaminari-core/lib/kaminari/core/version.rb | 1 + kaminari-core/lib/kaminari/engine.rb | 1 + kaminari-core/lib/kaminari/exceptions.rb | 1 + kaminari-core/lib/kaminari/helpers/paginator.rb | 1 + kaminari-core/lib/kaminari/helpers/tags.rb | 1 + kaminari-core/lib/kaminari/models/array_extension.rb | 1 + kaminari-core/lib/kaminari/models/configuration_methods.rb | 1 + kaminari-core/lib/kaminari/models/page_scope_methods.rb | 1 + kaminari-core/lib/kaminari/railtie.rb | 1 + kaminari-core/spec/config/config_spec.rb | 1 + kaminari-core/spec/fake_app/active_record/config.rb | 1 + kaminari-core/spec/fake_app/active_record/models.rb | 1 + kaminari-core/spec/fake_app/rails_app.rb | 1 + kaminari-core/spec/fake_gem.rb | 1 + kaminari-core/spec/generators/views_generator_spec.rb | 1 + kaminari-core/spec/helpers/action_view_extension_spec.rb | 1 + kaminari-core/spec/helpers/helpers_spec.rb | 1 + kaminari-core/spec/helpers/tags_spec.rb | 1 + .../models/active_record/active_record_relation_methods_spec.rb | 1 + kaminari-core/spec/models/active_record/inherited_spec.rb | 1 + kaminari-core/spec/models/active_record/scopes_spec.rb | 1 + kaminari-core/spec/models/array_spec.rb | 1 + kaminari-core/spec/models/configuration_methods_spec.rb | 1 + kaminari-core/spec/requests/users_spec.rb | 1 + kaminari-core/spec/support/database_cleaner.rb | 1 + kaminari-core/spec/support/matchers.rb | 1 + 32 files changed, 32 insertions(+) diff --git a/kaminari-core/kaminari-core.gemspec b/kaminari-core/kaminari-core.gemspec index 9c95bb3..3949433 100644 --- a/kaminari-core/kaminari-core.gemspec +++ b/kaminari-core/kaminari-core.gemspec @@ -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' diff --git a/kaminari-core/lib/generators/kaminari/config_generator.rb b/kaminari-core/lib/generators/kaminari/config_generator.rb index e6b0041..5148412 100644 --- a/kaminari-core/lib/generators/kaminari/config_generator.rb +++ b/kaminari-core/lib/generators/kaminari/config_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module Generators class ConfigGenerator < Rails::Generators::Base diff --git a/kaminari-core/lib/generators/kaminari/templates/kaminari_config.rb b/kaminari-core/lib/generators/kaminari/templates/kaminari_config.rb index 95eebf2..c808667 100644 --- a/kaminari-core/lib/generators/kaminari/templates/kaminari_config.rb +++ b/kaminari-core/lib/generators/kaminari/templates/kaminari_config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true Kaminari.configure do |config| # config.default_per_page = 25 # config.max_per_page = nil diff --git a/kaminari-core/lib/generators/kaminari/views_generator.rb b/kaminari-core/lib/generators/kaminari/views_generator.rb index 0e7b603..9f7ae96 100644 --- a/kaminari-core/lib/generators/kaminari/views_generator.rb +++ b/kaminari-core/lib/generators/kaminari/views_generator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module Generators diff --git a/kaminari-core/lib/kaminari/config.rb b/kaminari-core/lib/kaminari/config.rb index 6677427..3a8b613 100644 --- a/kaminari-core/lib/kaminari/config.rb +++ b/kaminari-core/lib/kaminari/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_support/configurable' module Kaminari diff --git a/kaminari-core/lib/kaminari/core.rb b/kaminari-core/lib/kaminari/core.rb index cbb39ec..1b7cc97 100644 --- a/kaminari-core/lib/kaminari/core.rb +++ b/kaminari-core/lib/kaminari/core.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari end diff --git a/kaminari-core/lib/kaminari/core/version.rb b/kaminari-core/lib/kaminari/core/version.rb index c3bf600..0d14527 100644 --- a/kaminari-core/lib/kaminari/core/version.rb +++ b/kaminari-core/lib/kaminari/core/version.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module Core VERSION = "0.1.0" diff --git a/kaminari-core/lib/kaminari/engine.rb b/kaminari-core/lib/kaminari/engine.rb index d4fe847..badc40c 100644 --- a/kaminari-core/lib/kaminari/engine.rb +++ b/kaminari-core/lib/kaminari/engine.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari #:nodoc: class Engine < ::Rails::Engine #:nodoc: end diff --git a/kaminari-core/lib/kaminari/exceptions.rb b/kaminari-core/lib/kaminari/exceptions.rb index 4987db5..02db120 100644 --- a/kaminari-core/lib/kaminari/exceptions.rb +++ b/kaminari-core/lib/kaminari/exceptions.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari class ZeroPerPageOperation < ZeroDivisionError; end end diff --git a/kaminari-core/lib/kaminari/helpers/paginator.rb b/kaminari-core/lib/kaminari/helpers/paginator.rb index d22b85e..b0e6e50 100644 --- a/kaminari-core/lib/kaminari/helpers/paginator.rb +++ b/kaminari-core/lib/kaminari/helpers/paginator.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_support/inflector' require 'kaminari/helpers/tags' diff --git a/kaminari-core/lib/kaminari/helpers/tags.rb b/kaminari-core/lib/kaminari/helpers/tags.rb index f8d7520..984fd96 100644 --- a/kaminari-core/lib/kaminari/helpers/tags.rb +++ b/kaminari-core/lib/kaminari/helpers/tags.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module Helpers PARAM_KEY_BLACKLIST = :authenticity_token, :commit, :utf8, :_method, :script_name diff --git a/kaminari-core/lib/kaminari/models/array_extension.rb b/kaminari-core/lib/kaminari/models/array_extension.rb index 8b8fbbc..707fba6 100644 --- a/kaminari-core/lib/kaminari/models/array_extension.rb +++ b/kaminari-core/lib/kaminari/models/array_extension.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'active_support/core_ext/module' module Kaminari # Kind of Array that can paginate diff --git a/kaminari-core/lib/kaminari/models/configuration_methods.rb b/kaminari-core/lib/kaminari/models/configuration_methods.rb index 747b4bf..0ca4c2b 100644 --- a/kaminari-core/lib/kaminari/models/configuration_methods.rb +++ b/kaminari-core/lib/kaminari/models/configuration_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module ConfigurationMethods extend ActiveSupport::Concern diff --git a/kaminari-core/lib/kaminari/models/page_scope_methods.rb b/kaminari-core/lib/kaminari/models/page_scope_methods.rb index 79dcba2..a0fd899 100644 --- a/kaminari-core/lib/kaminari/models/page_scope_methods.rb +++ b/kaminari-core/lib/kaminari/models/page_scope_methods.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module PageScopeMethods # Specify the per_page value for the preceding page scope diff --git a/kaminari-core/lib/kaminari/railtie.rb b/kaminari-core/lib/kaminari/railtie.rb index 447c778..793d854 100644 --- a/kaminari-core/lib/kaminari/railtie.rb +++ b/kaminari-core/lib/kaminari/railtie.rb @@ -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 diff --git a/kaminari-core/spec/config/config_spec.rb b/kaminari-core/spec/config/config_spec.rb index 1fa5e62..9a417ab 100644 --- a/kaminari-core/spec/config/config_spec.rb +++ b/kaminari-core/spec/config/config_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Kaminari::Configuration do diff --git a/kaminari-core/spec/fake_app/active_record/config.rb b/kaminari-core/spec/fake_app/active_record/config.rb index 7176b33..7921dda 100644 --- a/kaminari-core/spec/fake_app/active_record/config.rb +++ b/kaminari-core/spec/fake_app/active_record/config.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # database ActiveRecord::Base.configurations = {'test' => {:adapter => 'sqlite3', :database => ':memory:'}} ActiveRecord::Base.establish_connection :test diff --git a/kaminari-core/spec/fake_app/active_record/models.rb b/kaminari-core/spec/fake_app/active_record/models.rb index 988416f..9f342f2 100644 --- a/kaminari-core/spec/fake_app/active_record/models.rb +++ b/kaminari-core/spec/fake_app/active_record/models.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # models class User < ActiveRecord::Base has_many :authorships diff --git a/kaminari-core/spec/fake_app/rails_app.rb b/kaminari-core/spec/fake_app/rails_app.rb index b54dde4..9844bb5 100644 --- a/kaminari-core/spec/fake_app/rails_app.rb +++ b/kaminari-core/spec/fake_app/rails_app.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true # require 'rails/all' require 'action_controller/railtie' require 'action_view/railtie' diff --git a/kaminari-core/spec/fake_gem.rb b/kaminari-core/spec/fake_gem.rb index 78e9991..03e3010 100644 --- a/kaminari-core/spec/fake_gem.rb +++ b/kaminari-core/spec/fake_gem.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true module Kaminari module FakeGem extend ActiveSupport::Concern diff --git a/kaminari-core/spec/generators/views_generator_spec.rb b/kaminari-core/spec/generators/views_generator_spec.rb index da1ca3c..a40b09d 100644 --- a/kaminari-core/spec/generators/views_generator_spec.rb +++ b/kaminari-core/spec/generators/views_generator_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' if defined?(::Rails::Railtie) diff --git a/kaminari-core/spec/helpers/action_view_extension_spec.rb b/kaminari-core/spec/helpers/action_view_extension_spec.rb index 41a53c1..d1b714c 100644 --- a/kaminari-core/spec/helpers/action_view_extension_spec.rb +++ b/kaminari-core/spec/helpers/action_view_extension_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe 'Kaminari::ActionViewExtension', :if => defined?(::Rails::Railtie) && defined?(::ActionView) do diff --git a/kaminari-core/spec/helpers/helpers_spec.rb b/kaminari-core/spec/helpers/helpers_spec.rb index 15e6bc9..5fe5b40 100644 --- a/kaminari-core/spec/helpers/helpers_spec.rb +++ b/kaminari-core/spec/helpers/helpers_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' include Kaminari::Helpers diff --git a/kaminari-core/spec/helpers/tags_spec.rb b/kaminari-core/spec/helpers/tags_spec.rb index 6092788..72e0838 100644 --- a/kaminari-core/spec/helpers/tags_spec.rb +++ b/kaminari-core/spec/helpers/tags_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' include Kaminari::Helpers diff --git a/kaminari-core/spec/models/active_record/active_record_relation_methods_spec.rb b/kaminari-core/spec/models/active_record/active_record_relation_methods_spec.rb index 93e425b..2147251 100644 --- a/kaminari-core/spec/models/active_record/active_record_relation_methods_spec.rb +++ b/kaminari-core/spec/models/active_record/active_record_relation_methods_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' if defined? ActiveRecord diff --git a/kaminari-core/spec/models/active_record/inherited_spec.rb b/kaminari-core/spec/models/active_record/inherited_spec.rb index c1c66f9..a221a9f 100644 --- a/kaminari-core/spec/models/active_record/inherited_spec.rb +++ b/kaminari-core/spec/models/active_record/inherited_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' if defined? ActiveRecord diff --git a/kaminari-core/spec/models/active_record/scopes_spec.rb b/kaminari-core/spec/models/active_record/scopes_spec.rb index 81e9298..240adfa 100644 --- a/kaminari-core/spec/models/active_record/scopes_spec.rb +++ b/kaminari-core/spec/models/active_record/scopes_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' if defined? ActiveRecord diff --git a/kaminari-core/spec/models/array_spec.rb b/kaminari-core/spec/models/array_spec.rb index bf9062e..c266ab3 100644 --- a/kaminari-core/spec/models/array_spec.rb +++ b/kaminari-core/spec/models/array_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe Kaminari::PaginatableArray do diff --git a/kaminari-core/spec/models/configuration_methods_spec.rb b/kaminari-core/spec/models/configuration_methods_spec.rb index 78c69ac..d2c7574 100644 --- a/kaminari-core/spec/models/configuration_methods_spec.rb +++ b/kaminari-core/spec/models/configuration_methods_spec.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true require 'spec_helper' describe "configuration methods" do diff --git a/kaminari-core/spec/requests/users_spec.rb b/kaminari-core/spec/requests/users_spec.rb index d80f71f..c1f874e 100644 --- a/kaminari-core/spec/requests/users_spec.rb +++ b/kaminari-core/spec/requests/users_spec.rb @@ -1,4 +1,5 @@ # encoding: UTF-8 +# frozen_string_literal: true require 'spec_helper' feature 'Users' do diff --git a/kaminari-core/spec/support/database_cleaner.rb b/kaminari-core/spec/support/database_cleaner.rb index e87cd72..0c8e65b 100644 --- a/kaminari-core/spec/support/database_cleaner.rb +++ b/kaminari-core/spec/support/database_cleaner.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true DatabaseCleaner[:active_record].strategy = :transaction if defined? ActiveRecord RSpec.configure do |config| diff --git a/kaminari-core/spec/support/matchers.rb b/kaminari-core/spec/support/matchers.rb index a10374f..e30f191 100644 --- a/kaminari-core/spec/support/matchers.rb +++ b/kaminari-core/spec/support/matchers.rb @@ -1,3 +1,4 @@ +# frozen_string_literal: true RSpec::Matchers.define :contain_tag do |klass| match do |collection| if @num.blank?