diff --git a/README.md b/README.md index 36747e0b..e97ced48 100644 --- a/README.md +++ b/README.md @@ -3,6 +3,12 @@ Bashly - Bash CLI Generator Create beautiful bash scripts from simple YAML configuration. +[![Gem Version](https://badge.fury.io/rb/bashly.svg)](https://badge.fury.io/rb/bashly) +[![Build Status](https://travis-ci.com/DannyBen/bashly.svg?branch=master)](https://travis-ci.com/DannyBen/bashly) +[![Maintainability](https://api.codeclimate.com/v1/badges/8cf89047e50ca601e431/maintainability)](https://codeclimate.com/github/DannyBen/bashly/maintainability) + +--- + ![demo](demo/cast.svg) --- @@ -46,3 +52,6 @@ Contributing / Support If you experience any issue, have a question or a suggestion, or if you wish to contribute, feel free to [open an issue][issues]. + +[issues]: https://github.com/DannyBen/bashly/issues + diff --git a/bashly.gemspec b/bashly.gemspec index b4615325..f372bf93 100644 --- a/bashly.gemspec +++ b/bashly.gemspec @@ -17,7 +17,7 @@ Gem::Specification.new do |s| s.license = 'MIT' s.required_ruby_version = ">= 2.3.0" - s.add_runtime_dependency 'colsole', '~> 0.5' - s.add_runtime_dependency 'mister_bin', '~> 0.6' + s.add_runtime_dependency 'colsole', '~> 0.6' + s.add_runtime_dependency 'mister_bin', '~> 0.7' s.add_runtime_dependency 'requires', '~> 0.1' end diff --git a/lib/bashly.rb b/lib/bashly.rb index 9a211f1e..1d24ffeb 100644 --- a/lib/bashly.rb +++ b/lib/bashly.rb @@ -5,6 +5,7 @@ require 'lp' end +requires 'bashly/polyfills' requires 'bashly/settings' requires 'bashly/exceptions' requires 'bashly/concerns' diff --git a/lib/bashly/polyfills/hash.rb b/lib/bashly/polyfills/hash.rb new file mode 100644 index 00000000..64974738 --- /dev/null +++ b/lib/bashly/polyfills/hash.rb @@ -0,0 +1,10 @@ +# :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 \ No newline at end of file diff --git a/spec/approvals/cli/error b/spec/approvals/cli/error index bdcf3d0a..8f11e52f 100644 --- a/spec/approvals/cli/error +++ b/spec/approvals/cli/error @@ -1,3 +1,4 @@ -Errno::ENOENT +Errno::ENOENT No such file or directory @ rb_sysopen - src/bashly.yml -creating user files in src +creating user files in src + \ No newline at end of file