diff --git a/lib/cli_template/command.rb b/lib/cli_template/command.rb index c757284..8c8565e 100644 --- a/lib/cli_template/command.rb +++ b/lib/cli_template/command.rb @@ -43,5 +43,12 @@ def dispatch(m, args, options, config) super end end + + # https://github.com/erikhuda/thor/issues/244 + # Deprecation warning: Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `Lono::CLI` + # You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION. + def exit_on_failure? + true + end end end diff --git a/lib/templates/default/%project_name%.gemspec.tt b/lib/templates/default/%project_name%.gemspec.tt index 4b8370d..30b2687 100644 --- a/lib/templates/default/%project_name%.gemspec.tt +++ b/lib/templates/default/%project_name%.gemspec.tt @@ -8,8 +8,8 @@ Gem::Specification.new do |spec| spec.version = <%= project_class_name %>::VERSION spec.authors = ["<%= CliTemplate::Git.user_name %>"] spec.email = ["<%= CliTemplate::Git.user_email %>"] - spec.summary = "Generated with cli-template tool. Please write a gem summary" - spec.description = "Generated with cli-template tool. Write a longer description or delete this line." + spec.summary = "Generated with cli-template tool. Please write a gem summary" # TODO: changeme + spec.description = "Generated with cli-template tool. Write a longer description or delete this line." # TODO: changeme spec.homepage = "https://github.com/USERNAME/<%= project_name %>" # TODO: changeme spec.license = "" diff --git a/lib/templates/default/README.md.tt b/lib/templates/default/README.md.tt index f5b6b4f..7014bcf 100644 --- a/lib/templates/default/README.md.tt +++ b/lib/templates/default/README.md.tt @@ -1,10 +1,10 @@ # <%= project_class_name %> -[![Gem Version](https://badge.fury.io/rb/GEMNAME.png)](http://badge.fury.io/rb/GEMNAME) -[![CircleCI](https://circleci.com/gh/USER/REPO.svg?style=svg)](https://circleci.com/gh/USER/REPO) -[![Dependency Status](https://gemnasium.com/USER/REPO.png)](https://gemnasium.com/USER/REPO) -[![Coverage Status](https://coveralls.io/repos/USER/REPO/badge.png)](https://coveralls.io/r/USER/REPO) -[![Join the chat at https://gitter.im/USER/REPO](https://badges.gitter.im/USER/REPO.svg)](https://gitter.im/USER/REPO?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) +[![Gem Version](https://badge.fury.io/rb/<%= project_name %>.png)](http://badge.fury.io/rb/<%= project_name %>) +[![CircleCI](https://circleci.com/gh/USER/<%= project_name %>.svg?style=svg)](https://circleci.com/gh/USER/<%= project_name %>) +[![Dependency Status](https://gemnasium.com/USER/<%= project_name %>.png)](https://gemnasium.com/USER/<%= project_name %>) +[![Coverage Status](https://coveralls.io/<%= project_name %>s/USER/<%= project_name %>/badge.png)](https://coveralls.io/r/USER/<%= project_name %>) +[![Join the chat at https://gitter.im/USER/<%= project_name %>](https://badges.gitter.im/USER/<%= project_name %>.svg)](https://gitter.im/USER/<%= project_name %>?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge&utm_content=badge) [![Support](https://img.shields.io/badge/get-support-blue.svg)](https://boltops.com?utm_source=badge&utm_medium=badge&utm_campaign=<%= project_name %>) TODO: Write a gem description diff --git a/lib/templates/default/lib/%underscored_name%/command.rb.tt b/lib/templates/default/lib/%underscored_name%/command.rb.tt index 2701619..f174762 100644 --- a/lib/templates/default/lib/%underscored_name%/command.rb.tt +++ b/lib/templates/default/lib/%underscored_name%/command.rb.tt @@ -77,6 +77,13 @@ module <%= project_class_name %> def website "" end + + # https://github.com/erikhuda/thor/issues/244 + # Deprecation warning: Thor exit with status 0 on errors. To keep this behavior, you must define `exit_on_failure?` in `Lono::CLI` + # You can silence deprecations warning by setting the environment variable THOR_SILENCE_DEPRECATION. + def exit_on_failure? + true + end end end end diff --git a/lib/templates/default/spec/spec_helper.rb.tt b/lib/templates/default/spec/spec_helper.rb.tt index 6b8a873..88bb951 100644 --- a/lib/templates/default/spec/spec_helper.rb.tt +++ b/lib/templates/default/spec/spec_helper.rb.tt @@ -1,4 +1,4 @@ -ENV["TEST"] = "1" +ENV["<%= project_name.gsub('-','_').upcase %>_TEST"] = "1" # CodeClimate test coverage: https://docs.codeclimate.com/docs/configuring-test-coverage # require 'simplecov'