tty 0.0.11 → 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rspec +1 -0
- data/.ruby-gemset +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +16 -7
- data/CHANGELOG.md +6 -0
- data/Gemfile +18 -1
- data/README.md +55 -28
- data/Rakefile +5 -9
- data/images/tty.png +0 -0
- data/lib/tty.rb +7 -1
- data/lib/tty/coercer/boolean.rb +6 -9
- data/lib/tty/coercer/float.rb +14 -17
- data/lib/tty/coercer/integer.rb +14 -17
- data/lib/tty/coercer/range.rb +6 -7
- data/lib/tty/logger.rb +23 -9
- data/lib/tty/plugins.rb +3 -6
- data/lib/tty/plugins/plugin.rb +4 -7
- data/lib/tty/shell.rb +20 -12
- data/lib/tty/shell/question.rb +41 -48
- data/lib/tty/shell/question/modifier.rb +5 -8
- data/lib/tty/shell/question/validation.rb +8 -7
- data/lib/tty/shell/reader.rb +28 -19
- data/lib/tty/shell/response.rb +26 -22
- data/lib/tty/shell/statement.rb +13 -9
- data/lib/tty/shell/suggestion.rb +17 -13
- data/lib/tty/support/coercion.rb +5 -6
- data/lib/tty/support/conversion.rb +7 -6
- data/lib/tty/support/delegatable.rb +5 -5
- data/lib/tty/support/unicode.rb +3 -4
- data/lib/tty/support/utils.rb +1 -2
- data/lib/tty/system.rb +13 -6
- data/lib/tty/system/editor.rb +21 -18
- data/lib/tty/system/which.rb +3 -5
- data/lib/tty/table.rb +18 -22
- data/lib/tty/table/border.rb +2 -4
- data/lib/tty/table/border/ascii.rb +3 -2
- data/lib/tty/table/border/null.rb +1 -3
- data/lib/tty/table/border/row_line.rb +1 -4
- data/lib/tty/table/border/unicode.rb +3 -2
- data/lib/tty/table/border_dsl.rb +21 -17
- data/lib/tty/table/border_options.rb +6 -5
- data/lib/tty/table/column_set.rb +11 -7
- data/lib/tty/table/columns.rb +19 -16
- data/lib/tty/table/error.rb +1 -3
- data/lib/tty/table/field.rb +30 -12
- data/lib/tty/table/header.rb +18 -9
- data/lib/tty/table/indentation.rb +1 -3
- data/lib/tty/table/operation/alignment.rb +8 -9
- data/lib/tty/table/operation/alignment_set.rb +6 -5
- data/lib/tty/table/operation/escape.rb +3 -3
- data/lib/tty/table/operation/filter.rb +3 -4
- data/lib/tty/table/operation/truncation.rb +3 -3
- data/lib/tty/table/operation/wrapped.rb +3 -4
- data/lib/tty/table/operations.rb +19 -22
- data/lib/tty/table/orientation.rb +5 -5
- data/lib/tty/table/orientation/horizontal.rb +9 -6
- data/lib/tty/table/orientation/vertical.rb +10 -7
- data/lib/tty/table/padder.rb +46 -8
- data/lib/tty/table/renderer.rb +21 -14
- data/lib/tty/table/renderer/ascii.rb +6 -5
- data/lib/tty/table/renderer/basic.rb +18 -19
- data/lib/tty/table/renderer/unicode.rb +11 -5
- data/lib/tty/table/row.rb +36 -20
- data/lib/tty/table/transformation.rb +6 -5
- data/lib/tty/table/validatable.rb +32 -17
- data/lib/tty/terminal.rb +26 -42
- data/lib/tty/terminal/color.rb +10 -12
- data/lib/tty/terminal/echo.rb +4 -7
- data/lib/tty/terminal/home.rb +3 -10
- data/lib/tty/terminal/pager.rb +11 -10
- data/lib/tty/terminal/pager/basic.rb +3 -6
- data/lib/tty/terminal/pager/system.rb +2 -5
- data/lib/tty/text.rb +7 -10
- data/lib/tty/text/distance.rb +2 -4
- data/lib/tty/text/truncation.rb +1 -3
- data/lib/tty/text/wrapping.rb +1 -3
- data/lib/tty/vector.rb +3 -5
- data/lib/tty/version.rb +2 -2
- data/spec/spec_helper.rb +4 -11
- data/spec/tty/coercer/boolean/coerce_spec.rb +19 -16
- data/spec/tty/coercer/float/coerce_spec.rb +6 -4
- data/spec/tty/coercer/integer/coerce_spec.rb +5 -4
- data/spec/tty/coercer/range/coerce_spec.rb +12 -11
- data/spec/tty/logger/log_spec.rb +23 -0
- data/spec/tty/logger/new_spec.rb +14 -14
- data/spec/tty/logger/valid_level_spec.rb +6 -6
- data/spec/tty/plugins/find_spec.rb +4 -4
- data/spec/tty/plugins/load_spec.rb +4 -5
- data/spec/tty/plugins/plugin/load_spec.rb +10 -8
- data/spec/tty/plugins/plugin/new_spec.rb +7 -7
- data/spec/tty/shell/ask_spec.rb +6 -7
- data/spec/tty/shell/error_spec.rb +1 -2
- data/spec/tty/shell/print_table_spec.rb +1 -2
- data/spec/tty/shell/question/argument_spec.rb +1 -1
- data/spec/tty/shell/question/character_spec.rb +11 -3
- data/spec/tty/shell/question/default_spec.rb +3 -3
- data/spec/tty/shell/question/in_spec.rb +1 -1
- data/spec/tty/shell/question/initialize_spec.rb +8 -11
- data/spec/tty/shell/question/modifier/apply_to_spec.rb +8 -4
- data/spec/tty/shell/question/modifier/letter_case_spec.rb +4 -4
- data/spec/tty/shell/question/modifier/whitespace_spec.rb +5 -5
- data/spec/tty/shell/question/modify_spec.rb +1 -1
- data/spec/tty/shell/question/valid_spec.rb +4 -4
- data/spec/tty/shell/question/validate_spec.rb +4 -4
- data/spec/tty/shell/question/validation/coerce_spec.rb +2 -3
- data/spec/tty/shell/question/validation/valid_value_spec.rb +3 -3
- data/spec/tty/shell/reader/getc_spec.rb +16 -14
- data/spec/tty/shell/response/read_bool_spec.rb +1 -1
- data/spec/tty/shell/response/read_char_spec.rb +1 -2
- data/spec/tty/shell/response/read_date_spec.rb +1 -1
- data/spec/tty/shell/response/read_email_spec.rb +1 -1
- data/spec/tty/shell/response/read_multiple_spec.rb +3 -4
- data/spec/tty/shell/response/read_number_spec.rb +1 -2
- data/spec/tty/shell/response/read_range_spec.rb +2 -2
- data/spec/tty/shell/response/read_spec.rb +7 -7
- data/spec/tty/shell/response/read_string_spec.rb +2 -2
- data/spec/tty/shell/say_spec.rb +1 -1
- data/spec/tty/shell/statement/initialize_spec.rb +3 -3
- data/spec/tty/shell/suggest_spec.rb +1 -1
- data/spec/tty/shell/warn_spec.rb +1 -2
- data/spec/tty/support/coercion_spec.rb +10 -10
- data/spec/tty/support/conversion_spec.rb +9 -9
- data/spec/tty/support/delegatable_spec.rb +7 -5
- data/spec/tty/support/equatable_spec.rb +32 -34
- data/spec/tty/support/fixtures/classes.rb +4 -2
- data/spec/tty/system/editor/available_spec.rb +12 -12
- data/spec/tty/system/editor/build_spec.rb +8 -16
- data/spec/tty/system/editor/command_spec.rb +3 -2
- data/spec/tty/system/editor/executables_spec.rb +3 -3
- data/spec/tty/system/editor/invoke_spec.rb +10 -14
- data/spec/tty/system/editor/open_spec.rb +9 -7
- data/spec/tty/system/platform_spec.rb +32 -13
- data/spec/tty/system/which/which_spec.rb +9 -9
- data/spec/tty/system/which_spec.rb +4 -4
- data/spec/tty/table/access_spec.rb +24 -21
- data/spec/tty/table/add_row_spec.rb +2 -2
- data/spec/tty/table/border/ascii/rendering_spec.rb +13 -13
- data/spec/tty/table/border/new_spec.rb +5 -4
- data/spec/tty/table/border/null/rendering_spec.rb +12 -12
- data/spec/tty/table/border/options/from_spec.rb +2 -3
- data/spec/tty/table/border/options/new_spec.rb +4 -5
- data/spec/tty/table/border/unicode/rendering_spec.rb +10 -10
- data/spec/tty/table/border_options/new_spec.rb +20 -0
- data/spec/tty/table/border_options/update_spec.rb +18 -0
- data/spec/tty/table/column_set/extract_widths_spec.rb +1 -1
- data/spec/tty/table/column_set/total_width_spec.rb +2 -2
- data/spec/tty/table/column_set/widths_from_spec.rb +1 -2
- data/spec/tty/table/columns/enforce_spec.rb +2 -2
- data/spec/tty/table/columns/widths_spec.rb +2 -0
- data/spec/tty/table/data_spec.rb +3 -3
- data/spec/tty/table/each_spec.rb +9 -11
- data/spec/tty/table/each_with_index_spec.rb +8 -9
- data/spec/tty/table/empty_spec.rb +3 -3
- data/spec/tty/table/eql_spec.rb +6 -6
- data/spec/tty/table/field/equality_spec.rb +11 -11
- data/spec/tty/table/field/length_spec.rb +4 -4
- data/spec/tty/table/field/lines_spec.rb +3 -3
- data/spec/tty/table/field/new_spec.rb +7 -7
- data/spec/tty/table/field/width_spec.rb +6 -4
- data/spec/tty/table/filter_spec.rb +3 -3
- data/spec/tty/table/header/call_spec.rb +3 -3
- data/spec/tty/table/header/height_spec.rb +1 -1
- data/spec/tty/table/header/new_spec.rb +5 -5
- data/spec/tty/table/header/set_spec.rb +9 -4
- data/spec/tty/table/header/to_ary_spec.rb +4 -4
- data/spec/tty/table/header_spec.rb +3 -4
- data/spec/tty/table/indentation/insert_indent_spec.rb +1 -1
- data/spec/tty/table/initialize_spec.rb +13 -13
- data/spec/tty/table/operation/alignment/format_spec.rb +5 -5
- data/spec/tty/table/operation/alignment/new_spec.rb +4 -4
- data/spec/tty/table/operation/alignment_set/call_spec.rb +11 -11
- data/spec/tty/table/operation/alignment_set/each_spec.rb +3 -3
- data/spec/tty/table/operation/alignment_set/new_spec.rb +6 -6
- data/spec/tty/table/operation/alignment_set/to_ary_spec.rb +4 -4
- data/spec/tty/table/operation/escape/call_spec.rb +1 -1
- data/spec/tty/table/operation/filter/call_spec.rb +1 -1
- data/spec/tty/table/operation/truncation/call_spec.rb +1 -1
- data/spec/tty/table/operation/truncation/truncate_spec.rb +4 -4
- data/spec/tty/table/operation/wrapped/call_spec.rb +1 -1
- data/spec/tty/table/operation/wrapped/wrap_spec.rb +3 -3
- data/spec/tty/table/operations/new_spec.rb +1 -1
- data/spec/tty/table/options_spec.rb +8 -8
- data/spec/tty/table/orientation_spec.rb +15 -13
- data/spec/tty/table/padder/parse_spec.rb +1 -1
- data/spec/tty/table/padder/to_s_spec.rb +14 -0
- data/spec/tty/table/padding_spec.rb +1 -1
- data/spec/tty/table/properties_spec.rb +9 -8
- data/spec/tty/table/render_spec.rb +8 -5
- data/spec/tty/table/render_with_spec.rb +5 -4
- data/spec/tty/table/renderer/ascii/indentation_spec.rb +1 -1
- data/spec/tty/table/renderer/ascii/padding_spec.rb +1 -1
- data/spec/tty/table/renderer/ascii/render_spec.rb +7 -7
- data/spec/tty/table/renderer/ascii/resizing_spec.rb +1 -1
- data/spec/tty/table/renderer/ascii/separator_spec.rb +2 -2
- data/spec/tty/table/renderer/basic/alignment_spec.rb +5 -5
- data/spec/tty/table/renderer/basic/coloring_spec.rb +1 -1
- data/spec/tty/table/renderer/basic/extract_column_widths_spec.rb +6 -6
- data/spec/tty/table/renderer/basic/filter_spec.rb +4 -4
- data/spec/tty/table/renderer/basic/indentation_spec.rb +5 -3
- data/spec/tty/table/renderer/basic/multiline_content_spec.rb +10 -10
- data/spec/tty/table/renderer/basic/new_spec.rb +2 -2
- data/spec/tty/table/renderer/basic/options_spec.rb +9 -9
- data/spec/tty/table/renderer/basic/padding_spec.rb +1 -1
- data/spec/tty/table/renderer/basic/render_spec.rb +8 -8
- data/spec/tty/table/renderer/basic/resizing_spec.rb +1 -1
- data/spec/tty/table/renderer/basic/separator_spec.rb +2 -2
- data/spec/tty/table/renderer/basic/truncation_spec.rb +4 -4
- data/spec/tty/table/renderer/basic/wrapping_spec.rb +4 -4
- data/spec/tty/table/renderer/border_spec.rb +21 -21
- data/spec/tty/table/renderer/render_spec.rb +7 -7
- data/spec/tty/table/renderer/select_spec.rb +4 -4
- data/spec/tty/table/renderer/style_spec.rb +19 -19
- data/spec/tty/table/renderer/unicode/indentation_spec.rb +1 -1
- data/spec/tty/table/renderer/unicode/padding_spec.rb +1 -1
- data/spec/tty/table/renderer/unicode/render_spec.rb +6 -6
- data/spec/tty/table/renderer/unicode/separator_spec.rb +2 -2
- data/spec/tty/table/renderer_spec.rb +1 -1
- data/spec/tty/table/rotate_spec.rb +27 -27
- data/spec/tty/table/row/access_spec.rb +3 -3
- data/spec/tty/table/row/call_spec.rb +4 -4
- data/spec/tty/table/row/data_spec.rb +5 -5
- data/spec/tty/table/row/each_spec.rb +1 -1
- data/spec/tty/table/row/equality_spec.rb +16 -16
- data/spec/tty/table/row/height_spec.rb +1 -1
- data/spec/tty/table/row/new_spec.rb +11 -11
- data/spec/tty/table/row/to_ary_spec.rb +3 -3
- data/spec/tty/table/to_s_spec.rb +8 -8
- data/spec/tty/table/validatable/validate_options_spec.rb +5 -5
- data/spec/tty/table/validatable_spec.rb +14 -1
- data/spec/tty/terminal/color/code_spec.rb +3 -3
- data/spec/tty/terminal/color/remove_spec.rb +8 -9
- data/spec/tty/terminal/color/set_spec.rb +5 -6
- data/spec/tty/terminal/color_spec.rb +3 -5
- data/spec/tty/terminal/echo_spec.rb +3 -4
- data/spec/tty/terminal/home_spec.rb +12 -14
- data/spec/tty/terminal/page_spec.rb +5 -4
- data/spec/tty/terminal/pager/available_spec.rb +11 -11
- data/spec/tty/terminal/pager/basic/page_spec.rb +8 -8
- data/spec/tty/terminal/pager/command_spec.rb +2 -2
- data/spec/tty/terminal/pager/executables_spec.rb +3 -3
- data/spec/tty/terminal/pager/page_spec.rb +8 -10
- data/spec/tty/terminal/pager/system/page_spec.rb +8 -8
- data/spec/tty/terminal/size_spec.rb +39 -36
- data/spec/tty/text/distance/distance_spec.rb +13 -13
- data/spec/tty/text/distance/initialize_spec.rb +4 -4
- data/spec/tty/text/distance_spec.rb +2 -2
- data/spec/tty/text/truncate_spec.rb +2 -3
- data/spec/tty/text/truncation/initialize_spec.rb +9 -9
- data/spec/tty/text/truncation/truncate_spec.rb +14 -14
- data/spec/tty/text/wrap_spec.rb +2 -3
- data/spec/tty/text/wrapping/initialize_spec.rb +7 -7
- data/spec/tty/text/wrapping/wrap_spec.rb +11 -11
- data/spec/tty/tty_spec.rb +22 -0
- data/spec/tty/vector/new_spec.rb +7 -7
- data/tasks/console.rake +10 -0
- data/tasks/coverage.rake +11 -0
- data/tasks/metrics/cane.rake +2 -0
- data/tasks/metrics/flog.rake +2 -0
- data/tasks/metrics/heckle.rake +15 -0
- data/tasks/metrics/reek.rake +2 -0
- data/tasks/spec.rake +29 -0
- data/tty.gemspec +5 -12
- metadata +34 -91
- data/.rvmrc +0 -34
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
require 'spec_helper'
|
4
|
+
|
5
|
+
describe TTY do
|
6
|
+
let(:object) { described_class }
|
7
|
+
|
8
|
+
it { expect(object.terminal).to be_instance_of(TTY::Terminal) }
|
9
|
+
|
10
|
+
it { expect(object.shell).to be_instance_of(TTY::Shell) }
|
11
|
+
|
12
|
+
it { expect(object.system).to be(TTY::System) }
|
13
|
+
|
14
|
+
it { expect(object.plugins).to be_instance_of(TTY::Plugins) }
|
15
|
+
|
16
|
+
context 'when module' do
|
17
|
+
it 'decorates class' do
|
18
|
+
klass = Class.new { include TTY }
|
19
|
+
expect(klass).to respond_to(:terminal)
|
20
|
+
end
|
21
|
+
end
|
22
|
+
end # TTY
|
data/spec/tty/vector/new_spec.rb
CHANGED
@@ -1,17 +1,17 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
2
|
|
3
3
|
require 'spec_helper'
|
4
4
|
|
5
5
|
describe TTY::Vector, '#new' do
|
6
6
|
let(:object) { described_class }
|
7
7
|
|
8
|
-
subject { object.new(argument) }
|
8
|
+
subject(:vector) { object.new(argument) }
|
9
9
|
|
10
10
|
context 'with no arguments' do
|
11
|
-
subject { object.new }
|
11
|
+
subject(:vector) { object.new }
|
12
12
|
|
13
13
|
it 'sets elements to empty array' do
|
14
|
-
|
14
|
+
expect(vector.to_a).to eq([])
|
15
15
|
end
|
16
16
|
end
|
17
17
|
|
@@ -19,7 +19,7 @@ describe TTY::Vector, '#new' do
|
|
19
19
|
let(:argument) { nil }
|
20
20
|
|
21
21
|
it 'throws type error' do
|
22
|
-
expect {
|
22
|
+
expect { vector }.to raise_error(TTY::TypeError)
|
23
23
|
end
|
24
24
|
end
|
25
25
|
|
@@ -27,7 +27,7 @@ describe TTY::Vector, '#new' do
|
|
27
27
|
let(:argument) { {:value => 'Piotr'} }
|
28
28
|
|
29
29
|
it 'sets elements' do
|
30
|
-
|
30
|
+
expect(vector.to_a).to eq([[:value, 'Piotr']])
|
31
31
|
end
|
32
32
|
end
|
33
33
|
|
@@ -41,7 +41,7 @@ describe TTY::Vector, '#new' do
|
|
41
41
|
}
|
42
42
|
|
43
43
|
it 'sets elements' do
|
44
|
-
|
44
|
+
expect(vector.to_a).to eq(['Piotr'])
|
45
45
|
end
|
46
46
|
end
|
47
47
|
end
|
data/tasks/console.rake
ADDED
data/tasks/coverage.rake
ADDED
data/tasks/metrics/cane.rake
CHANGED
data/tasks/metrics/flog.rake
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
$LOAD_PATH.unshift(File.expand_path('../../../lib', __FILE__))
|
4
|
+
begin
|
5
|
+
require 'heckle'
|
6
|
+
|
7
|
+
namespace :metrics do
|
8
|
+
desc 'Heckle each module and class'
|
9
|
+
task :heckle do
|
10
|
+
require 'tty'
|
11
|
+
end
|
12
|
+
end
|
13
|
+
rescue LoadError
|
14
|
+
warn "Heckle is not available."
|
15
|
+
end
|
data/tasks/metrics/reek.rake
CHANGED
data/tasks/spec.rake
ADDED
@@ -0,0 +1,29 @@
|
|
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/{,/*/**}/*_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.gemspec
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
2
|
lib = File.expand_path('../lib', __FILE__)
|
3
3
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
4
|
require 'tty/version'
|
@@ -8,21 +8,14 @@ Gem::Specification.new do |gem|
|
|
8
8
|
gem.version = TTY::VERSION
|
9
9
|
gem.authors = ["Piotr Murach"]
|
10
10
|
gem.email = [""]
|
11
|
-
gem.description = %q{
|
12
|
-
gem.summary = %q{
|
13
|
-
gem.homepage =
|
11
|
+
gem.description = %q{A toolbox for developing beautiful command line clients.}
|
12
|
+
gem.summary = %q{A toolbox for developing beautiful command line clients. It provides a fluid interface for gathering input from the user, querying system and terminal and displaying information back.}
|
13
|
+
gem.homepage = 'http://peter-murach.github.io/tty/'
|
14
14
|
|
15
15
|
gem.files = `git ls-files`.split($/)
|
16
16
|
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
17
17
|
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
18
18
|
gem.require_paths = ["lib"]
|
19
19
|
|
20
|
-
gem.add_development_dependency
|
21
|
-
gem.add_development_dependency 'rake', '~> 10.1'
|
22
|
-
gem.add_development_dependency 'yard', '~> 0.8'
|
23
|
-
gem.add_development_dependency 'benchmark_suite'
|
24
|
-
gem.add_development_dependency 'bundler'
|
25
|
-
gem.add_development_dependency 'yard', '~> 0.8'
|
26
|
-
gem.add_development_dependency 'simplecov', '~> 0.7.1'
|
27
|
-
gem.add_development_dependency 'coveralls', '~> 0.6.7'
|
20
|
+
gem.add_development_dependency "bundler", "~> 1.5"
|
28
21
|
end
|
metadata
CHANGED
@@ -1,105 +1,30 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tty
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0
|
5
|
-
prerelease:
|
4
|
+
version: 0.1.0
|
6
5
|
platform: ruby
|
7
6
|
authors:
|
8
7
|
- Piotr Murach
|
9
8
|
autorequire:
|
10
9
|
bindir: bin
|
11
10
|
cert_chain: []
|
12
|
-
date:
|
11
|
+
date: 2014-09-21 00:00:00.000000000 Z
|
13
12
|
dependencies:
|
14
|
-
- !ruby/object:Gem::Dependency
|
15
|
-
name: rspec
|
16
|
-
requirement: &2152680020 !ruby/object:Gem::Requirement
|
17
|
-
none: false
|
18
|
-
requirements:
|
19
|
-
- - ~>
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version: '2.14'
|
22
|
-
type: :development
|
23
|
-
prerelease: false
|
24
|
-
version_requirements: *2152680020
|
25
|
-
- !ruby/object:Gem::Dependency
|
26
|
-
name: rake
|
27
|
-
requirement: &2152679080 !ruby/object:Gem::Requirement
|
28
|
-
none: false
|
29
|
-
requirements:
|
30
|
-
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: '10.1'
|
33
|
-
type: :development
|
34
|
-
prerelease: false
|
35
|
-
version_requirements: *2152679080
|
36
|
-
- !ruby/object:Gem::Dependency
|
37
|
-
name: yard
|
38
|
-
requirement: &2152678360 !ruby/object:Gem::Requirement
|
39
|
-
none: false
|
40
|
-
requirements:
|
41
|
-
- - ~>
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version: '0.8'
|
44
|
-
type: :development
|
45
|
-
prerelease: false
|
46
|
-
version_requirements: *2152678360
|
47
|
-
- !ruby/object:Gem::Dependency
|
48
|
-
name: benchmark_suite
|
49
|
-
requirement: &2152677540 !ruby/object:Gem::Requirement
|
50
|
-
none: false
|
51
|
-
requirements:
|
52
|
-
- - ! '>='
|
53
|
-
- !ruby/object:Gem::Version
|
54
|
-
version: '0'
|
55
|
-
type: :development
|
56
|
-
prerelease: false
|
57
|
-
version_requirements: *2152677540
|
58
13
|
- !ruby/object:Gem::Dependency
|
59
14
|
name: bundler
|
60
|
-
requirement:
|
61
|
-
none: false
|
62
|
-
requirements:
|
63
|
-
- - ! '>='
|
64
|
-
- !ruby/object:Gem::Version
|
65
|
-
version: '0'
|
66
|
-
type: :development
|
67
|
-
prerelease: false
|
68
|
-
version_requirements: *2152675960
|
69
|
-
- !ruby/object:Gem::Dependency
|
70
|
-
name: yard
|
71
|
-
requirement: &2152674320 !ruby/object:Gem::Requirement
|
72
|
-
none: false
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
73
16
|
requirements:
|
74
17
|
- - ~>
|
75
18
|
- !ruby/object:Gem::Version
|
76
|
-
version: '
|
19
|
+
version: '1.5'
|
77
20
|
type: :development
|
78
21
|
prerelease: false
|
79
|
-
version_requirements:
|
80
|
-
- !ruby/object:Gem::Dependency
|
81
|
-
name: simplecov
|
82
|
-
requirement: &2152672200 !ruby/object:Gem::Requirement
|
83
|
-
none: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
84
23
|
requirements:
|
85
24
|
- - ~>
|
86
25
|
- !ruby/object:Gem::Version
|
87
|
-
version:
|
88
|
-
|
89
|
-
prerelease: false
|
90
|
-
version_requirements: *2152672200
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: coveralls
|
93
|
-
requirement: &2152670720 !ruby/object:Gem::Requirement
|
94
|
-
none: false
|
95
|
-
requirements:
|
96
|
-
- - ~>
|
97
|
-
- !ruby/object:Gem::Version
|
98
|
-
version: 0.6.7
|
99
|
-
type: :development
|
100
|
-
prerelease: false
|
101
|
-
version_requirements: *2152670720
|
102
|
-
description: Toolbox for developing CLI clients
|
26
|
+
version: '1.5'
|
27
|
+
description: A toolbox for developing beautiful command line clients.
|
103
28
|
email:
|
104
29
|
- ''
|
105
30
|
executables: []
|
@@ -108,15 +33,18 @@ extra_rdoc_files: []
|
|
108
33
|
files:
|
109
34
|
- .gitignore
|
110
35
|
- .rspec
|
111
|
-
- .
|
36
|
+
- .ruby-gemset
|
37
|
+
- .ruby-version
|
112
38
|
- .travis.yml
|
113
39
|
- .yardopts
|
40
|
+
- CHANGELOG.md
|
114
41
|
- Gemfile
|
115
42
|
- LICENSE.txt
|
116
43
|
- README.md
|
117
44
|
- Rakefile
|
118
45
|
- benchmarks/shell.rb
|
119
46
|
- benchmarks/table.rb
|
47
|
+
- images/tty.png
|
120
48
|
- lib/tty.rb
|
121
49
|
- lib/tty/coercer.rb
|
122
50
|
- lib/tty/coercer/boolean.rb
|
@@ -196,6 +124,7 @@ files:
|
|
196
124
|
- spec/tty/coercer/float/coerce_spec.rb
|
197
125
|
- spec/tty/coercer/integer/coerce_spec.rb
|
198
126
|
- spec/tty/coercer/range/coerce_spec.rb
|
127
|
+
- spec/tty/logger/log_spec.rb
|
199
128
|
- spec/tty/logger/new_spec.rb
|
200
129
|
- spec/tty/logger/valid_level_spec.rb
|
201
130
|
- spec/tty/plugins/find_spec.rb
|
@@ -254,6 +183,8 @@ files:
|
|
254
183
|
- spec/tty/table/border/options/from_spec.rb
|
255
184
|
- spec/tty/table/border/options/new_spec.rb
|
256
185
|
- spec/tty/table/border/unicode/rendering_spec.rb
|
186
|
+
- spec/tty/table/border_options/new_spec.rb
|
187
|
+
- spec/tty/table/border_options/update_spec.rb
|
257
188
|
- spec/tty/table/column_set/extract_widths_spec.rb
|
258
189
|
- spec/tty/table/column_set/total_width_spec.rb
|
259
190
|
- spec/tty/table/column_set/widths_from_spec.rb
|
@@ -294,6 +225,7 @@ files:
|
|
294
225
|
- spec/tty/table/options_spec.rb
|
295
226
|
- spec/tty/table/orientation_spec.rb
|
296
227
|
- spec/tty/table/padder/parse_spec.rb
|
228
|
+
- spec/tty/table/padder/to_s_spec.rb
|
297
229
|
- spec/tty/table/padding_spec.rb
|
298
230
|
- spec/tty/table/properties_spec.rb
|
299
231
|
- spec/tty/table/render_spec.rb
|
@@ -363,41 +295,48 @@ files:
|
|
363
295
|
- spec/tty/text/wrap_spec.rb
|
364
296
|
- spec/tty/text/wrapping/initialize_spec.rb
|
365
297
|
- spec/tty/text/wrapping/wrap_spec.rb
|
298
|
+
- spec/tty/tty_spec.rb
|
366
299
|
- spec/tty/vector/new_spec.rb
|
300
|
+
- tasks/console.rake
|
301
|
+
- tasks/coverage.rake
|
367
302
|
- tasks/metrics/cane.rake
|
368
303
|
- tasks/metrics/flog.rake
|
304
|
+
- tasks/metrics/heckle.rake
|
369
305
|
- tasks/metrics/reek.rake
|
306
|
+
- tasks/spec.rake
|
370
307
|
- tty.gemspec
|
371
|
-
homepage: http://
|
308
|
+
homepage: http://peter-murach.github.io/tty/
|
372
309
|
licenses: []
|
310
|
+
metadata: {}
|
373
311
|
post_install_message:
|
374
312
|
rdoc_options: []
|
375
313
|
require_paths:
|
376
314
|
- lib
|
377
315
|
required_ruby_version: !ruby/object:Gem::Requirement
|
378
|
-
none: false
|
379
316
|
requirements:
|
380
|
-
- -
|
317
|
+
- - '>='
|
381
318
|
- !ruby/object:Gem::Version
|
382
319
|
version: '0'
|
383
320
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
384
|
-
none: false
|
385
321
|
requirements:
|
386
|
-
- -
|
322
|
+
- - '>='
|
387
323
|
- !ruby/object:Gem::Version
|
388
324
|
version: '0'
|
389
325
|
requirements: []
|
390
326
|
rubyforge_project:
|
391
|
-
rubygems_version:
|
327
|
+
rubygems_version: 2.0.3
|
392
328
|
signing_key:
|
393
|
-
specification_version:
|
394
|
-
summary:
|
329
|
+
specification_version: 4
|
330
|
+
summary: A toolbox for developing beautiful command line clients. It provides a fluid
|
331
|
+
interface for gathering input from the user, querying system and terminal and displaying
|
332
|
+
information back.
|
395
333
|
test_files:
|
396
334
|
- spec/spec_helper.rb
|
397
335
|
- spec/tty/coercer/boolean/coerce_spec.rb
|
398
336
|
- spec/tty/coercer/float/coerce_spec.rb
|
399
337
|
- spec/tty/coercer/integer/coerce_spec.rb
|
400
338
|
- spec/tty/coercer/range/coerce_spec.rb
|
339
|
+
- spec/tty/logger/log_spec.rb
|
401
340
|
- spec/tty/logger/new_spec.rb
|
402
341
|
- spec/tty/logger/valid_level_spec.rb
|
403
342
|
- spec/tty/plugins/find_spec.rb
|
@@ -456,6 +395,8 @@ test_files:
|
|
456
395
|
- spec/tty/table/border/options/from_spec.rb
|
457
396
|
- spec/tty/table/border/options/new_spec.rb
|
458
397
|
- spec/tty/table/border/unicode/rendering_spec.rb
|
398
|
+
- spec/tty/table/border_options/new_spec.rb
|
399
|
+
- spec/tty/table/border_options/update_spec.rb
|
459
400
|
- spec/tty/table/column_set/extract_widths_spec.rb
|
460
401
|
- spec/tty/table/column_set/total_width_spec.rb
|
461
402
|
- spec/tty/table/column_set/widths_from_spec.rb
|
@@ -496,6 +437,7 @@ test_files:
|
|
496
437
|
- spec/tty/table/options_spec.rb
|
497
438
|
- spec/tty/table/orientation_spec.rb
|
498
439
|
- spec/tty/table/padder/parse_spec.rb
|
440
|
+
- spec/tty/table/padder/to_s_spec.rb
|
499
441
|
- spec/tty/table/padding_spec.rb
|
500
442
|
- spec/tty/table/properties_spec.rb
|
501
443
|
- spec/tty/table/render_spec.rb
|
@@ -565,5 +507,6 @@ test_files:
|
|
565
507
|
- spec/tty/text/wrap_spec.rb
|
566
508
|
- spec/tty/text/wrapping/initialize_spec.rb
|
567
509
|
- spec/tty/text/wrapping/wrap_spec.rb
|
510
|
+
- spec/tty/tty_spec.rb
|
568
511
|
- spec/tty/vector/new_spec.rb
|
569
512
|
has_rdoc:
|
data/.rvmrc
DELETED
@@ -1,34 +0,0 @@
|
|
1
|
-
#!/usr/bin/env bash
|
2
|
-
|
3
|
-
environment_id="ruby-1.9.3-p0@tty"
|
4
|
-
|
5
|
-
#
|
6
|
-
# First we attempt to load the desired environment directly from the environment
|
7
|
-
# file. This is very fast and efficient compared to running through the entire
|
8
|
-
# CLI and selector. If you want feedback on which environment was used then
|
9
|
-
# insert the word 'use' after --create as this triggers verbose mode.
|
10
|
-
#
|
11
|
-
if [[ -d "${rvm_path:-$HOME/.rvm}/environments" \
|
12
|
-
&& -s "${rvm_path:-$HOME/.rvm}/environments/$environment_id" ]]
|
13
|
-
then
|
14
|
-
\. "${rvm_path:-$HOME/.rvm}/environments/$environment_id"
|
15
|
-
|
16
|
-
if [[ -s "${rvm_path:-$HOME/.rvm}/hooks/after_use" ]]
|
17
|
-
then
|
18
|
-
. "${rvm_path:-$HOME/.rvm}/hooks/after_use"
|
19
|
-
fi
|
20
|
-
else
|
21
|
-
# If the environment file has not yet been created, use the RVM CLI to select.
|
22
|
-
if ! rvm --create "$environment_id"
|
23
|
-
then
|
24
|
-
echo "Failed to create RVM environment '${environment_id}'."
|
25
|
-
return 1
|
26
|
-
fi
|
27
|
-
fi
|
28
|
-
|
29
|
-
if [[ $- == *i* ]] # check for interactive shells
|
30
|
-
then
|
31
|
-
echo "Using: $(tput setaf 2)$GEM_HOME$(tput sgr0)" # show the user the ruby and gemset they are using in green
|
32
|
-
else
|
33
|
-
echo "Using: $GEM_HOME" # don't use colors in interactive shells
|
34
|
-
fi
|