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

update crack to remove dependency on safe_yaml which won't run in Ruby 3 #62

Merged
merged 4 commits into from
Mar 6, 2023

Conversation

jadatkins
Copy link
Contributor

@jadatkins jadatkins commented Jan 27, 2023

crack 0.4.3 depends on safe_yaml which hasn't been updated to run in Ruby 3. The simplest way to get ruby-pardot working in Ruby 3 is just to update the crack dependency.

I've checked that the tests pass in Ruby 3.1.2, and that they continue to pass in Ruby 2.7.6 after making these changes.

This PR supersedes #60.

@jadatkins
Copy link
Contributor Author

@adelawalla @jpearson-sfdc @dcunning @dscataglini are you still maintaining this gem please?

@dscataglini
Copy link
Contributor

@jadatkins I'm not one of the gem maintainers. Sorry.

@adelawalla
Copy link
Contributor

@jadatkins Confirmed looks good. Can you update the version number to 1.4.2?

@jadatkins
Copy link
Contributor Author

@adelawalla done

@jadatkins
Copy link
Contributor Author

jadatkins commented Mar 6, 2023

I don't know what I did before, but I'm now getting 57 test failures in Ruby 3.2. I think I must have been running in Ruby 2.7 by mistake. Everything still passes in Ruby 2.7.

@adelawalla
Copy link
Contributor

adelawalla commented Mar 6, 2023

@jadatkins Which tests are you talking about? I thought we had some, but I'm not seeing any. I ran a spot check on Ruby 3 for querying prospects and it seems fine. Though, we haven't officially made an effort to support Ruby 3 yet. Let me know if you still want to merge.

@jadatkins
Copy link
Contributor Author

This PR should be safe to merge, but it's not much use if it's still not possible to run in Ruby 3.

Version 1.3.0 of the fakeweb gem breaks, in responder.rb line 58, where it makes a call to File.exists? which was deprecated in Ruby 2.1 and removed in Ruby 3. In their latest code we can see that this has been updated to File.exist? which works with both Ruby 2 and Ruby 3, but this has not yet been released into a version.

However, the relevant commit was made in 2013, and the latest release of fakeweb was in 2010, so it might just be dead.

@jadatkins
Copy link
Contributor Author

I've opened an issue on fakeweb, but it looks like it's dead.

Since Ruby 2 stops receiving security updates at the end of this month, for my company's (closed-source) software we can't be running anything on Ruby 2 from 1st April onwards, so we'll probably just remove our dependency on ruby-pardot unless you can remove your dependency on fakeweb.

@jadatkins
Copy link
Contributor Author

Which tests are you talking about?

I mean if you run rake spec. Tests are in the spec directory.

@adelawalla
Copy link
Contributor

I'll go ahead and merge this, but it's unlikely that we'll have resources to look at removing fakeweb in the near term.

@adelawalla adelawalla merged commit 4cc1e8d into pardot:master Mar 6, 2023
@jadatkins jadatkins deleted the update-crack branch March 20, 2023 13:38
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.

3 participants