From 203ce8059d8787214861ea64a702b0b11eb59136 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Sat, 26 Aug 2017 11:58:35 +0100 Subject: [PATCH 1/4] Fix more instance variable not initialized warnings Since EntryPoint does not call Link#initialize, we must make sure to initialize all of Link's instance variables to avoid any warnings. --- lib/hyperclient/entry_point.rb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/hyperclient/entry_point.rb b/lib/hyperclient/entry_point.rb index 9e747da..c880ebb 100644 --- a/lib/hyperclient/entry_point.rb +++ b/lib/hyperclient/entry_point.rb @@ -41,6 +41,8 @@ def initialize(url, &_block) @options = { async: true } @connection = nil @resource = nil + @key = nil + @uri_variables = nil yield self if block_given? end From e2da5c266af525a7d8b2c3d74b6a556ae3d7bf8a Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Sat, 26 Aug 2017 12:04:58 +0100 Subject: [PATCH 2/4] Add pry-byebug to development group, to ease debugging --- Gemfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Gemfile b/Gemfile index 14d9cca..0f4ee97 100644 --- a/Gemfile +++ b/Gemfile @@ -8,6 +8,7 @@ group :development do gem 'guard-minitest' gem 'guard-spinach' gem 'pry' + gem 'pry-byebug', platforms: :ruby end group :development, :test do From 5c0ff413ed4c9f6aaab8c3ee26e673ab838f7ef7 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Sat, 26 Aug 2017 12:10:24 +0100 Subject: [PATCH 3/4] Switch rubocop task to execute after the tests When you're developing, you're testing and haven't yet settled on the final state of the code so rubocop telling you you have some extra spaces somewhere when you're trying to run the test suite is not very useful. Instead, let's run the specs first and rubocop afterwards. --- Rakefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Rakefile b/Rakefile index c74bdc2..240d9c4 100755 --- a/Rakefile +++ b/Rakefile @@ -38,4 +38,4 @@ end require 'rubocop/rake_task' RuboCop::RakeTask.new(:rubocop) -task default: [:rubocop, :test, :spinach] +task default: [:test, :spinach, :rubocop] From 7969004576bbd1cfc38416341e97a50fd59b4533 Mon Sep 17 00:00:00 2001 From: Ivo Anjo Date: Sat, 26 Aug 2017 12:16:05 +0100 Subject: [PATCH 4/4] Update CHANGELOG --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 59da1b7..e7962df 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,7 @@ * [#122](https://github.com/codegram/hyperclient/pull/122): Improve error message when server returns invalid data - [@ivoanjo](https://github.com/ivoanjo). * [#125](https://github.com/codegram/hyperclient/pull/125): Add table of contents to readme and add note asking users to add their projects to the wiki - [@ivoanjo](https://github.com/ivoanjo). +* [#127](https://github.com/codegram/hyperclient/pull/127): Minor fixes: Fix warnings, and pry-byebug to dev Gemfile and tweak rubocop execution - [@ivoanjo](https://github.com/ivoanjo). * Your contribution here. ### 0.8.5 (July 5, 2017)