From 48d0903138731a31782b16e65a0354582a1e30ed Mon Sep 17 00:00:00 2001 From: Mingwei Samuel Date: Mon, 4 Nov 2019 23:29:46 -0800 Subject: [PATCH] Version 0.1.0 --- .gitignore | 4 ++++ Cargo.toml | 14 +++++++++----- LICENSE | 7 +++++++ src/req/token_bucket.test.rs | 2 +- srcgen/.gitignore | 2 -- tests/tests_euw.rs | 17 +++++++++++++++++ 6 files changed, 38 insertions(+), 8 deletions(-) create mode 100644 LICENSE delete mode 100644 srcgen/.gitignore diff --git a/.gitignore b/.gitignore index d5fedaa..748ea77 100644 --- a/.gitignore +++ b/.gitignore @@ -3,3 +3,7 @@ /doc Cargo.lock apikey.txt + +/srcgen/node_modules/ +/srcgen/.*.json + diff --git a/Cargo.toml b/Cargo.toml index 4ddecb5..b74163c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,16 @@ [package] name = "riven" -version = "0.0.5" +version = "0.1.0" authors = ["Mingwei Samuel "] repository = "https://github.com/MingweiSamuel/Riven" -description = "Riot API Library (WIP)" -license = "LGPL-3.0" +description = "Riot Games API Library" +readme = "README.md" +license = "MIT" edition = "2018" -include = [ "src/**" ] +include = [ "src/**", "/README.md" ] + +[badges] +travis-ci = { repository = "MingweiSamuel/Riven" } # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html @@ -26,7 +30,7 @@ url = "2.1" [dev-dependencies] colored = "1.8" env_logger = "0.7" -fake_clock = { git = "https://github.com/MingweiSamuel/fake_clock", branch = "master" } +fake_instant = "0.4" lazy_static = "1.4" tokio = "0.2.0-alpha.6" futures-util-preview = "0.3.0-alpha.19" diff --git a/LICENSE b/LICENSE new file mode 100644 index 0000000..9201d19 --- /dev/null +++ b/LICENSE @@ -0,0 +1,7 @@ +Copyright 2019 Mingwei Samuel + +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. \ No newline at end of file diff --git a/src/req/token_bucket.test.rs b/src/req/token_bucket.test.rs index 7a114d1..ce78ba4 100644 --- a/src/req/token_bucket.test.rs +++ b/src/req/token_bucket.test.rs @@ -1,6 +1,6 @@ #![cfg(test)] -use fake_clock::FakeClock as Instant; +use fake_instant::FakeClock as Instant; /// This is a hack to test token bucket, substituting FakeClock for Instant. mod token_bucket { diff --git a/srcgen/.gitignore b/srcgen/.gitignore deleted file mode 100644 index b204397..0000000 --- a/srcgen/.gitignore +++ /dev/null @@ -1,2 +0,0 @@ -node_modules/ -.*.json diff --git a/tests/tests_euw.rs b/tests/tests_euw.rs index 558d437..227ca99 100644 --- a/tests/tests_euw.rs +++ b/tests/tests_euw.rs @@ -25,5 +25,22 @@ async_tests!{ rassert!(s.len() >= 142, "Expected masteries: {}.", s.len()); Ok(()) }, + // // TFT tests. + // tftleaguev1_getchallengerleague: async { + // let p = RIOT_API.tft_league_v1().get_challenger_league(Region::EUW); + // let l = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT Challenger.".to_owned())?; + // rassert!(l.entries.len() > 10, "Expected a few challenger players, got: {}.", l.entries.len()); + // Ok(()) + // }, + // tftmatchv1_getmatch: async { + // let p = RIOT_API.tft_match_v1().get_match(Region::AMERICAS, "PBE1_4328907912"); + // let _m = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT match.".to_owned())?; + // Ok(()) + // }, + // tftsummonerv1_getbyname: async { + // let p = RIOT_API.tft_summoner_v1().get_by_summoner_name(Region::EUW, "相当猥琐"); + // let _s = p.await.map_err(|e| e.to_string())?.ok_or("Failed to get TFT summoner.".to_owned())?; + // Ok(()) + // }, } }