clin 0.3.0 → 0.4.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/.lint-ci.yml +2 -0
- data/.simplecov +5 -0
- data/.travis.yml +8 -0
- data/CHANGELOG.md +11 -0
- data/README.md +5 -4
- data/benchmarks/bench.rb +21 -0
- data/benchmarks/text_bench.rb +78 -0
- data/clin.gemspec +2 -1
- data/examples/reusable_options.rb +19 -0
- data/examples/simple.rb +8 -3
- data/examples/test.rb +5 -5
- data/examples/text_builder.rb +40 -0
- data/lib/clin/argument.rb +19 -2
- data/lib/clin/command_mixin/core.rb +13 -18
- data/lib/clin/command_mixin/options.rb +37 -26
- data/lib/clin/command_parser.rb +46 -57
- data/lib/clin/common/help_options.rb +1 -0
- data/lib/clin/errors.rb +50 -4
- data/lib/clin/line_reader/basic.rb +38 -0
- data/lib/clin/line_reader/readline.rb +53 -0
- data/lib/clin/line_reader.rb +16 -0
- data/lib/clin/option.rb +24 -11
- data/lib/clin/option_parser.rb +159 -0
- data/lib/clin/shell.rb +36 -15
- data/lib/clin/shell_interaction/choose.rb +19 -11
- data/lib/clin/shell_interaction/file_conflict.rb +4 -1
- data/lib/clin/shell_interaction/select.rb +44 -0
- data/lib/clin/shell_interaction.rb +1 -0
- data/lib/clin/text/table.rb +270 -0
- data/lib/clin/text.rb +152 -0
- data/lib/clin/version.rb +1 -1
- data/lib/clin.rb +10 -1
- data/spec/clin/command_dispacher_spec.rb +1 -1
- data/spec/clin/command_mixin/options_spec.rb +38 -15
- data/spec/clin/command_parser_spec.rb +27 -51
- data/spec/clin/line_reader/basic_spec.rb +54 -0
- data/spec/clin/line_reader/readline_spec.rb +64 -0
- data/spec/clin/line_reader_spec.rb +17 -0
- data/spec/clin/option_parser_spec.rb +217 -0
- data/spec/clin/option_spec.rb +5 -7
- data/spec/clin/shell_interaction/choose_spec.rb +30 -0
- data/spec/clin/shell_interaction/file_interaction_spec.rb +18 -0
- data/spec/clin/shell_interaction/select_spec.rb +96 -0
- data/spec/clin/shell_spec.rb +42 -0
- data/spec/clin/text/table_cell_spec.rb +72 -0
- data/spec/clin/text/table_row_spec.rb +74 -0
- data/spec/clin/text/table_separator_row_spec.rb +82 -0
- data/spec/clin/text/table_spec.rb +259 -0
- data/spec/clin/text_spec.rb +158 -0
- data/spec/examples/list_option_spec.rb +6 -2
- data/spec/examples/reusable_options_spec.rb +21 -0
- data/spec/examples/simple_spec.rb +9 -9
- data/spec/spec_helper.rb +3 -2
- metadata +54 -3
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: clin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Timothee Guerin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-06-
|
11
|
+
date: 2015-06-15 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activesupport
|
@@ -67,7 +67,7 @@ dependencies:
|
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '3.0'
|
69
69
|
- !ruby/object:Gem::Dependency
|
70
|
-
name:
|
70
|
+
name: codeclimate-test-reporter
|
71
71
|
requirement: !ruby/object:Gem::Requirement
|
72
72
|
requirements:
|
73
73
|
- - ">="
|
@@ -94,6 +94,20 @@ dependencies:
|
|
94
94
|
- - ">="
|
95
95
|
- !ruby/object:Gem::Version
|
96
96
|
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: benchmark-ips
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
97
111
|
description: ''
|
98
112
|
email:
|
99
113
|
- timothee.guerin@outlook.com
|
@@ -103,21 +117,27 @@ extra_rdoc_files: []
|
|
103
117
|
files:
|
104
118
|
- ".codeclimate.yml"
|
105
119
|
- ".gitignore"
|
120
|
+
- ".lint-ci.yml"
|
106
121
|
- ".rubocop.yml"
|
122
|
+
- ".simplecov"
|
107
123
|
- ".travis.yml"
|
108
124
|
- CHANGELOG.md
|
109
125
|
- Gemfile
|
110
126
|
- LICENSE.txt
|
111
127
|
- README.md
|
112
128
|
- Rakefile
|
129
|
+
- benchmarks/bench.rb
|
130
|
+
- benchmarks/text_bench.rb
|
113
131
|
- clin.gemspec
|
114
132
|
- examples/auto_option.rb
|
115
133
|
- examples/dispatcher.rb
|
116
134
|
- examples/list_option.rb
|
117
135
|
- examples/nested_dispatcher.rb
|
118
136
|
- examples/optional_argument.rb
|
137
|
+
- examples/reusable_options.rb
|
119
138
|
- examples/simple.rb
|
120
139
|
- examples/test.rb
|
140
|
+
- examples/text_builder.rb
|
121
141
|
- lib/clin.rb
|
122
142
|
- lib/clin/argument.rb
|
123
143
|
- lib/clin/command.rb
|
@@ -130,13 +150,20 @@ files:
|
|
130
150
|
- lib/clin/common/help_options.rb
|
131
151
|
- lib/clin/errors.rb
|
132
152
|
- lib/clin/general_option.rb
|
153
|
+
- lib/clin/line_reader.rb
|
154
|
+
- lib/clin/line_reader/basic.rb
|
155
|
+
- lib/clin/line_reader/readline.rb
|
133
156
|
- lib/clin/option.rb
|
134
157
|
- lib/clin/option_list.rb
|
158
|
+
- lib/clin/option_parser.rb
|
135
159
|
- lib/clin/shell.rb
|
136
160
|
- lib/clin/shell_interaction.rb
|
137
161
|
- lib/clin/shell_interaction/choose.rb
|
138
162
|
- lib/clin/shell_interaction/file_conflict.rb
|
163
|
+
- lib/clin/shell_interaction/select.rb
|
139
164
|
- lib/clin/shell_interaction/yes_or_no.rb
|
165
|
+
- lib/clin/text.rb
|
166
|
+
- lib/clin/text/table.rb
|
140
167
|
- lib/clin/version.rb
|
141
168
|
- spec/clin/argument_spec.rb
|
142
169
|
- spec/clin/command_dispacher_spec.rb
|
@@ -145,14 +172,26 @@ files:
|
|
145
172
|
- spec/clin/command_parser_spec.rb
|
146
173
|
- spec/clin/command_spec.rb
|
147
174
|
- spec/clin/common/help_options_spec.rb
|
175
|
+
- spec/clin/line_reader/basic_spec.rb
|
176
|
+
- spec/clin/line_reader/readline_spec.rb
|
177
|
+
- spec/clin/line_reader_spec.rb
|
148
178
|
- spec/clin/option_list_spec.rb
|
179
|
+
- spec/clin/option_parser_spec.rb
|
149
180
|
- spec/clin/option_spec.rb
|
150
181
|
- spec/clin/shell_interaction/choose_spec.rb
|
182
|
+
- spec/clin/shell_interaction/file_interaction_spec.rb
|
183
|
+
- spec/clin/shell_interaction/select_spec.rb
|
151
184
|
- spec/clin/shell_spec.rb
|
185
|
+
- spec/clin/text/table_cell_spec.rb
|
186
|
+
- spec/clin/text/table_row_spec.rb
|
187
|
+
- spec/clin/text/table_separator_row_spec.rb
|
188
|
+
- spec/clin/text/table_spec.rb
|
189
|
+
- spec/clin/text_spec.rb
|
152
190
|
- spec/errors_spec.rb
|
153
191
|
- spec/examples/auto_option_spec.rb
|
154
192
|
- spec/examples/list_option_spec.rb
|
155
193
|
- spec/examples/nested_dispatcher_spec.rb
|
194
|
+
- spec/examples/reusable_options_spec.rb
|
156
195
|
- spec/examples/simple_spec.rb
|
157
196
|
- spec/spec_helper.rb
|
158
197
|
homepage: ''
|
@@ -187,14 +226,26 @@ test_files:
|
|
187
226
|
- spec/clin/command_parser_spec.rb
|
188
227
|
- spec/clin/command_spec.rb
|
189
228
|
- spec/clin/common/help_options_spec.rb
|
229
|
+
- spec/clin/line_reader/basic_spec.rb
|
230
|
+
- spec/clin/line_reader/readline_spec.rb
|
231
|
+
- spec/clin/line_reader_spec.rb
|
190
232
|
- spec/clin/option_list_spec.rb
|
233
|
+
- spec/clin/option_parser_spec.rb
|
191
234
|
- spec/clin/option_spec.rb
|
192
235
|
- spec/clin/shell_interaction/choose_spec.rb
|
236
|
+
- spec/clin/shell_interaction/file_interaction_spec.rb
|
237
|
+
- spec/clin/shell_interaction/select_spec.rb
|
193
238
|
- spec/clin/shell_spec.rb
|
239
|
+
- spec/clin/text/table_cell_spec.rb
|
240
|
+
- spec/clin/text/table_row_spec.rb
|
241
|
+
- spec/clin/text/table_separator_row_spec.rb
|
242
|
+
- spec/clin/text/table_spec.rb
|
243
|
+
- spec/clin/text_spec.rb
|
194
244
|
- spec/errors_spec.rb
|
195
245
|
- spec/examples/auto_option_spec.rb
|
196
246
|
- spec/examples/list_option_spec.rb
|
197
247
|
- spec/examples/nested_dispatcher_spec.rb
|
248
|
+
- spec/examples/reusable_options_spec.rb
|
198
249
|
- spec/examples/simple_spec.rb
|
199
250
|
- spec/spec_helper.rb
|
200
251
|
has_rdoc:
|