Skip to content

Commit

Permalink
Add categories (MCC) + Bump min Ruby version + Pre-compile on boot (#26)
Browse files Browse the repository at this point in the history
* Categories!

* Bump min Ruby version

It's nice being able to omit hash values. This is a breaking change, but since only HCB uses it and we're on 3.3, it's alright. Plus we haven't been formally releasing this gem so there's no expectation for semver.

* Pre-compile hash from YAML file on boot

* categories!! ^w^

* bump version?

* lol

* fix typo

* add spec for categories :3

* stripe wants to give us strings? we eat strings for breakfast.

* Temporarily fix CI. Gemfile.lock shouldn't be checked in.

---------

Co-authored-by: 24c02 <[email protected]>
  • Loading branch information
garyhtou and 24c02 authored Oct 7, 2024
1 parent eab7f30 commit 4711379
Show file tree
Hide file tree
Showing 10 changed files with 1,082 additions and 5 deletions.
5 changes: 3 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ jobs:
strategy:
matrix:
ruby:
- "2.7" # Minimum supported version
- "3.2.4"
- "3.1" # Minimum supported version
- "3.2"
- "3.3"
- "ruby" # Latest stable version

Expand All @@ -36,3 +36,4 @@ jobs:
- uses: actions/setup-node@v4
- run: npm install -g ajv-cli
- run: ajv -s lib/yellow_pages/merchants.schema.json -d lib/yellow_pages/merchants.yaml --errors=text
- run: ajv -s lib/yellow_pages/categories.schema.json -d lib/yellow_pages/categories.yaml --errors=text
2 changes: 1 addition & 1 deletion Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
PATH
remote: .
specs:
yellow_pages (0.3.0)
yellow_pages (0.4.0)

GEM
remote: https://rubygems.org/
Expand Down
1 change: 1 addition & 0 deletions lib/yellow_pages.rb
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

require_relative "yellow_pages/version"
require_relative "yellow_pages/merchant"
require_relative "yellow_pages/category"

module YellowPages
class Error < StandardError; end
Expand Down
11 changes: 11 additions & 0 deletions lib/yellow_pages/categories.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"type": "object",
"properties": {
"name": {
"type": "string"
},
"key": {
"type": "string"
}
}
}
Loading

0 comments on commit 4711379

Please sign in to comment.