dopstick 0.0.5 → 0.0.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.github/FUNDING.yml +1 -1
- data/.github/dependabot.yml +15 -0
- data/.github/workflows/tests.yml +10 -12
- data/.rubocop.yml +1 -1
- data/CHANGELOG.md +11 -0
- data/dopstick.gemspec +3 -2
- data/lib/dopstick/cli.rb +2 -2
- data/lib/dopstick/generator/base/templates/dependabot.erb +1 -1
- data/lib/dopstick/generator/base/templates/funding.erb +1 -1
- data/lib/dopstick/generator/gem/generator.rb +16 -3
- data/lib/dopstick/generator/gem/templates/gemspec.erb +2 -1
- data/lib/dopstick/generator/gem/templates/readme.erb +0 -1
- data/lib/dopstick/generator/gem/templates/rubocop.erb +3 -0
- data/lib/dopstick/generator/gem/templates/tests_workflow.erb +12 -11
- data/lib/dopstick/generator/npm/generator.rb +6 -0
- data/lib/dopstick/generator/npm/templates/readme.erb +3 -4
- data/lib/dopstick/generator/npm/templates/tests_workflow.erb +7 -8
- data/lib/dopstick/generator/npm/templates/webpack.erb +1 -1
- data/lib/dopstick/version.rb +1 -1
- metadata +12 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 42446a66e285e1f148cf24c355d855dca254c32086ede5c12dea2101715fa4ed
|
4
|
+
data.tar.gz: f4f9358edf3b97602abb0584f0b09aa7877f1e62df7c17be0f1f6d6080f4aeb6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 28cbbe929c06a4c5a691016f5755ec4ed0c58bc5b6750d36940d084c54600dfa1d54744b9c53ae813269224db38ef1208997ebbdfc9a3e9d77cbf947c8061151
|
7
|
+
data.tar.gz: 9de528b5dbb5d9515c8668e62234641bfe49bb0ec5f401fc0d5135673f4d0fc4632985298f566e35e175269212afa65967f3731b2d6fedb3fac35bb40d2550fc
|
data/.github/FUNDING.yml
CHANGED
@@ -0,0 +1,15 @@
|
|
1
|
+
---
|
2
|
+
# Documentation:
|
3
|
+
# https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates
|
4
|
+
|
5
|
+
version: 2
|
6
|
+
updates:
|
7
|
+
- package-ecosystem: "github-actions"
|
8
|
+
directory: "/"
|
9
|
+
schedule:
|
10
|
+
interval: "daily"
|
11
|
+
|
12
|
+
- package-ecosystem: bundler
|
13
|
+
directory: "/"
|
14
|
+
schedule:
|
15
|
+
interval: "daily"
|
data/.github/workflows/tests.yml
CHANGED
@@ -1,15 +1,11 @@
|
|
1
|
+
---
|
1
2
|
name: Tests
|
2
3
|
|
3
4
|
on:
|
4
5
|
pull_request:
|
5
|
-
branches:
|
6
|
-
- main
|
7
6
|
push:
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
schedule:
|
12
|
-
- cron: "0 10 * * *"
|
7
|
+
workflow_dispatch:
|
8
|
+
inputs: {}
|
13
9
|
|
14
10
|
jobs:
|
15
11
|
build:
|
@@ -18,23 +14,25 @@ jobs:
|
|
18
14
|
strategy:
|
19
15
|
fail-fast: false
|
20
16
|
matrix:
|
21
|
-
ruby: [2.
|
17
|
+
ruby: ["2.7", "3.0"]
|
22
18
|
gemfile:
|
23
19
|
- Gemfile
|
24
20
|
|
25
21
|
steps:
|
26
|
-
- uses: actions/checkout@
|
22
|
+
- uses: actions/checkout@v2.4.0
|
27
23
|
|
28
24
|
- uses: actions/cache@v2
|
29
25
|
with:
|
30
26
|
path: vendor/bundle
|
31
27
|
key: >
|
32
|
-
${{ runner.os }}-${{ matrix.ruby }}-gems-${{
|
28
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{
|
29
|
+
hashFiles(matrix.gemfile) }}
|
33
30
|
restore-keys: >
|
34
|
-
${{ runner.os }}-${{ matrix.ruby }}-gems-${{
|
31
|
+
${{ runner.os }}-${{ matrix.ruby }}-gems-${{
|
32
|
+
hashFiles(matrix.gemfile) }}
|
35
33
|
|
36
34
|
- name: Set up Ruby
|
37
|
-
uses:
|
35
|
+
uses: ruby/setup-ruby@v1
|
38
36
|
with:
|
39
37
|
ruby-version: ${{ matrix.ruby }}
|
40
38
|
|
data/.rubocop.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -11,6 +11,17 @@ Prefix your message with one of the following:
|
|
11
11
|
- [Security] in case of vulnerabilities.
|
12
12
|
-->
|
13
13
|
|
14
|
+
## v0.0.7 - 2021-12-04
|
15
|
+
|
16
|
+
- [Fixed] Set proper package ecosystem on dependabot's config file.
|
17
|
+
- [Changed] Update ruby default versions to 2.7 and 3.0.
|
18
|
+
- [Changed] Update node default versions to 16 and 17.
|
19
|
+
|
20
|
+
## v0.0.6 - 2020-12-09
|
21
|
+
|
22
|
+
- [Fixed] Babel loader's order is backwards, so TypeScript first, then
|
23
|
+
JavaScript.
|
24
|
+
|
14
25
|
## v0.0.5 - 2020-11-14
|
15
26
|
|
16
27
|
- [Fixed] Jest configuration wasn't considering the full import path.
|
data/dopstick.gemspec
CHANGED
@@ -7,12 +7,13 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = Dopstick::VERSION
|
8
8
|
spec.authors = ["Nando Vieira"]
|
9
9
|
spec.email = ["me@fnando.com"]
|
10
|
+
spec.metadata = {"rubygems_mfa_required" => "true"}
|
10
11
|
|
11
|
-
spec.summary = "Generate a project skeleton for creating a Ruby/
|
12
|
+
spec.summary = "Generate a project skeleton for creating a Ruby/NPM " \
|
12
13
|
"package."
|
13
14
|
spec.description = spec.summary
|
14
15
|
spec.license = "MIT"
|
15
|
-
spec.required_ruby_version = Gem::Requirement.new(">= 2.
|
16
|
+
spec.required_ruby_version = Gem::Requirement.new(">= 2.7.0")
|
16
17
|
|
17
18
|
github_url = "https://github.com/fnando/dopstick"
|
18
19
|
github_tree_url = "#{github_url}/tree/v#{spec.version}"
|
data/lib/dopstick/cli.rb
CHANGED
@@ -48,12 +48,12 @@ module Dopstick
|
|
48
48
|
desc: "Set the codebase namespace. By default, it's inferred from " \
|
49
49
|
"the gem name."
|
50
50
|
option :ruby_versions,
|
51
|
-
default: %w[2.
|
51
|
+
default: %w[2.7 3.0 3.1],
|
52
52
|
type: :array,
|
53
53
|
desc: "Set Ruby versions that are officially supported. Multiple " \
|
54
54
|
"versions must separated by space."
|
55
55
|
option :node_versions,
|
56
|
-
default: %w[
|
56
|
+
default: %w[16.x 17.x],
|
57
57
|
type: :array,
|
58
58
|
desc: "Set Node versions that are officially supported. Multiple " \
|
59
59
|
"versions must separated by space."
|
@@ -111,16 +111,16 @@ module Dopstick
|
|
111
111
|
end
|
112
112
|
|
113
113
|
no_commands do
|
114
|
-
def render_tree(skip_content_spaces = false
|
114
|
+
def render_tree(skip_content_spaces = false)
|
115
115
|
content = []
|
116
116
|
|
117
117
|
options.namespace_names.each_with_index do |name, count|
|
118
|
-
content << (" " * count) + "module #{name}"
|
118
|
+
content << ((" " * count) + "module #{name}")
|
119
119
|
end
|
120
120
|
|
121
121
|
spacer = skip_content_spaces ? "" : " "
|
122
122
|
|
123
|
-
content << (spacer * options.namespace_size) +
|
123
|
+
content << ((spacer * options.namespace_size) + yield)
|
124
124
|
|
125
125
|
(options.namespace_size - 1).downto(0) do |count|
|
126
126
|
content << "#{' ' * count}end"
|
@@ -153,6 +153,19 @@ module Dopstick
|
|
153
153
|
File.read("#{self.class.source_root}/#{file}")
|
154
154
|
).result(binding)
|
155
155
|
end
|
156
|
+
|
157
|
+
def dependabot_package_ecosystem
|
158
|
+
"bundler"
|
159
|
+
end
|
160
|
+
|
161
|
+
def ruby_versions_for_workflow
|
162
|
+
options.ruby_versions.map do |v|
|
163
|
+
canonical_segments = ::Gem::Version.new(v).canonical_segments
|
164
|
+
canonical_segments << 0 if canonical_segments.size < 2
|
165
|
+
|
166
|
+
canonical_segments.join(".").inspect
|
167
|
+
end.join(", ")
|
168
|
+
end
|
156
169
|
end
|
157
170
|
end
|
158
171
|
end
|
@@ -7,6 +7,7 @@ Gem::Specification.new do |spec|
|
|
7
7
|
spec.version = <%= options.namespace %>::VERSION
|
8
8
|
spec.authors = [<%= options.user_name.inspect %>]
|
9
9
|
spec.email = [<%= options.user_email.inspect %>]
|
10
|
+
spec.metadata = {"rubygems_mfa_required" => "true"}
|
10
11
|
|
11
12
|
spec.summary = <%= options.description.inspect %>
|
12
13
|
spec.description = spec.summary
|
@@ -14,7 +15,7 @@ Gem::Specification.new do |spec|
|
|
14
15
|
spec.required_ruby_version = Gem::Requirement.new(">= <%= options.oldest_ruby_version %>")
|
15
16
|
|
16
17
|
github_url = <%= options.github_url.inspect %>
|
17
|
-
github_tree_url = "#{
|
18
|
+
github_tree_url = "#{github_url}/tree/v#{spec.version}"
|
18
19
|
|
19
20
|
spec.homepage = github_url
|
20
21
|
spec.metadata["homepage_uri"] = spec.homepage
|
@@ -1,7 +1,6 @@
|
|
1
1
|
# <%= options.package_name %>
|
2
2
|
|
3
3
|
[![Tests](<%= options.github_url %>/workflows/ruby-tests/badge.svg)](https://github.com/fnando/<%= options.package_name %>)
|
4
|
-
[![Code Climate](https://codeclimate.com/github/<%= options.github_user %>/<%= options.package_name %>/badges/gpa.svg)](https://codeclimate.com/github/<%= options.github_user %>/<%= options.package_name %>)
|
5
4
|
[![Gem](https://img.shields.io/gem/v/<%= options.package_name %>.svg)](https://rubygems.org/gems/<%= options.package_name %>)
|
6
5
|
[![Gem](https://img.shields.io/gem/dt/<%= options.package_name %>.svg)](https://rubygems.org/gems/<%= options.package_name %>)
|
7
6
|
|
@@ -1,24 +1,25 @@
|
|
1
|
+
---
|
1
2
|
name: ruby-tests
|
2
3
|
|
3
4
|
on:
|
4
|
-
|
5
|
-
branches:
|
6
|
-
- main
|
5
|
+
pull_request_target:
|
7
6
|
push:
|
8
7
|
branches:
|
9
8
|
- main
|
10
|
-
|
11
|
-
|
12
|
-
- cron: "0 10 * * *"
|
9
|
+
workflow_dispatch:
|
10
|
+
inputs: {}
|
13
11
|
|
14
12
|
jobs:
|
15
13
|
build:
|
16
14
|
name: Tests with Ruby ${{ matrix.ruby }} and ${{ matrix.gemfile }}
|
17
15
|
runs-on: "ubuntu-latest"
|
16
|
+
if: |
|
17
|
+
github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
|
18
|
+
github.actor != 'dependabot[bot]'
|
18
19
|
strategy:
|
19
20
|
fail-fast: false
|
20
21
|
matrix:
|
21
|
-
ruby: [<%=
|
22
|
+
ruby: [<%= ruby_versions_for_workflow %>]
|
22
23
|
gemfile:
|
23
24
|
- Gemfile
|
24
25
|
|
@@ -40,11 +41,9 @@ jobs:
|
|
40
41
|
path: vendor/bundle
|
41
42
|
key: >
|
42
43
|
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
43
|
-
restore-keys: >
|
44
|
-
${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
|
45
44
|
|
46
45
|
- name: Set up Ruby
|
47
|
-
uses:
|
46
|
+
uses: ruby/setup-ruby@v1
|
48
47
|
with:
|
49
48
|
ruby-version: ${{ matrix.ruby }}
|
50
49
|
|
@@ -68,8 +67,10 @@ jobs:
|
|
68
67
|
|
69
68
|
- name: Run Tests
|
70
69
|
env:
|
70
|
+
BUNDLE_GEMFILE: ${{ matrix.gemfile }}
|
71
|
+
<%- if options.active_record? -%>
|
71
72
|
PGHOST: localhost
|
72
73
|
PGUSER: postgres
|
73
|
-
|
74
|
+
<%- end -%>
|
74
75
|
run: |
|
75
76
|
bundle exec rake
|
@@ -1,9 +1,8 @@
|
|
1
1
|
# <%= options.package_name %>
|
2
2
|
|
3
3
|
[![Tests](<%= options.github_url %>/workflows/node-tests/badge.svg)](https://github.com/fnando/<%= options.package_name %>)
|
4
|
-
[![
|
5
|
-
[![NPM](https://img.shields.io/npm/
|
6
|
-
[![NPM](https://img.shields.io/npm/dt/<%= options.package_name %>.svg)](https://npmjs.org/packages/<%= options.package_name %>)
|
4
|
+
[![NPM](https://img.shields.io/npm/v/<%= options.package_name %>.svg)](https://npmjs.org/package/<%= options.package_name %>)
|
5
|
+
[![NPM](https://img.shields.io/npm/dt/<%= options.package_name %>.svg)](https://npmjs.org/package/<%= options.package_name %>)
|
7
6
|
|
8
7
|
<%= options.description %>
|
9
8
|
|
@@ -23,7 +22,7 @@ yarn add <%= options.package_name %>
|
|
23
22
|
|
24
23
|
## Usage
|
25
24
|
|
26
|
-
TODO: Write
|
25
|
+
TODO: Write package usage
|
27
26
|
|
28
27
|
## Maintainer
|
29
28
|
|
@@ -1,20 +1,21 @@
|
|
1
|
+
---
|
1
2
|
name: node-tests
|
2
3
|
|
3
4
|
on:
|
4
|
-
|
5
|
-
branches:
|
6
|
-
- main
|
5
|
+
pull_request_target:
|
7
6
|
push:
|
8
7
|
branches:
|
9
8
|
- main
|
10
|
-
|
11
|
-
|
12
|
-
- cron: "0 10 * * *"
|
9
|
+
workflow_dispatch:
|
10
|
+
inputs: {}
|
13
11
|
|
14
12
|
jobs:
|
15
13
|
build:
|
16
14
|
name: Tests with Node ${{ matrix.node }}
|
17
15
|
runs-on: "ubuntu-latest"
|
16
|
+
if: |
|
17
|
+
github.actor == 'dependabot[bot]' && github.event_name == 'pull_request_target' ||
|
18
|
+
github.actor != 'dependabot[bot]'
|
18
19
|
strategy:
|
19
20
|
fail-fast: false
|
20
21
|
matrix:
|
@@ -28,8 +29,6 @@ jobs:
|
|
28
29
|
path: vendor/bundle
|
29
30
|
key: >
|
30
31
|
${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles("package.json") }}
|
31
|
-
restore-keys: >
|
32
|
-
${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles("package.json") }}
|
33
32
|
|
34
33
|
- name: Set up Node
|
35
34
|
uses: actions/setup-node@v2-beta
|
data/lib/dopstick/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dopstick
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nando Vieira
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2022-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -122,7 +122,7 @@ dependencies:
|
|
122
122
|
- - ">="
|
123
123
|
- !ruby/object:Gem::Version
|
124
124
|
version: '0'
|
125
|
-
description: Generate a project skeleton for creating a Ruby/
|
125
|
+
description: Generate a project skeleton for creating a Ruby/NPM package.
|
126
126
|
email:
|
127
127
|
- me@fnando.com
|
128
128
|
executables:
|
@@ -135,6 +135,7 @@ files:
|
|
135
135
|
- ".github/ISSUE_TEMPLATE/bug_report.md"
|
136
136
|
- ".github/ISSUE_TEMPLATE/feature_request.md"
|
137
137
|
- ".github/PULL_REQUEST_TEMPLATE.md"
|
138
|
+
- ".github/dependabot.yml"
|
138
139
|
- ".github/workflows/tests.yml"
|
139
140
|
- ".gitignore"
|
140
141
|
- ".rubocop.yml"
|
@@ -206,12 +207,13 @@ homepage: https://github.com/fnando/dopstick
|
|
206
207
|
licenses:
|
207
208
|
- MIT
|
208
209
|
metadata:
|
210
|
+
rubygems_mfa_required: 'true'
|
209
211
|
homepage_uri: https://github.com/fnando/dopstick
|
210
212
|
bug_tracker_uri: https://github.com/fnando/dopstick/issues
|
211
|
-
source_code_uri: https://github.com/fnando/dopstick/tree/v0.0.
|
212
|
-
changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.
|
213
|
-
documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.
|
214
|
-
license_uri: https://github.com/fnando/dopstick/tree/v0.0.
|
213
|
+
source_code_uri: https://github.com/fnando/dopstick/tree/v0.0.9
|
214
|
+
changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.9/CHANGELOG.md
|
215
|
+
documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.9/README.md
|
216
|
+
license_uri: https://github.com/fnando/dopstick/tree/v0.0.9/LICENSE.md
|
215
217
|
post_install_message:
|
216
218
|
rdoc_options: []
|
217
219
|
require_paths:
|
@@ -220,15 +222,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
220
222
|
requirements:
|
221
223
|
- - ">="
|
222
224
|
- !ruby/object:Gem::Version
|
223
|
-
version: 2.
|
225
|
+
version: 2.7.0
|
224
226
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
225
227
|
requirements:
|
226
228
|
- - ">="
|
227
229
|
- !ruby/object:Gem::Version
|
228
230
|
version: '0'
|
229
231
|
requirements: []
|
230
|
-
rubygems_version: 3.
|
232
|
+
rubygems_version: 3.3.3
|
231
233
|
signing_key:
|
232
234
|
specification_version: 4
|
233
|
-
summary: Generate a project skeleton for creating a Ruby/
|
235
|
+
summary: Generate a project skeleton for creating a Ruby/NPM package.
|
234
236
|
test_files: []
|