Skip to content

Commit 093d0bc

Browse files
authored
Merge pull request #15 from ropensci/github-gitignore-backend
Increment version number (closes #13).
2 parents a7607e1 + cb2fae5 commit 093d0bc

12 files changed

+45
-48
lines changed

DESCRIPTION

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Type: Package
22
Package: gitignore
33
Title: Create Useful .gitignore Files for your Project
4-
Version: 0.1.3.9000
4+
Version: 0.1.4
55
Authors@R:
66
c(person(given = "Philippe",
77
family = "Massicotte",
@@ -21,7 +21,7 @@ Description: Simple interface to query gitignore.io to fetch
2121
gitignore templates that can be included in the .gitignore file. More
2222
than 450 templates are currently available.
2323
License: GPL-3
24-
URL: https://docs.ropensci.org/gitignore, https://github.com/ropensci/gitignore
24+
URL: https://docs.ropensci.org/gitignore/, https://github.com/ropensci/gitignore
2525
BugReports: https://github.com/ropensci/gitignore/issues
2626
Imports:
2727
clipr,
@@ -44,4 +44,4 @@ VignetteBuilder:
4444
Encoding: UTF-8
4545
Language: en-US
4646
LazyData: true
47-
RoxygenNote: 7.0.2
47+
RoxygenNote: 7.1.1

NEWS.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
# gitignore 0.1.3.9000
1+
# gitignore 0.1.4
2+
3+
* Change backend from https://www.gitignore.io/ to https://www.toptal.com/developers/gitignore as the former now redirects to the later (#13 @pat-s).
24

35
* Use `file.path()` instead of `paste0()` to build path. @dpprdan
46

R/gi_available_templates.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
gi_available_templates <-
1313
function() {
1414

15-
url = "https://www.gitignore.io/api/list?format=json"
15+
url <- glue::glue("{backend_url()}/api/list?format=json")
1616
res <- curl::curl_fetch_memory(url)
1717

1818
r <- jsonlite::fromJSON(rawToChar(res$content))

R/gi_fetch_templates.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ gi_fetch_templates <-
5353
template_name <- paste(template_name, collapse = ",")
5454

5555
r <- curl::curl_fetch_memory(
56-
glue::glue("https://www.gitignore.io/api/{template_name}")
56+
glue::glue("{backend_url()}/api/{template_name}")
5757
)
5858

5959
# Copy or not into the clipboard

R/gi_write_gitignore.R

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
#' @export
1111
#'
1212
#' @examples
13-
#' \donttest{
13+
#' \dontrun{
1414
#' f <- file.path(tempdir(), ".gitignore")
1515
#' new_lines <- gi_fetch_templates("r")
1616
#' gi_write_gitignore(new_lines, f)

R/zzz.R

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
backend_url <- function() {
2+
"https://www.toptal.com/developers/gitignore"
3+
}

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,11 +26,11 @@ knitr::opts_chunk$set(
2626

2727
<!-- badges: end -->
2828

29-
Based on the definition proposed by [freecodecamp](https://guide.freecodecamp.org/git/gitignore/):
29+
Based on the definition proposed by [freecodecamp](https://www.freecodecamp.org/news/gitignore-what-is-it-and-how-to-add-to-repo/):
3030

3131
> The .gitignore file is a text file that tells Git which files or folders to ignore in a project. A local .gitignore file is usually placed in the root directory of a project. You can also create a global .gitignore file and any entries in that file will be ignored in all of your Git repositories.
3232
33-
For any project, it is therefore important to have a `.gitignore` file that is complete and accurate. The package `gitignore` provides a simple R interface to the [gitignore.io](https://gitignore.io/) API. It can be used to fetch gitignore templates that can be included into the `.gitignore` file of you git repository. The `gitignore` R package can be used with R package, R Studio project or with any `.gitignore` file. Note that by default, the `usethis` package populates the `.gitignore` for the R language when you create a R project. However, it is common to use many different programming languages in a project such as `LaTeX`, `python`, `matlab`, `julia` and so one. This is where the `gitignore` package shines as it can be used to programmatically modify the `.gitignore` file of your project.
33+
For any project, it is therefore important to have a `.gitignore` file that is complete and accurate. The package `gitignore` provides a simple R interface to the [gitignore.io](https://www.toptal.com/developers/gitignore) API. It can be used to fetch gitignore templates that can be included into the `.gitignore` file of you git repository. The `gitignore` R package can be used with R package, R Studio project or with any `.gitignore` file. Note that by default, the `usethis` package populates the `.gitignore` for the R language when you create a R project. However, it is common to use many different programming languages in a project such as `LaTeX`, `python`, `matlab`, `julia` and so one. This is where the `gitignore` package shines as it can be used to programmatically modify the `.gitignore` file of your project.
3434

3535
## Installation
3636

README.md

Lines changed: 22 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,14 @@ Status](https://ci.appveyor.com/api/projects/status/github/ropensci/gitignore?br
1515
Status](https://travis-ci.org/ropensci/gitignore.svg?branch=master)](https://travis-ci.org/ropensci/gitignore)
1616
[![Codecov test
1717
coverage](https://codecov.io/gh/ropensci/gitignore/branch/master/graph/badge.svg)](https://codecov.io/gh/ropensci/gitignore?branch=master)
18-
1918
[![DOI](https://zenodo.org/badge/184759416.svg)](https://zenodo.org/badge/latestdoi/184759416)
19+
[![rOpenSci
20+
peer-review](https://badges.ropensci.org/303_status.svg)](https://github.com/ropensci/software-review/issues/303)
2021

2122
<!-- badges: end -->
2223

2324
Based on the definition proposed by
24-
[freecodecamp](https://guide.freecodecamp.org/git/gitignore/):
25+
[freecodecamp](https://www.freecodecamp.org/news/gitignore-what-is-it-and-how-to-add-to-repo/):
2526

2627
> The .gitignore file is a text file that tells Git which files or
2728
> folders to ignore in a project. A local .gitignore file is usually
@@ -31,8 +32,9 @@ Based on the definition proposed by
3132
3233
For any project, it is therefore important to have a `.gitignore` file
3334
that is complete and accurate. The package `gitignore` provides a simple
34-
R interface to the [gitignore.io](https://gitignore.io/) API. It can be
35-
used to fetch gitignore templates that can be included into the
35+
R interface to the
36+
[gitignore.io](https://www.toptal.com/developers/gitignore) API. It can
37+
be used to fetch gitignore templates that can be included into the
3638
`.gitignore` file of you git repository. The `gitignore` R package can
3739
be used with R package, R Studio project or with any `.gitignore` file.
3840
Note that by default, the `usethis` package populates the `.gitignore`
@@ -61,9 +63,9 @@ devtools::install_github("ropensci/gitignore")
6163

6264
There are currently two useful functions in the package:
6365

64-
- `gi_available_templates()` to fetch all supported gitignore
66+
- `gi_available_templates()` to fetch all supported gitignore
6567
templates.
66-
- `gi_fetch_templates()` to fetch one or many gitignore templates.
68+
- `gi_fetch_templates()` to fetch one or many gitignore templates.
6769

6870
Show the first 25 templates returned by `gi_available_templates()`.
6971

@@ -75,20 +77,20 @@ head(gi_available_templates(), 25)
7577
#> [4] "actionscript" "ada" "adobe"
7678
#> [7] "advancedinstaller" "adventuregamestudio" "agda"
7779
#> [10] "al" "alteraquartusii" "altium"
78-
#> [13] "android" "androidstudio" "angular"
79-
#> [16] "anjuta" "ansible" "apachecordova"
80-
#> [19] "apachehadoop" "appbuilder" "appceleratortitanium"
81-
#> [22] "appcode" "appcode+all" "appcode+iml"
82-
#> [25] "appengine"
80+
#> [13] "amplify" "android" "androidstudio"
81+
#> [16] "angular" "anjuta" "ansible"
82+
#> [19] "apachecordova" "apachehadoop" "appbuilder"
83+
#> [22] "appceleratortitanium" "appcode" "appcode+all"
84+
#> [25] "appcode+iml"
8385
```
8486

8587
Templates can be fetched using the `gi_fetch_templates()` function.
8688

8789
``` r
8890
gi_fetch_templates("R")
8991

90-
# Created by https://www.gitignore.io/api/r
91-
# Edit at https://www.gitignore.io/?templates=r
92+
# Created by https://www.toptal.com/developers/gitignore/api/r
93+
# Edit at https://www.toptal.com/developers/gitignore?templates=r
9294

9395
### R ###
9496
# History files
@@ -97,7 +99,6 @@ gi_fetch_templates("R")
9799

98100
# Session Data files
99101
.RData
100-
.RDataTmp
101102

102103
# User-specific files
103104
.Ruserdata
@@ -129,20 +130,23 @@ vignettes/*.pdf
129130
*.utf8.md
130131
*.knit.md
131132

133+
# R Environment Variables
134+
.Renviron
135+
132136
### R.Bookdown Stack ###
133137
# R package: bookdown caching files
134138
/*_files/
135139

136-
# End of https://www.gitignore.io/api/r
140+
# End of https://www.toptal.com/developers/gitignore/api/r
137141
```
138142

139143
Multiple templates can be fetched by specifying multiple values:
140144

141145
``` r
142146
gi_fetch_templates(c("java", "c++"))
143147

144-
# Created by https://www.gitignore.io/api/java,c++
145-
# Edit at https://www.gitignore.io/?templates=java,c++
148+
# Created by https://www.toptal.com/developers/gitignore/api/java,c++
149+
# Edit at https://www.toptal.com/developers/gitignore?templates=java,c++
146150

147151
### C++ ###
148152
# Prerequisites
@@ -203,7 +207,7 @@ gi_fetch_templates(c("java", "c++"))
203207
# virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
204208
hs_err_pid*
205209

206-
# End of https://www.gitignore.io/api/java,c++
210+
# End of https://www.toptal.com/developers/gitignore/api/java,c++
207211
```
208212

209213
By default, templates are copied into the clipboard. It is also possible

cran-comments.md

Lines changed: 2 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Test environments
22

3-
* local OS X install, R 3.6.1
4-
* Ubuntu 14.04 (on Travis-ci), oldrel, release, devel
3+
* Ubuntu (on Travis-ci), oldrel, release, devel
54
* win-builder (devel and release)
65

76
## R CMD check results
@@ -12,15 +11,4 @@
1211

1312
## Downstream dependencies
1413

15-
There are currently no reverse dependencies for this package.
16-
17-
## Re-submission
18-
19-
The package was archived because it was using the clipboard on Linux. This new release fixes this. Explicitly:
20-
21-
- Tests using the clipboard are now skipped on Linux.
22-
- The code in the vignette do not use the clipboard.
23-
- The code examples do not use the clipboard.
24-
- Temporary files created in the examples are now deleted using the `unlink()` function.
25-
26-
To the best of my knowledge, this release should fix all the clipboard related issues. Please let us know if anything is missing.
14+
There are currently no reverse dependencies for this package.

man/gi_write_gitignore.Rd

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)