bashly 1.2.7 → 1.2.8

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: fa7187087fc2f921c6631e901db4a6a1e4af476e870bd272b4fa11c1f6650a29
4
- data.tar.gz: 33dc09b9df4a807cb1fdae1538eced45214e5d029f25b8ed4ca40c2760210fb8
3
+ metadata.gz: 8e0ea93f1ae2d4de7347c78c66eded0c3af9a815e444efbe6450292d5808e1cd
4
+ data.tar.gz: f301168efb623543d51e26e433ac0935e874e1d70b5b59e9c0300e451e3e4fdd
5
5
  SHA512:
6
- metadata.gz: 44d91f1ab44daa047bf40d2a22c4e422cdba92d884bfb27bed4e6749156b66fdd6fd54465a64f72a3c18bf5fa691daca3d60ead18b91e22e94096c38f655dbed
7
- data.tar.gz: 00d6f327d759e79ec2856858f3f3a8db16ce91fa0eaa87d1336870b1ae3e776d70069d33c4dc2c6afe8c0544fadadd7401111463fde0f69ac6f6c507ae537289
6
+ metadata.gz: 9ebcf92ca566a54989af2fdf2f2ba6e59d87972fc3e958cfd280205b831a77fc27fd9c2a18c2f5b3f89d7e36754a0981b84c400214f8653bfc9dd79d099e8fe7
7
+ data.tar.gz: 82a22bd78ed9e19d3efc2d519da526943ec38a4c4cd0456779d2bde1fc452f007fe9363a1e9fc44753d6724df0a0a1ddd615fbeebc00504846cbe6171e8934d8
@@ -110,6 +110,7 @@ enable_view_markers: development
110
110
  enable_inspect_args: development
111
111
  enable_deps_array: always
112
112
  enable_env_var_names_array: always
113
+ enable_sourcing: development
113
114
 
114
115
 
115
116
  #-------------------------------------------------------------------------------
@@ -13,6 +13,7 @@ module Bashly
13
13
  :enable_env_var_names_array,
14
14
  :enable_header_comment,
15
15
  :enable_inspect_args,
16
+ :enable_sourcing,
16
17
  :enable_view_markers,
17
18
  :lib_dir,
18
19
  :partials_extension,
@@ -48,28 +49,32 @@ module Bashly
48
49
  (send(:"enable_#{feature}") == 'development' && !production?)
49
50
  end
50
51
 
51
- def enable_header_comment
52
- @enable_header_comment ||= get :enable_header_comment
53
- end
54
-
55
52
  def enable_bash3_bouncer
56
53
  @enable_bash3_bouncer ||= get :enable_bash3_bouncer
57
54
  end
58
55
 
59
- def enable_view_markers
60
- @enable_view_markers ||= get :enable_view_markers
56
+ def enable_deps_array
57
+ @enable_deps_array ||= get :enable_deps_array
58
+ end
59
+
60
+ def enable_env_var_names_array
61
+ @enable_env_var_names_array ||= get :enable_env_var_names_array
62
+ end
63
+
64
+ def enable_header_comment
65
+ @enable_header_comment ||= get :enable_header_comment
61
66
  end
62
67
 
63
68
  def enable_inspect_args
64
69
  @enable_inspect_args ||= get :enable_inspect_args
65
70
  end
66
71
 
67
- def enable_deps_array
68
- @enable_deps_array ||= get :enable_deps_array
72
+ def enable_sourcing
73
+ @enable_sourcing ||= get :enable_sourcing
69
74
  end
70
75
 
71
- def enable_env_var_names_array
72
- @enable_env_var_names_array ||= get :enable_env_var_names_array
76
+ def enable_view_markers
77
+ @enable_view_markers ||= get :enable_view_markers
73
78
  end
74
79
 
75
80
  def env
@@ -1,3 +1,3 @@
1
1
  module Bashly
2
- VERSION = '1.2.7'
2
+ VERSION = '1.2.8'
3
3
  end
@@ -1,5 +1,5 @@
1
1
  = view_marker
2
-
2
+ > declare -g long_usage=''
3
3
  > declare -g -A args=()
4
4
 
5
5
  if catch_all_used_anywhere?
@@ -1,8 +1,7 @@
1
1
  = view_marker
2
2
 
3
3
  > initialize() {
4
- > version="<%= version %>"
5
- > long_usage=''
4
+ > declare -g version="<%= version %>"
6
5
  > {{ Settings.strict_string }}
7
6
 
8
7
  if root_command?
@@ -11,8 +10,6 @@ if root_command?
11
10
  = render(:environment_variables_default).indent 2
12
11
  end
13
12
 
14
- = render(:globals).indent(2)
15
-
16
13
  if user_file_exist?('initialize')
17
14
  >
18
15
  = load_user_file('initialize').indent 2
@@ -13,6 +13,13 @@
13
13
  = render :run
14
14
 
15
15
  >
16
- > initialize
17
- > run "$@"
18
- >
16
+ if Settings.enabled? :sourcing
17
+ > if [[ "${BASH_SOURCE[0]}" == "${0}" ]]; then
18
+ > initialize
19
+ > run "$@"
20
+ > fi
21
+ else
22
+ > initialize
23
+ > run "$@"
24
+ end
25
+ >
@@ -1,6 +1,8 @@
1
1
  = view_marker
2
2
 
3
3
  > run() {
4
+ = render(:globals).indent(2)
5
+ >
4
6
  > normalize_input "$@"
5
7
  > parse_requirements "${input[@]}"
6
8
 
metadata CHANGED
@@ -1,14 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bashly
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.2.7
4
+ version: 1.2.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Danny Ben Shitrit
8
- autorequire:
9
8
  bindir: bin
10
9
  cert_chain: []
11
- date: 2024-12-28 00:00:00.000000000 Z
10
+ date: 2025-01-16 00:00:00.000000000 Z
12
11
  dependencies:
13
12
  - !ruby/object:Gem::Dependency
14
13
  name: colsole
@@ -349,7 +348,6 @@ metadata:
349
348
  homepage_uri: https://bashly.dannyb.co/
350
349
  source_code_uri: https://github.com/DannyBen/bashly
351
350
  rubygems_mfa_required: 'true'
352
- post_install_message:
353
351
  rdoc_options: []
354
352
  require_paths:
355
353
  - lib
@@ -364,8 +362,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
364
362
  - !ruby/object:Gem::Version
365
363
  version: '0'
366
364
  requirements: []
367
- rubygems_version: 3.5.23
368
- signing_key:
365
+ rubygems_version: 3.6.2
369
366
  specification_version: 4
370
367
  summary: Bash Command Line Tool Generator
371
368
  test_files: []