Skip to content

Commit

Permalink
windows ci
Browse files Browse the repository at this point in the history
  • Loading branch information
mamantoha committed Apr 5, 2024
1 parent f959b75 commit 47ddfa2
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 47ddfa2

Please sign in to comment.