-
Notifications
You must be signed in to change notification settings - Fork 40
Replace awesome_print with amazing_print #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
Context: When `config.snapshot_dir` is set to `:relative` (the default option), rspec-snapshot stores snapshots in a location relative to the spec file. Prior to this commit, that relative snapshot location was hard-coded to a `__snapshots__` subdirectory and the application had no way to choose anything else. Changes: This commit adds a new config option that allows the caller to specify a subdirectory when `config.snapshot_dir` is set to `:relative`. The new config option supports the following values: - String: a path to a different subdirectory - nil: stores snapshot files in the same directory as each spec file In all cases, the caller can still store the snapshot files in a further subdirectory by calling `match_snapshot` with a nested snapshot name.
The `awesome_print` gem has not been maintained for several years. There is now a successor gem named `amazing_print`, which implements the same API but is more actively maintained. Updating a project to use this commit will require some snapshots to be regenerated because `amazing_print` produces a slightly different result from that of the `awesome_print` gem. For example, it can serialize hashes using the newer `key: value` syntax instead of hash rockets.
50c6650 to
af3b499
Compare
Context: When `config.snapshot_dir` is set to `:relative` (the default option), rspec-snapshot stores snapshots in a location relative to the spec file. Prior to this commit, that relative snapshot location was hard-coded to a `__snapshots__` subdirectory and the application had no way to choose anything else. Changes: This commit adds a new config option that allows the caller to specify a subdirectory when `config.snapshot_dir` is set to `:relative`. The new config option supports the following values: - String: a path to a different subdirectory - nil: stores snapshot files in the same directory as each spec file In all cases, the caller can still store the snapshot files in a further subdirectory by calling `match_snapshot` with a nested snapshot name.
|
|
We would appreciate it if you would consider this proposal positively.
|
|
I'll have to do some work on the CI jobs to get this to pass since ruby 2.7 runner is deprecated. |
Ruby 2.7 is EoL for almost 3 years. There is no good reason for anyone to keep using EoL Rubies. Even 3.2 is going to end in 4 months (and while at it, would be good to test against 3.4) |
FYI users can configure amazing_print to produce a similar output/result as awesome_print by using the following configuration: AmazingPrint.defaults = { hash_format: :rocket, colors: :values_only }(the I believe my comment is not actionable for this PR, since rspec-snapshot should probably not force or override any custom amazing_print config that users set. I am just posting this comment as a FYI. |



The
awesome_printgem has not been maintained for several years.There is now a successor gem named
amazing_print, which implements the same API but is more actively maintained.Updating a project to use this commit will require some snapshots to be regenerated because
amazing_printproduces a slightly different result from that of theawesome_printgem. For example, it can serialize hashes using the newerkey: valuesyntax instead of hash rockets.