11# PpSql
22
3- [ ![ Version ] [ rubygems_badge ]] [ rubygems ]
4- [ ![ Codacy Badge ] [ codacy_badge ]] [ codacy ]
5- [ ![ Reviewed by Hound ] [ hound_badge ]] [ hound ]
6- [ < img src =" https://api.gitsponsors.com/api/badge/img?id=78002099 " height =" 20 " > ] ( https://api.gitsponsors.com/api/badge/link?p=J9d+7zEGJS+BQMhX3FZDy2lWmzWp75oJZulj80NsvTrAkDEWcEC5PzkwUCDB/oqWGOfl1rwmFSi7crAJTxB6ww== )
3+ [ ![ Version] [ rubygems_badge ]] [ rubygems ]
4+ [ ![ Codacy Badge] [ codacy_badge ]] [ codacy ]
5+ [ ![ Reviewed by Hound] [ hound_badge ]] [ hound ]
6+ [ img src="https://api.gitsponsors.com/api/badge/img?id=78002099 " height="20"] ( https://api.gitsponsors.com/api/badge/link?p=J9d+7zEGJS+BQMhX3FZDy2lWmzWp75oJZulj80NsvTrAkDEWcEC5PzkwUCDB/oqWGOfl1rwmFSi7crAJTxB6ww== )
77
88Replace standard ` ActiveRecord#to_sql ` method with
99[ ` anbt-sql-formatter ` ] [ anbt-sql-formatter-link ]
@@ -22,21 +22,21 @@ Ruby 3.1+
2222
2323## Rails
2424
25- Rails 7.0 + (optional), will be injected automatically
25+ Rails / ActiveRecord 7.1 + (optional), will be injected automatically
2626
2727## Legacy
2828
2929You can use version ` ~> 0.2 ` of this gem with Ruby 2.2, 2.3 and/or Rails 4.0, 4.1
3030
3131## Usage
3232
33- ```
33+ ``` text
3434Post.first.to_sql
3535```
3636
3737for easy and clean usage with custom string you can use:
3838
39- ```
39+ ``` text
4040class MyAwesomeDecoratedString < String
4141 include PpSql::ToSqlBeautify
4242end
4646
4747add in Gemfile
4848
49- ```
49+ ``` text
5050gem 'pp_sql', group: :development
5151```
5252
@@ -73,7 +73,7 @@ in initializers.
7373
7474I found usefull this trick:
7575
76- ```
76+ ``` text
7777 class ApplicationRecord < ActiveRecord::Base
7878 include PpSql::ToSqlBeautify if defined?(Rails::Console)
7979
8787
8888## Contributing
8989
90- Running the tests requires sqlite. To run the tests for different combinations of dependency
91- versions, run ` bundle exec appraisal install ` followed by ` bundle exec appraisal rake ` .
90+ Running the tests requires sqlite.
91+
92+ To refresh the generated appraisal gemfiles:
93+
94+ ``` bash
95+ bundle exec appraisal generate
96+ ```
97+
98+ To run the maintained dependency matrix locally:
99+
100+ ``` bash
101+ bundle exec appraisal install
102+ bundle exec appraisal rake
103+ ```
104+
105+ GitHub Actions runs the Rails / ActiveRecord ` 7.1 ` , ` 7.2 ` , ` 8.0 ` , and ` 8.1 `
106+ matrix on Ruby ` 3.2 ` , ` 3.3 ` , and ` 3.4 ` .
92107
93108## License
94109
0 commit comments