From d202aaac94eead7ab7f685aedabdaf702ad75d82 Mon Sep 17 00:00:00 2001 From: Sean T Allen Date: Sun, 14 Oct 2018 09:52:09 -0400 Subject: [PATCH] Rename bundle.json to tack.json --- README.md | 4 +-- stable/_bundle_locator.pony | 2 +- stable/_test.pony | 6 ++-- stable/bundle.pony | 4 +-- stable/main.pony | 4 +-- stable/test/integration/test_env.pony | 46 +++++++++++++-------------- stable/test/test_bundle.pony | 12 +++---- 7 files changed, 39 insertions(+), 39 deletions(-) diff --git a/README.md b/README.md index e6d17fe..2bbf668 100644 --- a/README.md +++ b/README.md @@ -176,7 +176,7 @@ actor Main ```bash stable fetch -# The dependencies listed in `bundle.json` will be fetched +# The dependencies listed in `tack.json` will be fetched # and/or updated into the local `.deps` directory. ``` ``` @@ -193,7 +193,7 @@ Checking connectivity... done. ```bash stable env ponyc --debug -# The local paths to the dependencies listed in `bundle.json` +# The local paths to the dependencies listed in `tack.json` # will be included in the `PONYPATH` environment variable, # available to `use` in the `ponyc` invocation. # You can run any custom command here - not just `ponyc`. diff --git a/stable/_bundle_locator.pony b/stable/_bundle_locator.pony index 7c22ac8..5302a7e 100644 --- a/stable/_bundle_locator.pony +++ b/stable/_bundle_locator.pony @@ -5,7 +5,7 @@ primitive _BundleLocator var path = start_path while path.size() > 0 do let candidate = try - FilePath(env.root as AmbientAuth, path)?.join("bundle.json")? + FilePath(env.root as AmbientAuth, path)?.join("tack.json")? else return None end diff --git a/stable/_test.pony b/stable/_test.pony index 2748355..d632aff 100644 --- a/stable/_test.pony +++ b/stable/_test.pony @@ -23,10 +23,10 @@ class _TestBundleLocator is UnitTest h.assert_eq[String]("stable/test/testdata/nested/deeply", _BundleLocator(h.env, bundle("nested/deeply")) as String) - // nested/empty has no bundle.json + // nested/empty has no tack.json h.assert_eq[String]("stable/test/testdata/nested", _BundleLocator(h.env, bundle("nested/empty")) as String) - // stable itself has no bundle.json, so this ancestor-checking - // from stable/test/testdata/empty yields no bundle.json + // stable itself has no tack.json, so this ancestor-checking + // from stable/test/testdata/empty yields no tack.json h.assert_eq[None](None, _BundleLocator(h.env, bundle("empty")) as None) diff --git a/stable/bundle.pony b/stable/bundle.pony index 0b7219d..822675c 100644 --- a/stable/bundle.pony +++ b/stable/bundle.pony @@ -14,7 +14,7 @@ class Bundle path = path' log = log' - let bundle_path = path.join("bundle.json")? + let bundle_path = path.join("tack.json")? if not bundle_path.exists() then if create_on_missing then @@ -87,5 +87,5 @@ class Bundle else JsonArray end deps_array.data.push(dep_json) - let file = CreateFile(path.join("bundle.json")?) as File + let file = CreateFile(path.join("tack.json")?) as File file.write(json.string(" ", true)) diff --git a/stable/main.pony b/stable/main.pony index 60b9a0c..7610f78 100644 --- a/stable/main.pony +++ b/stable/main.pony @@ -17,7 +17,7 @@ actor Main "" " A simple dependency manager for the Pony language." "" - " Invoke in a working directory containing a bundle.json." + " Invoke in a working directory containing a tack.json." "" "Commands:" " help - Print this message" @@ -41,7 +41,7 @@ actor Main if create_on_missing then Bundle(FilePath(env.root as AmbientAuth, cwd)?, log, true)? else - log("No bundle.json in current working directory or ancestors.") + log("No tack.json in current working directory or ancestors.") error end end diff --git a/stable/test/integration/test_env.pony b/stable/test/integration/test_env.pony index df4c0ab..60f83ac 100644 --- a/stable/test/integration/test_env.pony +++ b/stable/test/integration/test_env.pony @@ -18,7 +18,7 @@ actor EnvTests is TestList class TestEnvNoBundle is UnitTest new iso create() => None - fun name(): String => "integration.Env(no bundle.json)" + fun name(): String => "integration.Env(no tack.json)" fun apply(h: TestHelper) => h.long_test(2_000_000_000) @@ -35,7 +35,7 @@ class TestEnvNoBundle is UnitTest let notifier: ProcessNotify iso = _ExpectClient(h, None, - ["No bundle.json in current working directory or ancestors."], + ["No tack.json in current working directory or ancestors."], 0) _Exec(h, "stable env", tmp.path, consume notifier) @@ -59,13 +59,13 @@ class TestEnvEmptyBundleInSameDir is UnitTest let f = try - Directory(tmp)?.create_file("bundle.json")? + Directory(tmp)?.create_file("tack.json")? else - h.fail("failed to create bundle.json in temporary directory") + h.fail("failed to create tack.json in temporary directory") h.complete(false) return end - h.assert_true(f.write("{\"deps\":[]}\n"), "prepare bundle.json") + h.assert_true(f.write("{\"deps\":[]}\n"), "prepare tack.json") let notifier: ProcessNotify iso = _ExpectClient(h, ["PONYPATH=\n"], // empty @@ -93,9 +93,9 @@ class TestEnvBundleInSameDir is UnitTest let f = try - Directory(tmp)?.create_file("bundle.json")? + Directory(tmp)?.create_file("tack.json")? else - h.fail("failed to create bundle.json in temporary directory") + h.fail("failed to create tack.json in temporary directory") h.complete(false) return end @@ -104,7 +104,7 @@ class TestEnvBundleInSameDir is UnitTest {\"type\": \"local-git\", \"local-path\":\"../local-git/b\"}, {\"type\": \"github\", \"repo\":\"github/c\"}, {\"type\": \"gitlab\", \"repo\":\"gitlab/d\"} - ]}\n"), "prepare bundle.json") + ]}\n"), "prepare tack.json") let expected = try @@ -144,15 +144,15 @@ class TestEnvBundleInSameDirWithCall is UnitTest let f = try - Directory(tmp)?.create_file("bundle.json")? + Directory(tmp)?.create_file("tack.json")? else - h.fail("failed to create bundle.json in temporary directory") + h.fail("failed to create tack.json in temporary directory") h.complete(false) return end h.assert_true(f.write("{\"deps\":[ {\"type\": \"local\", \"local-path\":\"../local/a\"} - ]}\n"), "prepare bundle.json") + ]}\n"), "prepare tack.json") let notifier: ProcessNotify iso = _ExpectClient(h, ["../local/a"], @@ -163,7 +163,7 @@ class TestEnvBundleInSameDirWithCall is UnitTest class TestEnvBundleInParentDir is UnitTest new iso create() => None - fun name(): String => "integration.Env(bundle.json in parent dir)" + fun name(): String => "integration.Env(tack.json in parent dir)" fun apply(h: TestHelper) => h.long_test(2_000_000_000) @@ -182,15 +182,15 @@ class TestEnvBundleInParentDir is UnitTest try h.assert_true(Directory(tmp)?.mkdir("nested"), "create nested directory") let n = tmp.join("nested")? - (Directory(tmp)?.create_file("bundle.json")?, n) + (Directory(tmp)?.create_file("tack.json")?, n) else - h.fail("failed to create bundle.json in nested temporary directory") + h.fail("failed to create tack.json in nested temporary directory") h.complete(false) return end h.assert_true(f.write("{\"deps\":[ {\"type\": \"local\", \"local-path\":\"../local/a\"} - ]}\n"), "prepare bundle.json") + ]}\n"), "prepare tack.json") let notifier: ProcessNotify iso = _ExpectClient(h, ["PONYPATH=" + Path.join(tmp.path, "../local/a")], @@ -201,7 +201,7 @@ class TestEnvBundleInParentDir is UnitTest class TestEnvBadBundleInNestedAndValidBundleInParentDir is UnitTest new iso create() => None - fun name(): String => "integration.Env(invalid bundle.json in nested dir)" + fun name(): String => "integration.Env(invalid tack.json in nested dir)" fun apply(h: TestHelper) => h.long_test(2_000_000_000) @@ -220,21 +220,21 @@ class TestEnvBadBundleInNestedAndValidBundleInParentDir is UnitTest try h.assert_true(Directory(tmp)?.mkdir("nested"), "create nested directory") let n = tmp.join("nested")? - (Directory(n)?.create_file("bundle.json")?, - Directory(tmp)?.create_file("bundle.json")?, + (Directory(n)?.create_file("tack.json")?, + Directory(tmp)?.create_file("tack.json")?, n) else - h.fail("failed to create bundle.json example data files") + h.fail("failed to create tack.json example data files") h.complete(false) return end h.assert_true(good_bundle.write("{\"deps\":[ {\"type\": \"local\", \"local-path\":\"../local/a\"} - ]}\n"), "prepare good bundle.json") - h.assert_true(bad_bundle.write("{}"), "prepare bad bundle.json") + ]}\n"), "prepare good tack.json") + h.assert_true(bad_bundle.write("{}"), "prepare bad tack.json") - // This verifies that the parent-dir bundle.json isn't picked up if the - // nested-dir bundle.json is invalid. + // This verifies that the parent-dir tack.json isn't picked up if the + // nested-dir tack.json is invalid. let notifier: ProcessNotify iso = _ExpectClient(h, ["PONYPATH=$"], ["JSON error at: " + bad_bundle.path.path + ": missing \"deps\" array"], diff --git a/stable/test/test_bundle.pony b/stable/test/test_bundle.pony index 2cc4c50..d58d932 100644 --- a/stable/test/test_bundle.pony +++ b/stable/test/test_bundle.pony @@ -11,9 +11,9 @@ class TestBundle is UnitTest fun apply(h: TestHelper) ? => h.assert_error(_BundleCreate(h.env, "notfound")?, "nonexistant directory") - h.assert_error(_BundleCreate(h.env, bundle("empty"))?, "no bundle.json") - h.assert_error(_BundleCreate(h.env, bundle("bad/empty"))?, "empty bundle.json") - h.assert_error(_BundleCreate(h.env, bundle("bad/wrong_format"))?, "wrong bundle.json") + h.assert_error(_BundleCreate(h.env, bundle("empty"))?, "no tack.json") + h.assert_error(_BundleCreate(h.env, bundle("bad/empty"))?, "empty tack.json") + h.assert_error(_BundleCreate(h.env, bundle("bad/wrong_format"))?, "wrong tack.json") h.assert_no_error(_BundleCreate(h.env, bundle("empty-deps"))?, "empty deps") h.assert_no_error(_BundleCreate(h.env, bundle("github"))?, "github dep") @@ -26,14 +26,14 @@ class TestBundle is UnitTest h.assert_no_error(_BundleCreate(h.env, bundle("empty"), true)?, "create in directory with no bunde.json") - let file = FilePath(h.env.root as AmbientAuth, bundle("empty/bundle.json"))? - h.assert_true(file.exists(), "empty bundle.json created") + let file = FilePath(h.env.root as AmbientAuth, bundle("empty/tack.json"))? + h.assert_true(file.exists(), "empty tack.json created") let f = OpenFile(file) as File let content: String = f.read_string(f.size()) h.assert_eq[String]("{\"deps\":[]}\n", content) fun tear_down(h: TestHelper) => - let created_bundle = bundle("empty/bundle.json") + let created_bundle = bundle("empty/tack.json") try FilePath(h.env.root as AmbientAuth, created_bundle)?.remove() else