refactoring
This commit is contained in:
parent
38576e23e3
commit
e82a75611c
|
@ -1,35 +1,35 @@
|
||||||
# This configuration was generated by `rubocop --auto-gen-config`
|
# This configuration was generated by `rubocop --auto-gen-config`
|
||||||
# on 2015-03-27 03:03:45 +0200 using RuboCop version 0.29.1.
|
# on 2015-04-04 02:29:34 +0300 using RuboCop version 0.29.1.
|
||||||
# The point is for the user to remove these configuration records
|
# The point is for the user to remove these configuration records
|
||||||
# one by one as the offenses are removed from the code base.
|
# one by one as the offenses are removed from the code base.
|
||||||
# Note that changes in the inspected code, or installation of new
|
# Note that changes in the inspected code, or installation of new
|
||||||
# versions of RuboCop, may require this file to be generated again.
|
# versions of RuboCop, may require this file to be generated again.
|
||||||
|
|
||||||
# Offense count: 20
|
# Offense count: 21
|
||||||
Metrics/AbcSize:
|
Metrics/AbcSize:
|
||||||
Max: 114
|
Max: 71
|
||||||
|
|
||||||
# Offense count: 1
|
# Offense count: 2
|
||||||
Metrics/BlockNesting:
|
Metrics/BlockNesting:
|
||||||
Max: 4
|
Max: 4
|
||||||
|
|
||||||
# Offense count: 2
|
# Offense count: 2
|
||||||
# Configuration parameters: CountComments.
|
# Configuration parameters: CountComments.
|
||||||
Metrics/ClassLength:
|
Metrics/ClassLength:
|
||||||
Max: 471
|
Max: 457
|
||||||
|
|
||||||
# Offense count: 6
|
# Offense count: 6
|
||||||
Metrics/CyclomaticComplexity:
|
Metrics/CyclomaticComplexity:
|
||||||
Max: 18
|
Max: 15
|
||||||
|
|
||||||
# Offense count: 27
|
# Offense count: 28
|
||||||
# Configuration parameters: CountComments.
|
# Configuration parameters: CountComments.
|
||||||
Metrics/MethodLength:
|
Metrics/MethodLength:
|
||||||
Max: 147
|
Max: 118
|
||||||
|
|
||||||
# Offense count: 6
|
# Offense count: 5
|
||||||
Metrics/PerceivedComplexity:
|
Metrics/PerceivedComplexity:
|
||||||
Max: 20
|
Max: 18
|
||||||
|
|
||||||
# Offense count: 3
|
# Offense count: 3
|
||||||
Style/AccessorMethodName:
|
Style/AccessorMethodName:
|
||||||
|
@ -41,7 +41,7 @@ Style/AccessorMethodName:
|
||||||
Style/AndOr:
|
Style/AndOr:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 29
|
# Offense count: 27
|
||||||
# Cop supports --auto-correct.
|
# Cop supports --auto-correct.
|
||||||
Style/Blocks:
|
Style/Blocks:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
@ -51,7 +51,7 @@ Style/Blocks:
|
||||||
Style/CaseIndentation:
|
Style/CaseIndentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
# Offense count: 5
|
# Offense count: 4
|
||||||
Style/Documentation:
|
Style/Documentation:
|
||||||
Enabled: false
|
Enabled: false
|
||||||
|
|
||||||
|
|
|
@ -113,6 +113,28 @@ module GitHubChangelogGenerator
|
||||||
|
|
||||||
parser.parse!
|
parser.parse!
|
||||||
|
|
||||||
|
detect_user_and_project(options)
|
||||||
|
|
||||||
|
if !options[:user] || !options[:project]
|
||||||
|
puts parser.banner
|
||||||
|
exit
|
||||||
|
end
|
||||||
|
|
||||||
|
if ARGV[1]
|
||||||
|
options[:tag1] = ARGV[0]
|
||||||
|
options[:tag2] = ARGV[1]
|
||||||
|
end
|
||||||
|
|
||||||
|
if options[:verbose]
|
||||||
|
puts "Performing task with options:"
|
||||||
|
pp options
|
||||||
|
puts ""
|
||||||
|
end
|
||||||
|
|
||||||
|
options
|
||||||
|
end
|
||||||
|
|
||||||
|
def self.detect_user_and_project(options)
|
||||||
if ARGV[0] && !ARGV[1]
|
if ARGV[0] && !ARGV[1]
|
||||||
github_site = options[:github_site] ? options[:github_site] : "github.com"
|
github_site = options[:github_site] ? options[:github_site] : "github.com"
|
||||||
# this match should parse strings such "https://github.com/skywinder/Github-Changelog-Generator" or "skywinder/Github-Changelog-Generator" to user and name
|
# this match should parse strings such "https://github.com/skywinder/Github-Changelog-Generator" or "skywinder/Github-Changelog-Generator" to user and name
|
||||||
|
@ -159,24 +181,6 @@ module GitHubChangelogGenerator
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
if !options[:user] || !options[:project]
|
|
||||||
puts parser.banner
|
|
||||||
exit
|
|
||||||
end
|
|
||||||
|
|
||||||
if ARGV[1]
|
|
||||||
options[:tag1] = ARGV[0]
|
|
||||||
options[:tag2] = ARGV[1]
|
|
||||||
end
|
|
||||||
|
|
||||||
if options[:verbose]
|
|
||||||
puts "Performing task with options:"
|
|
||||||
pp options
|
|
||||||
puts ""
|
|
||||||
end
|
|
||||||
|
|
||||||
options
|
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Reference in New Issue
Block a user