From e60ccbd1c62543b0d7288aeb43cac4fed75a96ff Mon Sep 17 00:00:00 2001 From: Peter Vandoros Date: Fri, 28 Jul 2023 17:02:14 +1000 Subject: [PATCH 1/4] Use sorted_set gem instead of relying on it existing in ruby's `set` library Resolves the following error: StackMaster::TemplateCompiler::TemplateCompilationFailed Failed to compile a_stack_template.rb Caused by: RuntimeError The `SortedSet` class has been extracted from the `set` library. You must use the `sorted_set` gem or other alternatives. In ruby 3.1, the SortedSet class was removed from the `set` library. The sparkle_formation gem has resolved this issue, but has yet to release a new version of the gem. This commit works around the issue by ensuring the SortedSet class in the `sorted_set` gem is used by the sparkle_formation gem. --- Gemfile | 6 ------ stack_master.gemspec | 1 + 2 files changed, 1 insertion(+), 6 deletions(-) diff --git a/Gemfile b/Gemfile index 96049c5f..677a9ea3 100644 --- a/Gemfile +++ b/Gemfile @@ -2,9 +2,3 @@ source 'https://rubygems.org' # Specify your gem's dependencies in stack_master.gemspec gemspec - -if RUBY_VERSION >= '3.0.0' - # SparkleFormation has an issue with Ruby 3 and the SortedSet class. - # Remove after merged: https://github.com/sparkleformation/sparkle_formation/pull/271 - gem 'faux_sorted_set', require: false -end diff --git a/stack_master.gemspec b/stack_master.gemspec index 3998f60c..23a77c7b 100644 --- a/stack_master.gemspec +++ b/stack_master.gemspec @@ -44,6 +44,7 @@ Gem::Specification.new do |spec| spec.add_dependency "aws-sdk-ssm", "~> 1" spec.add_dependency "aws-sdk-ecr", "~> 1" spec.add_dependency "aws-sdk-iam", "~> 1" + spec.add_dependency "sorted_set" # remove once new version of sparkle_formation released (> v3.0.40). See https://github.com/sparkleformation/sparkle_formation/pull/271. spec.add_dependency "diffy" spec.add_dependency "erubis" spec.add_dependency "rainbow" From 49e1b9d81a60191ddf43e49cb9fbc7d888cfa1c9 Mon Sep 17 00:00:00 2001 From: Peter Vandoros Date: Fri, 28 Jul 2023 17:07:39 +1000 Subject: [PATCH 2/4] Bump version to v2.13.4 and update changelog --- CHANGELOG.md | 11 ++++++++++- lib/stack_master/version.rb | 2 +- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 687a1497..98412c01 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -10,7 +10,16 @@ The format is based on [Keep a Changelog], and this project adheres to ## [Unreleased] -[Unreleased]: https://github.com/envato/stack_master/compare/v2.13.3...HEAD +[Unreleased]: https://github.com/envato/stack_master/compare/v2.13.4...HEAD + +## [2.13.4] - 2023-07-31 + +### Fixed + +- Resolve error caused by `SortedSet` class being removed from the `set` library ([#374]). + +[2.13.3]: https://github.com/envato/stack_master/compare/v2.13.3...v2.13.4 +[#374]: https://github.com/envato/stack_master/pull/374 ## [2.13.3] - 2023-02-01 diff --git a/lib/stack_master/version.rb b/lib/stack_master/version.rb index 0ef6af20..df4e8397 100644 --- a/lib/stack_master/version.rb +++ b/lib/stack_master/version.rb @@ -1,3 +1,3 @@ module StackMaster - VERSION = "2.13.3" + VERSION = "2.13.4" end From 254eb03871efc652a46fb542f15514c0e76a8b67 Mon Sep 17 00:00:00 2001 From: Peter Vandoros Date: Fri, 28 Jul 2023 17:15:53 +1000 Subject: [PATCH 3/4] Update CHANGELOG.md to be specific about affected template engines Co-authored-by: Orien Madgwick <497874+orien@users.noreply.github.com> --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 98412c01..cc9522ff 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,7 +16,7 @@ The format is based on [Keep a Changelog], and this project adheres to ### Fixed -- Resolve error caused by `SortedSet` class being removed from the `set` library ([#374]). +- Resolve SparkleFormation template error caused by `SortedSet` class being removed from the `set` library in Ruby 3 ([#374]). [2.13.3]: https://github.com/envato/stack_master/compare/v2.13.3...v2.13.4 [#374]: https://github.com/envato/stack_master/pull/374 From 07b2e2e59fbd7fd1e295844a1c947612358442a6 Mon Sep 17 00:00:00 2001 From: Peter Vandoros Date: Wed, 2 Aug 2023 11:42:19 +1000 Subject: [PATCH 4/4] Update release date for v2.13.4 --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index cc9522ff..b14df14b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -12,7 +12,7 @@ The format is based on [Keep a Changelog], and this project adheres to [Unreleased]: https://github.com/envato/stack_master/compare/v2.13.4...HEAD -## [2.13.4] - 2023-07-31 +## [2.13.4] - 2023-08-02 ### Fixed