-
-
Notifications
You must be signed in to change notification settings - Fork 0
1.0 & Modernization #4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
aa57618
Modernize to support rails 7 & 8, drop support for rails 4/5/6.
wkirby f71dfe9
Add new syntax for declaring typical_situation
wkirby 559e890
Extend functionality, format
wkirby 929d66a
Add lint job
wkirby 6c4d913
Add permission hooks and documentation
wkirby 69695c9
Update docs and specs with details about create/update params
wkirby 49f30bc
Add support fo helper rest and crud shortcuts
wkirby 0ffa923
Refactor how forbidden is handled
wkirby 69fdd0a
Update README
wkirby 26e161f
Fix bundler compatability for github actions
wkirby 8051d6d
Update README with clearer comment on typical situation syntax
wkirby 26d0934
Update homepage in gemspec
wkirby e8d763a
Add x86 linux to gemfile for running specs on github
wkirby 303ef33
Remove Gemfile.lock from git
wkirby 188c301
Remove support for 3.1
wkirby efd5b8f
Update ruby versions to match across standard and workflows
wkirby ddd8812
Run standard
wkirby File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,39 @@ | ||
| name: CI | ||
|
|
||
| on: [push, pull_request] | ||
|
|
||
| jobs: | ||
| lint: | ||
| runs-on: ubuntu-latest | ||
| name: Lint | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: Set up Ruby | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: 3.3 | ||
| bundler-cache: true | ||
| - name: Run Standard RB | ||
| run: bundle exec standardrb | ||
|
|
||
| build: | ||
| runs-on: ubuntu-latest | ||
| name: Ruby ${{ matrix.ruby }} - Rails ${{ matrix.rails }} | ||
| strategy: | ||
| matrix: | ||
| ruby: [3.2, 3.3, 3.4] | ||
| rails: [rails_7.0, rails_7.1, rails_8.0] | ||
| env: | ||
| RUBY_VERSION: ${{ matrix.ruby }} | ||
| RAILS_VERSION: ${{ matrix.rails }} | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
wkirby marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| - name: Set up Ruby ${{ matrix.ruby }} | ||
| uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: ${{ matrix.ruby }} | ||
| bundler-cache: true | ||
| - name: Install dependencies | ||
| run: bundle exec appraisal install | ||
| - name: Run specs | ||
| run: bundle exec appraisal ${{ matrix.rails }} rspec | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,36 @@ | ||
| name: Publish Gem | ||
|
|
||
| on: | ||
| release: | ||
| types: [published] | ||
|
|
||
| jobs: | ||
| build: | ||
| runs-on: ubuntu-latest | ||
|
|
||
| steps: | ||
| - uses: actions/checkout@v4 | ||
wkirby marked this conversation as resolved.
Show resolved
Hide resolved
|
||
| - uses: ruby/setup-ruby@v1 | ||
| with: | ||
| ruby-version: '3.1' | ||
wkirby marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| bundler-cache: true | ||
| - name: Release Gem | ||
| if: contains(github.ref, 'refs/tags/v') | ||
| env: | ||
| RUBYGEMS_API_KEY: ${{secrets.RUBYGEMS_API_KEY}} | ||
| TAG: ${{ github.event.release.tag_name }} | ||
| run: | | ||
| echo "Setting up gem credentials..." | ||
| mkdir -p ~/.gem | ||
|
|
||
| cat << EOF > ~/.gem/credentials | ||
| --- | ||
| :rubygems_api_key: ${RUBYGEMS_API_KEY} | ||
| EOF | ||
|
|
||
| chmod 0600 ~/.gem/credentials | ||
|
|
||
| bundle exec rake build | ||
|
|
||
| echo "Running gem release task..." | ||
| gem push pkg/typical_situation-${TAG#v}.gem | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -23,4 +23,6 @@ pickle-email-*.html | |
| .byebug_history | ||
| *.sqlite3 | ||
| *.sqlite | ||
| *.log | ||
| *.log | ||
|
|
||
| pkg/**/* | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,12 @@ | ||
| # Standard Ruby configuration | ||
| # https://github.com/testdouble/standard | ||
|
|
||
| ruby_version: 3.0 | ||
|
|
||
| ignore: | ||
| - 'spec/internal/**/*' | ||
| - 'pkg/**/*' | ||
| - 'vendor/**/*' | ||
| - 'tmp/**/*' | ||
|
|
||
| fix: true |
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,25 @@ | ||
| # frozen_string_literal: true | ||
|
|
||
| appraise 'rails-4.2' do | ||
| gem 'rails', '~> 4.2' | ||
| gem 'rails-forward_compatible_controller_tests', require: false | ||
| appraise "rails_7.0" do | ||
| gem "rails", "~> 7.0" | ||
| gem "rspec", "~> 3.12" | ||
| gem "rspec-rails", "~> 6.0" | ||
| gem "rails-controller-testing" | ||
| gem "sqlite3", "~> 1.4" | ||
| end | ||
|
|
||
| appraise 'rails-5.2' do | ||
| gem 'rails', '~> 5.2' | ||
| gem 'rails-controller-testing' | ||
| appraise "rails_7.1" do | ||
| gem "rails", "~> 7.1" | ||
| gem "rspec", "~> 3.12" | ||
| gem "rspec-rails", "~> 6.1" | ||
| gem "rails-controller-testing" | ||
| gem "sqlite3", "~> 1.4" | ||
| end | ||
|
|
||
| appraise 'rails-6.0' do | ||
| gem 'rails', '~> 6.0' | ||
| gem 'sqlite3', '~> 1.4' | ||
| gem 'rails-controller-testing' | ||
| gem 'rspec-rails', '4.0.0.beta3' | ||
| appraise "rails_8.0" do | ||
| gem "rails", "~> 8.0" | ||
| gem "rspec", "~> 3.13" | ||
| gem "rspec-rails", "~> 8.0" | ||
| gem "rails-controller-testing" | ||
| gem "sqlite3", "~> 2.1" | ||
| end |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.