hephaestus 0.0.1 → 0.0.2

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: 371b5a8acd1794fe2317f9f6e6c94de073e3790198d3f9f5871b149df137602e
4
- data.tar.gz: ba0f8d0dfe79c043782610058fcebbe74f8c05d2c3edc472200841b769aeaf6a
3
+ metadata.gz: 6cfb5da6707ff5a508725681a93cee151823e06b0e25f385003241e8e67ba941
4
+ data.tar.gz: d54d8a73305ab8c17a391cc6af11bf5af2d40307a456a762a0df134770a5e31c
5
5
  SHA512:
6
- metadata.gz: a3b51205a5048ca0c67d5121fa477bb3b5053125968c0c31dd04386f5b224016e3a02dd08f5fcd74390b87f0dccbb253304e13f6c8da0f79584b137aa988231d
7
- data.tar.gz: 1d59384fc58c249d0b964a1dbe0d26a3c29109febaebd2ba12f9cea745c34d889fe674a992bfb42611c6a27b9b5fef6226b827399d65c7a75e128367684c2bce
6
+ metadata.gz: 42d578ae51c94944fc1cf155618180d321852eff0a3d2db61d342039217cbe6c69c146aa289144094b5332c11236aad919e0aa92de93a6180aa573d15b8d1068
7
+ data.tar.gz: db73d6d9d19f13dfc22156231052c8bb87f5f5925a31a934e2e9e0ee71a39e0af2704072fb545d0b3aa44a2ea6b002ac8daf92a85801bc6817793a63b609ffd4
data/CHANGELOG.md CHANGED
@@ -1,5 +1,9 @@
1
1
  # Changelog
2
2
 
3
+ ## [v0.0.2](https://github.com/yettoapp/hephaestus/tree/v0.0.2) (2023-03-01)
4
+
5
+ [Full Changelog](https://github.com/yettoapp/hephaestus/compare/v0.0.1...v0.0.2)
6
+
3
7
  ## [v0.0.1](https://github.com/yettoapp/hephaestus/tree/v0.0.1) (2023-02-28)
4
8
 
5
9
  [Full Changelog](https://github.com/yettoapp/hephaestus/compare/b33ebb8ab3188b8689b10d4649d3f29ea7ca1f2a...v0.0.1)
@@ -2,7 +2,7 @@
2
2
  # frozen_string_literal: true
3
3
 
4
4
  module Hephaestus
5
- VERSION = "0.0.1"
5
+ VERSION = "0.0.2"
6
6
  RAILS_VERSION = "~> 7.0.0"
7
7
  RUBY_VERSION = File
8
8
  .read("#{File.dirname(__FILE__)}/../../.ruby-version")
@@ -0,0 +1,4 @@
1
+ PLUG_APP_URL="plug-app.ngrok.io"
2
+ YETTO_API_VERSION_TLD="yetto.ngrok.io/api"
3
+
4
+ SLACK_LOG_URL=http://slack.com/the_log_room
@@ -0,0 +1,11 @@
1
+ name: "Run License Check"
2
+ description: "Validates that all the licenses are up to date."
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - uses: ./.github/actions/setup
8
+
9
+ - name: Run license check
10
+ shell: bash
11
+ run: script/licenses --update
@@ -0,0 +1,9 @@
1
+ name: "Set up Plug"
2
+ description: "Do whatever is necessary to setup the plug."
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - uses: ruby/setup-ruby@v1
8
+ with:
9
+ bundler-cache: true
@@ -0,0 +1,11 @@
1
+ name: "Configure git"
2
+ description: "Sets up Git creds for Sisyphus"
3
+
4
+ runs:
5
+ using: "composite"
6
+ steps:
7
+ - name: Run git config
8
+ shell: bash
9
+ run: |
10
+ git config --local user.email "sisyphus@yetto.app"
11
+ git config --local user.name "Sisyphus"
@@ -0,0 +1,19 @@
1
+ name: "Run Sorbet Check"
2
+ description: "Validates that all the Sorbet types are up to date."
3
+
4
+ inputs:
5
+ gh_token:
6
+ description: 'A GitHub PAT'
7
+ required: true
8
+
9
+ runs:
10
+ using: "composite"
11
+ steps:
12
+ - uses: ./.github/actions/setup
13
+
14
+ - name: Update RBI files
15
+ shell: bash
16
+ id: update
17
+ env:
18
+ GITHUB_TOKEN: ${{ inputs.gh_token }}
19
+ run: script/typecheck --update
@@ -0,0 +1,22 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "09:00"
8
+ timezone: "Etc/UTC"
9
+ open-pull-requests-limit: 10
10
+
11
+ - package-ecosystem: bundler
12
+ directory: "/"
13
+ schedule:
14
+ interval: daily
15
+ time: "09:00"
16
+ timezone: "Etc/UTC"
17
+ open-pull-requests-limit: 10
18
+ allow:
19
+ - dependency-name: "*"
20
+ dependency-type: "production"
21
+ - dependency-name: "sorbet*"
22
+ dependency-type: "all"
@@ -0,0 +1,98 @@
1
+ name: PR auto-{approve,merge}
2
+
3
+ on:
4
+ pull_request_target:
5
+
6
+ permissions:
7
+ pull-requests: write
8
+ contents: write
9
+
10
+ jobs:
11
+ dependabot:
12
+ name: Dependabot
13
+ runs-on: ubuntu-latest
14
+
15
+ env:
16
+ RAILS_ENV: test
17
+ REDIS_URL: redis://localhost:6379/0
18
+ RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
19
+ SLACK_LOG_URL: http://slack.com/the_log_room
20
+
21
+ # Service containers to run; note that this is duplicated
22
+ # in test.yml due to a limitation in GitHub Actions
23
+ # (services can only be defined per job)
24
+ services:
25
+ postgres:
26
+ redis:
27
+ # Docker Hub image name
28
+ image: redis:6.2-alpine
29
+ ports: ["6379:6379"]
30
+ # Set health checks to wait until redis has started
31
+ options: >-
32
+ --health-cmd "redis-cli ping" --health-interval 10s --health-timeout
33
+ 5s --health-retries 5
34
+
35
+ if: ${{ github.event.pull_request.user.login == 'dependabot[bot]' }}
36
+ steps:
37
+ - name: Fetch Dependabot metadata
38
+ id: dependabot-metadata
39
+ uses: dependabot/fetch-metadata@v1
40
+ with:
41
+ github-token: "${{ secrets.GITHUB_TOKEN }}"
42
+
43
+ - uses: actions/checkout@v3
44
+ with:
45
+ ref: ${{ github.head_ref }}
46
+
47
+ - uses: ./.github/actions/sisyphus
48
+
49
+ - uses: ./.github/actions/license
50
+
51
+ - name: Commit licenses
52
+ run: |
53
+ git add .
54
+ git commit -m "[auto-license]: Update license information" || true
55
+ git push
56
+
57
+ - uses: ./.github/actions/sorbet
58
+
59
+ - name: Commit Sorbet
60
+ run: |
61
+ git add .
62
+ git commit -m "[auto-rbi]: Update RBI files" || true
63
+ git push
64
+
65
+ - name: Approve Dependabot PR
66
+ if: ${{steps.dependabot-metadata.outputs.update-type != 'version-update:semver-major'}}
67
+ run: gh pr review --approve "$PR_URL"
68
+ env:
69
+ PR_URL: ${{github.event.pull_request.html_url}}
70
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
71
+
72
+ - name: Merge Dependabot PR
73
+ run: gh pr merge --auto --squash "$PR_URL"
74
+ env:
75
+ PR_URL: ${{ github.event.pull_request.html_url }}
76
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
77
+
78
+ sisyphusbot:
79
+ name: Automated PRs
80
+ runs-on: ubuntu-latest
81
+
82
+ if: ${{ github.event.pull_request.user.login == 'sisyphusbot' }}
83
+ steps:
84
+ - uses: actions/checkout@v3
85
+
86
+ - name: Approve Automated PR
87
+ if: startsWith(github.event.pull_request.title, '[auto')
88
+ run: gh pr review --approve "$PR_URL"
89
+ env:
90
+ PR_URL: ${{ github.event.pull_request.html_url }}
91
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
92
+
93
+ - name: Merge Automated PR
94
+ if: startsWith(github.event.pull_request.title, '[auto')
95
+ run: gh pr merge --auto --squash "$PR_URL"
96
+ env:
97
+ PR_URL: ${{ github.event.pull_request.html_url }}
98
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,43 @@
1
+ name: Update licenses
2
+
3
+ on:
4
+ push:
5
+ paths:
6
+ - "**/Gemfile.lock"
7
+ branches:
8
+ - production
9
+ - staging
10
+ workflow_dispatch:
11
+
12
+ permissions:
13
+ contents: write
14
+ pull-requests: write
15
+
16
+ jobs:
17
+ license-cache:
18
+ runs-on: ubuntu-latest
19
+
20
+ steps:
21
+ - uses: actions/checkout@v3
22
+ with:
23
+ ref: ${{ github.ref }}
24
+
25
+ - uses: ./.github/actions/license
26
+
27
+ - name: Create Pull Request
28
+ uses: peter-evans/create-pull-request@v4
29
+ with:
30
+ token: ${{ secrets.GH_SISYPHUS_YETTO_REPO_TOKEN }}
31
+ commit-message: "[auto-license] Update license information"
32
+ title: "[auto-license] Update license information"
33
+ body: |
34
+ - Update license information
35
+
36
+ Auto-generated by [create-pull-request][1]
37
+
38
+ [1]: https://github.com/peter-evans/create-pull-request
39
+ branch: update-licenses
40
+ committer: Sisyphus <sisyphus@yetto.app>
41
+ author: Sisyphus <sisyphus@yetto.app>
42
+ delete-branch: true
43
+ labels: 'chore, github action'
@@ -0,0 +1,50 @@
1
+ name: Linting
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ env:
7
+ RAILS_ENV: test
8
+
9
+ jobs:
10
+ rubocop:
11
+ runs-on: ubuntu-latest
12
+ steps:
13
+ - uses: actions/checkout@v3
14
+
15
+ # reads from .ruby-version
16
+ - uses: ruby/setup-ruby@v1
17
+ with:
18
+ bundler-cache: true
19
+
20
+ - name: Rubocop
21
+ run: bundle exec rake rubocop
22
+
23
+ ruby-types:
24
+ runs-on: ubuntu-latest
25
+ steps:
26
+ - uses: actions/checkout@v3
27
+
28
+ # reads from .ruby-version
29
+ - uses: ruby/setup-ruby@v1
30
+ with:
31
+ bundler-cache: true
32
+
33
+ - name: Sorbet
34
+ id: sorbet_tc
35
+ run: bundle exec srb tc
36
+
37
+ - name: Provide error message
38
+ if: failure() && steps.sorbet_tc.outcome == 'failure'
39
+ run: |
40
+ echo "Run 'bundle exec srb tc -a' to auto-correct Sorbet checks."
41
+
42
+ - name: Verifying Tapioca
43
+ id: tapioca_verify
44
+ run: script/typecheck --verify
45
+
46
+ - name: Provide error message
47
+ if: failure() && steps.tapioca_verify.outcome == 'failure'
48
+ run: |
49
+ echo "Run 'script/typecheck --update' to update Tapioca's RBI files."
50
+ echo "Run 'script/typecheck --verify' to verify that Tapioca's RBI files are up-to-date."
@@ -0,0 +1,36 @@
1
+ name: Security
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ env:
7
+ RAILS_ENV: test
8
+ BUNDLE_WITH: "ci"
9
+
10
+ jobs:
11
+ bundle-audit:
12
+ runs-on: ubuntu-latest
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - uses: ruby/setup-ruby@v1
16
+ with:
17
+ bundler-cache: true
18
+
19
+ # Patch-level verification for bundler.
20
+ - name: Run bundle-audit
21
+ run: |
22
+ script/security_checks/bundle-audit
23
+
24
+ brakeman: # A static analysis security vulnerability scanner for Ruby on Rails applications
25
+ runs-on: ubuntu-latest
26
+ steps:
27
+ - uses: actions/checkout@v3
28
+
29
+ - uses: ruby/setup-ruby@v1
30
+ with:
31
+ bundler-cache: true
32
+
33
+ - name: brakeman report
34
+ run: |
35
+ script/security_checks/brakeman
36
+ cat security-results.json
@@ -0,0 +1,49 @@
1
+ name: Update Sorbet files
2
+
3
+ on:
4
+ pull_request:
5
+ paths:
6
+ - '**.rb'
7
+
8
+ permissions:
9
+ contents: write
10
+ pull-requests: write
11
+
12
+ jobs:
13
+ trigger_tapioca_pr:
14
+ runs-on: ubuntu-latest
15
+
16
+ env:
17
+ RAILS_ENV: test
18
+ REDIS_URL: redis://localhost:6379/0
19
+ RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
20
+ SLACK_LOG_URL: http://slack.com/the_log_room
21
+
22
+ # Service containers to run; note that this is duplicated
23
+ # in test.yml due to a limitation in GitHub Actions
24
+ # (services can only be defined per job)
25
+ services:
26
+ redis:
27
+ # Docker Hub image name
28
+ image: redis:6.2-alpine
29
+ ports: ["6379:6379"]
30
+ # Set health checks to wait until redis has started
31
+ options: >-
32
+ --health-cmd "redis-cli ping" --health-interval 10s --health-timeout
33
+ 5s --health-retries 5
34
+
35
+ if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
36
+ steps:
37
+ - uses: actions/checkout@v3
38
+ with:
39
+ ref: ${{ github.head_ref }}
40
+
41
+ - uses: ./.github/actions/sisyphus
42
+
43
+ - uses: ./.github/actions/sorbet
44
+
45
+ - name: Commit Sorbet
46
+ run: |
47
+ git add .
48
+ git commit -m "[auto-rbi]: Update RBI files" || true
49
+ git push
@@ -0,0 +1,53 @@
1
+ name: Test
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ test:
8
+ runs-on: ubuntu-latest
9
+
10
+ env:
11
+ RAILS_ENV: test
12
+ REDIS_URL: redis://localhost:6379/0
13
+ RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
14
+ SLACK_LOG_URL: http://slack.com/the_log_room
15
+
16
+ # Service containers to run; note that this is duplicated
17
+ # in sorbet.yml due to a limitation in GitHub Actions
18
+ # (services can only be defined per job)
19
+ services:
20
+ redis:
21
+ # Docker Hub image name
22
+ image: redis:6.2-alpine
23
+ ports: ["6379:6379"]
24
+ # Set health checks to wait until redis has started
25
+ options: >-
26
+ --health-cmd "redis-cli ping" --health-interval 10s --health-timeout
27
+ 5s --health-retries 5
28
+
29
+ steps:
30
+ - uses: actions/checkout@v3
31
+ with:
32
+ ref: ${{github.ref}} # checkout branch not SHA
33
+ fetch-depth: 0
34
+
35
+ - uses: ./.github/actions/setup
36
+
37
+ - name: Run tests
38
+ run: |
39
+ script/ci
40
+
41
+ test-licenses:
42
+ needs: test
43
+ runs-on: ubuntu-latest
44
+
45
+ if: ${{ github.event.pull_request.user.login != 'dependabot[bot]' }}
46
+ steps:
47
+ - uses: actions/checkout@v3
48
+
49
+ - uses: ./.github/actions/setup
50
+
51
+ - name: Verifying licenses
52
+ run: script/licenses --verify
53
+
@@ -0,0 +1,33 @@
1
+ cache_path: vendor/.licenses
2
+
3
+ allowed:
4
+ - apache-2.0
5
+ - bsd-2-clause
6
+ - bsd-3-clause
7
+ - isc
8
+ - mit
9
+ - cc0-1.0
10
+ - unlicense
11
+
12
+ ignored:
13
+ bundler:
14
+ - bundler-audit # GPL-3.0; but also, only used in CI/test
15
+ - ruby2_keywords # BSD-2-Clause; ignored because of custom LICENSE text
16
+ - sidekiq # LGPL-3.0; ignored because of custom LICENSE text
17
+
18
+ reviewed:
19
+ bundler:
20
+ - activerecord # MIT
21
+ - brakeman # BRAKEMAN PUBLIC USE LICENSE
22
+ - concurrent-ruby # MIT
23
+ - date # BSD-2-Clause
24
+ - dry-transformer # MIT
25
+ - json # BSD-2-Clause
26
+ - net-imap # BSD-2-Clause
27
+ - net-pop # BSD-2-Clause
28
+ - net-protocol # BSD-2-Clause
29
+ - net-smtp # BSD-2-Clause
30
+ - racc # BSD-2-Clause
31
+ - timeout # BSD-2-Clause
32
+ - websocket-driver # Apache-2.0
33
+ - websocket-extensions # Apache-2.0
@@ -0,0 +1,5 @@
1
+ inherit_gem:
2
+ rubocop-standard:
3
+ - config/default.yml
4
+ - config/minitest.yml
5
+ - config/rails.yml
@@ -0,0 +1,9 @@
1
+ {
2
+ "recommendations": [
3
+ "shopify.ruby-extensions-pack",
4
+ "bradlc.vscode-tailwindcss",
5
+ "johnpapa.vscode-peacock",
6
+ "manuelpuyol.erb-linter",
7
+ "esbenp.prettier-vscode"
8
+ ]
9
+ }
@@ -0,0 +1,13 @@
1
+ {
2
+ // Use IntelliSense to learn about possible attributes.
3
+ // Hover to view descriptions of existing attributes.
4
+ // For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
5
+ "version": "0.2.0",
6
+ "configurations": [
7
+ {
8
+ "type": "rdbg",
9
+ "name": "Attach rdbg",
10
+ "request": "attach"
11
+ },
12
+ ]
13
+ }
@@ -0,0 +1,52 @@
1
+ {
2
+ "files.associations": {
3
+ "*.css": "tailwindcss",
4
+ "*.rbi": "ruby",
5
+ "*.rbupdated": "ruby",
6
+ "*.rbedited": "ruby"
7
+ },
8
+ "tailwindCSS.includeLanguages": {
9
+ "plaintext": "html"
10
+ },
11
+ "tailwindCSS.emmetCompletions": true,
12
+ "rubyLsp.enabledFeatures": {
13
+ "documentHighlights": true,
14
+ "documentLink": true,
15
+ "documentSymbols": true,
16
+ "foldingRanges": true,
17
+ "selectionRanges": true,
18
+ "semanticHighlighting": true,
19
+ "formatting": true,
20
+ "diagnostics": true,
21
+ "codeActions": true,
22
+ "onTypeFormatting": true
23
+ },
24
+ "peacock.color": "#A700A0",
25
+ "[javascript]": {
26
+ "editor.codeActionsOnSave": {
27
+ "source.fixAll.eslint": true
28
+ }
29
+ },
30
+ "[ruby]": {
31
+ "editor.defaultFormatter": "Shopify.ruby-lsp",
32
+ },
33
+ "workbench.colorCustomizations": {
34
+ "activityBar.activeBackground": "#26FF9A",
35
+ "activityBar.background": "#26FF9A",
36
+ "activityBar.foreground": "#181818",
37
+ "activityBar.inactiveForeground": "#18181899",
38
+ "activityBarBadge.background": "#b7bf00",
39
+ "activityBarBadge.foreground": "#15202b",
40
+ "commandCenter.border": "#18181899",
41
+ "sash.hoverBorder": "#26FF9A",
42
+ "statusBar.background": "#59FFB4",
43
+ "statusBar.foreground": "#181818",
44
+ "statusBarItem.hoverBackground": "#26FF9A",
45
+ "statusBarItem.remoteBackground": "#59FFB4",
46
+ "statusBarItem.remoteForeground": "#181818",
47
+ "titleBar.activeBackground": "#59FFB4",
48
+ "titleBar.activeForeground": "#181818",
49
+ "titleBar.inactiveBackground": "#59FFB499",
50
+ "titleBar.inactiveForeground": "#18181899"
51
+ }
52
+ }
File without changes
File without changes
File without changes
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hephaestus
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Garen Torikian
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2023-02-28 00:00:00.000000000 Z
11
+ date: 2023-03-01 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -113,6 +113,23 @@ files:
113
113
  - lib/hephaestus/generators/rubocop_generator.rb
114
114
  - lib/hephaestus/generators/sorbet_generator.rb
115
115
  - lib/hephaestus/version.rb
116
+ - templates/.env.test
117
+ - templates/.github/actions/license/action.yml
118
+ - templates/.github/actions/setup/action.yml
119
+ - templates/.github/actions/sisyphus/action.yml
120
+ - templates/.github/actions/sorbet/action.yml
121
+ - templates/.github/dependabot.yml
122
+ - templates/.github/workflows/automerge.yml
123
+ - templates/.github/workflows/licenses.yml
124
+ - templates/.github/workflows/lint.yml
125
+ - templates/.github/workflows/security.yml
126
+ - templates/.github/workflows/sorbet.yml
127
+ - templates/.github/workflows/test.yml
128
+ - templates/.licensed.yml
129
+ - templates/.rubocop.yml
130
+ - templates/.vscode/extensions.json
131
+ - templates/.vscode/launch.json
132
+ - templates/.vscode/settings.json
116
133
  - templates/Gemfile.erb
117
134
  - templates/Procfile.debug
118
135
  - templates/Procfile.dev
@@ -175,7 +192,10 @@ files:
175
192
  - templates/test/controllers/root_controller_test.rb
176
193
  - templates/test/controllers/settings_controller_test.rb
177
194
  - templates/test/controllers/yetto_controller_test.rb
195
+ - templates/test/fixtures/files/.keep
196
+ - templates/test/integration/.keep
178
197
  - templates/test/jobs/update_yetto_job_test.rb
198
+ - templates/test/mailers/.keep
179
199
  - templates/test/support/api.rb
180
200
  - templates/test/support/rails.rb
181
201
  - templates/test/support/webmocks.rb
@@ -198,9 +218,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
198
218
  version: 3.1.1
199
219
  required_rubygems_version: !ruby/object:Gem::Requirement
200
220
  requirements:
201
- - - "~>"
221
+ - - ">="
202
222
  - !ruby/object:Gem::Version
203
- version: '3.0'
223
+ version: 3.4.7
204
224
  requirements: []
205
225
  rubygems_version: 3.3.7
206
226
  signing_key: