From fc2acf41e29025396866a92919ab3170fa9a8f89 Mon Sep 17 00:00:00 2001 From: Andrey Novikov Date: Tue, 26 Dec 2017 15:54:56 +0300 Subject: [PATCH] Bumped version to 2.1.0 since we have new functionality Changelog updated as well --- CHANGELOG.md | 30 ++++++++++++++++++++++++++++++ evil-client.gemspec | 2 +- 2 files changed, 31 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 99e9c0e..a3d0179 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,36 @@ to [Semantic Versioning]. end ``` +- Method to pass response handling to parent scopes by @Envek ([#21](https://github.com/evilmartians/evil-client/pull/21])) + + Allow to handle specific cases in operations and common cases in parent scopes. + + ```ruby + scope :entities do + operation :create do + response(409) do |_, _, (data, *)| + super! unless data["errorCode"] == "201" + raise YourAPI::AlreadyExists, data["errorMessage"] + end + end + + response(409) do |_, _, (data, *)| + raise YourAPI::Error, data.dig["errorsMessage"] + end + end + ``` + +### Fixed + +- Generation of English error messages in case of using non-English locales + +### Changed + +- Version requirement for tram-policy is limited due to regression in 0.2.4 + + See https://github.com/tram-rb/tram-policy/commit/874c8f61399dbe174c158fec729d16c2b1ffb2fd#r26432444 + + ## [2.0.0] [2017-09-02] ### Changed diff --git a/evil-client.gemspec b/evil-client.gemspec index b93e941..f145554 100644 --- a/evil-client.gemspec +++ b/evil-client.gemspec @@ -1,6 +1,6 @@ Gem::Specification.new do |gem| gem.name = "evil-client" - gem.version = "2.0.0" + gem.version = "2.1.0" gem.author = ["Andrew Kozin (nepalez)", "Ravil Bairamgalin (brainopia)"] gem.email = ["andrew.kozin@gmail.com", "nepalez@evilmartians.com"] gem.homepage = "https://github.com/evilmartians/evil-client"