-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* New Google URLs * Use replace and startswith * Sync branch (#14) * Update doc.yml * fix * add Project.toml * fix * add ci * add methods docs * Update readme
- Loading branch information
1 parent
cdd05df
commit 56a648c
Showing
7 changed files
with
166 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,19 @@ | ||
name = "GoogleDrive" | ||
uuid = "91feb7a0-3508-11ea-1e8e-afea2c1c9a19" | ||
authors = ["tejasvaidhyadev <[email protected]>"] | ||
version = "0.1.2" | ||
authors = ["tejasvaidhyadev <[email protected]> and contributors"] | ||
version = "0.2" | ||
|
||
[deps] | ||
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe" | ||
Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" | ||
HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" | ||
Random = "9a3f8284-a2c9-5f02-9a11-845980a1fd5c" | ||
DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe" | ||
Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" | ||
|
||
|
||
[compat] | ||
julia = "1" | ||
HTTP = "1.4.0" | ||
julia = "1.9" | ||
DataDeps = "0.7.10" | ||
Documenter = "0.24,0.27" | ||
|
||
|
||
[extras] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
|
||
[targets] | ||
test = ["Test"] | ||
Documenter = "1" | ||
HTTP = "1.4.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
## Methods list | ||
|
||
```@index | ||
``` | ||
|
||
## Methods usage | ||
|
||
```@autodocs | ||
Modules = [GoogleDrive] | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
[deps] | ||
Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,23 @@ | ||
using GoogleDrive | ||
using GoogleDrive: google_download, google_download_url | ||
#using Downloads: download | ||
using Test | ||
|
||
@testset "GoogleDrive.jl" begin | ||
# Write your own tests here. | ||
|
||
src = "https://drive.google.com/file/d/XYZ" | ||
dst = "https://docs.google.com/uc?export=download&id=XYZ" | ||
@test google_download_url(src) == dst | ||
@test google_download_url(dst) == dst | ||
@test_throws ArgumentError google_download_url("foo") | ||
|
||
#= | ||
The following test reads a small Julia file from GoogleDrive. | ||
The test will fail if that Julia file ever disappears. | ||
=# | ||
url = "https://drive.google.com/file/d/1GqmszfSB_LHGQEQpSjoiPyDROZ5a8Ls4" | ||
io = IOBuffer() | ||
google_download(url, io) # mutates io | ||
str = String(take!(io)) | ||
@test str[1:2] == "#=" | ||
|
||
end |