
Security News
Deno 2.2 Improves Dependency Management and Expands Node.js Compatibility
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Лушка — маленький сервер, позволяющий быстро конфигурировать и запускать различные заглушки для тестирования своих сервисов.
Добавить строку ниже в свой Gemfile:
gem 'lushka'
Потом выполнить:
$ bundle install
Или установить просто как Gem (предпочтительно):
$ gem install lushka
В папке zag
создайте структуру папок, соответствующую желаемой заглушке, в папках создайте файл response.json
c JSON-ответом. Например:
lushka
│ zag.yaml
│
└─zag
│ └─countries
│ │ │ zag.yaml
│ │ │ response.json
│ │ └─russia
│ │ │ zag.yaml
│ │ └─response.json
Опционально в папке рядом с ответом можно размещать файл zag.yaml
с дополнительными настройками конкретного узла.
Файлов response.yaml
может быть несколько, в них можно опционально добавлять указание метода и код ошибки response_[:method]_[:code].yaml
, например:
response_post_200.yaml
response_delete.yaml
response_400.yaml
...
$ lushka
Запросы к серверу отправляются по адресам, соответствующим структуре папок внутри zag
. По-умолчанию будет отдан ответ без кода, либо с кодом 200, если он есть.
Для форсирования получения ответа с определенным кодом необходимо в заголовке передать его значение:
Expect-Response: 200
Lushka распространяется под открытой лицензией CAPAAL.
FAQs
Unknown package
We found that lushka demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Deno 2.2 enhances Node.js compatibility, improves dependency management, adds OpenTelemetry support, and expands linting and task automation for developers.
Security News
React's CRA deprecation announcement sparked community criticism over framework recommendations, leading to quick updates acknowledging build tools like Vite as valid alternatives.
Security News
Ransomware payment rates hit an all-time low in 2024 as law enforcement crackdowns, stronger defenses, and shifting policies make attacks riskier and less profitable.