dopstick 0.0.6 → 0.0.10

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 17fe9695f451b433549bf25b5d8d5484388771739fc32333c4d3a4a6bcfa9348
4
- data.tar.gz: 4791e172a00147a6e7e920eff00e15b26c6ec73d3964a4854e91847989049da3
3
+ metadata.gz: 68fe169c88729fa6813fff9f0ffa304105af9814c7c0f11f0fe74e2142190e1a
4
+ data.tar.gz: f633e7161ecb3c87310570eb2e3ada006d5fef01297ce2ccbc16bf47af0c9814
5
5
  SHA512:
6
- metadata.gz: 65edec1f5c5d373b5ead2dd1631fe4b5638cd396a11d10ad727e35ac6fc8f010134a06f9fb0c4b27b4b95ef62fb9d4556abfe2123252e3d933a07a36348065f1
7
- data.tar.gz: df7abe336abf35acaea9cc3e295cd547a5c376f448ffe80e9862d909d78b15d3ad300930c376c50c0a0ee2d5f3415b9a18b595ec75e9ff2ee94a7752aaf86ada
6
+ metadata.gz: d7e51df4841b4d4ac11459fa0e72ad1a7821bf0f22dc94fef6034da76da8c13a06945f8fbfba814ce6798d61d2cd6a3a549817e2abc241f945135723333c337f
7
+ data.tar.gz: c3aa86a1041cb3b8a86b4ce7d985c716cb9b7064472dbc22dbf7900f307a7cdc3de7859862034dbf82635c2d35472fbc5e6a70d02a5b9e1c03ce2af463063fa6
data/.github/FUNDING.yml CHANGED
@@ -1,4 +1,4 @@
1
1
  # These are supported funding model platforms
2
-
2
+ ---
3
3
  github: [fnando]
4
4
  custom: ["https://www.paypal.me/nandovieira/🍕"]
@@ -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"
@@ -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
- branches:
9
- - main
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.6.x, 2.7.x]
17
+ ruby: ["2.7", "3.0"]
22
18
  gemfile:
23
19
  - Gemfile
24
20
 
25
21
  steps:
26
- - uses: actions/checkout@v1
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-${{ hashFiles(matrix.gemfile) }}
28
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
29
+ hashFiles(matrix.gemfile) }}
33
30
  restore-keys: >
34
- ${{ runner.os }}-${{ matrix.ruby }}-gems-${{ hashFiles(matrix.gemfile) }}
31
+ ${{ runner.os }}-${{ matrix.ruby }}-gems-${{
32
+ hashFiles(matrix.gemfile) }}
35
33
 
36
34
  - name: Set up Ruby
37
- uses: actions/setup-ruby@v1
35
+ uses: ruby/setup-ruby@v1
38
36
  with:
39
37
  ruby-version: ${{ matrix.ruby }}
40
38
 
data/.rubocop.yml CHANGED
@@ -3,7 +3,7 @@ inherit_gem:
3
3
  rubocop-fnando: .rubocop.yml
4
4
 
5
5
  AllCops:
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
7
  NewCops: enable
8
8
  Exclude:
9
9
  - tmp/**/*
data/CHANGELOG.md CHANGED
@@ -11,7 +11,13 @@ Prefix your message with one of the following:
11
11
  - [Security] in case of vulnerabilities.
12
12
  -->
13
13
 
14
- ## Unreleased
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
15
21
 
16
22
  - [Fixed] Babel loader's order is backwards, so TypeScript first, then
17
23
  JavaScript.
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
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.6.0")
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.6 2.7],
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[14.x 12.x],
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."
@@ -9,7 +9,7 @@ updates:
9
9
  schedule:
10
10
  interval: "daily"
11
11
 
12
- - package-ecosystem: "bundler"
12
+ - package-ecosystem: <%= dependabot_package_ecosystem %>
13
13
  directory: "/"
14
14
  schedule:
15
15
  interval: "daily"
@@ -1,4 +1,4 @@
1
1
  # These are supported funding model platforms
2
-
2
+ ---
3
3
  github: [<%= options.github_user %>]
4
4
  custom: ["https://paypal.me/<%= options.paypal_user %>/🍕"]
@@ -0,0 +1,5 @@
1
+ ---
2
+ contact_links:
3
+ - name: "🤨 Q&A"
4
+ url: <%= options.github_url %>/discussions/new?category=q-a
5
+ about: Have a question? Ask it away here!
@@ -51,6 +51,8 @@ module Dopstick
51
51
  template "feature_request.erb",
52
52
  ".github/ISSUE_TEMPLATE/feature_request.md"
53
53
  template "pull_request.erb", ".github/PULL_REQUEST_TEMPLATE.md"
54
+ template "issue_template_config.erb",
55
+ ".github/ISSUE_TEMPLATE/config.yml"
54
56
  template "dependabot.erb", ".github/dependabot.yml"
55
57
  template "codeowners.erb", ".github/CODEOWNERS"
56
58
  end
@@ -115,12 +117,12 @@ module Dopstick
115
117
  content = []
116
118
 
117
119
  options.namespace_names.each_with_index do |name, count|
118
- content << (" " * count) + "module #{name}"
120
+ content << ((" " * count) + "module #{name}")
119
121
  end
120
122
 
121
123
  spacer = skip_content_spaces ? "" : " "
122
124
 
123
- content << (spacer * options.namespace_size) + yield
125
+ content << ((spacer * options.namespace_size) + yield)
124
126
 
125
127
  (options.namespace_size - 1).downto(0) do |count|
126
128
  content << "#{' ' * count}end"
@@ -153,6 +155,19 @@ module Dopstick
153
155
  File.read("#{self.class.source_root}/#{file}")
154
156
  ).result(binding)
155
157
  end
158
+
159
+ def dependabot_package_ecosystem
160
+ "bundler"
161
+ end
162
+
163
+ def ruby_versions_for_workflow
164
+ options.ruby_versions.map do |v|
165
+ canonical_segments = ::Gem::Version.new(v).canonical_segments
166
+ canonical_segments << 0 if canonical_segments.size < 2
167
+
168
+ canonical_segments.join(".").inspect
169
+ end.join(", ")
170
+ end
156
171
  end
157
172
  end
158
173
  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
@@ -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
 
@@ -5,6 +5,9 @@ inherit_gem:
5
5
  AllCops:
6
6
  TargetRubyVersion: <%= options.oldest_ruby_version.split(".").take(2).join(".") %>
7
7
  NewCops: enable
8
+ Exclude:
9
+ - vendor/**/*
10
+ - gemfiles/**/*
8
11
  <%- if options.package_name.include?("-") -%>
9
12
  Naming/FileName:
10
13
  Exclude:
@@ -1,24 +1,25 @@
1
+ ---
1
2
  name: ruby-tests
2
3
 
3
4
  on:
4
- pull_request:
5
- branches:
6
- - main
5
+ pull_request_target:
7
6
  push:
8
7
  branches:
9
8
  - main
10
-
11
- schedule:
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: [<%= options.ruby_versions.map {|v| [*Gem::Version.new(v).canonical_segments, "x"].take(3).join(".") }.join(", ") %>]
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: actions/setup-ruby@v1
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
- BUNDLE_GEMFILE: ${{ matrix.gemfile }}
74
+ <%- end -%>
74
75
  run: |
75
76
  bundle exec rake
@@ -56,6 +56,8 @@ module Dopstick
56
56
  template "feature_request.erb",
57
57
  ".github/ISSUE_TEMPLATE/feature_request.md"
58
58
  template "pull_request.erb", ".github/PULL_REQUEST_TEMPLATE.md"
59
+ template "issue_template_config.erb",
60
+ ".github/ISSUE_TEMPLATE/config.yml"
59
61
  template "dependabot.erb", ".github/dependabot.yml"
60
62
  template "codeowners.erb", ".github/CODEOWNERS"
61
63
  end
@@ -94,6 +96,12 @@ module Dopstick
94
96
  run "git add .", capture: true
95
97
  end
96
98
  end
99
+
100
+ no_commands do
101
+ def dependabot_package_ecosystem
102
+ "npm"
103
+ end
104
+ end
97
105
  end
98
106
  end
99
107
  end
@@ -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
- [![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
- [![NPM](https://img.shields.io/npm/v/<%= options.package_name %>.svg)](https://npmjs.org/packages/<%= options.package_name %>)
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 gem usage
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
- pull_request:
5
- branches:
6
- - main
5
+ pull_request_target:
7
6
  push:
8
7
  branches:
9
8
  - main
10
-
11
- schedule:
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:
@@ -27,9 +28,7 @@ jobs:
27
28
  with:
28
29
  path: vendor/bundle
29
30
  key: >
30
- ${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles("package.json") }}
31
- restore-keys: >
32
- ${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles("package.json") }}
31
+ ${{ runner.os }}-${{ matrix.node }}-npm-${{ hashFiles('package.json') }}
33
32
 
34
33
  - name: Set up Node
35
34
  uses: actions/setup-node@v2-beta
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dopstick
4
- VERSION = "0.0.6"
4
+ VERSION = "0.0.10"
5
5
  end
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.6
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Nando Vieira
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2020-12-09 00:00:00.000000000 Z
11
+ date: 2022-01-15 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor
@@ -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"
@@ -163,6 +164,7 @@ files:
163
164
  - lib/dopstick/generator/base/templates/funding.erb
164
165
  - lib/dopstick/generator/base/templates/gitignore.erb
165
166
  - lib/dopstick/generator/base/templates/issue.erb
167
+ - lib/dopstick/generator/base/templates/issue_template_config.erb
166
168
  - lib/dopstick/generator/base/templates/license.erb
167
169
  - lib/dopstick/generator/base/templates/pull_request.erb
168
170
  - lib/dopstick/generator/base/templates/setup.erb
@@ -206,12 +208,13 @@ homepage: https://github.com/fnando/dopstick
206
208
  licenses:
207
209
  - MIT
208
210
  metadata:
211
+ rubygems_mfa_required: 'true'
209
212
  homepage_uri: https://github.com/fnando/dopstick
210
213
  bug_tracker_uri: https://github.com/fnando/dopstick/issues
211
- source_code_uri: https://github.com/fnando/dopstick/tree/v0.0.6
212
- changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.6/CHANGELOG.md
213
- documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.6/README.md
214
- license_uri: https://github.com/fnando/dopstick/tree/v0.0.6/LICENSE.md
214
+ source_code_uri: https://github.com/fnando/dopstick/tree/v0.0.10
215
+ changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.10/CHANGELOG.md
216
+ documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.10/README.md
217
+ license_uri: https://github.com/fnando/dopstick/tree/v0.0.10/LICENSE.md
215
218
  post_install_message:
216
219
  rdoc_options: []
217
220
  require_paths:
@@ -220,14 +223,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
220
223
  requirements:
221
224
  - - ">="
222
225
  - !ruby/object:Gem::Version
223
- version: 2.6.0
226
+ version: 2.7.0
224
227
  required_rubygems_version: !ruby/object:Gem::Requirement
225
228
  requirements:
226
229
  - - ">="
227
230
  - !ruby/object:Gem::Version
228
231
  version: '0'
229
232
  requirements: []
230
- rubygems_version: 3.1.4
233
+ rubygems_version: 3.3.3
231
234
  signing_key:
232
235
  specification_version: 4
233
236
  summary: Generate a project skeleton for creating a Ruby/NPM package.