diff --git a/Cargo.lock b/Cargo.lock index 3175ce60..524044bd 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -710,7 +710,7 @@ dependencies = [ [[package]] name = "insta" version = "0.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" +source = "git+https://github.com/mitsuhiko/insta#8e32e354d1db280412592cfb627b26bbd58e0164" dependencies = [ "console 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)", "difference 2.0.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1567,7 +1567,7 @@ dependencies = [ "futures 0.1.29 (registry+https://github.com/rust-lang/crates.io-index)", "humantime 1.3.0 (registry+https://github.com/rust-lang/crates.io-index)", "hyper 0.12.35 (registry+https://github.com/rust-lang/crates.io-index)", - "insta 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "insta 0.11.0 (git+https://github.com/mitsuhiko/insta)", "jod-thread 0.1.0 (registry+https://github.com/rust-lang/crates.io-index)", "lazy_static 1.4.0 (registry+https://github.com/rust-lang/crates.io-index)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", @@ -1608,7 +1608,7 @@ name = "rojo-test" version = "0.1.0" dependencies = [ "env_logger 0.6.2 (registry+https://github.com/rust-lang/crates.io-index)", - "insta 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)", + "insta 0.11.0 (git+https://github.com/mitsuhiko/insta)", "log 0.4.8 (registry+https://github.com/rust-lang/crates.io-index)", "paste 0.1.6 (registry+https://github.com/rust-lang/crates.io-index)", "rbx_dom_weak 1.10.0 (registry+https://github.com/rust-lang/crates.io-index)", @@ -2383,7 +2383,7 @@ dependencies = [ "checksum indexmap 1.2.0 (registry+https://github.com/rust-lang/crates.io-index)" = "a61202fbe46c4a951e9404a720a0180bcf3212c750d735cb5c4ba4dc551299f3" "checksum inotify 0.6.1 (registry+https://github.com/rust-lang/crates.io-index)" = "40b54539f3910d6f84fbf9a643efd6e3aa6e4f001426c0329576128255994718" "checksum inotify-sys 0.1.3 (registry+https://github.com/rust-lang/crates.io-index)" = "e74a1aa87c59aeff6ef2cc2fa62d41bc43f54952f55652656b18a02fd5e356c0" -"checksum insta 0.11.0 (registry+https://github.com/rust-lang/crates.io-index)" = "23f83ab4ee86f38b292f0420c27fd412690a4baa9ea0ad4e3fa624bf34379b76" +"checksum insta 0.11.0 (git+https://github.com/mitsuhiko/insta)" = "" "checksum iovec 0.1.2 (registry+https://github.com/rust-lang/crates.io-index)" = "dbe6e417e7d0975db6512b90796e8ce223145ac4e33c377e4a42882a0e88bb08" "checksum itertools 0.8.0 (registry+https://github.com/rust-lang/crates.io-index)" = "5b8467d9c1cebe26feb08c640139247fac215782d35371ade9a2136ed6085358" "checksum itoa 0.4.4 (registry+https://github.com/rust-lang/crates.io-index)" = "501266b7edd0174f8530248f87f99c88fbe60ca4ef3dd486835b8d8d53136f7f" diff --git a/Cargo.toml b/Cargo.toml index d13280d0..f37be268 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -88,5 +88,5 @@ walkdir = "2.1" criterion = "0.3" [dev-dependencies.insta] -version = "0.11.0" +git = "https://github.com/mitsuhiko/insta" features = ["redactions"] diff --git a/rojo-test/Cargo.toml b/rojo-test/Cargo.toml index 366dfe8c..91b13449 100644 --- a/rojo-test/Cargo.toml +++ b/rojo-test/Cargo.toml @@ -23,5 +23,5 @@ rojo-insta-ext = { path = "../rojo-insta-ext" } rojo = { path = ".." } [dependencies.insta] -version = "0.11.0" +git = "https://github.com/mitsuhiko/insta" features = ["redactions"] diff --git a/rojo-test/serve-test-snapshots/serve_test__add_folder_all-2.snap b/rojo-test/serve-test-snapshots/serve_test__add_folder_all-2.snap index 94948cf8..379aa949 100644 --- a/rojo-test/serve-test-snapshots/serve_test__add_folder_all-2.snap +++ b/rojo-test/serve-test-snapshots/serve_test__add_folder_all-2.snap @@ -4,23 +4,23 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: add_folder - ClassName: Folder - Properties: {} Children: - id-3 - Metadata: - ignoreUnknownInstances: false - id-3: - Id: id-3 - Parent: id-2 - Name: my-new-folder ClassName: Folder - Properties: {} - Children: [] + Id: id-2 Metadata: ignoreUnknownInstances: false + Name: add_folder + Parent: ~ + Properties: {} + id-3: + Children: [] + ClassName: Folder + Id: id-3 + Metadata: + ignoreUnknownInstances: false + Name: my-new-folder + Parent: id-2 + Properties: {} messageCursor: 1 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__add_folder_all.snap b/rojo-test/serve-test-snapshots/serve_test__add_folder_all.snap index 03362f41..53d11e9b 100644 --- a/rojo-test/serve-test-snapshots/serve_test__add_folder_all.snap +++ b/rojo-test/serve-test-snapshots/serve_test__add_folder_all.snap @@ -4,13 +4,13 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: add_folder - ClassName: Folder - Properties: {} Children: [] + ClassName: Folder + Id: id-2 Metadata: ignoreUnknownInstances: false + Name: add_folder + Parent: ~ + Properties: {} messageCursor: 0 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__add_folder_subscribe.snap b/rojo-test/serve-test-snapshots/serve_test__add_folder_subscribe.snap index bfdfeadf..646fcfea 100644 --- a/rojo-test/serve-test-snapshots/serve_test__add_folder_subscribe.snap +++ b/rojo-test/serve-test-snapshots/serve_test__add_folder_subscribe.snap @@ -4,16 +4,16 @@ expression: "subscribe_response.intern_and_redact(&mut redactions, ())" --- messageCursor: 1 messages: - - removedInstances: [] - addedInstances: + - addedInstances: id-3: - Id: id-3 - Parent: id-2 - Name: my-new-folder - ClassName: Folder - Properties: {} Children: [] + ClassName: Folder + Id: id-3 Metadata: ignoreUnknownInstances: false + Name: my-new-folder + Parent: id-2 + Properties: {} + removedInstances: [] updatedInstances: [] sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__empty_all.snap b/rojo-test/serve-test-snapshots/serve_test__empty_all.snap index d8a33da7..7aca5205 100644 --- a/rojo-test/serve-test-snapshots/serve_test__empty_all.snap +++ b/rojo-test/serve-test-snapshots/serve_test__empty_all.snap @@ -4,13 +4,13 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: empty - ClassName: Folder - Properties: {} Children: [] + ClassName: Folder + Id: id-2 Metadata: ignoreUnknownInstances: true + Name: empty + Parent: ~ + Properties: {} messageCursor: 0 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__just_txt_all.snap b/rojo-test/serve-test-snapshots/serve_test__just_txt_all.snap index fb31572b..e67add37 100644 --- a/rojo-test/serve-test-snapshots/serve_test__just_txt_all.snap +++ b/rojo-test/serve-test-snapshots/serve_test__just_txt_all.snap @@ -4,16 +4,16 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: just_txt + Children: [] ClassName: StringValue + Id: id-2 + Metadata: + ignoreUnknownInstances: false + Name: just_txt + Parent: ~ Properties: Value: Type: String Value: "Hello, world!" - Children: [] - Metadata: - ignoreUnknownInstances: false messageCursor: 0 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__scripts_all-2.snap b/rojo-test/serve-test-snapshots/serve_test__scripts_all-2.snap index d65cca84..edc0daef 100644 --- a/rojo-test/serve-test-snapshots/serve_test__scripts_all-2.snap +++ b/rojo-test/serve-test-snapshots/serve_test__scripts_all-2.snap @@ -4,39 +4,39 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: scripts - ClassName: Folder - Properties: {} Children: - id-3 - id-4 + ClassName: Folder + Id: id-2 Metadata: ignoreUnknownInstances: false + Name: scripts + Parent: ~ + Properties: {} id-3: - Id: id-3 - Parent: id-2 - Name: bar + Children: [] ClassName: Script + Id: id-3 + Metadata: + ignoreUnknownInstances: false + Name: bar + Parent: id-2 Properties: Source: Type: String Value: "-- Hello, from bar!" + id-4: Children: [] + ClassName: ModuleScript + Id: id-4 Metadata: ignoreUnknownInstances: false - id-4: - Id: id-4 - Parent: id-2 Name: foo - ClassName: ModuleScript + Parent: id-2 Properties: Source: Type: String Value: Updated foo! - Children: [] - Metadata: - ignoreUnknownInstances: false messageCursor: 1 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__scripts_all.snap b/rojo-test/serve-test-snapshots/serve_test__scripts_all.snap index e11c4e25..64542c22 100644 --- a/rojo-test/serve-test-snapshots/serve_test__scripts_all.snap +++ b/rojo-test/serve-test-snapshots/serve_test__scripts_all.snap @@ -4,39 +4,39 @@ expression: "read_response.intern_and_redact(&mut redactions, root_id)" --- instances: id-2: - Id: id-2 - Parent: ~ - Name: scripts - ClassName: Folder - Properties: {} Children: - id-3 - id-4 + ClassName: Folder + Id: id-2 Metadata: ignoreUnknownInstances: false + Name: scripts + Parent: ~ + Properties: {} id-3: - Id: id-3 - Parent: id-2 - Name: bar + Children: [] ClassName: Script + Id: id-3 + Metadata: + ignoreUnknownInstances: false + Name: bar + Parent: id-2 Properties: Source: Type: String Value: "-- Hello, from bar!" + id-4: Children: [] + ClassName: ModuleScript + Id: id-4 Metadata: ignoreUnknownInstances: false - id-4: - Id: id-4 - Parent: id-2 Name: foo - ClassName: ModuleScript + Parent: id-2 Properties: Source: Type: String Value: "-- Hello, from foo!" - Children: [] - Metadata: - ignoreUnknownInstances: false messageCursor: 0 sessionId: id-1 diff --git a/rojo-test/serve-test-snapshots/serve_test__scripts_subscribe.snap b/rojo-test/serve-test-snapshots/serve_test__scripts_subscribe.snap index f71ad85b..b3ee2237 100644 --- a/rojo-test/serve-test-snapshots/serve_test__scripts_subscribe.snap +++ b/rojo-test/serve-test-snapshots/serve_test__scripts_subscribe.snap @@ -1,18 +1,18 @@ --- source: rojo-test/src/serve_test.rs -expression: redactions.redacted_yaml(subscribe_response) +expression: "subscribe_response.intern_and_redact(&mut redactions, ())" --- messageCursor: 1 messages: - - removedInstances: [] - addedInstances: {} + - addedInstances: {} + removedInstances: [] updatedInstances: - - id: id-4 + - changedClassName: ~ + changedMetadata: ~ changedName: ~ - changedClassName: ~ changedProperties: Source: Type: String Value: Updated foo! - changedMetadata: ~ + id: id-4 sessionId: id-1