Skip to content

Commit 0bb0f23

Browse files
committed
pkg: remove Gemfile and tests from the packaged gem
1 parent 59f999e commit 0bb0f23

File tree

3 files changed

+15
-25
lines changed

3 files changed

+15
-25
lines changed

bin/test-gem-file-contents

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,14 +94,25 @@ describe File.basename(gemfile) do
9494
end
9595

9696
describe "all platforms" do
97-
["lib", "test"].each do |dir|
97+
["lib"].each do |dir|
9898
it "contains every ruby file in #{dir}/" do
9999
expected = `git ls-files #{dir}`.split("\n").grep(/\.rb$/).sort
100100
skip "looks like this isn't a git repository" if expected.empty?
101101
actual = gemfile_contents.select { |f| f.start_with?("#{dir}/") }.grep(/\.rb$/).sort
102102
assert_equal(expected, actual)
103103
end
104104
end
105+
106+
["test"].each do |dir|
107+
it "does not contain files from #{dir}/" do
108+
actual = gemfile_contents.select { |f| f.start_with?("#{dir}/") }.grep(/\.rb$/)
109+
assert_empty(actual)
110+
end
111+
end
112+
113+
it "does not contain the Gemfile" do
114+
refute_includes(gemfile_contents, "Gemfile")
115+
end
105116
end
106117

107118
if gemspec.platform == Gem::Platform::RUBY

rakelib/check-manifest.rake

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ task :check_manifest do
1717
pkg
1818
ports
1919
rakelib
20+
test
2021
tmp
2122
vendor
2223
[0-9]*
@@ -26,7 +27,7 @@ task :check_manifest do
2627
.gitignore
2728
.rdoc_options
2829
.rubocop.yml
29-
Gemfile?*
30+
Gemfile*
3031
Rakefile
3132
[a-z]*.{log,out}
3233
[0-9]*

sqlite3.gemspec

Lines changed: 1 addition & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ Gem::Specification.new do |s|
4242
"CONTRIBUTING.md",
4343
"ChangeLog.cvs",
4444
"FAQ.md",
45-
"Gemfile",
4645
"INSTALLATION.md",
4746
"LICENSE",
4847
"LICENSE-DEPENDENCIES",
@@ -69,28 +68,7 @@ Gem::Specification.new do |s|
6968
"lib/sqlite3/resultset.rb",
7069
"lib/sqlite3/statement.rb",
7170
"lib/sqlite3/value.rb",
72-
"lib/sqlite3/version.rb",
73-
"test/helper.rb",
74-
"test/test_backup.rb",
75-
"test/test_collation.rb",
76-
"test/test_database.rb",
77-
"test/test_database_flags.rb",
78-
"test/test_database_readonly.rb",
79-
"test/test_database_readwrite.rb",
80-
"test/test_deprecated.rb",
81-
"test/test_encoding.rb",
82-
"test/test_integration.rb",
83-
"test/test_integration_aggregate.rb",
84-
"test/test_integration_open_close.rb",
85-
"test/test_integration_pending.rb",
86-
"test/test_integration_resultset.rb",
87-
"test/test_integration_statement.rb",
88-
"test/test_pragmas.rb",
89-
"test/test_resource_cleanup.rb",
90-
"test/test_result_set.rb",
91-
"test/test_sqlite3.rb",
92-
"test/test_statement.rb",
93-
"test/test_statement_execute.rb"
71+
"lib/sqlite3/version.rb"
9472
]
9573

9674
s.extra_rdoc_files = [

0 commit comments

Comments
 (0)