From 905f08e46ef1ffdad88eaf598f9546232b97aa4d Mon Sep 17 00:00:00 2001 From: Matthias Pigulla Date: Sat, 11 Oct 2014 16:23:36 +0200 Subject: [PATCH] Add some examples for "composer" type repositories. These can be used as examples or possibly for tests. --- doc/fixtures/fixtures.md | 17 ++++ .../repo-composer-plain/packages.json | 89 +++++++++++++++++++ ...6adbb14bcd09b8fc8108e3b46e2d73e4c423e.json | 89 +++++++++++++++++++ .../repo-composer-with-includes/packages.json | 10 +++ ...195c9e927eed6628ee1913b8331f97850cc1c.json | 77 ++++++++++++++++ ...b23711c60833672056925a868fe5c6af9c9c2.json | 10 +++ ...b1e29805d822e2f25f8cbc2985f800c0d6d33.json | 22 +++++ .../packages.json | 9 ++ 8 files changed, 323 insertions(+) create mode 100644 doc/fixtures/fixtures.md create mode 100644 doc/fixtures/repo-composer-plain/packages.json create mode 100644 doc/fixtures/repo-composer-with-includes/include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json create mode 100644 doc/fixtures/repo-composer-with-includes/packages.json create mode 100644 doc/fixtures/repo-composer-with-providers/p/foo/bar$fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c.json create mode 100644 doc/fixtures/repo-composer-with-providers/p/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json create mode 100644 doc/fixtures/repo-composer-with-providers/p/qux/quux$301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33.json create mode 100644 doc/fixtures/repo-composer-with-providers/packages.json diff --git a/doc/fixtures/fixtures.md b/doc/fixtures/fixtures.md new file mode 100644 index 000000000..d8f33675a --- /dev/null +++ b/doc/fixtures/fixtures.md @@ -0,0 +1,17 @@ +`Composer` type repository fixtures +======================= + +This directory contains some examples of what `composer` type repositories can look like. They serve as illustrating examples accompanying the docs, but can also be used as (initial) fixtures for tests. + +* `repo-composer-plain` is a simple, plain `packages.json` file +* `repo-composer-with-includes` uses the `includes` mechanism +* `repo-composer-with-providers` uses the `providers` mechanism + +Sample Packages used in these fixtures +------- + +All these repositories contain the following packages. + +* `foo/bar` versions 1.0.0, 1.0.1 and 1.1.0; dev-default and 1.0.x-dev branches. On dev-default and in 1.1.0, `bar/baz` ~1.0 is required. +* `qux/quux` only has a dev-default branch. It `replace`s `gar/nix`. + diff --git a/doc/fixtures/repo-composer-plain/packages.json b/doc/fixtures/repo-composer-plain/packages.json new file mode 100644 index 000000000..fab3418ff --- /dev/null +++ b/doc/fixtures/repo-composer-plain/packages.json @@ -0,0 +1,89 @@ +{ + "packages": { + "foo/bar": { + "1.0.0": { + "name": "foo/bar", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "249dec95a52a" + }, + "time": "2014-10-11 15:42:00", + "type": "library" + }, + "1.0.1": { + "name": "foo/bar", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "21e3328295d4" + }, + "time": "2014-10-11 15:45:56", + "type": "library" + }, + "1.0.x-dev": { + "name": "foo/bar", + "version": "1.0.x-dev", + "version_normalized": "1.0.9999999.9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "14dc17c8e860" + }, + "time": "2014-10-11 15:45:59", + "type": "library" + }, + "1.1.0": { + "name": "foo/bar", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "d2fa3e69ad5b" + }, + "require": { + "bar/baz": "~1.0" + }, + "time": "2014-10-11 15:43:16", + "type": "library" + }, + "dev-default": { + "name": "foo/bar", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "8e5a5c224336" + }, + "require": { + "bar/baz": "~1.0" + }, + "time": "2014-10-11 15:43:18", + "type": "library" + } + }, + "qux/quux": { + "dev-default": { + "name": "qux/quux", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "4a10a567baa5" + }, + "replace": { + "gar/nix": "1.0.*" + }, + "time": "2014-10-11 15:48:15", + "type": "library" + } + } + } +} diff --git a/doc/fixtures/repo-composer-with-includes/include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json b/doc/fixtures/repo-composer-with-includes/include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json new file mode 100644 index 000000000..fab3418ff --- /dev/null +++ b/doc/fixtures/repo-composer-with-includes/include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json @@ -0,0 +1,89 @@ +{ + "packages": { + "foo/bar": { + "1.0.0": { + "name": "foo/bar", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "249dec95a52a" + }, + "time": "2014-10-11 15:42:00", + "type": "library" + }, + "1.0.1": { + "name": "foo/bar", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "21e3328295d4" + }, + "time": "2014-10-11 15:45:56", + "type": "library" + }, + "1.0.x-dev": { + "name": "foo/bar", + "version": "1.0.x-dev", + "version_normalized": "1.0.9999999.9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "14dc17c8e860" + }, + "time": "2014-10-11 15:45:59", + "type": "library" + }, + "1.1.0": { + "name": "foo/bar", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "d2fa3e69ad5b" + }, + "require": { + "bar/baz": "~1.0" + }, + "time": "2014-10-11 15:43:16", + "type": "library" + }, + "dev-default": { + "name": "foo/bar", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "8e5a5c224336" + }, + "require": { + "bar/baz": "~1.0" + }, + "time": "2014-10-11 15:43:18", + "type": "library" + } + }, + "qux/quux": { + "dev-default": { + "name": "qux/quux", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http://some.where/over/the/rainbow", + "reference": "4a10a567baa5" + }, + "replace": { + "gar/nix": "1.0.*" + }, + "time": "2014-10-11 15:48:15", + "type": "library" + } + } + } +} diff --git a/doc/fixtures/repo-composer-with-includes/packages.json b/doc/fixtures/repo-composer-with-includes/packages.json new file mode 100644 index 000000000..7437fa71d --- /dev/null +++ b/doc/fixtures/repo-composer-with-includes/packages.json @@ -0,0 +1,10 @@ +{ + "packages": [ + + ], + "includes": { + "include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json": { + "sha1": "4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e" + } + } +} diff --git a/doc/fixtures/repo-composer-with-providers/p/foo/bar$fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c.json b/doc/fixtures/repo-composer-with-providers/p/foo/bar$fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c.json new file mode 100644 index 000000000..eb93bbcd7 --- /dev/null +++ b/doc/fixtures/repo-composer-with-providers/p/foo/bar$fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c.json @@ -0,0 +1,77 @@ +{ + "packages": { + "foo\/bar": { + "1.0.0": { + "name": "foo\/bar", + "version": "1.0.0", + "version_normalized": "1.0.0.0", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "249dec95a52a" + }, + "time": "2014-10-11 15:42:00", + "type": "library", + "uid": 0 + }, + "1.0.1": { + "name": "foo\/bar", + "version": "1.0.1", + "version_normalized": "1.0.1.0", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "21e3328295d4" + }, + "time": "2014-10-11 15:45:56", + "type": "library", + "uid": 1 + }, + "1.0.x-dev": { + "name": "foo\/bar", + "version": "1.0.x-dev", + "version_normalized": "1.0.9999999.9999999-dev", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "14dc17c8e860" + }, + "time": "2014-10-11 15:45:59", + "type": "library", + "uid": 2 + }, + "1.1.0": { + "name": "foo\/bar", + "version": "1.1.0", + "version_normalized": "1.1.0.0", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "d2fa3e69ad5b" + }, + "require": { + "bar\/baz": "~1.0" + }, + "time": "2014-10-11 15:43:16", + "type": "library", + "uid": 3 + }, + "dev-default": { + "name": "foo\/bar", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "8e5a5c224336" + }, + "require": { + "bar\/baz": "~1.0" + }, + "time": "2014-10-11 15:43:18", + "type": "library", + "uid": 4 + } + } + } +} \ No newline at end of file diff --git a/doc/fixtures/repo-composer-with-providers/p/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json b/doc/fixtures/repo-composer-with-providers/p/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json new file mode 100644 index 000000000..74a656c38 --- /dev/null +++ b/doc/fixtures/repo-composer-with-providers/p/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json @@ -0,0 +1,10 @@ +{ + "providers": { + "foo\/bar": { + "sha256": "fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c" + }, + "qux\/quux": { + "sha256": "301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33" + } + } +} \ No newline at end of file diff --git a/doc/fixtures/repo-composer-with-providers/p/qux/quux$301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33.json b/doc/fixtures/repo-composer-with-providers/p/qux/quux$301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33.json new file mode 100644 index 000000000..438b418cd --- /dev/null +++ b/doc/fixtures/repo-composer-with-providers/p/qux/quux$301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33.json @@ -0,0 +1,22 @@ +{ + "packages": { + "qux\/quux": { + "dev-default": { + "name": "qux\/quux", + "version": "dev-default", + "version_normalized": "9999999-dev", + "source": { + "type": "hg", + "url": "http:\/\/some.where\/over\/the\/rainbow", + "reference": "4a10a567baa5" + }, + "replace": { + "gar\/nix": "1.0.*" + }, + "time": "2014-10-11 15:48:15", + "type": "library", + "uid": 5 + } + } + } +} \ No newline at end of file diff --git a/doc/fixtures/repo-composer-with-providers/packages.json b/doc/fixtures/repo-composer-with-providers/packages.json new file mode 100644 index 000000000..c9e5c2e20 --- /dev/null +++ b/doc/fixtures/repo-composer-with-providers/packages.json @@ -0,0 +1,9 @@ +{ + "packages": [], + "providers-url": "\/p\/%package%$%hash%.json", + "provider-includes": { + "p\/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json": { + "sha256": "d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2" + } + } +} \ No newline at end of file