-
Notifications
You must be signed in to change notification settings - Fork 139
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1110 from flavorjones/bundle-as-gem
Package up YARP as a gem
- Loading branch information
Showing
12 changed files
with
409 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,8 @@ source "https://rubygems.org" | |
|
||
ruby ">= 3.1.0" | ||
|
||
gemspec | ||
|
||
gem "rake" | ||
gem "rake-compiler" | ||
gem "test-unit" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
desc "Perform a sanity check on the gemspec file list" | ||
task :check_manifest => [:templates, "configure"] do | ||
raw_gemspec = Bundler.load_gemspec("yarp.gemspec") | ||
|
||
ignore_directories = %w[ | ||
.bundle | ||
.git | ||
.github | ||
autom4te.cache | ||
bin | ||
build | ||
fuzz | ||
pkg | ||
tasks | ||
templates | ||
test | ||
tmp | ||
vendor | ||
] | ||
|
||
ignore_files = %w[ | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
Gemfile | ||
Gemfile.lock | ||
Makefile | ||
Rakefile | ||
config.log | ||
config.status | ||
configure.ac | ||
include/yarp/config.h | ||
java/org/yarp/AbstractNodeVisitor.java | ||
java/org/yarp/Loader.java | ||
java/org/yarp/Nodes.java | ||
java/org/yarp/Parser.java | ||
lib/yarp.{jar,so} | ||
] | ||
|
||
intended_directories = Dir.children(".") | ||
.select { |filename| File.directory?(filename) } | ||
.reject { |filename| ignore_directories.any? { |ig| File.fnmatch?(ig, filename) } } | ||
|
||
intended_files = Dir.children(".") | ||
.select { |filename| File.file?(filename) } | ||
.reject { |filename| ignore_files.any? { |ig| File.fnmatch?(ig, filename, File::FNM_EXTGLOB) } } | ||
|
||
intended_files += Dir.glob(intended_directories.map { |d| File.join(d, "/**/*") }) | ||
.select { |filename| File.file?(filename) } | ||
.reject { |filename| ignore_files.any? { |ig| File.fnmatch?(ig, filename, File::FNM_EXTGLOB) } } | ||
.sort | ||
|
||
spec_files = raw_gemspec.files.sort | ||
missing_files = intended_files - spec_files | ||
|
||
unless missing_files.empty? | ||
puts "✖ files must be added to either the gemspec or the ignore list:" | ||
missing_files.sort.each { |f| puts "- #{f}" } | ||
puts "(see #{__FILE__})" | ||
exit(1) | ||
end | ||
|
||
puts "☑ manifest looks good" | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.