Skip to content

Commit

Permalink
Merge pull request #1 from geocrystal/windows-ci
Browse files Browse the repository at this point in the history
windows ci
  • Loading branch information
mamantoha authored Apr 5, 2024
2 parents f959b75 + 47ddfa2 commit f1ca158
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 3 deletions.
10 changes: 9 additions & 1 deletion .github/workflows/crystal.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,18 @@ jobs:
run: crystal tool format --check

test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- { os: ubuntu-latest }
- { os: windows-latest }
runs-on: ${{ matrix.os }}
steps:
- name: Install Crystal
uses: crystal-lang/install-crystal@v1
with:
crystal: ${{ matrix.crystal }}
- name: Check out repository code
uses: actions/checkout@v4
- name: Install dependencies
Expand Down
4 changes: 2 additions & 2 deletions src/ipapi.cr
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ module Ipapi
# Retrive the location of a specific IP address.
# If `ip_address` is `nil`, use the client's IP.
def locate(ip_address : String? = nil) : Location?
url = Path.new([API_URL, ip_address, "json"].compact).to_s
url = Path.posix([API_URL, ip_address, "json"].compact).to_s
url = url + "?key=#{@api_key}" if @api_key

response = HTTP::Client.get(url)
Expand All @@ -50,7 +50,7 @@ module Ipapi
# Retrive {{description.id}} of a specific IP address.
# If `ip_address` is `nil`, use the client's IP.
def {{field.id}}(ip_address : String? = nil) : String
url = Path.new([API_URL, ip_address, "{{field.id}}"].compact).to_s
url = Path.posix([API_URL, ip_address, "{{field.id}}"].compact).to_s

url = url + "?key=#{@api_key}" if @api_key

Expand Down

0 comments on commit f1ca158

Please sign in to comment.