generated from mattbrictson/tomo-plugin
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 0f8a280
Showing
27 changed files
with
938 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
version: 2 | ||
jobs: | ||
rubocop: | ||
docker: | ||
- image: circleci/ruby:2.6.5 | ||
steps: | ||
- checkout | ||
- run: gem install bundler -v 2.0.2 | ||
- run: bundle install --jobs=4 --retry=3 | ||
- run: bundle exec rubocop | ||
|
||
test: | ||
docker: | ||
- image: circleci/ruby:2.6.5 | ||
steps: | ||
- checkout | ||
- run: gem install bundler -v 2.0.2 | ||
- run: bundle install --jobs=4 --retry=3 | ||
- run: bundle exec rake test TESTOPTS="--ci-dir=./reports" | ||
- store_test_results: | ||
path: ./reports | ||
|
||
workflows: | ||
version: 2 | ||
commit-workflow: | ||
jobs: | ||
- rubocop | ||
- test | ||
cron-workflow: | ||
jobs: | ||
- rubocop | ||
- test | ||
triggers: | ||
- schedule: | ||
cron: "0 13 * * 6" | ||
filters: | ||
branches: | ||
only: | ||
- master |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
name-template: "$NEXT_PATCH_VERSION" | ||
tag-template: "v$NEXT_PATCH_VERSION" | ||
categories: | ||
- title: "⚠️ Breaking Changes" | ||
label: "⚠️ Breaking" | ||
- title: "✨ New Features" | ||
label: "✨ Feature" | ||
- title: "🐛 Bug Fixes" | ||
label: "🐛 Bug Fix" | ||
- title: "📚 Documentation" | ||
label: "📚 Docs" | ||
- title: "🏠 Housekeeping" | ||
label: "🏠 Housekeeping" | ||
change-template: "- $TITLE (#$NUMBER) @$AUTHOR" | ||
no-changes-template: "- No changes" | ||
template: | | ||
$CHANGES |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
on: push | ||
name: Push | ||
jobs: | ||
draftRelease: | ||
name: Draft Release | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- name: Draft Release | ||
uses: toolmantim/release-drafter@v5.2.0 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
/.bundle/ | ||
/.yardoc | ||
/_yardoc/ | ||
/coverage/ | ||
/doc/ | ||
/pkg/ | ||
/site/ | ||
/spec/reports/ | ||
/tmp/ | ||
/Gemfile.lock |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
/.travis.yml | ||
/CODE_OF_CONDUCT.md |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,81 @@ | ||
require: rubocop-performance | ||
|
||
AllCops: | ||
DisplayCopNames: true | ||
DisplayStyleGuide: true | ||
TargetRubyVersion: 2.4 | ||
Exclude: | ||
- "tmp/**/*" | ||
- "vendor/**/*" | ||
|
||
Metrics/AbcSize: | ||
Max: 16 | ||
Exclude: | ||
- "test/**/*" | ||
|
||
Metrics/BlockLength: | ||
Exclude: | ||
- "*.gemspec" | ||
- "Rakefile" | ||
|
||
Metrics/ClassLength: | ||
Exclude: | ||
- "test/**/*" | ||
|
||
Metrics/MethodLength: | ||
Exclude: | ||
- "test/**/*" | ||
|
||
Metrics/LineLength: | ||
Exclude: | ||
- "*.gemspec" | ||
|
||
Metrics/ParameterLists: | ||
Max: 6 | ||
|
||
Layout/AlignHash: | ||
EnforcedColonStyle: | ||
- table | ||
- key | ||
EnforcedHashRocketStyle: | ||
- table | ||
- key | ||
|
||
Layout/SpaceAroundEqualsInParameterDefault: | ||
EnforcedStyle: no_space | ||
|
||
Naming/MemoizedInstanceVariableName: | ||
Enabled: false | ||
|
||
Naming/VariableNumber: | ||
Enabled: false | ||
|
||
Style/BarePercentLiterals: | ||
EnforcedStyle: percent_q | ||
|
||
Style/ClassAndModuleChildren: | ||
Enabled: false | ||
|
||
Style/Documentation: | ||
Enabled: false | ||
|
||
Style/DoubleNegation: | ||
Enabled: false | ||
|
||
Style/EmptyMethod: | ||
Enabled: false | ||
|
||
Style/FormatStringToken: | ||
Enabled: false | ||
|
||
Style/FrozenStringLiteralComment: | ||
Enabled: false | ||
|
||
Style/HashSyntax: | ||
EnforcedStyle: ruby19 | ||
|
||
Style/StringLiterals: | ||
EnforcedStyle: double_quotes | ||
|
||
Style/TrivialAccessors: | ||
AllowPredicates: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
--- | ||
sudo: false | ||
language: ruby | ||
cache: bundler | ||
branches: | ||
only: | ||
- master | ||
rvm: | ||
- 2.4.9 | ||
- 2.5.7 | ||
- 2.6.5 | ||
- ruby-head | ||
before_install: gem install bundler -v 2.0.2 | ||
script: bundle exec rake test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
Release notes for this project are kept here: https://github.com/mattbrictson/tomo-plugin/releases |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,74 @@ | ||
# Contributor Covenant Code of Conduct | ||
|
||
## Our Pledge | ||
|
||
In the interest of fostering an open and welcoming environment, we as | ||
contributors and maintainers pledge to making participation in our project and | ||
our community a harassment-free experience for everyone, regardless of age, body | ||
size, disability, ethnicity, gender identity and expression, level of experience, | ||
nationality, personal appearance, race, religion, or sexual identity and | ||
orientation. | ||
|
||
## Our Standards | ||
|
||
Examples of behavior that contributes to creating a positive environment | ||
include: | ||
|
||
* Using welcoming and inclusive language | ||
* Being respectful of differing viewpoints and experiences | ||
* Gracefully accepting constructive criticism | ||
* Focusing on what is best for the community | ||
* Showing empathy towards other community members | ||
|
||
Examples of unacceptable behavior by participants include: | ||
|
||
* The use of sexualized language or imagery and unwelcome sexual attention or | ||
advances | ||
* Trolling, insulting/derogatory comments, and personal or political attacks | ||
* Public or private harassment | ||
* Publishing others' private information, such as a physical or electronic | ||
address, without explicit permission | ||
* Other conduct which could reasonably be considered inappropriate in a | ||
professional setting | ||
|
||
## Our Responsibilities | ||
|
||
Project maintainers are responsible for clarifying the standards of acceptable | ||
behavior and are expected to take appropriate and fair corrective action in | ||
response to any instances of unacceptable behavior. | ||
|
||
Project maintainers have the right and responsibility to remove, edit, or | ||
reject comments, commits, code, wiki edits, issues, and other contributions | ||
that are not aligned to this Code of Conduct, or to ban temporarily or | ||
permanently any contributor for other behaviors that they deem inappropriate, | ||
threatening, offensive, or harmful. | ||
|
||
## Scope | ||
|
||
This Code of Conduct applies both within project spaces and in public spaces | ||
when an individual is representing the project or its community. Examples of | ||
representing a project or community include using an official project e-mail | ||
address, posting via an official social media account, or acting as an appointed | ||
representative at an online or offline event. Representation of a project may be | ||
further defined and clarified by project maintainers. | ||
|
||
## Enforcement | ||
|
||
Instances of abusive, harassing, or otherwise unacceptable behavior may be | ||
reported by contacting the project team at owner@example.com. All | ||
complaints will be reviewed and investigated and will result in a response that | ||
is deemed necessary and appropriate to the circumstances. The project team is | ||
obligated to maintain confidentiality with regard to the reporter of an incident. | ||
Further details of specific enforcement policies may be posted separately. | ||
|
||
Project maintainers who do not follow or enforce the Code of Conduct in good | ||
faith may face temporary or permanent repercussions as determined by other | ||
members of the project's leadership. | ||
|
||
## Attribution | ||
|
||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4, | ||
available at [http://contributor-covenant.org/version/1/4][version] | ||
|
||
[homepage]: http://contributor-covenant.org | ||
[version]: http://contributor-covenant.org/version/1/4/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
source "https://rubygems.org" | ||
gemspec |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
The MIT License (MIT) | ||
|
||
Copyright (c) 2019 Example Owner | ||
|
||
Permission is hereby granted, free of charge, to any person obtaining a copy | ||
of this software and associated documentation files (the "Software"), to deal | ||
in the Software without restriction, including without limitation the rights | ||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell | ||
copies of the Software, and to permit persons to whom the Software is | ||
furnished to do so, subject to the following conditions: | ||
|
||
The above copyright notice and this permission notice shall be included in | ||
all copies or substantial portions of the Software. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR | ||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, | ||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE | ||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER | ||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, | ||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN | ||
THE SOFTWARE. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
# tomo plugin template | ||
|
||
This is a GitHub template for creating [tomo](https://github.com/mattbrictson/tomo) plugins, which are packaged as Ruby gems. | ||
|
||
Read the tomo tutorial [Publishing a Plugin](https://tomo-deploy.com/tutorials/publishing-a-plugin/) to get started. Then press [**Use this template**](https://github.com/mattbrictson/tomo-plugin/generate) to generate a project from this template. In the generated project, run this script to rename the gem to meet your needs: | ||
|
||
``` | ||
$ ruby rename_template.rb | ||
``` | ||
|
||
This template is based on `bundle gem` with some notable improvements: | ||
|
||
- Travis CI _and_ Circle CI configuration | ||
- Minitest, with minitest-reporters for nicely formatted test output | ||
- Rubocop with a good set of configuration | ||
- [release-drafter](https://github.com/apps/release-drafter) GitHub Action for automating release notes | ||
- A `rake bump` task to keep your Ruby and Bundler dependencies up to date | ||
- A nice README with badges ready to go (see below) | ||
|
||
--- | ||
|
||
<!-- END FRONT MATTER --> | ||
|
||
# tomo-plugin-example | ||
|
||
[![Gem Version](https://badge.fury.io/rb/replace_with_gem_name.svg)](https://rubygems.org/gems/replace_with_gem_name) | ||
[![Travis](https://img.shields.io/travis/mattbrictson/tomo-plugin.svg?label=travis)](https://travis-ci.org/mattbrictson/tomo-plugin) | ||
[![Circle](https://circleci.com/gh/mattbrictson/tomo-plugin.svg?style=shield)](https://circleci.com/gh/mattbrictson/tomo-plugin) | ||
[![Code Climate](https://codeclimate.com/github/mattbrictson/tomo-plugin/badges/gpa.svg)](https://codeclimate.com/github/mattbrictson/tomo-plugin) | ||
|
||
This is a [tomo](https://github.com/mattbrictson/tomo) plugin that ... TODO: Description of this plugin goes here. | ||
|
||
--- | ||
|
||
- [Installation](#installation) | ||
- [Settings](#settings) | ||
- [Tasks](#tasks) | ||
- [Support](#support) | ||
- [License](#license) | ||
- [Code of conduct](#code-of-conduct) | ||
- [Contribution guide](#contribution-guide) | ||
|
||
## Installation | ||
|
||
Run: | ||
|
||
``` | ||
$ gem install tomo-plugin-example | ||
``` | ||
|
||
Or add it to your Gemfile: | ||
|
||
```ruby | ||
gem "tomo-plugin-example" | ||
``` | ||
|
||
Then add the following to `.tomo/config.rb`: | ||
|
||
```ruby | ||
plugin "example" | ||
``` | ||
|
||
## Settings | ||
|
||
TODO: document plugin settings | ||
|
||
| Name | Purpose | Default | | ||
| --------------------- | ------- | ------- | | ||
| `plugin_name_setting` | TODO | `nil` | | ||
|
||
## Tasks | ||
|
||
TODO: document plugin tasks | ||
|
||
### example:task_name | ||
|
||
TODO | ||
|
||
## Support | ||
|
||
If you want to report a bug, or have ideas, feedback or questions about the gem, [let me know via GitHub issues](https://github.com/mattbrictson/tomo-plugin/issues/new) and I will do my best to provide a helpful answer. Happy hacking! | ||
|
||
## License | ||
|
||
The gem is available as open source under the terms of the [MIT License](LICENSE.txt). | ||
|
||
## Code of conduct | ||
|
||
Everyone interacting in this project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](CODE_OF_CONDUCT.md). | ||
|
||
## Contribution guide | ||
|
||
Pull requests are welcome! |
Oops, something went wrong.