Skip to content

Commit 11a7088

Browse files
committed
Update CI configuration and support for older Ruby versions (2.7, 3.0)
1 parent c132177 commit 11a7088

File tree

5 files changed

+15
-9
lines changed

5 files changed

+15
-9
lines changed

.github/workflows/ci.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
runs-on: ubuntu-latest
1010
strategy:
1111
matrix:
12-
ruby-version: ['3.1']
12+
ruby-version: ['2.7','3.1','3.4']
1313
steps:
1414
- uses: actions/checkout@v3
1515
- name: Set up Ruby ${{ matrix.ruby-version }}

README.md

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -209,16 +209,20 @@ require 'serpapi'
209209

210210
require 'pp'
211211

212-
default_params = {
213-
engine: 'google',
214-
api_key: ENV.fetch('SERPAPI_KEY', nil)
215-
}
216-
client = SerpApi::Client.new(default_params)
212+
client = SerpApi::Client.new({api_key: ENV['SERPAPI_KEY']})
217213
params = {
218214
q: 'coffee'
219215
}
220216
results = client.search(params)
221-
if !results[:organic_results]
217+
print results[:search_parameters][:engine]
218+
if params[:engine] != results[:search_parameters][:engine]
219+
puts "Engine mismatch: expected #{params[:engine]}, got #{results[:search_parameters][:engine]}"
220+
exit 1
221+
end
222+
puts 'search engine match'
223+
exit 0
224+
225+
unless results[:organic_results]
222226
puts 'organic results found'
223227
exit 1
224228
end
@@ -1072,6 +1076,7 @@ Ruby versions validated by Github Actions:
10721076
* doc: [Github Actions.](https://github.com/serpapi/serpapi-ruby/actions/workflows/ci.yml)
10731077

10741078
## Change logs
1079+
* [2025-07-18] 1.0.1 Add support for old Ruby versions (2.7, 3.0)
10751080
* [2025-07-01] 1.0.0 Full API support
10761081

10771082
## Developer Guide

README.md.erb

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -491,6 +491,7 @@ Ruby versions validated by Github Actions:
491491
* doc: [Github Actions.](https://github.com/serpapi/serpapi-ruby/actions/workflows/ci.yml)
492492

493493
## Change logs
494+
* [2025-07-18] 1.0.1 Add support for old Ruby versions (2.7, 3.0)
494495
* [2025-07-01] 1.0.0 Full API support
495496

496497
## Developer Guide

lib/serpapi/version.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
module SerpApi
22
# Current version of the gem
3-
VERSION = '1.0.0'.freeze
3+
VERSION = '1.0.1'.freeze
44
end

serpapi.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ information.'
1919
s.require_paths = ['lib']
2020
s.homepage = 'https://github.com/serpapi/serpapi-ruby'
2121
s.license = 'MIT'
22-
s.required_ruby_version = '>= 3.1'
22+
s.required_ruby_version = '>= 2.7'
2323

2424
# faraday
2525
s.add_dependency 'http', '~> 5.2'

0 commit comments

Comments
 (0)