cli-ui 1.5.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/README.md +17 -17
- data/lib/cli/ui/ansi.rb +157 -129
- data/lib/cli/ui/color.rb +39 -20
- data/lib/cli/ui/formatter.rb +45 -21
- data/lib/cli/ui/frame/frame_stack.rb +32 -13
- data/lib/cli/ui/frame/frame_style/box.rb +15 -4
- data/lib/cli/ui/frame/frame_style/bracket.rb +18 -7
- data/lib/cli/ui/frame/frame_style.rb +84 -87
- data/lib/cli/ui/frame.rb +55 -24
- data/lib/cli/ui/glyph.rb +44 -31
- data/lib/cli/ui/os.rb +44 -48
- data/lib/cli/ui/printer.rb +65 -47
- data/lib/cli/ui/progress.rb +49 -32
- data/lib/cli/ui/prompt/interactive_options.rb +91 -44
- data/lib/cli/ui/prompt/options_handler.rb +8 -0
- data/lib/cli/ui/prompt.rb +84 -31
- data/lib/cli/ui/sorbet_runtime_stub.rb +157 -0
- data/lib/cli/ui/spinner/async.rb +15 -4
- data/lib/cli/ui/spinner/spin_group.rb +67 -11
- data/lib/cli/ui/spinner.rb +48 -28
- data/lib/cli/ui/stdout_router.rb +71 -34
- data/lib/cli/ui/terminal.rb +37 -25
- data/lib/cli/ui/truncater.rb +7 -2
- data/lib/cli/ui/version.rb +3 -1
- data/lib/cli/ui/widgets/base.rb +23 -4
- data/lib/cli/ui/widgets/status.rb +19 -1
- data/lib/cli/ui/widgets.rb +42 -23
- data/lib/cli/ui/wrap.rb +8 -1
- data/lib/cli/ui.rb +325 -188
- metadata +10 -21
- data/.dependabot/config.yml +0 -8
- data/.github/CODEOWNERS +0 -1
- data/.github/probots.yml +0 -2
- data/.gitignore +0 -14
- data/.rubocop.yml +0 -41
- data/.travis.yml +0 -7
- data/Gemfile +0 -17
- data/Gemfile.lock +0 -60
- data/Rakefile +0 -20
- data/bin/console +0 -14
- data/cli-ui.gemspec +0 -27
- data/dev.yml +0 -14
data/.rubocop.yml
DELETED
@@ -1,41 +0,0 @@
|
|
1
|
-
inherit_gem:
|
2
|
-
rubocop-shopify: rubocop-cli.yml
|
3
|
-
|
4
|
-
AllCops:
|
5
|
-
Exclude:
|
6
|
-
- vendor/**/*
|
7
|
-
TargetRubyVersion: 2.5
|
8
|
-
|
9
|
-
Style/FrozenStringLiteralComment:
|
10
|
-
Enabled: false
|
11
|
-
|
12
|
-
# This doesn't understand that <<~ doesn't exist in 2.0
|
13
|
-
Layout/HeredocIndentation:
|
14
|
-
Enabled: false
|
15
|
-
|
16
|
-
# This doesn't take into account retrying from an exception
|
17
|
-
Lint/SuppressedException:
|
18
|
-
Enabled: false
|
19
|
-
|
20
|
-
# allow String.new to create mutable strings
|
21
|
-
Style/EmptyLiteral:
|
22
|
-
Enabled: false
|
23
|
-
|
24
|
-
# allow the use of globals which makes sense in a CLI app like this
|
25
|
-
Style/GlobalVars:
|
26
|
-
Enabled: false
|
27
|
-
|
28
|
-
# allow using %r{} for regexes
|
29
|
-
Style/RegexpLiteral:
|
30
|
-
Enabled: false
|
31
|
-
|
32
|
-
# allow readable Dev::Util.begin formatting
|
33
|
-
Style/MultilineBlockChain:
|
34
|
-
Enabled: false
|
35
|
-
|
36
|
-
# we prefer rescue to align with the beginning of the line containing begin, not begin itself
|
37
|
-
Layout/RescueEnsureAlignment:
|
38
|
-
Enabled: false
|
39
|
-
|
40
|
-
Style/StringLiterals:
|
41
|
-
EnforcedStyle: single_quotes
|
data/.travis.yml
DELETED
data/Gemfile
DELETED
@@ -1,17 +0,0 @@
|
|
1
|
-
# NOTE: These are development-only dependencies
|
2
|
-
source 'https://rubygems.org'
|
3
|
-
|
4
|
-
gemspec
|
5
|
-
|
6
|
-
group :development, :test do
|
7
|
-
gem 'rubocop'
|
8
|
-
gem 'rubocop-shopify'
|
9
|
-
gem 'byebug', platforms: [:mri]
|
10
|
-
gem 'method_source'
|
11
|
-
end
|
12
|
-
|
13
|
-
group :test do
|
14
|
-
gem 'mocha', require: false
|
15
|
-
gem 'minitest', '>= 5.0.0', require: false
|
16
|
-
gem 'minitest-reporters', require: false
|
17
|
-
end
|
data/Gemfile.lock
DELETED
@@ -1,60 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
cli-ui (1.5.0)
|
5
|
-
|
6
|
-
GEM
|
7
|
-
remote: https://rubygems.org/
|
8
|
-
specs:
|
9
|
-
ansi (1.5.0)
|
10
|
-
ast (2.4.2)
|
11
|
-
builder (3.2.4)
|
12
|
-
byebug (11.1.3)
|
13
|
-
method_source (1.0.0)
|
14
|
-
minitest (5.14.4)
|
15
|
-
minitest-reporters (1.4.3)
|
16
|
-
ansi
|
17
|
-
builder
|
18
|
-
minitest (>= 5.0)
|
19
|
-
ruby-progressbar
|
20
|
-
mocha (1.12.0)
|
21
|
-
parallel (1.20.1)
|
22
|
-
parser (3.0.0.0)
|
23
|
-
ast (~> 2.4.1)
|
24
|
-
rainbow (3.0.0)
|
25
|
-
rake (13.0.3)
|
26
|
-
regexp_parser (2.1.1)
|
27
|
-
rexml (3.2.5)
|
28
|
-
rubocop (1.12.1)
|
29
|
-
parallel (~> 1.10)
|
30
|
-
parser (>= 3.0.0.0)
|
31
|
-
rainbow (>= 2.2.2, < 4.0)
|
32
|
-
regexp_parser (>= 1.8, < 3.0)
|
33
|
-
rexml
|
34
|
-
rubocop-ast (>= 1.2.0, < 2.0)
|
35
|
-
ruby-progressbar (~> 1.7)
|
36
|
-
unicode-display_width (>= 1.4.0, < 3.0)
|
37
|
-
rubocop-ast (1.4.1)
|
38
|
-
parser (>= 2.7.1.5)
|
39
|
-
rubocop-shopify (2.0.1)
|
40
|
-
rubocop (~> 1.11)
|
41
|
-
ruby-progressbar (1.11.0)
|
42
|
-
unicode-display_width (2.0.0)
|
43
|
-
|
44
|
-
PLATFORMS
|
45
|
-
java
|
46
|
-
ruby
|
47
|
-
|
48
|
-
DEPENDENCIES
|
49
|
-
byebug
|
50
|
-
cli-ui!
|
51
|
-
method_source
|
52
|
-
minitest (>= 5.0.0)
|
53
|
-
minitest-reporters
|
54
|
-
mocha
|
55
|
-
rake (~> 13.0)
|
56
|
-
rubocop
|
57
|
-
rubocop-shopify
|
58
|
-
|
59
|
-
BUNDLED WITH
|
60
|
-
2.1.0
|
data/Rakefile
DELETED
@@ -1,20 +0,0 @@
|
|
1
|
-
$LOAD_PATH.unshift(File.expand_path('../lib', __FILE__))
|
2
|
-
require 'cli/ui'
|
3
|
-
require 'rake/testtask'
|
4
|
-
require 'rubocop/rake_task'
|
5
|
-
require 'bundler/gem_tasks'
|
6
|
-
|
7
|
-
TEST_ROOT = File.expand_path('../test', __FILE__)
|
8
|
-
|
9
|
-
Rake::TestTask.new do |t|
|
10
|
-
t.libs += ['test']
|
11
|
-
t.test_files = FileList[File.join(TEST_ROOT, '**', '*_test.rb')]
|
12
|
-
t.verbose = false
|
13
|
-
t.warning = false
|
14
|
-
end
|
15
|
-
|
16
|
-
RuboCop::RakeTask.new(:style) do |t|
|
17
|
-
t.options = ['--display-cop-names']
|
18
|
-
end
|
19
|
-
|
20
|
-
task(default: [:test, :style])
|
data/bin/console
DELETED
@@ -1,14 +0,0 @@
|
|
1
|
-
#!/usr/bin/env ruby
|
2
|
-
|
3
|
-
require 'bundler/setup'
|
4
|
-
require 'cli/ui'
|
5
|
-
|
6
|
-
# You can add fixtures and/or initialization code here to make experimenting
|
7
|
-
# with your gem easier. You can also use a different console, if you like.
|
8
|
-
|
9
|
-
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
# require "pry"
|
11
|
-
# Pry.start
|
12
|
-
|
13
|
-
require 'irb'
|
14
|
-
IRB.start(__FILE__)
|
data/cli-ui.gemspec
DELETED
@@ -1,27 +0,0 @@
|
|
1
|
-
# coding: utf-8
|
2
|
-
lib = File.expand_path('../lib', __FILE__)
|
3
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require 'cli/ui/version'
|
5
|
-
|
6
|
-
Gem::Specification.new do |spec|
|
7
|
-
spec.name = 'cli-ui'
|
8
|
-
spec.version = CLI::UI::VERSION
|
9
|
-
spec.authors = ['Burke Libbey', 'Julian Nadeau', 'Lisa Ugray']
|
10
|
-
spec.email = ['burke.libbey@shopify.com', 'julian.nadeau@shopify.com', 'lisa.ugray@shopify.com']
|
11
|
-
|
12
|
-
spec.summary = 'Terminal UI framework'
|
13
|
-
spec.description = 'Terminal UI framework'
|
14
|
-
spec.homepage = 'https://github.com/shopify/cli-ui'
|
15
|
-
spec.license = 'MIT'
|
16
|
-
|
17
|
-
spec.files = %x(git ls-files -z).split("\x0").reject do |f|
|
18
|
-
f.match(%r{^(test|spec|features)/})
|
19
|
-
end
|
20
|
-
spec.bindir = 'exe'
|
21
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = ['lib']
|
23
|
-
|
24
|
-
# spec.add_development_dependency "bundler", "~> 2.0"
|
25
|
-
spec.add_development_dependency('rake', '~> 13.0')
|
26
|
-
spec.add_development_dependency('minitest', '~> 5.0')
|
27
|
-
end
|