-
Notifications
You must be signed in to change notification settings - Fork 44
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
Showing
4 changed files
with
40 additions
and
46 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 |
---|---|---|
@@ -1,31 +1,29 @@ | ||
class CombinationApprovals | ||
def self.verify_all_combinations(*arg_variations, namer:) | ||
combo = new() | ||
arg_variations.each do |list| | ||
combo.arg(list) | ||
end | ||
|
||
output = "" | ||
combo.all_combinations.each do |args| | ||
begin | ||
result = yield *args | ||
rescue StandardError => exception | ||
result = "#{exception.inspect}" | ||
end | ||
output << "#{args} => #{result}\n" | ||
end | ||
Approvals.verify(output, namer: namer) | ||
end | ||
|
||
def arg(values) | ||
@args ||= [] | ||
@args << values | ||
def self.verify_all_combinations(*arg_variations, namer:) | ||
combo = new() | ||
arg_variations.each do |list| | ||
combo.arg(list) | ||
end | ||
|
||
def all_combinations() | ||
first, *rest = *@args | ||
first.product(*rest) | ||
output = "" | ||
combo.all_combinations.each do |args| | ||
begin | ||
result = yield *args | ||
rescue StandardError => exception | ||
result = "#{exception.inspect}" | ||
end | ||
output << "#{args} => #{result}\n" | ||
end | ||
Approvals.verify(output, namer: namer) | ||
end | ||
|
||
def arg(values) | ||
@args ||= [] | ||
@args << values | ||
end | ||
|
||
end | ||
def all_combinations() | ||
first, *rest = *@args | ||
first.product(*rest) | ||
end | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,16 +1,13 @@ | ||
# Publish | ||
## Prereqs | ||
- [ ] `brew install rbenv ruby-build` | ||
- [ ] `brew install rbenv ruby-build` | ||
This installs [rbenv](https://github.com/rbenv/rbenv) | ||
- [ ] `brew install openssl` | ||
- [ ] `eval "$(rbenv init - zsh)"` | ||
- [ ] `brew install openssl` | ||
- [ ] `eval "$(rbenv init - zsh)"` | ||
**note:** this command will diff based on the shell. run `rbenv init` to find | ||
- [ ] `RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl@3/3.0.3 rbenv install 3.1.2` | ||
**note:** this path comes from | ||
`brew info openssl` | ||
ruby version comes from | ||
`rbenv install -l` | ||
## Build | ||
|
||
|
||
|
||
- [ ] `RUBY_CONFIGURE_OPTS=--with-openssl-dir=/usr/local/Cellar/openssl@3/3.0.3 rbenv install 3.1.2` | ||
**note:** this path comes from | ||
`brew info openssl` | ||
ruby version comes from | ||
`rbenv install -l` | ||
## Build |
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 |
---|---|---|
|
@@ -6,5 +6,5 @@ | |
|
||
2. check pending tests | ||
3. check issues & pull requests | ||
4. Update dependencies | ||
5. | ||
4. Update dependencies | ||
5. |