tabry 0.2.5 → 0.2.6
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/tabry/cli/flag_proxy.rb +4 -0
- data/lib/tabry/version.rb +1 -1
- data/spec/spec_helper.rb +1 -1
- data/spec/tabry/replty/builder_spec.rb +39 -0
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7733876522770c3037de86e663ddadd59cf1a86b2ddb1bc993934789e5b8d34a
|
4
|
+
data.tar.gz: 383673dc7f2ba427e70808fc08484829db28cd5b2c263b21ed1a4971ee2427be
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e3f75ff33d1b2d3c9e959debc066a672687b906a64a7b414ed57091878cb4ede0ae815d18c563ea619be7ca148bc51c2a571d9cb4075ff4a10ca0c05e64a97cd
|
7
|
+
data.tar.gz: 29d82a30fe87411c11c97287bd6af5f1fd279bf2f1a1e44890273c7844d6dd5e0f35916bf4756f2c9fbfbc84f9e6a206862f8d73addbae14cce90666b2b16f89
|
data/lib/tabry/cli/flag_proxy.rb
CHANGED
data/lib/tabry/version.rb
CHANGED
data/spec/spec_helper.rb
CHANGED
@@ -0,0 +1,39 @@
|
|
1
|
+
require_relative '../../../lib/tabry/replty/builder'
|
2
|
+
require_relative '../../../lib/tabry/replty/base'
|
3
|
+
require_relative '../../../lib/tabry/config_builder'
|
4
|
+
|
5
|
+
module Tabry
|
6
|
+
module Specs
|
7
|
+
class TestRepl < Tabry::Replty::Base
|
8
|
+
def log
|
9
|
+
@log ||= []
|
10
|
+
end
|
11
|
+
|
12
|
+
def foo
|
13
|
+
log << [:foo]
|
14
|
+
end
|
15
|
+
|
16
|
+
def bar
|
17
|
+
log << [:bar, args.waz, flags.ok]
|
18
|
+
end
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
22
|
+
|
23
|
+
describe Tabry::Replty::Builder do
|
24
|
+
it 'calls the repl method for the subcommand' do
|
25
|
+
conf = Tabry::ConfigBuilder.build do |c|
|
26
|
+
sub :foo
|
27
|
+
sub :bar do
|
28
|
+
arg :waz
|
29
|
+
flag :ok
|
30
|
+
end
|
31
|
+
end
|
32
|
+
|
33
|
+
repl = Tabry::Specs::TestRepl.new
|
34
|
+
builder = Tabry::Replty::Builder.new(conf, repl)
|
35
|
+
expect(builder).to receive(:readline).and_return("bar waz --ok")
|
36
|
+
expect(builder).to receive(:readline).and_return(nil)
|
37
|
+
builder.run
|
38
|
+
end
|
39
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabry
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.6
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Evan Battaglia
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pry-byebug
|
@@ -203,6 +203,7 @@ files:
|
|
203
203
|
- spec/tabry/models/shell_option_spec.rb
|
204
204
|
- spec/tabry/models/subs_list_spec.rb
|
205
205
|
- spec/tabry/options_finder_spec.rb
|
206
|
+
- spec/tabry/replty/builder_spec.rb
|
206
207
|
- spec/tabry/result_spec.rb
|
207
208
|
- spec/tabry/runner_spec.rb
|
208
209
|
- spec/tabry/shell_tokenizer_spec.rb
|