dopstick 0.0.4 → 0.0.8

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: fe33ac2b2b1d210b9c5f54cf0f6039ebd8548dfc7893fdebf54e9118a6d44618
4
- data.tar.gz: da37488ed41ebe8f16473376c0aad18c98da952bed00ace9b66220b6d13e46a0
3
+ metadata.gz: 88e28fc1753aaa4198ed8021100c401d532d1574daaa5017953ea00b8794ac74
4
+ data.tar.gz: d5fd3840b247b6bb1d8b4e2a1780a71e9fda02a887433290e0f50100902fc594
5
5
  SHA512:
6
- metadata.gz: 66650b1b3fb60790d1c750749d250bea61c7da3b6e88e116e87b5d93142d1922492edb887e95cd9fd013dec702a89deafc2c7d52d547e9b72ca347b419552898
7
- data.tar.gz: 382c93b122eebd71c54e3b255159a72b89eed321cbd63e992547bd8565dd5710e7d2a6e6e23fdefceb712ca5bb80ccaafb53e27889645d82dddd1131037bcc07
6
+ metadata.gz: 13785048ac2360a3237879f43c723b1a7663f826fe4ec3448aa1af36be3c7265debbd23a0fee5401a2b7032eda383e6fda118c39a49e9ea6f9288104cdaa2220
7
+ data.tar.gz: 5e5db46af35eabcea97fadae738235ec38a155e372066ee3deb0eaa7ce0c9fbeaf5e71fdb787141ff989c256f6eac00f59617517884f23af461f958c2334ee5f
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,22 @@ 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
21
+
22
+ - [Fixed] Babel loader's order is backwards, so TypeScript first, then
23
+ JavaScript.
24
+
25
+ ## v0.0.5 - 2020-11-14
26
+
27
+ - [Fixed] Jest configuration wasn't considering the full import path.
28
+
29
+ ## v0.0.4 - 2020-11-14
15
30
 
16
31
  - [Added] Generate
17
32
  [dependabot](https://help.github.com/github/administering-a-repository/configuration-options-for-dependency-updates)
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/Node" \
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"
@@ -111,16 +111,16 @@ module Dopstick
111
111
  end
112
112
 
113
113
  no_commands do
114
- def render_tree(skip_content_spaces = false, &block)
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) + block.call
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 = "#{options.github_url}/tree/v#{spec.version}"
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,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
 
@@ -94,6 +94,12 @@ module Dopstick
94
94
  run "git add .", capture: true
95
95
  end
96
96
  end
97
+
98
+ no_commands do
99
+ def dependabot_package_ecosystem
100
+ "npm"
101
+ end
102
+ end
97
103
  end
98
104
  end
99
105
  end
@@ -6,7 +6,7 @@ module.exports = {
6
6
  roots: ["<rootDir>/src"],
7
7
  modulePaths: ["src"],
8
8
  moduleNameMapper: {
9
- "^~/": "<rootDir>/src/",
9
+ "^~/(.*?)$": "<rootDir>/src/$1",
10
10
  },
11
11
  testPathIgnorePatterns: ["/vendor/bundle/", "node_modules"],
12
12
  };
@@ -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:
@@ -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
@@ -16,7 +16,7 @@ module.exports = {
16
16
  rules: [
17
17
  {
18
18
  test: /\.ts$/,
19
- use: [{ loader: "ts-loader" }, { loader: "babel-loader" }],
19
+ use: [{ loader: "babel-loader" }, { loader: "ts-loader" }],
20
20
  exclude: /node_modules/,
21
21
  },
22
22
  {
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Dopstick
4
- VERSION = "0.0.4"
4
+ VERSION = "0.0.8"
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.4
4
+ version: 0.0.8
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-11-14 00:00:00.000000000 Z
11
+ date: 2022-01-01 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/Nodepackage.
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.4
212
- changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.4/CHANGELOG.md
213
- documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.4/README.md
214
- license_uri: https://github.com/fnando/dopstick/tree/v0.0.4/LICENSE.md
213
+ source_code_uri: https://github.com/fnando/dopstick/tree/v0.0.8
214
+ changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.8/CHANGELOG.md
215
+ documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.8/README.md
216
+ license_uri: https://github.com/fnando/dopstick/tree/v0.0.8/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.6.0
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.1.4
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/Nodepackage.
235
+ summary: Generate a project skeleton for creating a Ruby/NPM package.
234
236
  test_files: []