{"id":20293009,"url":"https://github.com/gemini-testing/gemini-url-decorator","last_synced_at":"2026-06-05T08:31:48.522Z","repository":{"id":101480393,"uuid":"69491563","full_name":"gemini-testing/gemini-url-decorator","owner":"gemini-testing","description":"DEPRECATED use https://github.com/gemini-testing/url-decorator","archived":false,"fork":false,"pushed_at":"2016-10-12T10:53:24.000Z","size":11,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-01-14T09:16:10.981Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/gemini-testing.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-09-28T18:23:04.000Z","updated_at":"2017-08-09T08:19:40.000Z","dependencies_parsed_at":null,"dependency_job_id":"471cb1ee-4ab2-4c2e-a629-b5b8dff5eaf0","html_url":"https://github.com/gemini-testing/gemini-url-decorator","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini-url-decorator","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini-url-decorator/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini-url-decorator/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gemini-testing%2Fgemini-url-decorator/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gemini-testing","download_url":"https://codeload.github.com/gemini-testing/gemini-url-decorator/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241787485,"owners_count":20020101,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-14T15:20:40.283Z","updated_at":"2025-03-04T05:14:47.567Z","avatar_url":"https://github.com/gemini-testing.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gemini-url-decorator\n\n[![Build Status](https://travis-ci.org/gemini-testing/gemini-url-decorator.svg?branch=master)](https://travis-ci.org/gemini-testing/gemini-url-decorator)\n[![Coverage Status](https://img.shields.io/coveralls/gemini-testing/gemini-url-decorator.svg?style=flat)](https://coveralls.io/r/gemini-testing/gemini-url-decorator?branch=master)\n\nPlugin for [gemini](https://github.com/gemini-testing/gemini) which is intended to change test urls in runtime. You can read more about plugins at [documentation](https://github.com/gemini-testing/gemini/blob/master/doc/plugins.md).\n\n## Installation\n\n```bash\nnpm install gemini-url-decorator\n```\n\n## Usage\n\n### Configuration\n\n* **url** (optional) `Object` - the list of url parameters, which will be added in each test url\n    * **query** (optional) `Object` - the list of query parameters\n        * **queryParam** (optional) `Object` - name of query parameter\n            * **value** (optional) `String` - value of query parameter\n            * **concat** (optional) `Boolean` - enable/disable concatenation; by default is `true`\n\n### Examples\n\nAdd plugin to your `gemini` config file:\n\n```yaml\nsystem:\n  plugins:\n    url-decorator: true\n```\n\nTo pass additional url parameters you can use environment variables, which should start with `GEMINI_URL_` or specify them in the `gemini` config file.\n\nFor example, you have the following test url: `http://localhost/test/?name=bilbo` and you want to add query parameter via environment variable:\n\n```bash\nGEMINI_URL_QUERY_TEXT=ololo gemini test\n```\n\nAfter that your test url will be changed to: `http://localhost/test/?name=bilbo\u0026text=ololo`.\n\nThe same thing you can do using `gemini` config file:\n\n```yaml\nurl-decorator:\n  url:\n    query:\n      text:\n        value: ololo\n      # or\n      text: ololo\n```\n\nNote: environment variables have higher priority than config values.\n\n#### Concatenation of url parameters\n\nIn previous example you have seen how add url parameters. Now we look how to concat and override url parameters.\n\nSuppose, you want to add query parameter `name` which is already presented in your test url: `http://localhost/test/?name=bilbo` and you don't want to override it:\n\n```yaml\nurl-decorator:\n  url:\n    query:\n      name:\n        value: torin\n        concat: true\n      # or\n      name:\n        value: torin\n      # or\n      name: torin\n\n```\n\nThe result url will look like: `http://localhost/test/?name=bilbo\u0026name=torin`. How you understand, the result will be the same if `concat` would be any value except `false`.\n\nMoreover for previous test url you can specify a set of values for one query parameter:\n\n```yaml\nurl-decorator:\n  url:\n    query:\n      name:\n        value:\n          - torin\n          - gloin\n      # or\n      name:\n        - torin\n        - gloin\n```\n\nThe result url will look like: `http://localhost/test/?name=bilbo\u0026name=torin\u0026name=gloin`\n\nIf you want to override value of `name` query parameter:\n\n```yaml\nurl-decorator:\n  url:\n    query:\n      name:\n        value: torin\n        concat: false\n```\n\nAs a result url will look like: `http://localhost/test/?name=torin`.\n\nYou can do the same thing via environment variables. In this case concat value will be used from config to the same url parameter:\n\n```bash\nGEMINI_URL_QUERY_NAME=gloin gemini test\n```\n\nThe result url will look like: `http://localhost/test/?name=gloin`\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fgemini-url-decorator","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgemini-testing%2Fgemini-url-decorator","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgemini-testing%2Fgemini-url-decorator/lists"}