Skip to content

Commit

Permalink
Update crate to use openssl 1.1.
Browse files Browse the repository at this point in the history
  • Loading branch information
vaijira committed Feb 16, 2020
1 parent 56b1ce0 commit 26e8beb
Show file tree
Hide file tree
Showing 8 changed files with 178 additions and 153 deletions.
6 changes: 4 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,12 @@ rust:
before_script:
- |
pip install 'travis-cargo<0.2' --user &&
export PATH=$HOME/.local/bin:$PATH
export PATH=$HOME/.local/bin:$PATH &&
rustup component add clippy
script:
- |
travis-cargo build &&
cargo clippy &&
travis-cargo test &&
travis-cargo bench &&
travis-cargo --only stable doc
Expand All @@ -26,5 +28,5 @@ after_success:
- travis-cargo coveralls --no-sudo --verify
env:
global:
- TRAVIS_CARGO_NIGHTLY_FEATURE="clippy skeptic test-quandl-api"
- TRAVIS_CARGO_NIGHTLY_FEATURE="skeptic test-quandl-api"
- secure: k9FwpBXnrJz8lboIHm9/UKxQ2UG9vdGKMaZ2XGYxrStYx/OqmFOPxJsXBOiVZZz8aje9aVh6R86FQtX/QvXMPmisPpmxP3tJ2LQAu/38z+lLT4jTyaL1qOC5l5jlw38fcTuobcuxp4JeR4MdY73W2amptCPtW1oB0s+CZi+sBqavqicATWNWmUH6HCSN8wYqf+cz27FjrSKsignCMfJVrknBs1gLAdRrpuKJGYQ+S/DeOh0xCkpkrLo+GdqfIbcOitT0cEQd9ojEyChs2AczBNzpyoB1te8QQ5l3P+k/EnL9RLH+43nstYCd/axTB5r6jdgsj1sWB1eS8HpGv/P1ezhQs+qJXgYvFbPUFLXHvy6Y+m0yH37VxaBrjrc7EX378KYI/sfMXTcd4LfO+F5G58iU3rUPmFiZPkpBzvIazOxtcQgp8E0ndCXHklRfmiUWe3Q2M+3d4OQSg8+ckMnGMpEoG26c1AdSl8wC7ng8wvfQ9gOvFxZmFRSqB6J1LFxHguqIlNa0nrMRLrUk7NcUlvYZ9Kh420eIvIJctqNNPG6J7RLl7XnSeHKDOayesFKCI6r7IgwFhTHf1KolgTDnOEQO9yrFQ4Pec75SZMDpmYyq/nTMhhsCN1tuqAaCCcPh6xAq5K/NsRqpXXTK1PWgufGm1Z/uqLb2hvoZaiGIxk0=
25 changes: 11 additions & 14 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,30 +5,27 @@ documentation = "http://open.frostly.com/quandl"
keywords = ["quandl"]
license = "MIT/Apache-2.0"
name = "quandl"
edition = "2018"
readme = "README.md"
repository = "https://github.com/frostly/quandl"
version = "0.1.1"
build = "build_readme_test.rs"
version = "0.2.0"

[dependencies]
chrono = "0.2.17"
curl = "0.2.14"
hyper = "0.7.0"
quick-error = "0.1.4"
serde_json = "0.6.0"
url = "0.5.0"

[dependencies.clippy]
optional = true
version = "^0.0"
bytes = "0.5"
chrono = "0.4.10"
hyper = "0.13.2"
hyper-tls = "0.4.1"
quick-error = "1.2.3"
serde_json = "1.0.48"
tokio = { version = "0.2.11", features = ["full"] }

[features]
default = []
# used to run test cases that call out to the quandl API directly
test-quandl-api = []

[build-dependencies]
skeptic = { version = "0.4.0", optional = true }
skeptic = { version = "0.13.4", optional = true }

[dev-dependencies]
skeptic = "0.4.0"
skeptic = "0.13.4"
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ datasets.
# Usage

```rust
extern crate quandl;
crate quandl;

use quandl::{Quandl, NaiveDate};

Expand Down
File renamed without changes.
2 changes: 1 addition & 1 deletion src/error.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use chrono;
use hyper;
use serde_json;
use chrono;

/// Result type often returned from methods that can have quandl `Error`s.
pub type Result<T> = ::std::result::Result<T, Error>;
Expand Down
47 changes: 24 additions & 23 deletions src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,37 +1,38 @@
#![deny(missing_docs,
missing_debug_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications)]
#![deny(
missing_docs,
missing_debug_implementations,
trivial_casts,
trivial_numeric_casts,
unsafe_code,
unstable_features,
unused_import_braces,
unused_qualifications
)]

#![cfg_attr(all(test, feature = "nightly"), feature(test))]
#![cfg_attr(test, deny(warnings))]
#![cfg_attr(feature = "clippy", allow(unstable_features))]
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
#![cfg_attr(feature = "clippy", deny(clippy))]
#![cfg_attr(feature = "cargo-clippy", allow(unstable_features))]
#![deny(clippy::all)]

//! Library to fetch data from the [Quandl v3 API](https://www.quandl.com/docs/api)
//! for financial and economic datasets.
extern crate curl;
extern crate serde_json;
extern crate url;
extern crate hyper;
#[macro_use] extern crate quick_error;
extern crate serde_json;
extern crate tokio;
#[macro_use]
extern crate quick_error;
extern crate chrono;

pub use quandl::Quandl;
pub use quandl_request::*;
pub use error::{Error, Result};
pub use serde_json::Value as JsonValue;
pub use chrono::NaiveDate as NaiveDate;
pub use crate::chrono::NaiveDate;
pub use crate::error::{Error, Result};
pub use crate::quandl::Quandl;
pub use crate::quandl_request::*;
pub use crate::serde_json::Value as JsonValue;

/// Errors
pub mod error;
/// Handles common information across requests.
pub mod quandl;
/// Handles building and sending requests to Quandl
pub mod quandl_request;
/// Errors
pub mod error;
14 changes: 8 additions & 6 deletions src/quandl.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
use std::fmt::{self, Formatter, Debug};
use hyper;
use super::QuandlRequest;
use hyper;
use hyper_tls::HttpsConnector;
use std::fmt::{self, Debug, Formatter};

/// Parameters for Quandl
pub struct Quandl {
/// Http client
pub http_client: hyper::Client,
pub http_client: hyper::Client<HttpsConnector<hyper::client::HttpConnector>>,
/// Quandl API key. Used for premium databases and/or increased usage limits
pub api_key: Option<String>,
}
Expand Down Expand Up @@ -36,8 +37,9 @@ impl Quandl {

impl Default for Quandl {
fn default() -> Quandl {
let https = HttpsConnector::new();
Quandl {
http_client: hyper::Client::new(),
http_client: hyper::Client::builder().build::<_, hyper::Body>(https),
api_key: None,
}
}
Expand All @@ -46,7 +48,7 @@ impl Default for Quandl {
impl Debug for Quandl {
fn fmt(&self, fmt: &mut Formatter) -> fmt::Result {
fmt.debug_struct("QuandlRequest")
.field("api_key", &self.api_key)
.finish()
.field("api_key", &self.api_key)
.finish()
}
}
Loading

0 comments on commit 26e8beb

Please sign in to comment.