File tree Expand file tree Collapse file tree 5 files changed +15
-9
lines changed
Expand file tree Collapse file tree 5 files changed +15
-9
lines changed Original file line number Diff line number Diff line change 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 }}
Original file line number Diff line number Diff line change @@ -209,16 +209,20 @@ require 'serpapi'
209209
210210require ' 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' ]})
217213params = {
218214 q: ' coffee'
219215}
220216results = 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
224228end
@@ -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
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11module SerpApi
22 # Current version of the gem
3- VERSION = '1.0.0 ' . freeze
3+ VERSION = '1.0.1 ' . freeze
44end
Original file line number Diff line number Diff 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'
You can’t perform that action at this time.
0 commit comments