File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -45,6 +45,10 @@ Style/Documentation:
4545 Exclude :
4646 - " tests/units/**/*"
4747
48+ Style/OneClassPerFile :
49+ Exclude :
50+ - " tests/units/**/*"
51+
4852AllCops :
4953 # Pin this project to Ruby 3.1 in case the shared config above is upgraded to 3.2
5054 # or later.
Original file line number Diff line number Diff line change 99# Offense count: 2
1010# Configuration parameters: CountComments, CountAsOne.
1111Metrics/ClassLength :
12- Max : 1160
12+ Max : 1170
Original file line number Diff line number Diff line change @@ -43,7 +43,7 @@ module Git
4343#
4444# @author Scott Chacon (mailto:schacon@gmail.com)
4545#
46- module Git
46+ module Git # rubocop:disable Style/OneClassPerFile
4747 # g.config('user.name', 'Scott Chacon') # sets value
4848 # g.config('user.email', 'email@email.com') # sets value
4949 # g.config('user.name') # returns 'Scott Chacon'
Original file line number Diff line number Diff line change @@ -242,7 +242,7 @@ def run_with_capture_options(**options_hash)
242242 # @api private
243243 #
244244 def build_git_cmd ( args )
245- raise ArgumentError , 'The args array can not contain an array' if args . any? { | a | a . is_a? ( Array ) }
245+ raise ArgumentError , 'The args array can not contain an array' if args . any? ( Array )
246246
247247 [ binary_path , *global_opts , *args ] . map ( &:to_s )
248248 end
Original file line number Diff line number Diff line change @@ -133,7 +133,7 @@ def blob(type = :dst)
133133 private
134134
135135 def validate_paths_not_arrays ( paths )
136- return unless paths . any? { | p | p . is_a? ( Array ) }
136+ return unless paths . any? ( Array )
137137
138138 raise ArgumentError ,
139139 'path expects individual arguments, not arrays. ' \
Original file line number Diff line number Diff line change @@ -80,11 +80,7 @@ def ignore_case?
8080 rescue Git ::FailedError
8181 @_ignore_case = false
8282 end
83- end
84- end
8583
86- module Git
87- class Status
8884 # Represents a single file's status in the git repository. Each instance
8985 # holds information about a file's state in the index and working tree.
9086 class StatusFile
@@ -109,11 +105,7 @@ def blob(type = :index)
109105 @base . object ( sha ) if sha
110106 end
111107 end
112- end
113- end
114108
115- module Git
116- class Status
117109 # A factory class responsible for fetching git status data and building
118110 # a hash of StatusFile objects.
119111 # @api private
You can’t perform that action at this time.
0 commit comments