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

feat: Allow lower Faraday versions in gemspec #16

Merged
merged 5 commits into from
Jul 30, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion groq.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
spec.require_paths = ["lib"]

spec.add_dependency "faraday", "~> 2.0"
spec.add_dependency "faraday", "~> 1.0"
Copy link
Owner

Choose a reason for hiding this comment

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

Can we make this ">= 1.0" to allow 2.X as well?

Copy link
Owner

Choose a reason for hiding this comment

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

Any ideas how we might test both faraday 1.X and faraday 2.X in CI?

Copy link
Contributor Author

@itstheraj itstheraj Jul 30, 2024

Choose a reason for hiding this comment

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

Hi thank you! Yes I have updated this CR to allow for 2.x as well ✅

As for the latter I will push a new commit shortly editing main.yml workflow in a minute. The approach would be, IMO, to have the faraday version pulled from env var. In your workflow if the "FARADAY_VERSION" var is not set, it will default to the latest version as per Gemfile; if it is set it will pull the custom version.

    - name: Run the test suite with lower Faraday versions
      run: FARADAY_VERSION=1.0.0 bin/setup && bundle exec rake test

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Let me know if this works / makes sense - I cannot run CI without workflow approval so I hope this helps :)

spec.add_dependency "json"
spec.add_dependency "activesupport", "> 5" # for Concerns
spec.add_dependency "event_stream_parser", "~> 1.0"
Expand Down