Skip to content

Commit 74be3df

Browse files
authored
Merge branch 'master' into update/settings-schema
2 parents b4e7e4d + e942477 commit 74be3df

File tree

5 files changed

+22
-11
lines changed

5 files changed

+22
-11
lines changed

bashly.gemspec

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
2020
s.add_dependency 'filewatcher', '~> 2.0'
2121
s.add_dependency 'gtx', '~> 0.1.1'
2222
s.add_dependency 'lp', '~> 0.2.0'
23-
s.add_dependency 'mister_bin', '~> 0.7.0'
23+
s.add_dependency 'mister_bin', '~> 0.8.1'
2424
s.add_dependency 'requires', '~> 1.1'
2525
s.add_dependency 'tty-markdown', '~> 0.7.2'
2626

lib/bashly/cli.rb

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ def self.runner
99
header: 'Bashly - Bash CLI Generator',
1010
footer: "Help: m`bashly COMMAND --help`\nDocs: bu`https://bashly.dannyb.co`"
1111

12-
runner.route 'init', to: Commands::Init
13-
runner.route 'preview', to: Commands::Preview
14-
runner.route 'validate', to: Commands::Validate
15-
runner.route 'generate', to: Commands::Generate
16-
runner.route 'add', to: Commands::Add
17-
runner.route 'doc', to: Commands::Doc
18-
runner.route 'completions', to: Commands::Completions
19-
runner.route 'render', to: Commands::Render
20-
runner.route 'shell', to: Commands::Shell unless ENV['BASHLY_SHELL']
12+
runner.route 'init', to: Commands::Init
13+
runner.route 'preview', to: Commands::Preview
14+
runner.route 'validate', to: Commands::Validate
15+
runner.route %w[generate build], to: Commands::Generate
16+
runner.route 'add', to: Commands::Add
17+
runner.route 'doc', to: Commands::Doc
18+
runner.route 'completions', to: Commands::Completions
19+
runner.route 'render', to: Commands::Render
20+
runner.route 'shell', to: Commands::Shell unless ENV['BASHLY_SHELL']
2121

2222
runner
2323
end

lib/bashly/commands/generate.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@
33
module Bashly
44
module Commands
55
class Generate < Base
6-
help 'Generate the bash script and required files'
6+
summary "Generate the bash script and required files"
7+
help "This command is also aliased as 'build'"
78

89
usage 'bashly generate [options]'
910
usage 'bashly generate (-h|--help)'
@@ -22,6 +23,7 @@ class Generate < Base
2223

2324
example 'bashly generate --force'
2425
example 'bashly generate --wrap my_function'
26+
example 'bashly build --watch --env production'
2527
example 'bashly g -uw'
2628

2729
attr_reader :watching

spec/approvals/cli/generate/help

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
Generate the bash script and required files
22

3+
This command is also aliased as 'build'
4+
35
Usage:
46
bashly generate [options]
57
bashly generate (-h|--help)
@@ -32,4 +34,5 @@ Options:
3234
Examples:
3335
bashly generate --force
3436
bashly generate --wrap my_function
37+
bashly build --watch --env production
3538
bashly g -uw

spec/bashly/commands/generate_spec.rb

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,12 @@
1111
end
1212
end
1313

14+
describe 'build --help' do
15+
it 'is an alias to generate' do
16+
expect { subject.execute %w[build --help] }.to output_approval('cli/generate/help')
17+
end
18+
end
19+
1420
describe 'generate' do
1521
let(:cli_script) { "#{target_dir}/cli" }
1622

0 commit comments

Comments
 (0)