-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
bf18835
commit 6b6e593
Showing
1 changed file
with
59 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
RSpec.describe "gem release process" do | ||
context "datadog-ci.gemspec" do | ||
context "files" do | ||
subject(:files) { Gem::Specification.load("datadog-ci.gemspec").files } | ||
|
||
# It's easy to forget to ship new files, especially when a new paradigm is | ||
# introduced (e.g. introducing native files requires the inclusion `ext/`) | ||
it "includes all important files" do | ||
single_files_excluded = / | ||
^ | ||
( | ||
|\.env | ||
|\.gitignore | ||
|\.rspec | ||
|\.rubocop.yml | ||
|\.standard.yml | ||
|\.standard_todo.yml | ||
|\.simplecov | ||
|\.yardopts | ||
|Appraisals | ||
|CODE_OF_CONDUCT.md | ||
|CONTRIBUTING.md | ||
|Gemfile | ||
|Gemfile-.* | ||
|Rakefile | ||
|Steepfile | ||
|datadog-ci\.gemspec | ||
|docker-compose\.yml | ||
) | ||
$ | ||
/x | ||
|
||
directories_excluded = %r{ | ||
^( | ||
spec | ||
|docs | ||
|\.circleci | ||
|\.github | ||
|\.vscode | ||
| bin | ||
|gemfiles | ||
|integration | ||
|tasks | ||
|yard | ||
|vendor/rbs | ||
)/ | ||
}x | ||
|
||
expect(files) | ||
.to match_array( | ||
`git ls-files -z` | ||
.split("\x0") | ||
.reject { |f| f.match(directories_excluded) } | ||
.reject { |f| f.match(single_files_excluded) } | ||
) | ||
end | ||
end | ||
end | ||
end |