From b1cd09a718c44384e206b9fd541580a1ba359109 Mon Sep 17 00:00:00 2001 From: Ali Naqvi Date: Mon, 5 Apr 2021 00:43:04 +0800 Subject: [PATCH] Updated for Crystal 1.0 --- .github/workflows/ci.yml | 26 ++++++++++++++++++++------ shard.yml | 6 ++++-- src/json-xpath.cr | 2 +- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4e874de..99792fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -5,18 +5,32 @@ on: branches: [ master ] pull_request: branches: [ master ] - + schedule: + - cron: '0 6 * * 6' jobs: build: - - runs-on: ubuntu-latest - - container: - image: crystallang/crystal + timeout-minutes: 30 + strategy: + fail-fast: false + matrix: + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v2 + - name: Install Crystal + uses: oprypin/install-crystal@v1.4.0 - name: Install dependencies run: shards install - name: Run tests run: crystal spec + - name: Generate docs + run: crystal doc + - name: Deploy + if: github.ref == 'refs/heads/master' + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: docs + SINGLE_COMMIT: true diff --git a/shard.yml b/shard.yml index dcea1ef..a21500a 100644 --- a/shard.yml +++ b/shard.yml @@ -1,10 +1,12 @@ name: json-xpath -version: 0.1.2 +version: 0.1.3 authors: - Ali Naqvi +description: | + Provide XPath support on JSON document -crystal: 0.36.0 +crystal: ">= 0.36.0, < 2.0.0" dependencies: xpath2: diff --git a/src/json-xpath.cr b/src/json-xpath.cr index 2a13dae..208d6dd 100644 --- a/src/json-xpath.cr +++ b/src/json-xpath.cr @@ -1,6 +1,6 @@ # XPath query package for JSON document, lets you extract data from JSON documents through an XPath expression. module JSONXPath - VERSION = "0.1.2" + VERSION = "0.1.3" # Parses the JSON and returns an instance of `JSONXPath::Node` def self.parse(input : String | IO)