tty-prompt 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/.gitignore +14 -0
- data/.rspec +3 -0
- data/.ruby-version +1 -0
- data/.travis.yml +24 -0
- data/Gemfile +16 -0
- data/LICENSE.txt +22 -0
- data/README.md +199 -0
- data/Rakefile +8 -0
- data/lib/tty-prompt.rb +15 -0
- data/lib/tty/prompt.rb +206 -0
- data/lib/tty/prompt/distance.rb +49 -0
- data/lib/tty/prompt/error.rb +26 -0
- data/lib/tty/prompt/history.rb +16 -0
- data/lib/tty/prompt/mode.rb +64 -0
- data/lib/tty/prompt/mode/echo.rb +40 -0
- data/lib/tty/prompt/mode/raw.rb +40 -0
- data/lib/tty/prompt/question.rb +338 -0
- data/lib/tty/prompt/question/modifier.rb +93 -0
- data/lib/tty/prompt/question/validation.rb +92 -0
- data/lib/tty/prompt/reader.rb +113 -0
- data/lib/tty/prompt/response.rb +252 -0
- data/lib/tty/prompt/response_delegation.rb +41 -0
- data/lib/tty/prompt/statement.rb +60 -0
- data/lib/tty/prompt/suggestion.rb +113 -0
- data/lib/tty/prompt/utils.rb +16 -0
- data/lib/tty/prompt/version.rb +7 -0
- data/spec/spec_helper.rb +45 -0
- data/spec/unit/ask_spec.rb +77 -0
- data/spec/unit/distance/distance_spec.rb +75 -0
- data/spec/unit/error_spec.rb +30 -0
- data/spec/unit/question/argument_spec.rb +30 -0
- data/spec/unit/question/character_spec.rb +24 -0
- data/spec/unit/question/default_spec.rb +25 -0
- data/spec/unit/question/in_spec.rb +23 -0
- data/spec/unit/question/initialize_spec.rb +24 -0
- data/spec/unit/question/modifier/apply_to_spec.rb +31 -0
- data/spec/unit/question/modifier/letter_case_spec.rb +22 -0
- data/spec/unit/question/modifier/whitespace_spec.rb +33 -0
- data/spec/unit/question/modify_spec.rb +44 -0
- data/spec/unit/question/valid_spec.rb +46 -0
- data/spec/unit/question/validate_spec.rb +30 -0
- data/spec/unit/question/validation/coerce_spec.rb +24 -0
- data/spec/unit/question/validation/valid_value_spec.rb +22 -0
- data/spec/unit/reader/getc_spec.rb +42 -0
- data/spec/unit/response/read_bool_spec.rb +47 -0
- data/spec/unit/response/read_char_spec.rb +16 -0
- data/spec/unit/response/read_date_spec.rb +20 -0
- data/spec/unit/response/read_email_spec.rb +42 -0
- data/spec/unit/response/read_multiple_spec.rb +23 -0
- data/spec/unit/response/read_number_spec.rb +28 -0
- data/spec/unit/response/read_range_spec.rb +26 -0
- data/spec/unit/response/read_spec.rb +68 -0
- data/spec/unit/response/read_string_spec.rb +19 -0
- data/spec/unit/say_spec.rb +66 -0
- data/spec/unit/statement/initialize_spec.rb +19 -0
- data/spec/unit/suggest_spec.rb +33 -0
- data/spec/unit/warn_spec.rb +30 -0
- data/tasks/console.rake +10 -0
- data/tasks/coverage.rake +11 -0
- data/tasks/spec.rake +29 -0
- data/tty-prompt.gemspec +26 -0
- metadata +194 -0
data/tty-prompt.gemspec
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'tty/prompt/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "tty-prompt"
|
8
|
+
spec.version = TTY::Prompt::VERSION
|
9
|
+
spec.authors = ["Piotr Murach"]
|
10
|
+
spec.email = [""]
|
11
|
+
spec.summary = %q{A beautiful and powerful interactive command line prompt.}
|
12
|
+
spec.description = %q{A beautiful and powerful interactive command line prompt with a robust API for getting and validating complex inputs.}
|
13
|
+
spec.homepage = "http://peter-murach.github.io/tty"
|
14
|
+
spec.license = "MIT"
|
15
|
+
|
16
|
+
spec.files = `git ls-files -z`.split("\x0")
|
17
|
+
spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
|
18
|
+
spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
|
19
|
+
spec.require_paths = ["lib"]
|
20
|
+
|
21
|
+
spec.add_dependency "necromancer", "~> 0.3.0"
|
22
|
+
spec.add_dependency "pastel", "~> 0.5.1"
|
23
|
+
spec.add_dependency "tty-platform", "~> 0.1.0"
|
24
|
+
|
25
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
26
|
+
end
|
metadata
ADDED
@@ -0,0 +1,194 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: tty-prompt
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Piotr Murach
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-11-01 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: necromancer
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ~>
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: 0.3.0
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ~>
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 0.3.0
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: pastel
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ~>
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: 0.5.1
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: 0.5.1
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: tty-platform
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ~>
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: 0.1.0
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ~>
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: 0.1.0
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: bundler
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ~>
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '1.6'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ~>
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '1.6'
|
69
|
+
description: A beautiful and powerful interactive command line prompt with a robust
|
70
|
+
API for getting and validating complex inputs.
|
71
|
+
email:
|
72
|
+
- ''
|
73
|
+
executables: []
|
74
|
+
extensions: []
|
75
|
+
extra_rdoc_files: []
|
76
|
+
files:
|
77
|
+
- .gitignore
|
78
|
+
- .rspec
|
79
|
+
- .ruby-version
|
80
|
+
- .travis.yml
|
81
|
+
- Gemfile
|
82
|
+
- LICENSE.txt
|
83
|
+
- README.md
|
84
|
+
- Rakefile
|
85
|
+
- lib/tty-prompt.rb
|
86
|
+
- lib/tty/prompt.rb
|
87
|
+
- lib/tty/prompt/distance.rb
|
88
|
+
- lib/tty/prompt/error.rb
|
89
|
+
- lib/tty/prompt/history.rb
|
90
|
+
- lib/tty/prompt/mode.rb
|
91
|
+
- lib/tty/prompt/mode/echo.rb
|
92
|
+
- lib/tty/prompt/mode/raw.rb
|
93
|
+
- lib/tty/prompt/question.rb
|
94
|
+
- lib/tty/prompt/question/modifier.rb
|
95
|
+
- lib/tty/prompt/question/validation.rb
|
96
|
+
- lib/tty/prompt/reader.rb
|
97
|
+
- lib/tty/prompt/response.rb
|
98
|
+
- lib/tty/prompt/response_delegation.rb
|
99
|
+
- lib/tty/prompt/statement.rb
|
100
|
+
- lib/tty/prompt/suggestion.rb
|
101
|
+
- lib/tty/prompt/utils.rb
|
102
|
+
- lib/tty/prompt/version.rb
|
103
|
+
- spec/spec_helper.rb
|
104
|
+
- spec/unit/ask_spec.rb
|
105
|
+
- spec/unit/distance/distance_spec.rb
|
106
|
+
- spec/unit/error_spec.rb
|
107
|
+
- spec/unit/question/argument_spec.rb
|
108
|
+
- spec/unit/question/character_spec.rb
|
109
|
+
- spec/unit/question/default_spec.rb
|
110
|
+
- spec/unit/question/in_spec.rb
|
111
|
+
- spec/unit/question/initialize_spec.rb
|
112
|
+
- spec/unit/question/modifier/apply_to_spec.rb
|
113
|
+
- spec/unit/question/modifier/letter_case_spec.rb
|
114
|
+
- spec/unit/question/modifier/whitespace_spec.rb
|
115
|
+
- spec/unit/question/modify_spec.rb
|
116
|
+
- spec/unit/question/valid_spec.rb
|
117
|
+
- spec/unit/question/validate_spec.rb
|
118
|
+
- spec/unit/question/validation/coerce_spec.rb
|
119
|
+
- spec/unit/question/validation/valid_value_spec.rb
|
120
|
+
- spec/unit/reader/getc_spec.rb
|
121
|
+
- spec/unit/response/read_bool_spec.rb
|
122
|
+
- spec/unit/response/read_char_spec.rb
|
123
|
+
- spec/unit/response/read_date_spec.rb
|
124
|
+
- spec/unit/response/read_email_spec.rb
|
125
|
+
- spec/unit/response/read_multiple_spec.rb
|
126
|
+
- spec/unit/response/read_number_spec.rb
|
127
|
+
- spec/unit/response/read_range_spec.rb
|
128
|
+
- spec/unit/response/read_spec.rb
|
129
|
+
- spec/unit/response/read_string_spec.rb
|
130
|
+
- spec/unit/say_spec.rb
|
131
|
+
- spec/unit/statement/initialize_spec.rb
|
132
|
+
- spec/unit/suggest_spec.rb
|
133
|
+
- spec/unit/warn_spec.rb
|
134
|
+
- tasks/console.rake
|
135
|
+
- tasks/coverage.rake
|
136
|
+
- tasks/spec.rake
|
137
|
+
- tty-prompt.gemspec
|
138
|
+
homepage: http://peter-murach.github.io/tty
|
139
|
+
licenses:
|
140
|
+
- MIT
|
141
|
+
metadata: {}
|
142
|
+
post_install_message:
|
143
|
+
rdoc_options: []
|
144
|
+
require_paths:
|
145
|
+
- lib
|
146
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
147
|
+
requirements:
|
148
|
+
- - '>='
|
149
|
+
- !ruby/object:Gem::Version
|
150
|
+
version: '0'
|
151
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - '>='
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
requirements: []
|
157
|
+
rubyforge_project:
|
158
|
+
rubygems_version: 2.0.3
|
159
|
+
signing_key:
|
160
|
+
specification_version: 4
|
161
|
+
summary: A beautiful and powerful interactive command line prompt.
|
162
|
+
test_files:
|
163
|
+
- spec/spec_helper.rb
|
164
|
+
- spec/unit/ask_spec.rb
|
165
|
+
- spec/unit/distance/distance_spec.rb
|
166
|
+
- spec/unit/error_spec.rb
|
167
|
+
- spec/unit/question/argument_spec.rb
|
168
|
+
- spec/unit/question/character_spec.rb
|
169
|
+
- spec/unit/question/default_spec.rb
|
170
|
+
- spec/unit/question/in_spec.rb
|
171
|
+
- spec/unit/question/initialize_spec.rb
|
172
|
+
- spec/unit/question/modifier/apply_to_spec.rb
|
173
|
+
- spec/unit/question/modifier/letter_case_spec.rb
|
174
|
+
- spec/unit/question/modifier/whitespace_spec.rb
|
175
|
+
- spec/unit/question/modify_spec.rb
|
176
|
+
- spec/unit/question/valid_spec.rb
|
177
|
+
- spec/unit/question/validate_spec.rb
|
178
|
+
- spec/unit/question/validation/coerce_spec.rb
|
179
|
+
- spec/unit/question/validation/valid_value_spec.rb
|
180
|
+
- spec/unit/reader/getc_spec.rb
|
181
|
+
- spec/unit/response/read_bool_spec.rb
|
182
|
+
- spec/unit/response/read_char_spec.rb
|
183
|
+
- spec/unit/response/read_date_spec.rb
|
184
|
+
- spec/unit/response/read_email_spec.rb
|
185
|
+
- spec/unit/response/read_multiple_spec.rb
|
186
|
+
- spec/unit/response/read_number_spec.rb
|
187
|
+
- spec/unit/response/read_range_spec.rb
|
188
|
+
- spec/unit/response/read_spec.rb
|
189
|
+
- spec/unit/response/read_string_spec.rb
|
190
|
+
- spec/unit/say_spec.rb
|
191
|
+
- spec/unit/statement/initialize_spec.rb
|
192
|
+
- spec/unit/suggest_spec.rb
|
193
|
+
- spec/unit/warn_spec.rb
|
194
|
+
has_rdoc:
|