dopstick 0.0.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. data/.github/FUNDING.yml +4 -0
  3. data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
  4. data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
  5. data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
  6. data/.github/workflows/tests.yml +55 -0
  7. data/.gitignore +11 -0
  8. data/.rubocop.yml +21 -0
  9. data/CHANGELOG.md +16 -0
  10. data/CODE_OF_CONDUCT.md +74 -0
  11. data/CONTRIBUTING.md +79 -0
  12. data/Gemfile +5 -0
  13. data/LICENSE.md +20 -0
  14. data/README.md +56 -0
  15. data/Rakefile +15 -0
  16. data/bin/console +16 -0
  17. data/bin/setup +10 -0
  18. data/dopstick.gemspec +45 -0
  19. data/exe/dopstick +5 -0
  20. data/lib/dopstick.rb +12 -0
  21. data/lib/dopstick/cli.rb +89 -0
  22. data/lib/dopstick/generator.rb +214 -0
  23. data/lib/dopstick/refinements.rb +24 -0
  24. data/lib/dopstick/templates/CHANGELOG.md +16 -0
  25. data/lib/dopstick/templates/active_record.erb +23 -0
  26. data/lib/dopstick/templates/bin.erb +5 -0
  27. data/lib/dopstick/templates/bug_report.erb +41 -0
  28. data/lib/dopstick/templates/cli.erb +3 -0
  29. data/lib/dopstick/templates/cli_class.erb +19 -0
  30. data/lib/dopstick/templates/coc.erb +74 -0
  31. data/lib/dopstick/templates/console.erb +16 -0
  32. data/lib/dopstick/templates/contributing.erb +80 -0
  33. data/lib/dopstick/templates/entry_file.erb +3 -0
  34. data/lib/dopstick/templates/feature_request.erb +23 -0
  35. data/lib/dopstick/templates/funding.erb +4 -0
  36. data/lib/dopstick/templates/gem_entry_file.erb +3 -0
  37. data/lib/dopstick/templates/gemfile.erb +5 -0
  38. data/lib/dopstick/templates/gemspec.erb +53 -0
  39. data/lib/dopstick/templates/generator.erb +3 -0
  40. data/lib/dopstick/templates/generator_class.erb +13 -0
  41. data/lib/dopstick/templates/gitignore.erb +11 -0
  42. data/lib/dopstick/templates/issue.erb +26 -0
  43. data/lib/dopstick/templates/license.erb +20 -0
  44. data/lib/dopstick/templates/pull_request.erb +38 -0
  45. data/lib/dopstick/templates/rakefile.erb +15 -0
  46. data/lib/dopstick/templates/readme.erb +50 -0
  47. data/lib/dopstick/templates/rubocop.erb +12 -0
  48. data/lib/dopstick/templates/setup.erb +10 -0
  49. data/lib/dopstick/templates/test_file.erb +9 -0
  50. data/lib/dopstick/templates/test_helper.erb +14 -0
  51. data/lib/dopstick/templates/tests_workflow.erb +73 -0
  52. data/lib/dopstick/templates/version.erb +3 -0
  53. data/lib/dopstick/version.rb +5 -0
  54. metadata +214 -0
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 561b26205dfef50b8f164c6a3db683fe509e4c98811a2c2619947e6b25c4e3a0
4
+ data.tar.gz: c755f5a46d109f4af6ff7293d43df4de7c3a18cd148757e1b08ccb60e38ad0b9
5
+ SHA512:
6
+ metadata.gz: 2e34355f973760582c98eb094f8c9292b049be619a2a397f47abb6423a165e8eb43cc4c1646c8e6a0970912c747808f078ffe1e5199ea9eab36f769251a56ff2
7
+ data.tar.gz: 97c0bae838da251a639950b5f4a43fd22777976ad20680af66a78038096cf6fe3e490aaca2139d75be22d14834eb508180d58feec9517d2d02c0f975968283ff
@@ -0,0 +1,4 @@
1
+ # These are supported funding model platforms
2
+
3
+ github: [fnando]
4
+ other: https://paypal.me/nandovieira/🍕
@@ -0,0 +1,41 @@
1
+ ---
2
+ name: "🐛 Bug Report"
3
+ about: Report a reproducible bug or regression.
4
+ title: 'Bug: '
5
+ labels: 'Status: Unconfirmed'
6
+
7
+ ---
8
+
9
+ <!--
10
+ - Please provide a clear and concise description of what the bug is.
11
+ - If possible, add an example reproducing your issue.
12
+ - Please test using the latest version of dopstick
13
+ to make sure your issue has not already been fixed.
14
+ -->
15
+
16
+ ## Description
17
+
18
+ [Add bug description here]
19
+
20
+ ## How to reproduce
21
+
22
+ [Add steps on how to reproduce this issue]
23
+
24
+ ## What do you expect
25
+
26
+ [Describe what do you expect to happen]
27
+
28
+ ## What happened instead
29
+
30
+ [Describe the actual results]
31
+
32
+ ## Software:
33
+
34
+ - Gem version: [Add gem version here]
35
+ - Ruby version: [Add version here]
36
+
37
+ ## Full backtrace
38
+
39
+ ```text
40
+ [Paste full backtrace here]
41
+ ```
@@ -0,0 +1,23 @@
1
+ ---
2
+ name: "💡 Feature request"
3
+ about: Have an idea that may be useful? Make a suggestion!
4
+ title: 'Feature Request: '
5
+ labels: 'Feature request'
6
+
7
+ ---
8
+
9
+ ## Description
10
+
11
+ _A clear and concise description of what the problem is._
12
+
13
+ ## Describe the solution
14
+
15
+ _A clear and concise description of what you want to happen._
16
+
17
+ ## Alternatives you considered
18
+
19
+ _A clear and concise description of any alternative solutions or features you've considered._
20
+
21
+ ## Additional context
22
+
23
+ _Add any other context, screenshots, links, etc about the feature request here._
@@ -0,0 +1,38 @@
1
+ <!--
2
+ If you're making a doc PR or something tiny where the below is irrelevant,
3
+ delete this template and use a short description, but in your description aim to
4
+ include both what the change is, and why it is being made, with enough context
5
+ for anyone to understand.
6
+ -->
7
+
8
+ <details>
9
+ <summary>PR Checklist</summary>
10
+
11
+ ### PR Structure
12
+
13
+ - [ ] This PR has reasonably narrow scope (if not, break it down into smaller
14
+ PRs).
15
+ - [ ] This PR avoids mixing refactoring changes with feature changes (split into
16
+ two PRs otherwise).
17
+ - [ ] This PR's title starts is concise and descriptive.
18
+
19
+ ### Thoroughness
20
+
21
+ - [ ] This PR adds tests for the most critical parts of the new functionality or
22
+ fixes.
23
+ - [ ] I've updated any docs, `.md` files, etc… affected by this change.
24
+
25
+ </details>
26
+
27
+ ### What
28
+
29
+ [TODO: Short statement about what is changing.]
30
+
31
+ ### Why
32
+
33
+ [TODO: Why this change is being made. Include any context required to understand
34
+ the why.]
35
+
36
+ ### Known limitations
37
+
38
+ [TODO or N/A]
@@ -0,0 +1,55 @@
1
+ name: Tests
2
+
3
+ on:
4
+ pull_request:
5
+ branches:
6
+ - main
7
+ push:
8
+ branches:
9
+ - main
10
+
11
+ schedule:
12
+ - cron: "0 10 * * *"
13
+
14
+ jobs:
15
+ build:
16
+ name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
17
+ runs-on: "ubuntu-latest"
18
+ strategy:
19
+ fail-fast: false
20
+ matrix:
21
+ ruby: [2.6.x, 2.7.x]
22
+ gemfile:
23
+ - Gemfile
24
+
25
+ steps:
26
+ - uses: actions/checkout@v1
27
+
28
+ - uses: actions/cache@v2
29
+ with:
30
+ path: vendor/bundle
31
+ key: >
32
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
33
+ restore-keys: >
34
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
35
+
36
+ - name: Set up Ruby
37
+ uses: actions/setup-ruby@v1
38
+ with:
39
+ ruby-version: ${{ matrix.ruby }}
40
+
41
+ - name: Install gem dependencies
42
+ env:
43
+ RAILS_ENV: test
44
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
45
+ run: |
46
+ gem install bundler
47
+ bundle config path vendor/bundle
48
+ bundle update --jobs 4 --retry 3
49
+
50
+ - name: Run Tests
51
+ env:
52
+ RAILS_ENV: test
53
+ BUNDLE_GEMFILE: ${{ matrix.gemfile }}
54
+ run: |
55
+ bundle exec rake
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+ /vendor/
10
+ *.log
11
+ *.lock
@@ -0,0 +1,21 @@
1
+ ---
2
+ inherit_gem:
3
+ rubocop-fnando: .rubocop.yml
4
+
5
+ AllCops:
6
+ TargetRubyVersion: 2.6
7
+ NewCops: enable
8
+ Exclude:
9
+ - tmp/**/*
10
+ - bin/**/*
11
+ - vendor/**/*
12
+
13
+ Metrics/BlockLength:
14
+ Exclude:
15
+ - test/**/*
16
+ - "**/*.gemspec"
17
+
18
+ Metrics/ClassLength:
19
+ Exclude:
20
+ - test/**/*
21
+ - "**/*.gemspec"
@@ -0,0 +1,16 @@
1
+ # Changelog
2
+
3
+ <!--
4
+ Prefix your message with one of the following:
5
+
6
+ - [Added] for new features.
7
+ - [Changed] for changes in existing functionality.
8
+ - [Deprecated] for soon-to-be removed features.
9
+ - [Removed] for now removed features.
10
+ - [Fixed] for any bug fixes.
11
+ - [Security] in case of vulnerabilities.
12
+ -->
13
+
14
+ ## v0.0.1 - 2020-11-02
15
+
16
+ - Initial release.
@@ -0,0 +1,74 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ In the interest of fostering an open and welcoming environment, we as
6
+ contributors and maintainers pledge to making participation in our project and
7
+ our community a harassment-free experience for everyone, regardless of age, body
8
+ size, disability, ethnicity, gender identity and expression, level of experience,
9
+ nationality, personal appearance, race, religion, or sexual identity and
10
+ orientation.
11
+
12
+ ## Our Standards
13
+
14
+ Examples of behavior that contributes to creating a positive environment
15
+ include:
16
+
17
+ * Using welcoming and inclusive language
18
+ * Being respectful of differing viewpoints and experiences
19
+ * Gracefully accepting constructive criticism
20
+ * Focusing on what is best for the community
21
+ * Showing empathy towards other community members
22
+
23
+ Examples of unacceptable behavior by participants include:
24
+
25
+ * The use of sexualized language or imagery and unwelcome sexual attention or
26
+ advances
27
+ * Trolling, insulting/derogatory comments, and personal or political attacks
28
+ * Public or private harassment
29
+ * Publishing others' private information, such as a physical or electronic
30
+ address, without explicit permission
31
+ * Other conduct which could reasonably be considered inappropriate in a
32
+ professional setting
33
+
34
+ ## Our Responsibilities
35
+
36
+ Project maintainers are responsible for clarifying the standards of acceptable
37
+ behavior and are expected to take appropriate and fair corrective action in
38
+ response to any instances of unacceptable behavior.
39
+
40
+ Project maintainers have the right and responsibility to remove, edit, or
41
+ reject comments, commits, code, wiki edits, issues, and other contributions
42
+ that are not aligned to this Code of Conduct, or to ban temporarily or
43
+ permanently any contributor for other behaviors that they deem inappropriate,
44
+ threatening, offensive, or harmful.
45
+
46
+ ## Scope
47
+
48
+ This Code of Conduct applies both within project spaces and in public spaces
49
+ when an individual is representing the project or its community. Examples of
50
+ representing a project or community include using an official project e-mail
51
+ address, posting via an official social media account, or acting as an appointed
52
+ representative at an online or offline event. Representation of a project may be
53
+ further defined and clarified by project maintainers.
54
+
55
+ ## Enforcement
56
+
57
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be
58
+ reported by contacting the project team at me@fnando.com. All
59
+ complaints will be reviewed and investigated and will result in a response that
60
+ is deemed necessary and appropriate to the circumstances. The project team is
61
+ obligated to maintain confidentiality with regard to the reporter of an incident.
62
+ Further details of specific enforcement policies may be posted separately.
63
+
64
+ Project maintainers who do not follow or enforce the Code of Conduct in good
65
+ faith may face temporary or permanent repercussions as determined by other
66
+ members of the project's leadership.
67
+
68
+ ## Attribution
69
+
70
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
71
+ available at [https://contributor-covenant.org/version/1/4][version]
72
+
73
+ [homepage]: https://contributor-covenant.org
74
+ [version]: https://contributor-covenant.org/version/1/4/
@@ -0,0 +1,79 @@
1
+ # Contributing to dopstick
2
+
3
+ 👍🎉 First off, thanks for taking the time to contribute! 🎉👍
4
+
5
+ The following is a set of guidelines for contributing to this project. These are
6
+ mostly guidelines, not rules. Use your best judgment, and feel free to propose
7
+ changes to this document in a pull request.
8
+
9
+ ## Code of Conduct
10
+
11
+ Everyone interacting in this project's codebases, issue trackers, chat rooms and
12
+ mailing lists is expected to follow the [code of conduct](https://github.com/fnando/dopstick/blob/main/CODE_OF_CONDUCT.md).
13
+
14
+ ## Reporting bugs
15
+
16
+ This section guides you through submitting a bug report. Following these
17
+ guidelines helps maintainers and the community understand your report, reproduce
18
+ the behavior, and find related reports.
19
+
20
+ - Before creating bug reports, please check the open issues; somebody may
21
+ already have submitted something similar, and you may not need to create a new
22
+ one.
23
+ - When you are creating a bug report, please include as many details as
24
+ possible, with an example reproducing the issue.
25
+
26
+ ## Contributing with code
27
+
28
+ Before making any radicals changes, please make sure you discuss your intention
29
+ by [opening an issue on Github](https://github.com/fnando/dopstick/issues).
30
+
31
+ When you're ready to make your pull request, follow checklist below to make sure
32
+ your contribution is according to how this project works.
33
+
34
+ 1. [Fork](https://help.github.com/forking/) dopstick
35
+ 2. Create a topic branch - `git checkout -b my_branch`
36
+ 3. Make your changes using [descriptive commit messages](#commit-messages)
37
+ 4. Update CHANGELOG.md describing your changes by adding an entry to the
38
+ "Unreleased" section. If this section is not available, create one right
39
+ before the last version.
40
+ 5. Push to your branch - `git push origin my_branch`
41
+ 6. [Create a pull request](https://docs.github.com/articles/creating-a-pull-request)
42
+ 7. That's it!
43
+
44
+ ## Styleguides
45
+
46
+ ### Commit messages
47
+
48
+ - Use the present tense ("Add feature" not "Added feature")
49
+ - Use the imperative mood ("Move cursor to..." not "Moves cursor to...")
50
+ - Limit the first line to 72 characters or less
51
+ - Reference issues and pull requests liberally after the first line
52
+
53
+ ### Changelog
54
+
55
+ - Add a message describing your changes to the "Unreleased" section. The
56
+ changelog message should follow the same style as the commit message.
57
+ - Prefix your message with one of the following:
58
+ - `[Added]` for new features.
59
+ - `[Changed]` for changes in existing functionality.
60
+ - `[Deprecated]` for soon-to-be removed features.
61
+ - `[Removed]` for now removed features.
62
+ - `[Fixed]` for any bug fixes.
63
+ - `[Security]` in case of vulnerabilities.
64
+
65
+ ### Ruby code
66
+
67
+ - This project uses [Rubocop](https://rubocop.org) to enforce code style. Before
68
+ submitting your changes, make sure your tests are passing and code conforms to
69
+ the expected style by running `rake`.
70
+ - Do not change the library version. This will be done by the maintainer
71
+ whenever a new version is about to be released.
72
+
73
+ ### JavaScript code
74
+
75
+ - This project uses [ESLint](https://eslint.org) to enforce code style. Before
76
+ submitting your changes, make sure your tests are passing and code conforms to
77
+ the expected style by running `yarn test:ci`.
78
+ - Do not change the library version. This will be done by the maintainer
79
+ whenever a new version is about to be released.
data/Gemfile ADDED
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ gemspec
@@ -0,0 +1,20 @@
1
+ # The MIT License (MIT)
2
+
3
+ Copyright (c) 2020 Nando Vieira
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy of
6
+ this software and associated documentation files (the "Software"), to deal in
7
+ the Software without restriction, including without limitation the rights to
8
+ use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of
9
+ the Software, and to permit persons to whom the Software is furnished to do so,
10
+ subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS
17
+ FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR
18
+ COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER
19
+ IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
20
+ CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,56 @@
1
+ # dopstick
2
+
3
+ [![Tests](https://github.com/fnando/dopstick/workflows/Tests/badge.svg)](https://github.com/fnando/dopstick)
4
+ [![Code Climate](https://codeclimate.com/github/fnando/dopstick/badges/gpa.svg)](https://codeclimate.com/github/fnando/dopstick)
5
+ [![Gem](https://img.shields.io/gem/v/dopstick.svg)](https://rubygems.org/gems/dopstick)
6
+ [![Gem](https://img.shields.io/gem/dt/dopstick.svg)](https://rubygems.org/gems/dopstick)
7
+
8
+ Generate a project skeleton for creating a rubygem.
9
+
10
+ Includes:
11
+
12
+ - Github templates
13
+ - Changelog
14
+ - ActiveRecord setup (via `--active-record`)
15
+ - CLI setup (via `--bin NAME`)
16
+
17
+ ## Installation
18
+
19
+ ```bash
20
+ gem install dopstick
21
+ ```
22
+
23
+ ## Usage
24
+
25
+ Once the gem is installed, you can use the command `dopstick`.
26
+
27
+ ```console
28
+ $ dopstick new [PATH] [OPTIONS]
29
+ ```
30
+
31
+ You can check all the available options with `dopstick new --help`.
32
+
33
+ ## Maintainer
34
+
35
+ - [Nando Vieira](https://github.com/fnando)
36
+
37
+ ## Contributors
38
+
39
+ - https://github.com/fnando/dopstick/contributors
40
+
41
+ ## Contributing
42
+
43
+ For more details about how to contribute, please read
44
+ https://github.com/fnando/dopstick/blob/main/CONTRIBUTING.md.
45
+
46
+ ## License
47
+
48
+ The gem is available as open source under the terms of the
49
+ [MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
50
+ found at https://github.com/fnando/dopstick/blob/main/LICENSE.md.
51
+
52
+ ## Code of Conduct
53
+
54
+ Everyone interacting in the dopstick project's codebases, issue trackers, chat
55
+ rooms and mailing lists is expected to follow the
56
+ [code of conduct](https://github.com/fnando/dopstick/blob/main/CODE_OF_CONDUCT.md).