From b6115e7e8f665f4ace512380b21151ec8544acdc Mon Sep 17 00:00:00 2001 From: Domizio Demichelis Date: Fri, 16 Apr 2021 14:20:27 +0700 Subject: [PATCH] Added explicit pagy.manifest to comply with rubocop-packaging (see also #297) --- .gitignore | 1 + Gemfile | 4 +-- Gemfile.lock | 2 ++ Rakefile | 12 ++++++++ pagy.gemspec | 18 ++++++------ pagy.manifest | 76 +++++++++++++++++++++++++++++++++++++++++++++++++++ 6 files changed, 102 insertions(+), 11 deletions(-) create mode 100644 pagy.manifest diff --git a/.gitignore b/.gitignore index a3a3dd297..fe3e43ceb 100644 --- a/.gitignore +++ b/.gitignore @@ -2,6 +2,7 @@ /.yardoc /_yardoc/ /coverage/ +/pkg/ /tmp/ /docs/.jekyll-metadata /.idea/ diff --git a/Gemfile b/Gemfile index 57e049993..7a824d9ae 100644 --- a/Gemfile +++ b/Gemfile @@ -8,8 +8,7 @@ gem 'i18n' gem 'oj', require: false # false is for testing with or without it gem 'rack' gem 'rake' - -gem 'puma' +gem 'rake-manifest' group :test do gem 'codecov', require: false @@ -24,6 +23,7 @@ group :test do end group :apps do + gem 'puma' gem 'sinatra' gem 'sinatra-contrib' # gem 'slim' diff --git a/Gemfile.lock b/Gemfile.lock index 293fd1fdb..2c28d2ac0 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -40,6 +40,7 @@ GEM rack rainbow (3.0.0) rake (13.0.3) + rake-manifest (0.2.0) rbzip2 (0.2.0) regexp_parser (2.1.1) rexml (3.2.4) @@ -103,6 +104,7 @@ DEPENDENCIES puma rack rake + rake-manifest rubocop (~> 1.11) rubocop-minitest rubocop-packaging diff --git a/Rakefile b/Rakefile index eba0df314..91e8f9792 100644 --- a/Rakefile +++ b/Rakefile @@ -7,6 +7,18 @@ require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) +unless ENV['CI'] + require 'rake/manifest' + Rake::Manifest::Task.new do |t| + t.patterns = %w[lib/**/* LICENSE.txt] + t.patterns = FileList.new.include('lib/**/*', 'LICENSE.txt').exclude('**/*.md') + t.manifest_file = 'pagy.manifest' + end + + desc 'Build the gem, checking the manifest first' + task build: 'manifest:check' +end + # Separate tasks for each test that must run a process # in isolation in order to avoid affecting also other tests. test_tasks = {} diff --git a/pagy.gemspec b/pagy.gemspec index c746fb6c8..dd2f695a7 100644 --- a/pagy.gemspec +++ b/pagy.gemspec @@ -5,14 +5,14 @@ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib) require 'pagy' Gem::Specification.new do |s| - s.name = 'pagy' - s.version = Pagy::VERSION - s.authors = ['Domizio Demichelis'] - s.email = ['dd.nexus@gmail.com'] - s.summary = 'The Ultimate Pagination Ruby Gem' - s.description = 'Agnostic pagination in plain ruby: it works with any framework, ORM and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays, JSON data... Easy, powerful, fast and light.' - s.homepage = 'https://github.com/ddnexus/pagy' - s.license = 'MIT' - s.files = `git ls-files -z`.split("\x0").select{|f| f.start_with?('lib', 'pagy.gemspec', 'LICENSE') } # rubocop:disable Packaging/GemspecGit # TODO (#297) + s.name = 'pagy' + s.version = Pagy::VERSION + s.authors = ['Domizio Demichelis'] + s.email = ['dd.nexus@gmail.com'] + s.summary = 'The Ultimate Pagination Ruby Gem' + s.description = 'Agnostic pagination in plain ruby: it works with any framework, ORM and DB type, with all kinds of collections, even pre-paginated, scopes, Arrays, JSON data... Easy, powerful, fast and light.' + s.homepage = 'https://github.com/ddnexus/pagy' + s.license = 'MIT' + s.files = File.read('pagy.manifest').split s.required_ruby_version = '>= 3.0' end diff --git a/pagy.manifest b/pagy.manifest new file mode 100644 index 000000000..3e8203a02 --- /dev/null +++ b/pagy.manifest @@ -0,0 +1,76 @@ +lib/config/pagy.rb +lib/javascripts/pagy.js +lib/locales/ar.yml +lib/locales/bg.yml +lib/locales/bs.yml +lib/locales/ca.yml +lib/locales/cs.yml +lib/locales/da.yml +lib/locales/de.yml +lib/locales/en.yml +lib/locales/es.yml +lib/locales/fr.yml +lib/locales/hr.yml +lib/locales/id.yml +lib/locales/it.yml +lib/locales/ja.yml +lib/locales/km.yml +lib/locales/ko.yml +lib/locales/nb.yml +lib/locales/nl.yml +lib/locales/pl.yml +lib/locales/pt-BR.yml +lib/locales/pt.yml +lib/locales/ru.yml +lib/locales/sr.yml +lib/locales/sv-SE.yml +lib/locales/sv.yml +lib/locales/sw.yml +lib/locales/tr.yml +lib/locales/utils/i18n.rb +lib/locales/utils/loader.rb +lib/locales/utils/p11n.rb +lib/locales/zh-CN.yml +lib/locales/zh-HK.yml +lib/locales/zh-TW.yml +lib/pagy.rb +lib/pagy/backend.rb +lib/pagy/countless.rb +lib/pagy/exceptions.rb +lib/pagy/extras/arel.rb +lib/pagy/extras/array.rb +lib/pagy/extras/bootstrap.rb +lib/pagy/extras/bulma.rb +lib/pagy/extras/countless.rb +lib/pagy/extras/elasticsearch_rails.rb +lib/pagy/extras/foundation.rb +lib/pagy/extras/headers.rb +lib/pagy/extras/i18n.rb +lib/pagy/extras/items.rb +lib/pagy/extras/materialize.rb +lib/pagy/extras/metadata.rb +lib/pagy/extras/navs.rb +lib/pagy/extras/overflow.rb +lib/pagy/extras/searchkick.rb +lib/pagy/extras/semantic.rb +lib/pagy/extras/shared.rb +lib/pagy/extras/support.rb +lib/pagy/extras/trim.rb +lib/pagy/extras/uikit.rb +lib/pagy/frontend.rb +lib/templates/bootstrap_nav.html.erb +lib/templates/bootstrap_nav.html.haml +lib/templates/bootstrap_nav.html.slim +lib/templates/bulma_nav.html.erb +lib/templates/bulma_nav.html.haml +lib/templates/bulma_nav.html.slim +lib/templates/foundation_nav.html.erb +lib/templates/foundation_nav.html.haml +lib/templates/foundation_nav.html.slim +lib/templates/nav.html.erb +lib/templates/nav.html.haml +lib/templates/nav.html.slim +lib/templates/uikit_nav.html.erb +lib/templates/uikit_nav.html.haml +lib/templates/uikit_nav.html.slim +LICENSE.txt