prspec-ruby 0.1.1

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 ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: ec8a80834a51dd1a38ea44f0df3363d1f68490527c6363587506c79df78b352c
4
+ data.tar.gz: 04d436701dd6c8e969e126c95b7fcf2f7549a33fa19c09e09227601bd0738cc5
5
+ SHA512:
6
+ metadata.gz: 36e6dadf2de387cd269cfa3d4683a9260e015e553e0b876f37560a24b6d0b175a93517f9e56c87b794a16b6294789cda5991f76cd83ec7e09ccfd90dac7406e3
7
+ data.tar.gz: fa8a8eabb9722afb280a221226607ecf230275c69db5ab86be28593a2477553385c1107c52fb0dd1abbc367ae7013c78f1d7f1a9621149365869893bcc9ec9d4
@@ -0,0 +1,6 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler" # See documentation for possible values
4
+ directory: "/" # Location of package manifests
5
+ schedule:
6
+ interval: "weekly"
@@ -0,0 +1,23 @@
1
+ name-template: 'v$NEXT_PATCH_VERSION'
2
+ tag-template: 'v$NEXT_PATCH_VERSION'
3
+ template: |
4
+ ## Changes
5
+
6
+ $CHANGES
7
+
8
+ ## Contributors
9
+
10
+ $CONTRIBUTORS
11
+
12
+ categories:
13
+ - title: '🚀 Features'
14
+ labels:
15
+ - 'feat'
16
+ - title: '🐛 Fixes'
17
+ labels:
18
+ - 'fix'
19
+ - title: '🧰 Maintenance'
20
+ labels:
21
+ - 'chore'
22
+ change-template: '- $TITLE @$AUTHOR (#$NUMBER)'
23
+ no-changes-template: '- No changes'
@@ -0,0 +1,50 @@
1
+ name: Changelog
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ jobs:
9
+ changelog:
10
+ runs-on: ubuntu-latest
11
+
12
+ steps:
13
+ - name: Checkout Code
14
+ uses: actions/checkout@v3
15
+
16
+ - name: Extract version
17
+ id: version
18
+ run: |
19
+ version=$(grep -Eo "[0-9]+\.[0-9]+\.[0-9]+" lib/prspec/ruby/version.rb | head -n 1)
20
+ echo "version=v$version" >> $GITHUB_ENV
21
+ echo "VERSION_TAG=v$version" >> $GITHUB_ENV
22
+
23
+ - name: Check if version tag exists
24
+ id: check_tag
25
+ run: |
26
+ if gh release view "$VERSION_TAG" --json tagName > /dev/null 2>&1; then
27
+ echo "exists=true" >> $GITHUB_OUTPUT
28
+ else
29
+ echo "exists=false" >> $GITHUB_OUTPUT
30
+ fi
31
+ env:
32
+ GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
33
+
34
+ - name: Generate CHANGELOG with requarks/changelog-action
35
+ if: steps.check_tag.outputs.exists == 'true'
36
+ id: changelog
37
+ uses: requarks/changelog-action@v1
38
+ with:
39
+ token: ${{ secrets.GITHUB_TOKEN }}
40
+ tag: ${{ env.VERSION_TAG }}
41
+ writeToFile: true
42
+ changelogFilePath: CHANGELOG.md
43
+
44
+ - name: Draft release with release-drafter
45
+ if: steps.check_tag.outputs.exists == 'false'
46
+ uses: release-drafter/release-drafter@v5
47
+ with:
48
+ config-name: release-drafter.yml
49
+ env:
50
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
@@ -0,0 +1,92 @@
1
+ name: Ruby Gem
2
+
3
+ on:
4
+ push:
5
+ tags: [ 'v*' ]
6
+
7
+ jobs:
8
+ build:
9
+ name: Build + Publish
10
+ runs-on: ubuntu-latest
11
+ permissions:
12
+ contents: write
13
+ packages: write
14
+
15
+ steps:
16
+ - uses: actions/checkout@v3
17
+ with:
18
+ fetch-depth: 0
19
+
20
+ - name: Set up Ruby 3.4
21
+ uses: ruby/setup-ruby@v1
22
+ with:
23
+ ruby-version: 3.4.3
24
+
25
+ - name: Extract version
26
+ id: version
27
+ run: |
28
+ version=$(echo "${GITHUB_REF#refs/tags/}")
29
+ echo "version=$version" >> $GITHUB_ENV
30
+
31
+ - name: Check if a previous tag exists
32
+ id: previous_tag
33
+ run: |
34
+ if [ "$(git tag --list 'v*' | wc -l)" -gt 1 ]; then
35
+ echo "exists=true" >> $GITHUB_OUTPUT
36
+ else
37
+ echo "exists=false" >> $GITHUB_OUTPUT
38
+ fi
39
+
40
+ - name: Generate CHANGELOG
41
+ if: steps.previous_tag.outputs.exists == 'true'
42
+ id: changelog
43
+ uses: requarks/changelog-action@v1
44
+ with:
45
+ token: ${{ secrets.GITHUB_TOKEN }}
46
+ tag: ${{ env.version }}
47
+ writeToFile: true
48
+ changelogFilePath: CHANGELOG.md
49
+ includeRefIssues: true
50
+ useGitmojis: true
51
+
52
+ - name: Commit updated CHANGELOG.md
53
+ if: steps.previous_tag.outputs.exists == 'true'
54
+ run: |
55
+ git config user.name "github-actions"
56
+ git config user.email "github-actions@github.com"
57
+ git add CHANGELOG.md
58
+ git commit -m "docs: update CHANGELOG for ${{ env.version }}" || echo "No changes to commit"
59
+ git push origin HEAD:main
60
+ continue-on-error: true
61
+
62
+ - name: Update GitHub Release
63
+ uses: ncipollo/release-action@v1
64
+ with:
65
+ allowUpdates: true
66
+ tag: ${{ env.version }}
67
+ name: ${{ env.version }}
68
+ body: ${{ steps.changelog.outputs.changes }}
69
+ token: ${{ secrets.GITHUB_TOKEN }}
70
+
71
+ - name: Publish to GPR
72
+ run: |
73
+ mkdir -p $HOME/.gem
74
+ touch $HOME/.gem/credentials
75
+ chmod 0600 $HOME/.gem/credentials
76
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
77
+ gem build *.gemspec
78
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
79
+ env:
80
+ GEM_HOST_API_KEY: "Bearer ${{ secrets.GITHUB_TOKEN }}"
81
+ OWNER: ${{ github.repository_owner }}
82
+
83
+ - name: Publish to RubyGems
84
+ run: |
85
+ mkdir -p $HOME/.gem
86
+ touch $HOME/.gem/credentials
87
+ chmod 0600 $HOME/.gem/credentials
88
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
89
+ gem build *.gemspec
90
+ gem push *.gem
91
+ env:
92
+ GEM_HOST_API_KEY: "${{ secrets.RUBYGEMS_AUTH_TOKEN }}"
@@ -0,0 +1,28 @@
1
+ name: Ruby
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+
8
+ pull_request:
9
+
10
+ jobs:
11
+ build:
12
+ runs-on: ubuntu-latest
13
+ name: Ruby ${{ matrix.ruby }}
14
+ strategy:
15
+ matrix:
16
+ ruby:
17
+ - '3.4'
18
+
19
+ steps:
20
+ - uses: actions/checkout@v3
21
+ - name: Set up Ruby
22
+ uses: ruby/setup-ruby@v1
23
+ with:
24
+ ruby-version: ${{ matrix.ruby }}
25
+ - run: bundle config set frozen false
26
+ - run: bundle install
27
+ - name: Run the rspec.
28
+ run: bundle exec rspec
@@ -0,0 +1,8 @@
1
+ repos:
2
+ - repo: local
3
+ hooks:
4
+ - id: betterleaks
5
+ name: betterleaks
6
+ entry: betterleaks
7
+ language: system
8
+ pass_filenames: false
data/CHANGELOG.md ADDED
@@ -0,0 +1,11 @@
1
+ ## [v0.1.1] - 2026-06-19
2
+ ### :bug: Bug Fixes
3
+ - [`f1a4b71`](https://github.com/slidict/prspec-ruby/commit/f1a4b7160566a297bdb73926e82a9c4172df487b) - skip CHANGELOG generation on first release, bump patch version *(commit by [@abechan1](https://github.com/abechan1))*
4
+
5
+
6
+ ## [Unreleased]
7
+
8
+ ## [0.1.0] - 2026-06-19
9
+
10
+ - Initial release
11
+ [v0.1.1]: https://github.com/slidict/prspec-ruby/compare/v0.1.0...v0.1.1
@@ -0,0 +1,10 @@
1
+ # Code of Conduct
2
+
3
+ "prspec-ruby" follows [The Ruby Community Conduct Guideline](https://www.ruby-lang.org/en/conduct) in all "collaborative space", which is defined as community communications channels (such as mailing lists, submitted patches, commit comments, etc.):
4
+
5
+ * Participants will be tolerant of opposing views.
6
+ * Participants must ensure that their language and actions are free of personal attacks and disparaging personal remarks.
7
+ * When interpreting the words and actions of others, participants should always assume good intentions.
8
+ * Behaviour which can be reasonably considered harassment will not be tolerated.
9
+
10
+ If you have any concerns about behaviour within this project, please contact us at ["255824173+abechan1@users.noreply.github.com"](mailto:"255824173+abechan1@users.noreply.github.com").
data/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 slidict
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2026 Yusuke Abe
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,42 @@
1
+ # Prspec::Ruby
2
+
3
+ AI-powered test review for Rails pull requests. prspec finds missing specs, risky Rails
4
+ changes, and weak test coverage in your pull requests before they get merged.
5
+
6
+ See [prspec.io](https://prspec.io) for more details.
7
+
8
+ ## Installation
9
+
10
+ Not yet released on RubyGems.org. Install from git in the meantime:
11
+
12
+ ```bash
13
+ bundle add prspec-ruby --git https://github.com/slidict/prspec-ruby.git
14
+ ```
15
+
16
+ Once released, you'll be able to install it with:
17
+
18
+ ```bash
19
+ gem install prspec-ruby
20
+ ```
21
+
22
+ ## Usage
23
+
24
+ TODO: Write usage instructions here
25
+
26
+ ## Development
27
+
28
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
29
+
30
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
31
+
32
+ ## Contributing
33
+
34
+ Bug reports and pull requests are welcome on GitHub at https://github.com/slidict/prspec-ruby. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [code of conduct](https://github.com/slidict/prspec-ruby/blob/prspec-ruby/CODE_OF_CONDUCT.md).
35
+
36
+ ## License
37
+
38
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
39
+
40
+ ## Code of Conduct
41
+
42
+ Everyone interacting in the Prspec::Ruby project's codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/slidict/prspec-ruby/blob/prspec-ruby/CODE_OF_CONDUCT.md).
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/exe/prspec-ruby ADDED
@@ -0,0 +1,3 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "prspec/ruby"
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Prspec
4
+ module Ruby
5
+ VERSION = "0.1.1"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "ruby/version"
4
+
5
+ module Prspec
6
+ module Ruby
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
10
+ end
@@ -0,0 +1,6 @@
1
+ module Prspec
2
+ module Ruby
3
+ VERSION: String
4
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
5
+ end
6
+ end
metadata ADDED
@@ -0,0 +1,61 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: prspec-ruby
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Yusuke Abe
8
+ bindir: exe
9
+ cert_chain: []
10
+ date: 1980-01-02 00:00:00.000000000 Z
11
+ dependencies: []
12
+ description: prspec finds missing specs, risky Rails changes, and weak test coverage
13
+ in your pull requests before they get merged.
14
+ email:
15
+ - 255824173+abechan1@users.noreply.github.com
16
+ executables:
17
+ - prspec-ruby
18
+ extensions: []
19
+ extra_rdoc_files: []
20
+ files:
21
+ - ".github/dependabot.yml"
22
+ - ".github/release-drafter.yml"
23
+ - ".github/workflows/changelog.yml"
24
+ - ".github/workflows/gem-push.yml"
25
+ - ".github/workflows/main.yml"
26
+ - ".pre-commit-config.yaml"
27
+ - CHANGELOG.md
28
+ - CODE_OF_CONDUCT.md
29
+ - LICENSE
30
+ - LICENSE.txt
31
+ - README.md
32
+ - Rakefile
33
+ - exe/prspec-ruby
34
+ - lib/prspec/ruby.rb
35
+ - lib/prspec/ruby/version.rb
36
+ - sig/prspec/ruby.rbs
37
+ homepage: https://prspec.io
38
+ licenses:
39
+ - MIT
40
+ metadata:
41
+ homepage_uri: https://prspec.io
42
+ source_code_uri: https://github.com/slidict/prspec-ruby
43
+ changelog_uri: https://github.com/slidict/prspec-ruby/blob/main/CHANGELOG.md
44
+ rdoc_options: []
45
+ require_paths:
46
+ - lib
47
+ required_ruby_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: 3.2.0
52
+ required_rubygems_version: !ruby/object:Gem::Requirement
53
+ requirements:
54
+ - - ">="
55
+ - !ruby/object:Gem::Version
56
+ version: '0'
57
+ requirements: []
58
+ rubygems_version: 3.6.7
59
+ specification_version: 4
60
+ summary: AI-powered test review for Rails pull requests.
61
+ test_files: []