Skip to content

Commit

Permalink
switched curl::has_internet by pingr::is_online() -- the first doesn'…
Browse files Browse the repository at this point in the history
…t seem to work on restricted networks. Fixes #20
  • Loading branch information
msperlin committed Nov 15, 2022
1 parent 203d032 commit 4aec38a
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 7 deletions.
9 changes: 5 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: yfR
Title: Downloads and Organizes Financial Data from Yahoo Finance
Version: 1.0.3
Version: 1.0.4
Authors@R: c(person("Marcelo", "Perlin", email = "[email protected]", role = c("aut", "cre")),
person("Nic", "Crane", role = "rev",
comment = "Nic reviewed the package (v. 0.0.5) for
Expand All @@ -14,11 +14,11 @@ Description: Facilitates download of financial data from Yahoo Finance <https://
URL: https://github.com/ropensci/yfR,
https://docs.ropensci.org/yfR/
BugReports: https://github.com/ropensci/yfR/issues
Encoding: UTF-8
Depends:
R (>= 4.0.0)
Imports:
stringr,
curl,
tidyr,
lubridate,
furrr,
Expand All @@ -33,10 +33,11 @@ Imports:
quantmod (>= 0.4.20),
magrittr,
humanize,
methods
methods,
pingr
License: MIT + file LICENSE
LazyData: true
RoxygenNote: 7.2.1
RoxygenNote: 7.2.2
Suggests:
knitr,
rmarkdown,
Expand Down
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## Version 1.0.4 (2022-11-15) -- bug fixes

- switched curl::has_internet by pingr::is_online() -- the first doesn't seem to work on restricted networks. Fixes [#20](https://github.com/ropensci/yfR/issues/20)

## Version 1.0.3 (2022-10-20) -- bug fixes

- fixed bug on number of files at cache folder
Expand Down
2 changes: 1 addition & 1 deletion R/yf_get.R
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ yf_get <- function(tickers,
be_quiet = FALSE) {

# check for internet
if (!curl::has_internet()) {
if (!pingr::is_online()) {
stop("Can't find an active internet connection...")
}

Expand Down
4 changes: 2 additions & 2 deletions inst/CITATION
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ citEntry(
entry = "Manual",
title = "yfR: Downloads and Organizes Financial Data from Yahoo Finance",
author = "Marcelo Perlin",
year = "2021",
note = "R package version 0.0.1",
year = "2022",
note = "R package version 1.0.4",
url = "https://github.com/ropensci/yfR",
textVersion = "Makes it easy to download financial data from Yahoo Finance <https://finance.yahoo.com/>,
a vast repository of stock price data across multiple financial exchanges. The package offers a local caching system
Expand Down
1 change: 1 addition & 0 deletions inst/WORDLIST
Original file line number Diff line number Diff line change
Expand Up @@ -48,3 +48,4 @@ ropensci
dontrun
donttest
TSLA
pingr

0 comments on commit 4aec38a

Please sign in to comment.