dopstick 0.0.5 → 0.0.9

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 67d8b2be08b351c27515e62ca76bee7b29e8d98980f0624ca7b6e931b3dfcfc4
4
- data.tar.gz: d878cb9f1762827c315121c2ab107af72181f33362a9944c10903b733da01e3e
3
+ metadata.gz: 42446a66e285e1f148cf24c355d855dca254c32086ede5c12dea2101715fa4ed
4
+ data.tar.gz: f4f9358edf3b97602abb0584f0b09aa7877f1e62df7c17be0f1f6d6080f4aeb6
5
5
  SHA512:
6
- metadata.gz: eac9428db86f3c28346a4ae6dc38cd6dc08d90f4fdef7b35179c4a0b36bfdb2c67244967d7791050012a897ecffbee29e39a45662483dac7b2a0127bb4b705cd
7
- data.tar.gz: ca31cdc4a53c79daa502559b1cc4793b24bbb6577de57fcfc1f0e253929d737abcaf446d815bd8458cf2c5a625e918006cd1b7c4be00b43b15902bc33cd4f101
6
+ metadata.gz: 28cbbe929c06a4c5a691016f5755ec4ed0c58bc5b6750d36940d084c54600dfa1d54744b9c53ae813269224db38ef1208997ebbdfc9a3e9d77cbf947c8061151
7
+ data.tar.gz: 9de528b5dbb5d9515c8668e62234641bfe49bb0ec5f401fc0d5135673f4d0fc4632985298f566e35e175269212afa65967f3731b2d6fedb3fac35bb40d2550fc
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,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/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"
@@ -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 %>/🍕"]
@@ -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,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
@@ -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
@@ -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:
@@ -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.5"
4
+ VERSION = "0.0.9"
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.5
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: 2020-11-14 00:00:00.000000000 Z
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/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.5
212
- changelog_uri: https://github.com/fnando/dopstick/tree/v0.0.5/CHANGELOG.md
213
- documentation_uri: https://github.com/fnando/dopstick/tree/v0.0.5/README.md
214
- license_uri: https://github.com/fnando/dopstick/tree/v0.0.5/LICENSE.md
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.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: []