{% set version = '0.1.0' %}

{% set posix = 'm2-' if win else '' %}
{% set native = 'm2w64-' if win else '' %}

package:
  name: r-ghql
  version: {{ version|replace("-", "_") }}

source:
  url:
    - {{ cran_mirror }}/src/contrib/ghql_{{ version }}.tar.gz
    - {{ cran_mirror }}/src/contrib/Archive/ghql/ghql_{{ version }}.tar.gz
  sha256: 7f19ab466fed3b081d8a02b8bc517194051991372600c833e79c4391517a5ca5

build:
  merge_build_host: True  # [win]
  number: 0

  rpaths:
    - lib/R/lib/
    - lib/

requirements:
  build:
    - {{ posix }}zip               # [win]

  host:
    - r-base
    - r-r6
    - r-crul
    - r-graphql
    - r-jsonlite

  run:
    - r-base
    - r-r6
    - r-crul
    - r-graphql
    - r-jsonlite

test:
  commands:
    - $R -e "library('ghql')"           # [not win]
    - "\"%R%\" -e \"library('ghql')\""  # [win]

about:
  home: https://github.com/ropensci/ghql (devel) https://docs.ropensci.org/ghql (docs)
  license: MIT
  summary: A 'GraphQL' client, with an R6 interface for initializing a connection to a 'GraphQL'
    instance, and methods for constructing queries, including fragments and parameterized
    queries. Queries are checked with the 'libgraphqlparser' C++ parser via the 'gaphql'
    package.
  license_family: MIT
  license_file:
    - '{{ environ["PREFIX"] }}/lib/R/share/licenses/MIT'
    - LICENSE

extra:
  recipe-maintainers:
    - conda-forge/r
    - jezcope

# The original CRAN metadata for this package was:

# Package: ghql
# Type: Package
# Title: General Purpose 'GraphQL' Client
# Description: A 'GraphQL' client, with an R6 interface for initializing a connection to a 'GraphQL' instance, and methods for constructing queries, including fragments and parameterized queries. Queries are checked with the 'libgraphqlparser' C++ parser via the 'gaphql' package.
# Version: 0.1.0
# Authors@R: c(person("Scott", "Chamberlain", role = c("aut", "cre"), email = "myrmecocystus@gmail.com", comment = c(ORCID="0000-0003-1444-9135")))
# License: MIT + file LICENSE
# URL: https://github.com/ropensci/ghql (devel) https://docs.ropensci.org/ghql (docs)
# BugReports: https://github.com/ropensci/ghql/issues
# Encoding: UTF-8
# Language: en-US
# Imports: crul, jsonlite, R6, graphql
# Suggests: testthat
# RoxygenNote: 7.0.2
# X-schema.org-applicationCategory: Web
# X-schema.org-keywords: http, API, web-services, curl, data, GraphQL
# X-schema.org-isPartOf: https://ropensci.org
# NeedsCompilation: no
# Packaged: 2020-02-24 18:13:41 UTC; sckott
# Author: Scott Chamberlain [aut, cre] (<https://orcid.org/0000-0003-1444-9135>)
# Maintainer: Scott Chamberlain <myrmecocystus@gmail.com>
# Repository: CRAN
# Date/Publication: 2020-03-04 14:30:06 UTC

# See
# https://docs.conda.io/projects/conda-build for
# more information about meta.yaml
