From a98c4ba8f6eb569a70f5d08fe6fedd03a2e1309f Mon Sep 17 00:00:00 2001 From: Jonathan Tron Date: Mon, 24 Aug 2015 22:38:13 +0200 Subject: [PATCH] Fix bug in error handling for API requests and release 2.1.3 (fixes #80) --- CHANGELOG.md | 4 ++++ libraries/api_helper.rb | 2 +- metadata.rb | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dd42f2c2..bc39813c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,10 @@ This file is used to list changes made in each version of grafana. +## 2.1.3 (2015-08-24): + +* Fix a bug in error message handling code [#80](https://github.com/JonathanTron/chef-grafana/issues/80) + ## 2.1.2 (2015-08-24): * Fix Grafana package checksums [#79](https://github.com/JonathanTron/chef-grafana/issues/79) diff --git a/libraries/api_helper.rb b/libraries/api_helper.rb index 34c7d02b..ad4ffec0 100644 --- a/libraries/api_helper.rb +++ b/libraries/api_helper.rb @@ -88,7 +88,7 @@ def handle_response_success(request, message) def handle_response_unauthorized(message) if message - Chef::Log.error messages[:unauthorized] + Chef::Log.error message else Chef::Log.error 'Invalid grafana_user and grafana_sess.' end diff --git a/metadata.rb b/metadata.rb index 13e9236b..5e3f6b06 100644 --- a/metadata.rb +++ b/metadata.rb @@ -4,7 +4,7 @@ license 'Apache 2.0' description 'Installs/Configures grafana' long_description IO.read(File.join(File.dirname(__FILE__), 'README.md')) -version '2.1.2' +version '2.1.3' supports 'ubuntu', '>= 12.04' supports 'debian', '>= 7.0'