File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1616 steps :
1717 - uses : actions/checkout@v2
1818 - uses : taiki-e/install-action@cargo-hack
19- - name : Build
20- run : cargo hack build --each-feature --verbose
2119 - name : Run tests
22- run : cargo hack test --each-feature --verbose
20+ run : ./scripts/ test-features.sh
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+
3+ set -ueo pipefail
4+
5+ cargo metadata --format-version 1 | jq ' .packages[] | select(.name == "scryfall") | .features | keys[]' -r | while read -r feature; do
6+ cargo test --no-default-features --features " $feature ,default-tls"
7+ done
8+
9+ cargo test --all-features
Original file line number Diff line number Diff line change @@ -287,6 +287,9 @@ pub struct Card {
287287 /// the same name (tokens, Unstable variants, etc).
288288 pub oracle_id : Option < Uuid > ,
289289
290+ /// This card’s Resource ID on Gatherer, if any.
291+ pub resource_id : Option < String > ,
292+
290293 /// A link to where you can begin paginating all re/prints for this card on
291294 /// Scryfall’s API.
292295 pub prints_search_uri : Uri < List < Card > > ,
Original file line number Diff line number Diff line change @@ -335,13 +335,20 @@ mod tests {
335335
336336 #[ tokio:: test]
337337 async fn numeric_property_comparison_buffered ( ) {
338- let card = Card :: search_random ( Query :: And ( vec ! [
339- power( eq( NumProperty :: Toughness ) ) ,
340- pow_tou( eq( NumProperty :: Cmc ) ) ,
341- not( CardIs :: Funny ) ,
342- ] ) )
343- . await
344- . unwrap ( ) ;
338+ let card = loop {
339+ let card = Card :: search_random ( Query :: And ( vec ! [
340+ power( eq( NumProperty :: Toughness ) ) ,
341+ pow_tou( eq( NumProperty :: Cmc ) ) ,
342+ not( CardIs :: Funny ) ,
343+ ] ) )
344+ . await
345+ . unwrap ( ) ;
346+
347+ // dfcs have don't have power and toughness on the top level card
348+ if card. power . is_some ( ) || card. toughness . is_some ( ) {
349+ break card;
350+ }
351+ } ;
345352
346353 let power = card
347354 . power
Original file line number Diff line number Diff line change @@ -230,6 +230,12 @@ fn match_on_promo_type(f: PromoType) {
230230 PromoType :: Vault => todo ! ( ) ,
231231 PromoType :: Wizardsplaynetwork => todo ! ( ) ,
232232 PromoType :: DragonScaleFoil => todo ! ( ) ,
233+ PromoType :: Beginnerbox => todo ! ( ) ,
234+ PromoType :: Manafoil => todo ! ( ) ,
235+ PromoType :: Resale => todo ! ( ) ,
236+ PromoType :: Sldbonus => todo ! ( ) ,
237+ PromoType :: Sourcematerial => todo ! ( ) ,
238+ PromoType :: Startercollection => todo ! ( ) ,
233239 _ => todo ! ( ) ,
234240 }
235241}
Original file line number Diff line number Diff line change @@ -211,6 +211,7 @@ fn match_on_promo_type(f: PromoType) {
211211 PromoType :: Silverfoil => todo ! ( ) ,
212212 PromoType :: Singularityfoil => todo ! ( ) ,
213213 PromoType :: Sldbonus => todo ! ( ) ,
214+ PromoType :: Sourcematerial => todo ! ( ) ,
214215 PromoType :: Stamped => todo ! ( ) ,
215216 PromoType :: Startercollection => todo ! ( ) ,
216217 PromoType :: Starterdeck => todo ! ( ) ,
Original file line number Diff line number Diff line change @@ -217,6 +217,7 @@ fn match_on_promo_type(f: PromoType) {
217217 PromoType :: Silverfoil => todo ! ( ) ,
218218 PromoType :: Singularityfoil => todo ! ( ) ,
219219 PromoType :: Sldbonus => todo ! ( ) ,
220+ PromoType :: Sourcematerial => todo ! ( ) ,
220221 PromoType :: Stamped => todo ! ( ) ,
221222 PromoType :: Startercollection => todo ! ( ) ,
222223 PromoType :: Starterdeck => todo ! ( ) ,
You can’t perform that action at this time.
0 commit comments