Skip to content

Commit

Permalink
Merge pull request #3 from Overmuse/SR/remove_dividend_field
Browse files Browse the repository at this point in the history
remove troublesome field
  • Loading branch information
SebRollen authored Oct 1, 2021
2 parents c9e7437 + 4301b27 commit be47934
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,12 @@ jobs:
uses: actions/checkout@v2
- name: Read version number
id: read_toml
uses: outcome-co/action-read-toml@v2.0.10
uses: SebRollen/toml-action@v1.0.0
with:
path: Cargo.toml
key: package.version
file: Cargo.toml
field: package.version
- name: Set tag env variable
run: echo IMAGE_TAG=v${{steps.read_toml.outputs.package_version}} >> $GITHUB_ENV
run: echo IMAGE_TAG=v${{steps.read_toml.outputs.value}} >> $GITHUB_ENV
- uses: ncipollo/release-action@v1
continue-on-error: true
with:
Expand Down
8 changes: 3 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "iex"
version = "0.1.1"
version = "0.2.0"
authors = ["Sebastian Rollen <[email protected]>"]
edition = "2018"

Expand All @@ -9,18 +9,16 @@ edition = "2018"
[dependencies]
chrono = { version = "0.4", features = ["serde"] }
futures = { version = "0.3"}
itertools = "0.10.0"
reqwest = { version = "0.11", features = ["json"] }
rust_decimal = { version = "1.11.1", features = ["serde-float"] }
rust_decimal = { version = "1.11", features = ["serde-float"] }
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
serde_repr = "0.1"
thiserror = "1.0"
tokio = { version = "1.0", default-features = false, features = ["net"], optional = true}
tracing = "0.1"

[dev-dependencies]
futures-channel = "0.3"
mockito = "0.29"
rust_decimal_macros = "1.11.1"
rust_decimal_macros = "1.11"
tokio = { version = "1.0", default-features = false, features = ["macros", "rt-multi-thread"] }
5 changes: 3 additions & 2 deletions src/dividends.rs
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ pub struct Dividend {
pub amount: Decimal,
pub currency: String,
pub description: String,
pub declared_date: NaiveDate,
// This field is sometimes formatted as 0000-00-00, which breaks deserialization.
// pub declared_date: Option<NaiveDate>,
pub ex_date: NaiveDate,
pub flag: Flag,
pub frequency: String,
Expand Down Expand Up @@ -69,7 +70,7 @@ mod test {
.match_query(Matcher::AllOf(vec![
Matcher::UrlEncoded("token".into(), "TOKEN".into()),
]))
.with_body(r#"[{"amount":0.70919585493507512,"currency":"USD","declaredDate":"2020-10-19","description":"OrdinaryShares","exDate":"2020-10-28","flag":"Cash","frequency":"quarterly","paymentDate":"2020-11-06","recordDate":"2020-10-28","refid":2096218,"symbol":"AAPL","id":"DIVIDENDS","key":"AAPL","subkey":"2053393","date":1612392166191,"updated":1612392166191}]"#)
.with_body(r#"[{"amount":0.22,"currency":"USD","declaredDate":"0000-00-00","description":"Ordinary Shares","exDate":"2021-08-06","flag":"Cash","frequency":"quarterly","paymentDate":"2021-08-12","recordDate":"2021-08-09","refid":2274911,"symbol":"AAPL","id":"DIVIDENDS","key":"AAPL","subkey":"2274911","date":1628208000000,"updated":1627518795000}]"#)
.create();
let url = mockito::server_url();

Expand Down

0 comments on commit be47934

Please sign in to comment.