bashly 0.6.2 → 0.6.3

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: bd9fb393dfda0c4529dc984e9ee12660e310c014a41e4fac031c3d7b33420bad
4
- data.tar.gz: 3496cc3d2d8715332fce5d163b4ebe0d6ea9eb5441378c75dae3a070fbf8db18
3
+ metadata.gz: 01c46120b6cecba45cf9b55dd726ce4b66888ba3fc11d3383557a554ac51b154
4
+ data.tar.gz: 9682934a468d1624d05924f4ca5bd76d6438c26853fed1ad8098865dae669bc2
5
5
  SHA512:
6
- metadata.gz: 430ac01ae504b3f54e6c812d13729806c494cf5912833bf2b5360645040c368b1f514c538c66d701672f12ae6c1ba77849691c1666f4f6d11a43b44bc79d0f17
7
- data.tar.gz: 41784e22ff19801e5e6be60be31652ea751f30a21c027d40ba59d9f29a08ed0e5074fa1c87518bb54fd0d41bc94ad475f7f91764bbf3cde85f09868e4ccda46f
6
+ metadata.gz: bb068fa1b263a1f820910b548cd48fde9cc1ae8607c50eea381361f9cbfe952581a4e1c9e54ac31e20a96c6ccba876d2a58b2f0ec6e8a59c3f8a467fbe0bde43
7
+ data.tar.gz: 653410059e779fffdf9aa28d8c23a0a2cc8d3ba0a7911651deaf2669fc1b4d744dc3a3824124ba79140813d331510ec14a1b47f852049c305ab47fe55fe9c89d
@@ -13,7 +13,7 @@ module Bashly
13
13
 
14
14
  option "-f --force", "Overwrite existing files"
15
15
 
16
- param "FORMAT", "Output format, can be one of:\n function : generate a function file to be included in your script.\n script : generate a standalone bash completions script\n yaml : generate a yaml compatible with 'completely'"
16
+ param "FORMAT", "Output format, can be one of:\n function : generate a function file to be included in your script.\n script : generate a standalone bash completions script.\n yaml : generate a yaml compatible with completely."
17
17
  param "OUTPUT", "For the 'comp function' command: Name of the generated function.\nFor the 'comp script' or 'comp yaml' commands: path to output file.\nIn all cases, this is optional and will have sensible defaults."
18
18
 
19
19
  command "strings", "Copy an additional configuration file to your project, allowing you to customize all the tips and error strings."
@@ -17,7 +17,7 @@ config_init() {
17
17
  [[ -f "$CONFIG_FILE" ]] || touch "$CONFIG_FILE"
18
18
  }
19
19
 
20
- # Get a value from the config
20
+ # Get a value from the config.
21
21
  # Usage: result=$(config_get hello)
22
22
  config_get() {
23
23
  key=$1
@@ -66,7 +66,7 @@ config_set() {
66
66
  printf "%b\n" "$output" > "$CONFIG_FILE"
67
67
  }
68
68
 
69
- # Delete a key from teh config.
69
+ # Delete a key from the config.
70
70
  # Usage: config_del key
71
71
  config_del() {
72
72
  key=$1
@@ -92,7 +92,7 @@ config_show() {
92
92
  cat "$CONFIG_FILE"
93
93
  }
94
94
 
95
- # Return an array of the keys in the config file
95
+ # Return an array of the keys in the config file.
96
96
  # Usage:
97
97
  #
98
98
  # for k in $(config_keys); do
@@ -114,7 +114,7 @@ config_keys() {
114
114
  echo "${keys[@]}"
115
115
  }
116
116
 
117
- # Returns true if the specified key exists in the config file
117
+ # Returns true if the specified key exists in the config file.
118
118
  # Usage:
119
119
  #
120
120
  # if config_has_key "key" ; then
@@ -31,3 +31,4 @@ missing_required_environment_variable: "missing required environment variable: %
31
31
  missing_dependency: "missing dependency: %{dependency}"
32
32
  disallowed_flag: "%{name} must be one of: %{allowed}"
33
33
  disallowed_argument: "%{name} must be one of: %{allowed}"
34
+ unsupported_bash_version: "bash version 4 or higher is required"
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = "0.6.2"
2
+ VERSION = "0.6.3"
3
3
  end
@@ -2,7 +2,12 @@
2
2
  initialize() {
3
3
  version="<%= version %>"
4
4
  long_usage=''
5
- set -e
5
+ set -e
6
+
7
+ if [[ "${BASH_VERSINFO:-0}" -lt 4 ]]; then
8
+ printf "<%= strings[:unsupported_bash_version] -%>\n"
9
+ exit 1
10
+ fi
6
11
 
7
12
  <%= load_user_file("initialize.sh", placeholder: false).indent 2 %>
8
13
  }
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: 0.6.2
4
+ version: 0.6.3
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: 2021-07-27 00:00:00.000000000 Z
11
+ date: 2021-08-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
169
169
  - !ruby/object:Gem::Version
170
170
  version: '0'
171
171
  requirements: []
172
- rubygems_version: 3.2.16
172
+ rubygems_version: 3.2.25
173
173
  signing_key:
174
174
  specification_version: 4
175
175
  summary: Bash Command Line Tool Generator