Skip to content

Commit b82b70a

Browse files
committed
- Remove deprecated command.short
1 parent 7faf670 commit b82b70a

File tree

17 files changed

+1
-206
lines changed

17 files changed

+1
-206
lines changed

lib/bashly/commands/base.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -21,14 +21,6 @@ def validate_config
2121
def with_valid_config
2222
validate_config
2323
yield
24-
show_deprecations
25-
end
26-
27-
def show_deprecations
28-
return if config_validator.deprecations.empty? || ENV['BASHLY_HIDE_DEPRECATIONS']
29-
30-
messages = config_validator.deprecations.map(&:message).join("\n\n")
31-
say! "\n#{messages}\n\n"
3224
end
3325
end
3426
end

lib/bashly/commands/validate.rb

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,7 @@ def run
1717
puts '---'
1818
end
1919
validate_config
20-
show_deprecations
21-
deprecations = config_validator.deprecations
22-
if deprecations.empty?
23-
say 'g`OK`'
24-
else
25-
say "r`WARNING` Found #{deprecations.count} deprecations"
26-
end
20+
say 'g`OK`'
2721
end
2822
end
2923
end

lib/bashly/concerns/validation_helpers.rb

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ module Bashly
22
# This is a `ConfigValidator` concern responsible for providing basic
33
# assertion methods.
44
module ValidationHelpers
5-
def deprecations
6-
@deprecations ||= []
7-
end
8-
95
protected
106

117
def assert(valid, message)
@@ -16,10 +12,6 @@ def refute(invalid, message)
1612
assert !invalid, message
1713
end
1814

19-
def deprecate(key, **options)
20-
deprecations.push Deprecation.new(key, **options)
21-
end
22-
2315
def assert_string(key, value)
2416
assert value.is_a?(String), "#{key} must be a string"
2517
end

lib/bashly/config_validator.rb

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -193,11 +193,6 @@ def assert_command(key, value)
193193
refute value['version'], "#{key}.version makes no sense"
194194
refute value['extensible'], "#{key}.extensible makes no sense"
195195
end
196-
197-
# DEPRECATION 0.8.0
198-
if value['short']
199-
deprecate "#{key}.short", replacement: 'alias', reference: 'https://github.com/DannyBen/bashly/pull/220'
200-
end
201196
end
202197
end
203198
end

lib/bashly/deprecation.rb

Lines changed: 0 additions & 27 deletions
This file was deleted.

lib/bashly/script/command.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,7 @@ def option_keys
1111
extensible expose filename filters flags
1212
footer function group help name
1313
private version
14-
short
1514
]
16-
# DEPRECATION 0.8.0
1715
end
1816
end
1917

@@ -36,8 +34,6 @@ def aliases
3634

3735
# Returns an array of alternative aliases if any
3836
def alt
39-
# DEPRECATION 0.8.0
40-
options['alias'] ||= options['short']
4137
return [] unless options['alias']
4238

4339
options['alias'].is_a?(String) ? [options['alias']] : options['alias']

spec/approvals/cli/deprecations/command-short-stderr

Lines changed: 0 additions & 12 deletions
This file was deleted.

spec/approvals/cli/validate/deprecation-command-short

Lines changed: 0 additions & 1 deletion
This file was deleted.

spec/approvals/deprecation/message

Lines changed: 0 additions & 4 deletions
This file was deleted.

spec/approvals/fixtures/deprecation-command-short

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)