Add Stock.search for ticker/name autocomplete (v0.5.0)#11
Merged
Conversation
Calls Yahoo's v1/finance/search endpoint (unauthenticated by default, falls back to the cookie+crumb flow only if Yahoo demands it), normalizes results to symbol/name/exchange/type/type_display, caches under the existing 5-min @cache, and returns [] on any error. Also pins ruby = "3.4.1" via mise.toml so contributors and CI pick up a consistent toolchain. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
YahooFinanceClient::Stock.search(query, count:)calling Yahoo'sv1/finance/searchendpoint{ symbol, name, exchange, type, type_display }@cache; returns[]on any errorThe name fallback prefers
longnamewhenshortnameechoes the symbol (mutual funds like Baelo Dividendo Creciente come back this way), so users see "Baelo Dividendo Creciente A FI" instead of "0P0001QYEF.F".Also adds
mise.tomlpinning ruby = "3.4.1" so contributors and CI pick up a consistent toolchain (no.ruby-versionexisted before).Test plan
bundle exec rake(62 examples, 0 failures; rubocop 0 offenses)rake releaseand verify it lands on rubygems.org🤖 Generated with Claude Code