bashly 1.0.4 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e8541b3056b57bf3b312972de9468334a8590dbf9c759a0a099de12230b164e4
4
- data.tar.gz: 2ad5a9367d40f95fed80dcb5da2743469237f24e7935ba1d7530459adbc9dfc8
3
+ metadata.gz: 8c219a4bf3f32f47434d1a855a620ea62caaafe336a8647e8ef84529eb7023b8
4
+ data.tar.gz: d18b7f6bdfeb43fc4a27fb9e5f617d1c0c9c6f5783f5c7dc1df8f6eff575c8ab
5
5
  SHA512:
6
- metadata.gz: 1bd9c8ce895b05bae99c0fa658a23816426c10d33ea965cd0186460da5de6e088f3a1c9f6acf5969ef84022db3c10321163a0740966162646b39744855c1984f
7
- data.tar.gz: 12a626b4e5875110003c5a8b22ea9b289e63b0e05638ba37d25c353e73b86149e65b7e5b9e5460ae5c356c971057a2cef8d73a472f09f851533d64c665b71f2d
6
+ metadata.gz: 38cf3b1d1c49c447f0e2817b57cb03362e528cefe22dc0f4d9c1dcfcb7b52859c034bc012bfb7ec769b6c94801c102bfe74d9c336e0dbc8ee060027c10b1b242
7
+ data.tar.gz: e64ced05cc15cd4cb66cc2dc6696cb522db87843c9fc8826d69500cfb1aafb8aa3ad13ccf36bca806ce262cece7c30763229d82f297bbf471ee71ca5807eaaec
data/lib/bashly/cli.rb CHANGED
@@ -15,6 +15,7 @@ module Bashly
15
15
  runner.route 'generate', to: Commands::Generate
16
16
  runner.route 'add', to: Commands::Add
17
17
  runner.route 'doc', to: Commands::Doc
18
+ runner.route 'shell', to: Commands::Shell unless ENV['BASHLY_SHELL']
18
19
 
19
20
  runner
20
21
  end
@@ -2,7 +2,6 @@ module Bashly
2
2
  module Commands
3
3
  class Doc < Base
4
4
  summary 'Show bashly reference documentation'
5
- help 'This command displays bite-sized help for all the bashly configuration options in the terminal.'
6
5
 
7
6
  usage 'bashly doc [SEARCH] [--index]'
8
7
  usage 'bashly doc (-h|--help)'
@@ -2,7 +2,7 @@ module Bashly
2
2
  module Commands
3
3
  class Init < Base
4
4
  summary 'Initialize a new workspace'
5
- help 'This command will create the source folder, and place a template configuration file in it.'
5
+ help 'Create the bashly source folder, and place a template configuration file in it'
6
6
 
7
7
  usage 'bashly init [--minimal]'
8
8
  usage 'bashly init (-h|--help)'
@@ -0,0 +1,40 @@
1
+ module Bashly
2
+ module Commands
3
+ class Shell < Base
4
+ summary 'Start an interactive bashly shell'
5
+ help 'Start an interactive shell where you can run bashly commands'
6
+
7
+ usage 'bashly shell'
8
+ usage 'bashly shell (-h|--help)'
9
+
10
+ def run
11
+ ENV['BASHLY_SHELL'] = '1'
12
+ terminal.start
13
+ end
14
+
15
+ private
16
+
17
+ def terminal
18
+ @terminal ||= begin
19
+ terminal = MisterBin::Terminal.new runner, {
20
+ autocomplete: autocomplete,
21
+ show_usage: true,
22
+ prompt: "\n\e[33m\e[1mbashly\e[0m > ",
23
+ }
24
+
25
+ terminal.on('help') { runner.run %w[--help] }
26
+ terminal.on('version') { runner.run %w[--version] }
27
+ terminal
28
+ end
29
+ end
30
+
31
+ def runner
32
+ @runner ||= Bashly::CLI.runner
33
+ end
34
+
35
+ def autocomplete
36
+ @autocomplete ||= %w[help version] + runner.commands.keys
37
+ end
38
+ end
39
+ end
40
+ end
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = '1.0.4'
2
+ VERSION = '1.0.5'
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bashly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.4
4
+ version: 1.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-05-05 00:00:00.000000000 Z
11
+ date: 2023-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -131,6 +131,7 @@ files:
131
131
  - lib/bashly/commands/generate.rb
132
132
  - lib/bashly/commands/init.rb
133
133
  - lib/bashly/commands/preview.rb
134
+ - lib/bashly/commands/shell.rb
134
135
  - lib/bashly/commands/validate.rb
135
136
  - lib/bashly/concerns/asset_helper.rb
136
137
  - lib/bashly/concerns/completions.rb
@@ -262,7 +263,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
263
  - !ruby/object:Gem::Version
263
264
  version: '0'
264
265
  requirements: []
265
- rubygems_version: 3.3.26
266
+ rubygems_version: 3.4.13
266
267
  signing_key:
267
268
  specification_version: 4
268
269
  summary: Bash Command Line Tool Generator