bashly 1.0.3 → 1.0.4

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: 2b90c79b66c9396dc7fda026e19761818e7db33c8b19b0e0501486b3cdf7f1e0
4
- data.tar.gz: be2b5e3ae996189263e604421910ebc3b8a597e3cf9c525cf19b94e2e4434fd3
3
+ metadata.gz: e8541b3056b57bf3b312972de9468334a8590dbf9c759a0a099de12230b164e4
4
+ data.tar.gz: 2ad5a9367d40f95fed80dcb5da2743469237f24e7935ba1d7530459adbc9dfc8
5
5
  SHA512:
6
- metadata.gz: 1414d602e5fabf5e9b98dfb1811276601f01de83dc0c866ce155ab22a2246122c9a6a2605c9f83dedc70f21a47c5f397b5ed59339412d8eccf09a319429b7271
7
- data.tar.gz: 8bef6713c24b2a2d24d0ef97b54c1fd957ad8ff28e041ec08fdfa96c3bedc22a5a41c6b4691367357e63e404ba87dbd9599d7eddd0102cbe9bac9184f0d1dcee
6
+ metadata.gz: 1bd9c8ce895b05bae99c0fa658a23816426c10d33ea965cd0186460da5de6e088f3a1c9f6acf5969ef84022db3c10321163a0740966162646b39744855c1984f
7
+ data.tar.gz: 12a626b4e5875110003c5a8b22ea9b289e63b0e05638ba37d25c353e73b86149e65b7e5b9e5460ae5c356c971057a2cef8d73a472f09f851533d64c665b71f2d
@@ -29,7 +29,7 @@ module Bashly
29
29
  end
30
30
  end
31
31
 
32
- commands.each do |command|
32
+ public_commands.each do |command|
33
33
  result.merge! command.completion_data(with_version: false)
34
34
  end
35
35
 
@@ -62,7 +62,7 @@ module Bashly
62
62
  end
63
63
 
64
64
  def completion_flag_names
65
- flags.map(&:name) + flags.map(&:short)
65
+ public_flags.map(&:name) + public_flags.map(&:short)
66
66
  end
67
67
 
68
68
  def completion_allowed_args
@@ -73,7 +73,7 @@ module Bashly
73
73
  trivial_flags = %w[--help -h]
74
74
  trivial_flags += %w[--version -v] if with_version
75
75
  all = (
76
- command_aliases + trivial_flags +
76
+ public_command_aliases + trivial_flags +
77
77
  completion_flag_names + completion_allowed_args
78
78
  )
79
79
 
@@ -223,6 +223,11 @@ module Bashly
223
223
  commands.reject(&:private)
224
224
  end
225
225
 
226
+ # Returns a full list of the public Command names and aliases combined
227
+ def public_command_aliases
228
+ public_commands.map(&:aliases).flatten
229
+ end
230
+
226
231
  # Returns only environment variables that are not private
227
232
  def public_environment_variables
228
233
  environment_variables.reject(&:private)
@@ -56,9 +56,9 @@ module Bashly
56
56
  end
57
57
 
58
58
  def strict_string
59
- if Settings.strict.is_a? String
60
- Settings.strict
61
- elsif Settings.strict
59
+ if strict.is_a? String
60
+ strict
61
+ elsif strict
62
62
  'set -euo pipefail'
63
63
  else
64
64
  'set -e'
@@ -101,7 +101,13 @@ module Bashly
101
101
  end
102
102
 
103
103
  def user_settings_path
104
- ENV['BASHLY_SETTINGS_PATH'] || 'settings.yml'
104
+ @user_settings_path ||= if ENV['BASHLY_SETTINGS_PATH']
105
+ ENV['BASHLY_SETTINGS_PATH']
106
+ elsif File.exist? 'bashly-settings.yml'
107
+ 'bashly-settings.yml'
108
+ else
109
+ 'settings.yml'
110
+ end
105
111
  end
106
112
 
107
113
  def defsult_settings
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = '1.0.3'
2
+ VERSION = '1.0.4'
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.3
4
+ version: 1.0.4
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-04-08 00:00:00.000000000 Z
11
+ date: 2023-05-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: colsole
@@ -262,7 +262,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
262
262
  - !ruby/object:Gem::Version
263
263
  version: '0'
264
264
  requirements: []
265
- rubygems_version: 3.4.10
265
+ rubygems_version: 3.3.26
266
266
  signing_key:
267
267
  specification_version: 4
268
268
  summary: Bash Command Line Tool Generator