From 06f3eeb947c96377fe2292d4cb35365fa37c955b Mon Sep 17 00:00:00 2001 From: Danny Ben Shitrit Date: Thu, 26 Aug 2021 07:51:08 +0000 Subject: [PATCH] remove polyfill since ruby 2.4 is no longer supported --- .travis.disabled.yml | 15 --------------- lib/bashly.rb | 1 - lib/bashly/models/command.rb | 2 +- lib/bashly/polyfills/hash.rb | 12 ------------ 4 files changed, 1 insertion(+), 29 deletions(-) delete mode 100644 .travis.disabled.yml delete mode 100644 lib/bashly/polyfills/hash.rb diff --git a/.travis.disabled.yml b/.travis.disabled.yml deleted file mode 100644 index 84b43a7d..00000000 --- a/.travis.disabled.yml +++ /dev/null @@ -1,15 +0,0 @@ -language: ruby - -rvm: -- "2.3" -- "2.4" -- "2.5" -- "2.6" -- "2.7" - -before_install: -- gem install bundler - -script: -- bundle exec rspec -- bundle exec run shellcheck diff --git a/lib/bashly.rb b/lib/bashly.rb index 14e48fa9..5e1c14ba 100644 --- a/lib/bashly.rb +++ b/lib/bashly.rb @@ -5,7 +5,6 @@ require 'lp' end -requires 'bashly/polyfills' requires 'bashly/concerns' requires 'bashly/settings' diff --git a/lib/bashly/models/command.rb b/lib/bashly/models/command.rb index d24a8a52..00947ce4 100644 --- a/lib/bashly/models/command.rb +++ b/lib/bashly/models/command.rb @@ -5,7 +5,7 @@ class Command < Base # Returns the name to be used as an action. # - If it is the root command, the action is "root" - # - Else, it is all the parents, except the first tone (root) joined + # - Else, it is all the parents, except the first one (root) joined # by space. For example, for a command like "docker container run" # the action name is "container run". def action_name diff --git a/lib/bashly/polyfills/hash.rb b/lib/bashly/polyfills/hash.rb deleted file mode 100644 index 02ad8f98..00000000 --- a/lib/bashly/polyfills/hash.rb +++ /dev/null @@ -1,12 +0,0 @@ -# :nocov: - -# Required for Ruby < 2.4 -if !Dir.respond_to? :empty? - class Dir - def self.empty?(path_name) - exist?(path_name) && (entries(path_name) - ['.', '..']).empty? - end - end -end - -# :nocov: \ No newline at end of file