diff --git a/github_changelog_generator.gemspec b/github_changelog_generator.gemspec index ec22619..a621547 100644 --- a/github_changelog_generator.gemspec +++ b/github_changelog_generator.gemspec @@ -30,5 +30,4 @@ Gem::Specification.new do |spec| spec.add_runtime_dependency("faraday-http-cache") spec.add_runtime_dependency("activesupport") spec.add_runtime_dependency("retriable", ["~> 2.1"]) - end diff --git a/lib/github_changelog_generator/octo_fetcher.rb b/lib/github_changelog_generator/octo_fetcher.rb index a1f1f0f..2e68f51 100644 --- a/lib/github_changelog_generator/octo_fetcher.rb +++ b/lib/github_changelog_generator/octo_fetcher.rb @@ -1,5 +1,5 @@ # frozen_string_literal: true -require 'retriable' +require "retriable" module GitHubChangelogGenerator # A Fetcher responsible for all requests to GitHub and all basic manipulation with related data # (such as filtering, validating, e.t.c) @@ -297,12 +297,12 @@ Make sure, that you push tags to remote repo via 'git push --tags'" # Exponential backoff def retry_options { - :on => [Octokit::Forbidden], - :tries => MAX_FORBIDDEN_RETRIES, - :base_interval => sleep_base_interval, - :multiplier => 1.0, - :rand_factor => 0.0, - :on_retry => retry_callback + on: [Octokit::Forbidden], + tries: MAX_FORBIDDEN_RETRIES, + base_interval: sleep_base_interval, + multiplier: 1.0, + rand_factor: 0.0, + on_retry: retry_callback } end @@ -311,7 +311,7 @@ Make sure, that you push tags to remote repo via 'git push --tags'" end def retry_callback - Proc.new do |exception, try, elapsed_time, next_interval| + proc do |exception, try, elapsed_time, next_interval| Helper.log.warn("RETRY - #{exception.class}: '#{exception.message}'") Helper.log.warn("#{try} tries in #{elapsed_time} seconds and #{next_interval} seconds until the next try") Helper.log.warn GH_RATE_LIMIT_EXCEEDED_MSG diff --git a/lib/github_changelog_generator/parser.rb b/lib/github_changelog_generator/parser.rb index 9323e46..c62f187 100755 --- a/lib/github_changelog_generator/parser.rb +++ b/lib/github_changelog_generator/parser.rb @@ -42,7 +42,7 @@ module GitHubChangelogGenerator # setup parsing options def self.setup_parser(options) - parser = OptionParser.new do |opts| + parser = OptionParser.new do |opts| # rubocop:disable Metrics/BlockLength opts.banner = "Usage: github_changelog_generator [options]" opts.on("-u", "--user [USER]", "Username of the owner of target GitHub repo") do |last| options[:user] = last