Skip to content

Commit

Permalink
add project name in _TEST env var and define exit_on_failure? to remo…
Browse files Browse the repository at this point in the history
…ve deprecation
  • Loading branch information
tongueroo committed Dec 24, 2019
1 parent 23c114d commit 92094a0
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 8 deletions.
7 changes: 7 additions & 0 deletions lib/cli_template/command.rb
Original file line number Diff line number Diff line change
Expand Up @@ -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
4 changes: 2 additions & 2 deletions lib/templates/default/%project_name%.gemspec.tt
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ""

Expand Down
10 changes: 5 additions & 5 deletions lib/templates/default/README.md.tt
Original file line number Diff line number Diff line change
@@ -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
Expand Down
7 changes: 7 additions & 0 deletions lib/templates/default/lib/%underscored_name%/command.rb.tt
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion lib/templates/default/spec/spec_helper.rb.tt
Original file line number Diff line number Diff line change
@@ -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'
Expand Down

0 comments on commit 92094a0

Please sign in to comment.