mirror of
https://github.com/ruby/ruby.git
synced 2025-08-24 05:25:34 +02:00
Manually merged from https://github.com/rubygems/rubygems/pull/2636
Enable Style/EmptyLinesAroundClassBody rubocop cop.
This commit is contained in:
parent
f56fc720ee
commit
31a6eaabc1
274 changed files with 672 additions and 0 deletions
|
@ -172,6 +172,7 @@ end
|
|||
# Gem::StreamUI implements a simple stream based user interface.
|
||||
|
||||
class Gem::StreamUI
|
||||
|
||||
extend Gem::Deprecate
|
||||
|
||||
##
|
||||
|
@ -386,6 +387,7 @@ class Gem::StreamUI
|
|||
# An absolutely silent progress reporter.
|
||||
|
||||
class SilentProgressReporter
|
||||
|
||||
##
|
||||
# The count of items is never updated for the silent progress reporter.
|
||||
|
||||
|
@ -410,12 +412,14 @@ class Gem::StreamUI
|
|||
|
||||
def done
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
# A basic dotted progress reporter.
|
||||
|
||||
class SimpleProgressReporter
|
||||
|
||||
include Gem::DefaultUserInteraction
|
||||
|
||||
##
|
||||
|
@ -453,12 +457,14 @@ class Gem::StreamUI
|
|||
def done
|
||||
@out.puts "\n#{@terminal_message}"
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
# A progress reporter that prints out messages about the current progress.
|
||||
|
||||
class VerboseProgressReporter
|
||||
|
||||
include Gem::DefaultUserInteraction
|
||||
|
||||
##
|
||||
|
@ -495,6 +501,7 @@ class Gem::StreamUI
|
|||
def done
|
||||
@out.puts @terminal_message
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -512,6 +519,7 @@ class Gem::StreamUI
|
|||
# An absolutely silent download reporter.
|
||||
|
||||
class SilentDownloadReporter
|
||||
|
||||
##
|
||||
# The silent download reporter ignores all arguments
|
||||
|
||||
|
@ -537,12 +545,14 @@ class Gem::StreamUI
|
|||
|
||||
def done
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
# A progress reporter that behaves nicely with threaded downloading.
|
||||
|
||||
class ThreadedDownloadReporter
|
||||
|
||||
MUTEX = Mutex.new
|
||||
|
||||
##
|
||||
|
@ -591,7 +601,9 @@ class Gem::StreamUI
|
|||
@out.puts message
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
|
@ -599,6 +611,7 @@ end
|
|||
# STDOUT, and STDERR.
|
||||
|
||||
class Gem::ConsoleUI < Gem::StreamUI
|
||||
|
||||
##
|
||||
# The Console UI has no arguments as it defaults to reading input from
|
||||
# stdin, output to stdout and warnings or errors to stderr.
|
||||
|
@ -606,12 +619,14 @@ class Gem::ConsoleUI < Gem::StreamUI
|
|||
def initialize
|
||||
super STDIN, STDOUT, STDERR, true
|
||||
end
|
||||
|
||||
end
|
||||
|
||||
##
|
||||
# SilentUI is a UI choice that is absolutely silent.
|
||||
|
||||
class Gem::SilentUI < Gem::StreamUI
|
||||
|
||||
##
|
||||
# The SilentUI has no arguments as it does not use any stream.
|
||||
|
||||
|
@ -637,4 +652,5 @@ class Gem::SilentUI < Gem::StreamUI
|
|||
def progress_reporter(*args) # :nodoc:
|
||||
SilentProgressReporter.new(@outs, *args)
|
||||
end
|
||||
|
||||
end
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue