Change to use Rainbow instead of colorize

colorize is licensed under GPL-2 which conflicts with the MIT license of
github_changelog_generator.  This changes all usage of colorize to
rainbow which does have a compatible license (MIT)
This commit is contained in:
James Casey
2016-08-31 14:17:35 -07:00
parent d23375f5ac
commit f647dc0d98
8 changed files with 25 additions and 26 deletions

View File

@@ -74,7 +74,7 @@ module GitHubChangelogGenerator
commit = @fetcher.fetch_commit(event)
issue[:actual_date] = commit[:author][:date]
rescue
puts "Warning: Can't fetch commit #{event[:commit_id]}. It is probably referenced from another repo.".yellow
puts "Warning: Can't fetch commit #{event[:commit_id]}. It is probably referenced from another repo.".color(:yellow)
issue[:actual_date] = issue[:closed_at]
end
end

View File

@@ -39,10 +39,10 @@ module GitHubChangelogGenerator
index2 = hash[tag2]
log += generate_log_between_tags(all_tags[index1], all_tags[index2])
else
raise ChangelogGeneratorError, "Can't find tag #{tag2} -> exit".red
raise ChangelogGeneratorError, "Can't find tag #{tag2} -> exit".color(:red)
end
else
raise ChangelogGeneratorError, "Can't find tag #{tag1} -> exit".red
raise ChangelogGeneratorError, "Can't find tag #{tag1} -> exit".color(:red)
end
log
end

View File

@@ -19,7 +19,7 @@ module GitHubChangelogGenerator
# @param [Hash] tag_name name of the tag
# @return [Time] time of specified tag
def get_time_of_tag(tag_name)
raise ChangelogGeneratorError, "tag_name is nil".red if tag_name.nil?
raise ChangelogGeneratorError, "tag_name is nil".color(:red) if tag_name.nil?
name_of_tag = tag_name["name"]
time_for_name = @tag_times_hash[name_of_tag]