From 51b081cef9d4d91cb75f80dd33222805612c7b95 Mon Sep 17 00:00:00 2001 From: Eric Proulx Date: Sat, 21 Oct 2023 16:20:41 +0200 Subject: [PATCH] Reduce gem size by removing test_files (spec) (#2360) * Remove test_files Refactor files * Add CHANGELOG --- .rubocop_todo.yml | 8 -------- CHANGELOG.md | 1 + grape.gemspec | 5 +---- 3 files changed, 2 insertions(+), 12 deletions(-) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index 51d3219195..b2ba49521c 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -6,14 +6,6 @@ # Note that changes in the inspected code, or installation of new # versions of RuboCop, may require this file to be generated again. -# Offense count: 1 -# This cop supports safe autocorrection (--autocorrect). -# Configuration parameters: Severity, Include. -# Include: **/*.gemspec -Gemspec/DeprecatedAttributeAssignment: - Exclude: - - 'grape.gemspec' - # Offense count: 1 # This cop supports safe autocorrection (--autocorrect). # Configuration parameters: Severity, Include. diff --git a/CHANGELOG.md b/CHANGELOG.md index f8dc826bc6..4e1200ea8a 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,7 @@ #### Features * [#2353](https://github.com/ruby-grape/grape/pull/2353): Added Rails 7.1 support - [@ericproulx](https://github.com/ericproulx). +* [#2360](https://github.com/ruby-grape/grape/pull/2360): Reduce gem size by removing specs - [@ericproulx](https://github.com/ericproulx). * Your contribution here. #### Fixes diff --git a/grape.gemspec b/grape.gemspec index a5a56bc0a3..9e53ddea75 100644 --- a/grape.gemspec +++ b/grape.gemspec @@ -27,10 +27,7 @@ Gem::Specification.new do |s| s.add_runtime_dependency 'rack', '>= 1.3.0' s.add_runtime_dependency 'rack-accept' - s.files = %w[CHANGELOG.md CONTRIBUTING.md README.md grape.png UPGRADING.md LICENSE] - s.files += %w[grape.gemspec] - s.files += Dir['lib/**/*'] - s.test_files = Dir['spec/**/*'] + s.files = Dir['lib/**/*', 'CHANGELOG.md', 'CONTRIBUTING.md', 'README.md', 'grape.png', 'UPGRADING.md', 'LICENSE', 'grape.gemspec'] s.require_paths = ['lib'] s.required_ruby_version = '>= 2.6.0' end