tty-box 0.3.0 → 0.7.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/CHANGELOG.md +56 -1
- data/LICENSE.txt +1 -1
- data/README.md +171 -34
- data/lib/tty-box.rb +1 -1
- data/lib/tty/box.rb +353 -59
- data/lib/tty/box/border.rb +21 -16
- data/lib/tty/box/version.rb +1 -1
- metadata +31 -55
- data/Rakefile +0 -8
- data/bin/console +0 -14
- data/bin/setup +0 -8
- data/examples/commander.rb +0 -54
- data/examples/connected.rb +0 -47
- data/spec/spec_helper.rb +0 -29
- data/spec/unit/align_spec.rb +0 -27
- data/spec/unit/border/parse_spec.rb +0 -61
- data/spec/unit/border_spec.rb +0 -149
- data/spec/unit/frame_spec.rb +0 -49
- data/spec/unit/padding_spec.rb +0 -46
- data/spec/unit/position_spec.rb +0 -23
- data/spec/unit/style_spec.rb +0 -121
- data/spec/unit/title_spec.rb +0 -35
- data/tasks/console.rake +0 -11
- data/tasks/coverage.rake +0 -11
- data/tasks/spec.rake +0 -29
- data/tty-box.gemspec +0 -29
data/spec/unit/title_spec.rb
DELETED
@@ -1,35 +0,0 @@
|
|
1
|
-
RSpec.describe TTY::Box, ':title option' do
|
2
|
-
it "allows to specify top border titles" do
|
3
|
-
output = TTY::Box.frame(
|
4
|
-
top: 0, left: 0,
|
5
|
-
width: 35, height: 4,
|
6
|
-
title: {
|
7
|
-
top_left: 'left',
|
8
|
-
top_right: 'right',
|
9
|
-
top_center: 'center'
|
10
|
-
})
|
11
|
-
|
12
|
-
expect(output).to eq([
|
13
|
-
"\e[1;1H┌left─────────center─────────right┐",
|
14
|
-
"\e[2;1H│\e[2;35H│\e[3;1H│\e[3;35H│",
|
15
|
-
"\e[4;1H└─────────────────────────────────┘"
|
16
|
-
].join)
|
17
|
-
end
|
18
|
-
|
19
|
-
it "allows to specify bottom border titles" do
|
20
|
-
output = TTY::Box.frame(
|
21
|
-
top: 0, left: 0,
|
22
|
-
width: 35, height: 4,
|
23
|
-
title: {
|
24
|
-
bottom_left: 'left',
|
25
|
-
bottom_right: 'right',
|
26
|
-
bottom_center: 'center'
|
27
|
-
})
|
28
|
-
|
29
|
-
expect(output).to eq([
|
30
|
-
"\e[1;1H┌─────────────────────────────────┐",
|
31
|
-
"\e[2;1H│\e[2;35H│\e[3;1H│\e[3;35H│",
|
32
|
-
"\e[4;1H└left─────────center─────────right┘"
|
33
|
-
].join)
|
34
|
-
end
|
35
|
-
end
|
data/tasks/console.rake
DELETED
data/tasks/coverage.rake
DELETED
data/tasks/spec.rake
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
begin
|
4
|
-
require 'rspec/core/rake_task'
|
5
|
-
|
6
|
-
desc 'Run all specs'
|
7
|
-
RSpec::Core::RakeTask.new(:spec) do |task|
|
8
|
-
task.pattern = 'spec/{unit,integration}{,/*/**}/*_spec.rb'
|
9
|
-
end
|
10
|
-
|
11
|
-
namespace :spec do
|
12
|
-
desc 'Run unit specs'
|
13
|
-
RSpec::Core::RakeTask.new(:unit) do |task|
|
14
|
-
task.pattern = 'spec/unit{,/*/**}/*_spec.rb'
|
15
|
-
end
|
16
|
-
|
17
|
-
desc 'Run integration specs'
|
18
|
-
RSpec::Core::RakeTask.new(:integration) do |task|
|
19
|
-
task.pattern = 'spec/integration{,/*/**}/*_spec.rb'
|
20
|
-
end
|
21
|
-
end
|
22
|
-
|
23
|
-
rescue LoadError
|
24
|
-
%w[spec spec:unit spec:integration].each do |name|
|
25
|
-
task name do
|
26
|
-
$stderr.puts "In order to run #{name}, do `gem install rspec`"
|
27
|
-
end
|
28
|
-
end
|
29
|
-
end
|
data/tty-box.gemspec
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
lib = File.expand_path("../lib", __FILE__)
|
2
|
-
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
3
|
-
require "tty/box/version"
|
4
|
-
|
5
|
-
Gem::Specification.new do |spec|
|
6
|
-
spec.name = "tty-box"
|
7
|
-
spec.version = TTY::Box::VERSION
|
8
|
-
spec.authors = ["Piotr Murach"]
|
9
|
-
spec.email = [""]
|
10
|
-
|
11
|
-
spec.summary = %q{Draw various frames and boxes in your terminal interface.}
|
12
|
-
spec.description = %q{Draw various frames and boxes in your terminal interface.}
|
13
|
-
spec.homepage = "https://piotrmurach.github.io/tty"
|
14
|
-
spec.license = "MIT"
|
15
|
-
|
16
|
-
spec.files = Dir['{lib,spec,examples}/**/*.rb']
|
17
|
-
spec.files += Dir['{bin,tasks}/*', 'tty-box.gemspec']
|
18
|
-
spec.files += Dir['README.md', 'CHANGELOG.md', 'LICENSE.txt', 'Rakefile']
|
19
|
-
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
20
|
-
spec.require_paths = ["lib"]
|
21
|
-
|
22
|
-
spec.add_dependency 'pastel', '~> 0.7.2'
|
23
|
-
spec.add_dependency 'tty-cursor', '~> 0.6.0'
|
24
|
-
spec.add_dependency 'strings', '~> 0.1.4'
|
25
|
-
|
26
|
-
spec.add_development_dependency "bundler", "~> 1.16"
|
27
|
-
spec.add_development_dependency "rake", "~> 10.0"
|
28
|
-
spec.add_development_dependency "rspec", "~> 3.0"
|
29
|
-
end
|