dopstick 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.github/FUNDING.yml +4 -0
- data/.github/ISSUE_TEMPLATE/bug_report.md +41 -0
- data/.github/ISSUE_TEMPLATE/feature_request.md +23 -0
- data/.github/PULL_REQUEST_TEMPLATE.md +38 -0
- data/.github/workflows/tests.yml +55 -0
- data/.gitignore +11 -0
- data/.rubocop.yml +21 -0
- data/CHANGELOG.md +16 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/CONTRIBUTING.md +79 -0
- data/Gemfile +5 -0
- data/LICENSE.md +20 -0
- data/README.md +56 -0
- data/Rakefile +15 -0
- data/bin/console +16 -0
- data/bin/setup +10 -0
- data/dopstick.gemspec +45 -0
- data/exe/dopstick +5 -0
- data/lib/dopstick.rb +12 -0
- data/lib/dopstick/cli.rb +89 -0
- data/lib/dopstick/generator.rb +214 -0
- data/lib/dopstick/refinements.rb +24 -0
- data/lib/dopstick/templates/CHANGELOG.md +16 -0
- data/lib/dopstick/templates/active_record.erb +23 -0
- data/lib/dopstick/templates/bin.erb +5 -0
- data/lib/dopstick/templates/bug_report.erb +41 -0
- data/lib/dopstick/templates/cli.erb +3 -0
- data/lib/dopstick/templates/cli_class.erb +19 -0
- data/lib/dopstick/templates/coc.erb +74 -0
- data/lib/dopstick/templates/console.erb +16 -0
- data/lib/dopstick/templates/contributing.erb +80 -0
- data/lib/dopstick/templates/entry_file.erb +3 -0
- data/lib/dopstick/templates/feature_request.erb +23 -0
- data/lib/dopstick/templates/funding.erb +4 -0
- data/lib/dopstick/templates/gem_entry_file.erb +3 -0
- data/lib/dopstick/templates/gemfile.erb +5 -0
- data/lib/dopstick/templates/gemspec.erb +53 -0
- data/lib/dopstick/templates/generator.erb +3 -0
- data/lib/dopstick/templates/generator_class.erb +13 -0
- data/lib/dopstick/templates/gitignore.erb +11 -0
- data/lib/dopstick/templates/issue.erb +26 -0
- data/lib/dopstick/templates/license.erb +20 -0
- data/lib/dopstick/templates/pull_request.erb +38 -0
- data/lib/dopstick/templates/rakefile.erb +15 -0
- data/lib/dopstick/templates/readme.erb +50 -0
- data/lib/dopstick/templates/rubocop.erb +12 -0
- data/lib/dopstick/templates/setup.erb +10 -0
- data/lib/dopstick/templates/test_file.erb +9 -0
- data/lib/dopstick/templates/test_helper.erb +14 -0
- data/lib/dopstick/templates/tests_workflow.erb +73 -0
- data/lib/dopstick/templates/version.erb +3 -0
- data/lib/dopstick/version.rb +5 -0
- metadata +214 -0
|
@@ -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,15 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "bundler/gem_tasks"
|
|
4
|
+
require "rake/testtask"
|
|
5
|
+
require "rubocop/rake_task"
|
|
6
|
+
|
|
7
|
+
Rake::TestTask.new(:test) do |t|
|
|
8
|
+
t.libs << "test"
|
|
9
|
+
t.libs << "lib"
|
|
10
|
+
t.test_files = FileList["test/**/*_test.rb"]
|
|
11
|
+
end
|
|
12
|
+
|
|
13
|
+
RuboCop::RakeTask.new
|
|
14
|
+
|
|
15
|
+
task default: %i[test rubocop]
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
# <%= gem_name %>
|
|
2
|
+
|
|
3
|
+
[](https://github.com/fnando/<%= gem_name %>)
|
|
4
|
+
[](https://codeclimate.com/github/<%= github_user %>/<%= gem_name %>)
|
|
5
|
+
[](https://rubygems.org/gems/<%= gem_name %>)
|
|
6
|
+
[](https://rubygems.org/gems/<%= gem_name %>)
|
|
7
|
+
|
|
8
|
+
TODO: Add project description here
|
|
9
|
+
|
|
10
|
+
## Installation
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
gem install <%= gem_name %>
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
Or add the following line to your project's Gemfile:
|
|
17
|
+
|
|
18
|
+
```ruby
|
|
19
|
+
gem "<%= gem_name %>"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
## Usage
|
|
23
|
+
|
|
24
|
+
TODO: Write gem usage
|
|
25
|
+
|
|
26
|
+
## Maintainer
|
|
27
|
+
|
|
28
|
+
- [<%= user_name %>](https://github.com/<%= github_user %>)
|
|
29
|
+
|
|
30
|
+
## Contributors
|
|
31
|
+
|
|
32
|
+
- <%= github_url %>/contributors
|
|
33
|
+
|
|
34
|
+
## Contributing
|
|
35
|
+
|
|
36
|
+
For more details about how to contribute, please read
|
|
37
|
+
<%= github_url %>/blob/main/CONTRIBUTING.md.
|
|
38
|
+
|
|
39
|
+
|
|
40
|
+
## License
|
|
41
|
+
|
|
42
|
+
The gem is available as open source under the terms of the
|
|
43
|
+
[MIT License](https://opensource.org/licenses/MIT). A copy of the license can be
|
|
44
|
+
found at <%= github_url %>/blob/main/LICENSE.md.
|
|
45
|
+
|
|
46
|
+
## Code of Conduct
|
|
47
|
+
|
|
48
|
+
Everyone interacting in the <%= gem_name %> project's codebases, issue trackers,
|
|
49
|
+
chat rooms and mailing lists is expected to follow the
|
|
50
|
+
[code of conduct](<%= github_url %>/blob/main/CODE_OF_CONDUCT.md).
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
---
|
|
2
|
+
inherit_gem:
|
|
3
|
+
rubocop-fnando: .rubocop.yml
|
|
4
|
+
|
|
5
|
+
AllCops:
|
|
6
|
+
TargetRubyVersion: <%= oldest_ruby_version.split(".").take(2).join(".") %>
|
|
7
|
+
NewCops: enable
|
|
8
|
+
<%- if gem_name.include?("-") -%>
|
|
9
|
+
Naming/FileName:
|
|
10
|
+
Exclude:
|
|
11
|
+
- lib/<%= gem_name %>.rb
|
|
12
|
+
<%- end -%>
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require "simplecov"
|
|
4
|
+
SimpleCov.start
|
|
5
|
+
|
|
6
|
+
require "bundler/setup"
|
|
7
|
+
require <%= gem_name.inspect %>
|
|
8
|
+
|
|
9
|
+
require "minitest/utils"
|
|
10
|
+
require "minitest/autorun"
|
|
11
|
+
|
|
12
|
+
Dir["#{__dir__}/support/**/*.rb"].sort.each do |file|
|
|
13
|
+
require file
|
|
14
|
+
end
|
|
@@ -0,0 +1,73 @@
|
|
|
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: [<%= ruby_versions.map {|v| [*Gem::Version.new(v).canonical_segments, "x"].take(3).join(".") }.join(", ") %>]
|
|
22
|
+
gemfile:
|
|
23
|
+
- Gemfile
|
|
24
|
+
|
|
25
|
+
<%- if options[:active_record] -%>
|
|
26
|
+
services:
|
|
27
|
+
postgres:
|
|
28
|
+
image: postgres:11.5
|
|
29
|
+
ports: ["5432:5432"]
|
|
30
|
+
options:
|
|
31
|
+
--health-cmd pg_isready --health-interval 10s --health-timeout 5s
|
|
32
|
+
--health-retries 5
|
|
33
|
+
|
|
34
|
+
<%- end -%>
|
|
35
|
+
steps:
|
|
36
|
+
- uses: actions/checkout@v1
|
|
37
|
+
|
|
38
|
+
- uses: actions/cache@v2
|
|
39
|
+
with:
|
|
40
|
+
path: vendor/bundle
|
|
41
|
+
key: >
|
|
42
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
|
43
|
+
restore-keys: >
|
|
44
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
|
45
|
+
|
|
46
|
+
- name: Set up Ruby
|
|
47
|
+
uses: actions/setup-ruby@v1
|
|
48
|
+
with:
|
|
49
|
+
ruby-version: ${{ matrix.ruby }}
|
|
50
|
+
|
|
51
|
+
<%- if options[:active_record] -%>
|
|
52
|
+
- name: Install PostgreSQL client
|
|
53
|
+
env:
|
|
54
|
+
PGHOST: localhost
|
|
55
|
+
PGUSER: postgres
|
|
56
|
+
run: |
|
|
57
|
+
sudo apt-get -yqq install libpq-dev
|
|
58
|
+
psql -U postgres -c "create database test"
|
|
59
|
+
|
|
60
|
+
<%- end -%>
|
|
61
|
+
- name: Install gem dependencies
|
|
62
|
+
env:
|
|
63
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
64
|
+
run: |
|
|
65
|
+
gem install bundler
|
|
66
|
+
bundle config path vendor/bundle
|
|
67
|
+
bundle update --jobs 4 --retry 3
|
|
68
|
+
|
|
69
|
+
- name: Run Tests
|
|
70
|
+
env:
|
|
71
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
|
72
|
+
run: |
|
|
73
|
+
bundle exec rake
|
metadata
ADDED
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: dopstick
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.0.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- Nando Vieira
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2020-11-03 00:00:00.000000000 Z
|
|
12
|
+
dependencies:
|
|
13
|
+
- !ruby/object:Gem::Dependency
|
|
14
|
+
name: thor
|
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
|
16
|
+
requirements:
|
|
17
|
+
- - ">="
|
|
18
|
+
- !ruby/object:Gem::Version
|
|
19
|
+
version: '0'
|
|
20
|
+
type: :runtime
|
|
21
|
+
prerelease: false
|
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
23
|
+
requirements:
|
|
24
|
+
- - ">="
|
|
25
|
+
- !ruby/object:Gem::Version
|
|
26
|
+
version: '0'
|
|
27
|
+
- !ruby/object:Gem::Dependency
|
|
28
|
+
name: minitest
|
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
|
30
|
+
requirements:
|
|
31
|
+
- - ">="
|
|
32
|
+
- !ruby/object:Gem::Version
|
|
33
|
+
version: '0'
|
|
34
|
+
type: :development
|
|
35
|
+
prerelease: false
|
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
37
|
+
requirements:
|
|
38
|
+
- - ">="
|
|
39
|
+
- !ruby/object:Gem::Version
|
|
40
|
+
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: minitest-utils
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - ">="
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - ">="
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
55
|
+
- !ruby/object:Gem::Dependency
|
|
56
|
+
name: pry-meta
|
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
|
58
|
+
requirements:
|
|
59
|
+
- - ">="
|
|
60
|
+
- !ruby/object:Gem::Version
|
|
61
|
+
version: '0'
|
|
62
|
+
type: :development
|
|
63
|
+
prerelease: false
|
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
65
|
+
requirements:
|
|
66
|
+
- - ">="
|
|
67
|
+
- !ruby/object:Gem::Version
|
|
68
|
+
version: '0'
|
|
69
|
+
- !ruby/object:Gem::Dependency
|
|
70
|
+
name: rake
|
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
|
72
|
+
requirements:
|
|
73
|
+
- - ">="
|
|
74
|
+
- !ruby/object:Gem::Version
|
|
75
|
+
version: '0'
|
|
76
|
+
type: :development
|
|
77
|
+
prerelease: false
|
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
79
|
+
requirements:
|
|
80
|
+
- - ">="
|
|
81
|
+
- !ruby/object:Gem::Version
|
|
82
|
+
version: '0'
|
|
83
|
+
- !ruby/object:Gem::Dependency
|
|
84
|
+
name: rubocop
|
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
|
86
|
+
requirements:
|
|
87
|
+
- - ">="
|
|
88
|
+
- !ruby/object:Gem::Version
|
|
89
|
+
version: '0'
|
|
90
|
+
type: :development
|
|
91
|
+
prerelease: false
|
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
93
|
+
requirements:
|
|
94
|
+
- - ">="
|
|
95
|
+
- !ruby/object:Gem::Version
|
|
96
|
+
version: '0'
|
|
97
|
+
- !ruby/object:Gem::Dependency
|
|
98
|
+
name: rubocop-fnando
|
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
|
100
|
+
requirements:
|
|
101
|
+
- - ">="
|
|
102
|
+
- !ruby/object:Gem::Version
|
|
103
|
+
version: '0'
|
|
104
|
+
type: :development
|
|
105
|
+
prerelease: false
|
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
107
|
+
requirements:
|
|
108
|
+
- - ">="
|
|
109
|
+
- !ruby/object:Gem::Version
|
|
110
|
+
version: '0'
|
|
111
|
+
- !ruby/object:Gem::Dependency
|
|
112
|
+
name: simplecov
|
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
|
114
|
+
requirements:
|
|
115
|
+
- - ">="
|
|
116
|
+
- !ruby/object:Gem::Version
|
|
117
|
+
version: '0'
|
|
118
|
+
type: :development
|
|
119
|
+
prerelease: false
|
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
+
requirements:
|
|
122
|
+
- - ">="
|
|
123
|
+
- !ruby/object:Gem::Version
|
|
124
|
+
version: '0'
|
|
125
|
+
description: Generate a project skeleton for creating a rubygem
|
|
126
|
+
email:
|
|
127
|
+
- me@fnando.com
|
|
128
|
+
executables:
|
|
129
|
+
- dopstick
|
|
130
|
+
extensions: []
|
|
131
|
+
extra_rdoc_files: []
|
|
132
|
+
files:
|
|
133
|
+
- ".github/FUNDING.yml"
|
|
134
|
+
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
|
135
|
+
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
|
136
|
+
- ".github/PULL_REQUEST_TEMPLATE.md"
|
|
137
|
+
- ".github/workflows/tests.yml"
|
|
138
|
+
- ".gitignore"
|
|
139
|
+
- ".rubocop.yml"
|
|
140
|
+
- CHANGELOG.md
|
|
141
|
+
- CODE_OF_CONDUCT.md
|
|
142
|
+
- CONTRIBUTING.md
|
|
143
|
+
- Gemfile
|
|
144
|
+
- LICENSE.md
|
|
145
|
+
- README.md
|
|
146
|
+
- Rakefile
|
|
147
|
+
- bin/console
|
|
148
|
+
- bin/setup
|
|
149
|
+
- dopstick.gemspec
|
|
150
|
+
- exe/dopstick
|
|
151
|
+
- lib/dopstick.rb
|
|
152
|
+
- lib/dopstick/cli.rb
|
|
153
|
+
- lib/dopstick/generator.rb
|
|
154
|
+
- lib/dopstick/refinements.rb
|
|
155
|
+
- lib/dopstick/templates/CHANGELOG.md
|
|
156
|
+
- lib/dopstick/templates/active_record.erb
|
|
157
|
+
- lib/dopstick/templates/bin.erb
|
|
158
|
+
- lib/dopstick/templates/bug_report.erb
|
|
159
|
+
- lib/dopstick/templates/cli.erb
|
|
160
|
+
- lib/dopstick/templates/cli_class.erb
|
|
161
|
+
- lib/dopstick/templates/coc.erb
|
|
162
|
+
- lib/dopstick/templates/console.erb
|
|
163
|
+
- lib/dopstick/templates/contributing.erb
|
|
164
|
+
- lib/dopstick/templates/entry_file.erb
|
|
165
|
+
- lib/dopstick/templates/feature_request.erb
|
|
166
|
+
- lib/dopstick/templates/funding.erb
|
|
167
|
+
- lib/dopstick/templates/gem_entry_file.erb
|
|
168
|
+
- lib/dopstick/templates/gemfile.erb
|
|
169
|
+
- lib/dopstick/templates/gemspec.erb
|
|
170
|
+
- lib/dopstick/templates/generator.erb
|
|
171
|
+
- lib/dopstick/templates/generator_class.erb
|
|
172
|
+
- lib/dopstick/templates/gitignore.erb
|
|
173
|
+
- lib/dopstick/templates/issue.erb
|
|
174
|
+
- lib/dopstick/templates/license.erb
|
|
175
|
+
- lib/dopstick/templates/pull_request.erb
|
|
176
|
+
- lib/dopstick/templates/rakefile.erb
|
|
177
|
+
- lib/dopstick/templates/readme.erb
|
|
178
|
+
- lib/dopstick/templates/rubocop.erb
|
|
179
|
+
- lib/dopstick/templates/setup.erb
|
|
180
|
+
- lib/dopstick/templates/test_file.erb
|
|
181
|
+
- lib/dopstick/templates/test_helper.erb
|
|
182
|
+
- lib/dopstick/templates/tests_workflow.erb
|
|
183
|
+
- lib/dopstick/templates/version.erb
|
|
184
|
+
- lib/dopstick/version.rb
|
|
185
|
+
homepage: https://github.com/fnando/dopstick
|
|
186
|
+
licenses:
|
|
187
|
+
- MIT
|
|
188
|
+
metadata:
|
|
189
|
+
homepage_uri: https://github.com/fnando/dopstick
|
|
190
|
+
bug_tracker_uri: https://github.com/fnando/dopstick/issues
|
|
191
|
+
source_code_uri: https://github.com/fnando/dopstick/blob/v0.0.1
|
|
192
|
+
changelog_uri: https://github.com/fnando/dopstick/blob/v0.0.1/CHANGELOG.md
|
|
193
|
+
documentation_uri: https://github.com/fnando/dopstick/blob/v0.0.1/README.md
|
|
194
|
+
license_uri: https://github.com/fnando/dopstick/blob/v0.0.1/LICENSE.md
|
|
195
|
+
post_install_message:
|
|
196
|
+
rdoc_options: []
|
|
197
|
+
require_paths:
|
|
198
|
+
- lib
|
|
199
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
200
|
+
requirements:
|
|
201
|
+
- - ">="
|
|
202
|
+
- !ruby/object:Gem::Version
|
|
203
|
+
version: 2.6.0
|
|
204
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
205
|
+
requirements:
|
|
206
|
+
- - ">="
|
|
207
|
+
- !ruby/object:Gem::Version
|
|
208
|
+
version: '0'
|
|
209
|
+
requirements: []
|
|
210
|
+
rubygems_version: 3.1.4
|
|
211
|
+
signing_key:
|
|
212
|
+
specification_version: 4
|
|
213
|
+
summary: Generate a project skeleton for creating a rubygem
|
|
214
|
+
test_files: []
|