Skip to content

Commit

Permalink
Add Travis script
Browse files Browse the repository at this point in the history
  • Loading branch information
eschnett committed Mar 15, 2019
1 parent 0213b97 commit b3cc777
Show file tree
Hide file tree
Showing 5 changed files with 63 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
language: julia
os:
- linux
- osx
julia:
- "1.0"
- "1.1"
- "nightly"
matrix:
allow_failures:
- julia: nightly
notifications:
email: false

script:
- if [[ -a .git/shallow ]]; then git fetch --unshallow; fi
- julia -e 'using Pkg; Pkg.build(); Pkg.test(coverage=true)'
after_success:
- julia -e 'using Pkg; cd(Pkg.dir("DropboxSDK")); Pkg.add("Coverage"); using Coverage; Coveralls.submit(Coveralls.process_folder())'
# - julia -e 'using Pkg; cd(Pkg.dir("DropboxSDK")); Pkg.add("Coverage"); using Coverage; Codecov.submit(Codecov.process_folder())'
22 changes: 22 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
The MIT License (MIT) <https://opensource.org/licenses/MIT>

Copyright (c) 2019 Erik Schnetter

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,8 @@

A Julia package to access Dropbox via its
[API](https://www.dropbox.com/developers).

[![Build Status (Travis)](https://travis-ci.org/eschnett/DropboxSDK.jl.svg?branch=master)](https://travis-ci.org/eschnett/DropboxSDK.jl)
XXX [![Build Status (Appveyor)](https://ci.appveyor.com/api/projects/status/4voe93gewdi9i0pq/branch/master?svg=true)](https://ci.appveyor.com/project/eschnett/asdf-jl/branch/master)
[![Coverage Status (Coveralls)](https://coveralls.io/repos/github/eschnett/DropboxSDK.jl/badge.svg?branch=master)](https://coveralls.io/github/eschnett/DropboxSDK.jl?branch=master)
XXX [![DOI](https://zenodo.org/badge/144600920.svg)](https://zenodo.org/badge/latestdoi/144600920)
4 changes: 4 additions & 0 deletions REQUIRE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
julia 1.0
ConfParser
HTTP
JSON
15 changes: 12 additions & 3 deletions src/DropboxSDK.jl
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,18 @@ struct Authorization
end

function read_authorization()::Authorization
conf = ConfParse("secrets.http")
parse_conf!(conf)
access_token = retrieve(conf, "access_token")
access_token = nothing
if access_token === nothing
access_token = get(ENV, "DROPBOXSDK_ACCESS_TOKEN", nothing)
end
if access_token === nothing
conf = ConfParse("secrets.http")
parse_conf!(conf)
access_token = retrieve(conf, "access_token")
end
if access_token === nothing
println("Error: Could not find access token for Dropbxo")
end
Authorization(access_token)
end

Expand Down

0 comments on commit b3cc777

Please sign in to comment.