Skip to content

Commit

Permalink
Update changelogs (#56)
Browse files Browse the repository at this point in the history
* Update changelog link

* Add pretty assertions

Makes seeing test differences easier

* Update jruby changelog link

* Expected on the left

In ruby expected comes before actual. Swap the order of the assertions.

* Fix tests and don't break newline
  • Loading branch information
schneems authored Dec 13, 2024
1 parent a6da00d commit a41f31c
Show file tree
Hide file tree
Showing 5 changed files with 34 additions and 6 deletions.
25 changes: 24 additions & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,4 @@ libherokubuildpack = { version = "0.24.0", default-features = false, features =
# File locking (FLOCK)
fs2 = "0.4"

pretty_assertions = "1.4.1"
2 changes: 1 addition & 1 deletion jruby_executable/src/bin/jruby_changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ fn jruby_changelog(args: &Args) -> Result<(), Box<dyn Error>> {
let changelog = formatdoc! {"
## JRuby version {version} is now available
[JRuby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run
[JRuby v{version}](/articles/ruby-support-reference#ruby-versions) is now available on Heroku. To run
your app using this version of Ruby, add the following `ruby` directive to your Gemfile:
```ruby
Expand Down
3 changes: 3 additions & 0 deletions ruby_executable/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,3 +21,6 @@ libherokubuildpack = { workspace = true }
chrono = { workspace = true }
sha2 = { workspace = true }
gem_version = { workspace = true }

[dev-dependencies]
pretty_assertions = { workspace = true }
9 changes: 5 additions & 4 deletions ruby_executable/src/bin/ruby_changelog.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ where
let changelog = formatdoc! {"
## Ruby version {version} is now available
[Ruby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run
[Ruby v{version}](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \
your app using this version of Ruby, add the following `ruby` directive to your Gemfile:
```ruby
Expand Down Expand Up @@ -72,6 +72,7 @@ fn main() {
#[cfg(test)]
mod test {
use super::*;
use pretty_assertions::assert_eq;

#[test]
fn regular_release() {
Expand All @@ -86,7 +87,7 @@ mod test {
## Ruby version 3.3.2 is now available
[Ruby v3.3.2](/articles/ruby-support#ruby-versions) is now available on Heroku. To run
[Ruby v3.3.2](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \
your app using this version of Ruby, add the following `ruby` directive to your Gemfile:
```ruby
Expand All @@ -95,7 +96,7 @@ mod test {
For more information on [Ruby 3.3.2, you can view the release announcement](https://www.ruby-lang.org/en/news/).
"};
assert_eq!(actual.trim(), expected.trim());
assert_eq!(expected.trim(), actual.trim());
}

#[test]
Expand All @@ -111,7 +112,7 @@ mod test {
## Ruby version 3.1.0-rc1 is now available
[Ruby v3.1.0-rc1](/articles/ruby-support#ruby-versions) is now available on Heroku. To run
[Ruby v3.1.0-rc1](/articles/ruby-support#ruby-versions) is now available on Heroku. To run \
your app using this version of Ruby, add the following `ruby` directive to your Gemfile:
```ruby
Expand Down

0 comments on commit a41f31c

Please sign in to comment.