Skip to content

Commit

Permalink
fix #60
Browse files Browse the repository at this point in the history
  • Loading branch information
eblondel committed Mar 29, 2023
1 parent 971ce62 commit a0fb240
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 6 deletions.
4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: geosapi
Type: Package
Title: GeoServer REST API R Interface
Version: 0.6-5
Date: 2023-01-06
Version: 0.6-6
Date: 2023-03-29
Authors@R: c(person("Emmanuel", "Blondel", role = c("aut", "cre"), email = "emmanuel.blondel1@gmail.com", comment = c(ORCID = "0000-0002-5870-5762")))
Maintainer: Emmanuel Blondel <emmanuel.blondel1@gmail.com>
Description: Provides an R interface to the GeoServer REST API, allowing to upload
Expand Down
7 changes: 7 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,10 @@
## [geosapi 0.6-6](https://cran.r-project.org/package=geosapi) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://cran.r-project.org/package=geosapi)

**Enhancements**

* [#60](https://github.com/eblondel/geosapi/issues/60) Fix base URL used to retrieve Geoserver version


## [geosapi 0.6-5](https://cran.r-project.org/package=geosapi) | [![CRAN_Status_Badge](https://img.shields.io/badge/CRAN-published-blue.svg)](https://cran.r-project.org/package=geosapi)

**Enhancements**
Expand Down
2 changes: 1 addition & 1 deletion R/GSManager.R
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ GSManager <- R6Class("GSManager",
}

#inherit GeoServer version
self$version <- GSVersion$new(url, user, pwd)
self$version <- GSVersion$new(baseUrl, user, pwd)

invisible(self)

Expand Down
4 changes: 2 additions & 2 deletions R/GSVersion.R
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ GSVersion <- R6Class("GSVersion",
initialize = function(url, user, pwd){

#try to grab version from web admin
req <- GET(paste(url, "web", sep = "/"))
req <- GET(paste(dirname(url), "web", sep = "/"))
if(status_code(req) == 200){
html <- htmlParse(content(req, "text", encoding = "ISO-8859-1"))
trgSet <- getNodeSet(html, "//strong")
Expand All @@ -71,7 +71,7 @@ GSVersion <- R6Class("GSVersion",

#try to grab version from REST API
if(is.null(self$version) & is.null(self$value)){
req <- GSUtils$GET(url, user, pwd, "/rest/about/version.xml", FALSE)
req <- GSUtils$GET(url, user, pwd, "about/version.xml", verbose = FALSE)
if(status_code(req) == 200){
xml <- xmlParse(content(req, "text", encoding = "UTF-8"))
trgSet <- getNodeSet(xml, "//resource[@name='GeoServer']/Version")
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
[![Build Status](https://github.com/eblondel/geosapi/actions/workflows/r-cmd-check.yml/badge.svg?branch=master)](https://github.com/eblondel/geosapi/actions/workflows/r-cmd-check.yml)
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/geosapi)](https://cran.r-project.org/package=geosapi)
[![cran checks](https://badges.cranchecks.info/worst/geosapi.svg)](https://cran.r-project.org/web/checks/check_results_geosapi.html)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.6--5-blue.svg)](https://github.com/eblondel/geosapi)
[![Github_Status_Badge](https://img.shields.io/badge/Github-0.6--6-blue.svg)](https://github.com/eblondel/geosapi)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.1184895.svg)](https://doi.org/10.5281/zenodo.1184895)

``geosapi``: GeoServer REST API R Interface
Expand Down

0 comments on commit a0fb240

Please sign in to comment.