1
0
Fork 0

Add some examples for "composer" type repositories.

These can be used as examples or possibly for tests.
pull/3347/head
Matthias Pigulla 2014-10-11 16:23:36 +02:00
parent 73e9db5d99
commit 905f08e46e
8 changed files with 323 additions and 0 deletions

17
doc/fixtures/fixtures.md Normal file
View File

@ -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`.

View File

@ -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"
}
}
}
}

View File

@ -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"
}
}
}
}

View File

@ -0,0 +1,10 @@
{
"packages": [
],
"includes": {
"include/all$4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e.json": {
"sha1": "4a06adbb14bcd09b8fc8108e3b46e2d73e4c423e"
}
}
}

View File

@ -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
}
}
}
}

View File

@ -0,0 +1,10 @@
{
"providers": {
"foo\/bar": {
"sha256": "fc231cb99b4427d2e6e10e500e3195c9e927eed6628ee1913b8331f97850cc1c"
},
"qux\/quux": {
"sha256": "301aa898cc49a14ebe56084431db1e29805d822e2f25f8cbc2985f800c0d6d33"
}
}
}

View File

@ -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
}
}
}
}

View File

@ -0,0 +1,9 @@
{
"packages": [],
"providers-url": "\/p\/%package%$%hash%.json",
"provider-includes": {
"p\/provider-active$d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2.json": {
"sha256": "d0a9908f6006b833fa0b654dc47b23711c60833672056925a868fe5c6af9c9c2"
}
}
}