tty-box 0.3.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -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
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- desc 'Load gem inside irb console'
4
- task :console do
5
- require 'irb'
6
- require 'irb/completion'
7
- require File.join(__FILE__, '../../lib/tty-box')
8
- ARGV.clear
9
- IRB.start
10
- end
11
- task c: %w[ console ]
@@ -1,11 +0,0 @@
1
- # encoding: utf-8
2
-
3
- desc 'Measure code coverage'
4
- task :coverage do
5
- begin
6
- original, ENV['COVERAGE'] = ENV['COVERAGE'], 'true'
7
- Rake::Task['spec'].invoke
8
- ensure
9
- ENV['COVERAGE'] = original
10
- end
11
- end
@@ -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
@@ -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