Skip to content
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

Add ruby 3.3 support and update test suite to use a local server #216

Merged
merged 7 commits into from
Jan 15, 2024

Conversation

afromankenobi
Copy link
Contributor

This PR is my attempt to fix Grover's use of Ruby 3.3 and remove the dependency on the external resources the test suite used. It basically:

  • Runs a Sinatra app within the test suite that implements most of the features we get from external services.
  • Runs the test suite against this internal Sinatra app, allowing testing of Grover's functionality in a controlled environment.
  • Includes additional error handling and mock setups in the test suite to address issues encountered during testing.

I hope this is helpful :).

Related to #212 and #213

@braindeaf
Copy link
Contributor

Yep, this is awesome. +1

@Laykou
Copy link

Laykou commented Jan 11, 2024

With Ruby 3.3 I observed weird behavior in the encoding of diacritic (special chars) like:

ščťžýáíé

I needed to add

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

@breisig
Copy link

breisig commented Jan 11, 2024

This is perfect. If it looks good, lets get it merged. :-)

@Petercopter
Copy link

@afromankenobi Thank you for your hard work! 👍 🎉

@afromankenobi
Copy link
Contributor Author

@abrom can you take a look at this pls?

@abrom
Copy link
Contributor

abrom commented Jan 15, 2024

Soz @afromankenobi i've been on holidays 😉 Taking a look over it now

abrom added 3 commits January 16, 2024 00:08
Revert some of the spec simplifications
Fix header count bug in `/headers` endpoint
@@ -1,5 +1,5 @@
# frozen_string_literal: true

class Grover
VERSION = '1.1.5'
VERSION = '1.2.0'
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

i would recommend you don't change the version in a PR.. you're assuming to know the version change policy of the project.

end
end

get '/' do
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice one 👍 Fixing this has been on my list for months.. this looks like a nice long term solution


get '/cookie_renderer' do
cookie_info = request.cookies.map.with_index(1) do |(name, value), i|
"#{i}. #{name} #{value}"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not quite the same rendering as the original, but it'll do (the original used a table)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since I wasn't able to get in touch with the original, I had to resort to improvisation.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No worries.. I wrote it, I've just "misplaced" the source.. What you did is fine 😄

@abrom abrom merged commit 898599a into Studiosity:main Jan 15, 2024
12 checks passed
@abrom
Copy link
Contributor

abrom commented Jan 15, 2024

Released in v1.1.6

@afromankenobi afromankenobi deleted the add_ruby_3.3_support branch January 15, 2024 16:16
simonbaird added a commit to tiddlyhost/tiddlyhost-com that referenced this pull request Jan 18, 2024
Side note: I tried this before but hit problems with the grover gem.
Those problems are resolved now with grover 1.1.6, see
Studiosity/grover#216 .
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants