From 92fbf47960498929d8d7994cc8614bcabea6efe8 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Tue, 23 Feb 2016 12:21:10 -0800 Subject: [PATCH 1/8] If Rakefile is an extension, any requires are runtime deps --- Gemfile | 1 - Gemfile.lock | 2 +- github_changelog_generator.gemspec | 1 + 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Gemfile b/Gemfile index 8841647..8452dc5 100644 --- a/Gemfile +++ b/Gemfile @@ -8,5 +8,4 @@ group :test do gem "coveralls", "~>0.8", require: false gem "simplecov", "~>0.10", require: false gem "codeclimate-test-reporter", "~>0.4" - gem "overcommit", "~>0.31" end diff --git a/Gemfile.lock b/Gemfile.lock index 406bb95..59d6ac9 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -4,6 +4,7 @@ PATH github_changelog_generator (1.10.3) colorize (~> 0.7) github_api (~> 0.12) + overcommit (~> 0.31) GEM remote: https://rubygems.org/ @@ -97,7 +98,6 @@ DEPENDENCIES codeclimate-test-reporter (~> 0.4) coveralls (~> 0.8) github_changelog_generator! - overcommit (~> 0.31) rake (~> 10.0) rspec (~> 3.2) rubocop (~> 0.31) diff --git a/github_changelog_generator.gemspec b/github_changelog_generator.gemspec index b110954..a449e68 100644 --- a/github_changelog_generator.gemspec +++ b/github_changelog_generator.gemspec @@ -26,6 +26,7 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency("github_api", ["~> 0.12"]) spec.add_runtime_dependency("colorize", ["~> 0.7"]) + spec.add_runtime_dependency("overcommit", "~>0.31") # Development only spec.add_development_dependency "bundler", "~> 1.7" From 575f42f6528bfd24a6672c56c10c1c6c92f47ae9 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 23 Feb 2016 22:24:10 +0100 Subject: [PATCH 2/8] Test case for #327 --- spec/files/github_changelog_params_327 | 1 + spec/unit/parse_file_spec.rb | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 spec/files/github_changelog_params_327 diff --git a/spec/files/github_changelog_params_327 b/spec/files/github_changelog_params_327 new file mode 100644 index 0000000..21fce1c --- /dev/null +++ b/spec/files/github_changelog_params_327 @@ -0,0 +1 @@ +exclude-labels=73a91042-da6f-11e5-9335-1040f38d7f90,7adf83b4-da6f-11e5-ae18-1040f38d7f90 \ No newline at end of file diff --git a/spec/unit/parse_file_spec.rb b/spec/unit/parse_file_spec.rb index 92d56e6..e08168d 100644 --- a/spec/unit/parse_file_spec.rb +++ b/spec/unit/parse_file_spec.rb @@ -36,6 +36,20 @@ describe GitHubChangelogGenerator::ParserFile do unreleased: false, header: "=== Changelog ===")) end + + context "turns exclude-label into an Array", bug: '#327' do + let(:options) { + { + params_file: 'spec/files/github_changelog_params_327' + } + } + it "reads exclude_labels into an Array" do + expect { parse.parse! }.to change { options[:exclude_labels] } + .from(nil) + .to(["73a91042-da6f-11e5-9335-1040f38d7f90", "7adf83b4-da6f-11e5-ae18-1040f38d7f90"]) + + end + end end end end From fb502c0ac7882b3d45beffddc14d6d5500452f1b Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 23 Feb 2016 22:25:07 +0100 Subject: [PATCH 3/8] Spec: Avoid a deprecation --- spec/spec_helper.rb | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index e8fa625..5e4530f 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -23,11 +23,11 @@ require "coveralls" module SpecHelper end -SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter[ +SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ Coveralls::SimpleCov::Formatter, SimpleCov::Formatter::HTMLFormatter, CodeClimate::TestReporter::Formatter -] +]) SimpleCov.start require "github_changelog_generator" From bc6bfac2a3bccc6899da5d03747bbfca46b663bd Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 23 Feb 2016 22:28:24 +0100 Subject: [PATCH 4/8] Typo --- spec/unit/parse_file_spec.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/spec/unit/parse_file_spec.rb b/spec/unit/parse_file_spec.rb index e08168d..41eafbd 100644 --- a/spec/unit/parse_file_spec.rb +++ b/spec/unit/parse_file_spec.rb @@ -37,7 +37,7 @@ describe GitHubChangelogGenerator::ParserFile do header: "=== Changelog ===")) end - context "turns exclude-label into an Array", bug: '#327' do + context "turns exclude-labels into an Array", bug: '#327' do let(:options) { { params_file: 'spec/files/github_changelog_params_327' From 20c22defc28096afbc4987101a4ee2d289876f60 Mon Sep 17 00:00:00 2001 From: Olle Jonsson Date: Tue, 23 Feb 2016 23:39:53 +0100 Subject: [PATCH 5/8] Rake and Bundler as runtime deps To support Rakefile running at install. See #329 --- github_changelog_generator.gemspec | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/github_changelog_generator.gemspec b/github_changelog_generator.gemspec index a449e68..3fe5427 100644 --- a/github_changelog_generator.gemspec +++ b/github_changelog_generator.gemspec @@ -24,11 +24,9 @@ Gem::Specification.new do |spec| spec.test_files = spec.files.grep(%r{^(test|spec|features)/}) spec.require_paths = ["lib"] + spec.add_runtime_dependency "rake", "~> 10.0" + spec.add_runtime_dependency "bundler", "~> 1.7" spec.add_runtime_dependency("github_api", ["~> 0.12"]) spec.add_runtime_dependency("colorize", ["~> 0.7"]) spec.add_runtime_dependency("overcommit", "~>0.31") - - # Development only - spec.add_development_dependency "bundler", "~> 1.7" - spec.add_development_dependency "rake", "~> 10.0" end From 0b3e8429c4b1c8f6d4e9cdc0584544eb13f2f6a1 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Wed, 24 Feb 2016 15:02:56 +0200 Subject: [PATCH 6/8] rubocop fixes --- Gemfile.lock | 4 ++-- spec/spec_helper.rb | 8 ++++---- spec/unit/parse_file_spec.rb | 11 +++++------ 3 files changed, 11 insertions(+), 12 deletions(-) diff --git a/Gemfile.lock b/Gemfile.lock index 59d6ac9..e7e4cff 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -2,9 +2,11 @@ PATH remote: . specs: github_changelog_generator (1.10.3) + bundler (~> 1.7) colorize (~> 0.7) github_api (~> 0.12) overcommit (~> 0.31) + rake (~> 10.0) GEM remote: https://rubygems.org/ @@ -94,11 +96,9 @@ PLATFORMS ruby DEPENDENCIES - bundler (~> 1.7) codeclimate-test-reporter (~> 0.4) coveralls (~> 0.8) github_changelog_generator! - rake (~> 10.0) rspec (~> 3.2) rubocop (~> 0.31) simplecov (~> 0.10) diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index 5e4530f..2edef57 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -24,10 +24,10 @@ module SpecHelper end SimpleCov.formatter = SimpleCov::Formatter::MultiFormatter.new([ - Coveralls::SimpleCov::Formatter, - SimpleCov::Formatter::HTMLFormatter, - CodeClimate::TestReporter::Formatter -]) + Coveralls::SimpleCov::Formatter, + SimpleCov::Formatter::HTMLFormatter, + CodeClimate::TestReporter::Formatter + ]) SimpleCov.start require "github_changelog_generator" diff --git a/spec/unit/parse_file_spec.rb b/spec/unit/parse_file_spec.rb index 41eafbd..99c6477 100644 --- a/spec/unit/parse_file_spec.rb +++ b/spec/unit/parse_file_spec.rb @@ -38,16 +38,15 @@ describe GitHubChangelogGenerator::ParserFile do end context "turns exclude-labels into an Array", bug: '#327' do - let(:options) { + let(:options) do { - params_file: 'spec/files/github_changelog_params_327' + params_file: "spec/files/github_changelog_params_327" } - } + end it "reads exclude_labels into an Array" do expect { parse.parse! }.to change { options[:exclude_labels] } - .from(nil) - .to(["73a91042-da6f-11e5-9335-1040f38d7f90", "7adf83b4-da6f-11e5-ae18-1040f38d7f90"]) - + .from(nil) + .to(["73a91042-da6f-11e5-9335-1040f38d7f90", "7adf83b4-da6f-11e5-ae18-1040f38d7f90"]) end end end From 63c70edb25a4acd2ee13a6f12b9e6aed4378cc66 Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Wed, 24 Feb 2016 15:09:38 +0200 Subject: [PATCH 7/8] add pending message --- spec/unit/parse_file_spec.rb | 1 + 1 file changed, 1 insertion(+) diff --git a/spec/unit/parse_file_spec.rb b/spec/unit/parse_file_spec.rb index 99c6477..f130d34 100644 --- a/spec/unit/parse_file_spec.rb +++ b/spec/unit/parse_file_spec.rb @@ -44,6 +44,7 @@ describe GitHubChangelogGenerator::ParserFile do } end it "reads exclude_labels into an Array" do + pending("Related with Bug #327.") expect { parse.parse! }.to change { options[:exclude_labels] } .from(nil) .to(["73a91042-da6f-11e5-9335-1040f38d7f90", "7adf83b4-da6f-11e5-ae18-1040f38d7f90"]) From 11677063353cb6a1913d927bc8eb9338bc4c563a Mon Sep 17 00:00:00 2001 From: Petr Korolev Date: Wed, 24 Feb 2016 15:11:01 +0200 Subject: [PATCH 8/8] Update gemspec to version 1.10.4 --- lib/github_changelog_generator/version.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/github_changelog_generator/version.rb b/lib/github_changelog_generator/version.rb index e6d8d95..396bca5 100644 --- a/lib/github_changelog_generator/version.rb +++ b/lib/github_changelog_generator/version.rb @@ -1,3 +1,3 @@ module GitHubChangelogGenerator - VERSION = "1.10.3" + VERSION = "1.10.4" end