dox Executable Documentation

From repository

Clone repository

Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo.git" } } } }'
When I run composer with the plugin
Then there should be a directory 'assets/vendor'
Then 'git clone --no-checkout \'https://example.com/some/repo.git\' \'vendor/fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632\'' should be executed
Then 'git checkout \'master\'' should be executed
Then the output should contain 'Installing fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632 (1.0)'
Then the output should contain 'Cloning master'

Specify tag

Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo.git", "reference":"v1.1" } } } }'
When I run composer with the plugin
Then the output should contain 'Cloning v1.1'

Update repository

Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo.git" } } } }'
When I run composer with the plugin
Given the directory 'vendor/fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632/.git'
Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo.git", "reference": "1.1" } } } }'
When I run composer with the plugin
Then 'git fetch composer' should be executed
Then 'git fetch --tags composer' should be executed
Then 'git checkout \'1.1\'' should be executed
Then the output should contain 'Updating fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632 (1.0 => 1.1)'
Then the output should contain 'Checking out 1.1'

Specify target folder

Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo.git", "target":"my/target" } } } }'
When I run composer with the plugin
Then the output should contain 'vendor/fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632 -> assets/vendor/my/target'

Source as key

Given the composer json '{ "extra":{ "fido-fetch": { "https://example.com/some/repo.git":{} } } }'
When I run composer with the plugin
Then the output should contain 'Installing fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632 (1.0)'

Tag as value

Given the composer json '{ "extra":{ "fido-fetch": { "https://example.com/some/repo.git":"v1.3" } } }'
When I run composer with the plugin
Then the output should contain 'Cloning v1.3'

Specify type

Given the composer json '{ "extra":{ "fido-fetch": { "some repo": { "source":"https://example.com/some/repo", "type":"git" } } } }'
When I run composer with the plugin
Then the output should contain 'Installing fido/repo-85c6fea5a41a6e5852f7a986453fee60 (1.0)'

In require

Given the composer json '{ "require": { "fido-fetch:https://example.com/some/repo.git":"v1.3" } }'
When I run composer with the plugin
Then the output should contain 'Installing fido/repo_git-7cd3d7da4878bedbcfde6f9a52615632 (v1.3)'