Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
05ce69a
Support rails 7 +
mrmalvi Nov 10, 2025
5401ecb
Merge pull request #1 from mrmalvi/kp-support_rails_7_plus
mrmalvi Nov 10, 2025
1d78b0c
update use past defines
mrmalvi Nov 10, 2025
a2084dc
Merge pull request #2 from mrmalvi/kp-update_dummy_klass
mrmalvi Nov 10, 2025
3284ab0
more improve
mrmalvi Jan 13, 2026
be50201
Remove Rails 6 & 7 boolean fields section
mrmalvi Jan 15, 2026
1ae1d20
Update preference_definition.rb
mrmalvi Jan 15, 2026
614405d
Update boolean? method to use @type_caster
mrmalvi Jan 15, 2026
7d87f75
Update numerical? method to use @type_caster.type
mrmalvi Jan 15, 2026
1f80e1c
Refactor type casting to use @column instead of @type_caster
mrmalvi Jan 15, 2026
566f04e
Modify gem dependencies for compatibility for test
mrmalvi Jan 16, 2026
ed4f617
Update Rails gems to version 7.0.4
mrmalvi Jan 16, 2026
9673607
Update gemfile.lock for Rails 7.0.4
mrmalvi Jan 16, 2026
d76d8dc
Update Rails appraisal to version 7.0.4
mrmalvi Jan 16, 2026
080b4c2
test on 7.2
mrmalvi Jan 17, 2026
99a5c58
Change ActiveRecord to ActiveModel for String type
mrmalvi Jan 17, 2026
3c540cd
Modify default_value to use @column.cast
mrmalvi Jan 17, 2026
a241803
Add tests for boolean behavior and default values
mrmalvi Jan 17, 2026
d1f7557
Refactor preference_definition_spec by removing tests
mrmalvi Jan 17, 2026
e8d6137
Update boolean normalization tests for case sensitivity
mrmalvi Jan 17, 2026
f4ec95f
Refactor boolean default value and remove tests
mrmalvi Jan 17, 2026
6c447c8
Update preference_definition_spec.rb
mrmalvi Jan 17, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -25,3 +25,20 @@ appraise "rails-6" do
gem "activesupport", "6.0.0"
gem "activerecord", "6.0.0"
end

appraise "rails-7.0.4" do
gem "activesupport", "7.0.4"
gem "activerecord", "7.0.4"
end

appraise "rails-7.1" do
gem "activesupport", "7.1.0"
gem "activerecord", "7.1.0"
gem "sqlite3", "~> 1.4"
end

appraise "rails-7.2" do
gem "activesupport", "~> 7.2.0"
gem "activerecord", "~> 7.2.0"
gem "sqlite3", "~> 2.0"
end
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ Or install it yourself as:

preferences do

preference :taxable data_type: :boolean, required: true
preference :taxable data_type: :boolean, required: true, default: true
preference :vat_no required: false
preference :max_invoice_items data_type: :integer

Expand Down
8 changes: 8 additions & 0 deletions gemfiles/rails_7.0.4.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "7.0.4"
gem "activerecord", "7.0.4"

gemspec path: "../"
145 changes: 145 additions & 0 deletions gemfiles/rails_7.0.4.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
PATH
remote: ..
specs:
serial_preference (1.3.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (7.0.4)
actionview (= 7.0.4)
activesupport (= 7.0.4)
rack (~> 2.0, >= 2.2.0)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.0, >= 1.2.0)
actionview (7.0.4)
activesupport (= 7.0.4)
builder (~> 3.1)
erubi (~> 1.4)
rails-dom-testing (~> 2.0)
rails-html-sanitizer (~> 1.1, >= 1.2.0)
activemodel (7.0.4)
activesupport (= 7.0.4)
activerecord (7.0.4)
activemodel (= 7.0.4)
activesupport (= 7.0.4)
activesupport (7.0.4)
concurrent-ruby (~> 1.0, >= 1.0.2)
i18n (>= 1.6, < 2)
minitest (>= 5.1)
tzinfo (~> 2.0)
appraisal (2.4.1)
bundler
rake
thor (>= 0.14.0)
builder (3.2.4)
concurrent-ruby (1.1.10)
crass (1.0.6)
date (3.5.1)
debug (1.11.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.5.0)
erb (6.0.1)
erubi (1.12.0)
i18n (1.12.0)
concurrent-ruby (~> 1.0)
io-console (0.8.2)
irb (1.16.0)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
loofah (2.19.1)
crass (~> 1.0.2)
nokogiri (>= 1.5.9)
method_source (1.0.0)
minitest (5.17.0)
nokogiri (1.14.0-x86_64-darwin)
racc (~> 1.4)
nokogiri (1.14.0-x86_64-linux)
racc (~> 1.4)
pp (0.6.3)
prettyprint
prettyprint (0.2.0)
psych (5.3.1)
date
stringio
racc (1.6.2)
rack (2.2.6)
rack-test (2.0.2)
rack (>= 1.3)
rails-dom-testing (2.0.3)
activesupport (>= 4.2.0)
nokogiri (>= 1.6)
rails-html-sanitizer (1.4.4)
loofah (~> 2.19, >= 2.19.1)
railties (7.0.4)
actionpack (= 7.0.4)
activesupport (= 7.0.4)
method_source
rake (>= 12.2)
thor (~> 1.0)
zeitwerk (~> 2.5)
rake (13.0.6)
rdoc (7.1.0)
erb
psych (>= 4.0.0)
tsort
reline (0.6.3)
io-console (~> 0.5)
rspec (3.12.0)
rspec-core (~> 3.12.0)
rspec-expectations (~> 3.12.0)
rspec-mocks (~> 3.12.0)
rspec-core (3.12.0)
rspec-support (~> 3.12.0)
rspec-expectations (3.12.2)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-mocks (3.12.3)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.12.0)
rspec-rails (6.0.1)
actionpack (>= 6.1)
activesupport (>= 6.1)
railties (>= 6.1)
rspec-core (~> 3.11)
rspec-expectations (~> 3.11)
rspec-mocks (~> 3.11)
rspec-support (~> 3.11)
rspec-support (3.12.0)
shoulda (4.0.0)
shoulda-context (~> 2.0)
shoulda-matchers (~> 4.0)
shoulda-context (2.0.0)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
sqlite3 (1.6.0-x86_64-darwin)
sqlite3 (1.6.0-x86_64-linux)
stringio (3.2.0)
thor (1.2.1)
tsort (0.2.0)
tzinfo (2.0.5)
concurrent-ruby (~> 1.0)
zeitwerk (2.6.6)

PLATFORMS
x86_64-darwin-22
x86_64-linux

DEPENDENCIES
activerecord (= 7.0.4)
activesupport (= 7.0.4)
appraisal
debug
rspec (>= 3.0.0)
rspec-rails
serial_preference!
shoulda
sqlite3

BUNDLED WITH
2.4.3
9 changes: 9 additions & 0 deletions gemfiles/rails_7.1.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "7.1.0"
gem "activerecord", "7.1.0"
gem "sqlite3", "~> 1.4"

gemspec path: "../"
164 changes: 164 additions & 0 deletions gemfiles/rails_7.1.gemfile.lock
Original file line number Diff line number Diff line change
@@ -0,0 +1,164 @@
PATH
remote: ..
specs:
serial_preference (1.3.0)
activerecord (>= 3.0.0)
activesupport (>= 3.0.0)

GEM
remote: https://rubygems.org/
specs:
actionpack (7.1.0)
actionview (= 7.1.0)
activesupport (= 7.1.0)
nokogiri (>= 1.8.5)
rack (>= 2.2.4)
rack-session (>= 1.0.1)
rack-test (>= 0.6.3)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
actionview (7.1.0)
activesupport (= 7.1.0)
builder (~> 3.1)
erubi (~> 1.11)
rails-dom-testing (~> 2.2)
rails-html-sanitizer (~> 1.6)
activemodel (7.1.0)
activesupport (= 7.1.0)
activerecord (7.1.0)
activemodel (= 7.1.0)
activesupport (= 7.1.0)
timeout (>= 0.4.0)
activesupport (7.1.0)
base64
bigdecimal
concurrent-ruby (~> 1.0, >= 1.0.2)
connection_pool (>= 2.2.5)
drb
i18n (>= 1.6, < 2)
minitest (>= 5.1)
mutex_m
tzinfo (~> 2.0)
appraisal (2.5.0)
bundler
rake
thor (>= 0.14.0)
base64 (0.3.0)
bigdecimal (4.0.1)
builder (3.3.0)
concurrent-ruby (1.3.6)
connection_pool (3.0.2)
crass (1.0.6)
date (3.5.1)
debug (1.11.1)
irb (~> 1.10)
reline (>= 0.3.8)
diff-lcs (1.6.2)
drb (2.2.3)
erb (6.0.1)
erubi (1.13.1)
i18n (1.14.8)
concurrent-ruby (~> 1.0)
io-console (0.8.2)
irb (1.16.0)
pp (>= 0.6.0)
rdoc (>= 4.0.0)
reline (>= 0.4.2)
loofah (2.25.0)
crass (~> 1.0.2)
nokogiri (>= 1.12.0)
minitest (6.0.1)
prism (~> 1.5)
mutex_m (0.3.0)
nokogiri (1.19.0-x86_64-darwin)
racc (~> 1.4)
pp (0.6.3)
prettyprint
prettyprint (0.2.0)
prism (1.8.0)
psych (5.3.1)
date
stringio
racc (1.8.1)
rack (3.2.4)
rack-session (2.1.1)
base64 (>= 0.1.0)
rack (>= 3.0.0)
rack-test (2.2.0)
rack (>= 1.3)
rackup (2.3.1)
rack (>= 3)
rails-dom-testing (2.3.0)
activesupport (>= 5.0.0)
minitest
nokogiri (>= 1.6)
rails-html-sanitizer (1.6.2)
loofah (~> 2.21)
nokogiri (>= 1.15.7, != 1.16.7, != 1.16.6, != 1.16.5, != 1.16.4, != 1.16.3, != 1.16.2, != 1.16.1, != 1.16.0.rc1, != 1.16.0)
railties (7.1.0)
actionpack (= 7.1.0)
activesupport (= 7.1.0)
irb
rackup (>= 1.0.0)
rake (>= 12.2)
thor (~> 1.0, >= 1.2.2)
zeitwerk (~> 2.6)
rake (13.3.1)
rdoc (7.1.0)
erb
psych (>= 4.0.0)
tsort
reline (0.6.3)
io-console (~> 0.5)
rspec (3.13.2)
rspec-core (~> 3.13.0)
rspec-expectations (~> 3.13.0)
rspec-mocks (~> 3.13.0)
rspec-core (3.13.6)
rspec-support (~> 3.13.0)
rspec-expectations (3.13.5)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-mocks (3.13.7)
diff-lcs (>= 1.2.0, < 2.0)
rspec-support (~> 3.13.0)
rspec-rails (7.1.1)
actionpack (>= 7.0)
activesupport (>= 7.0)
railties (>= 7.0)
rspec-core (~> 3.13)
rspec-expectations (~> 3.13)
rspec-mocks (~> 3.13)
rspec-support (~> 3.13)
rspec-support (3.13.6)
shoulda (4.0.0)
shoulda-context (~> 2.0)
shoulda-matchers (~> 4.0)
shoulda-context (2.0.0)
shoulda-matchers (4.5.1)
activesupport (>= 4.2.0)
sqlite3 (1.6.0-x86_64-darwin)
stringio (3.2.0)
thor (1.5.0)
timeout (0.6.0)
tsort (0.2.0)
tzinfo (2.0.6)
concurrent-ruby (~> 1.0)
zeitwerk (2.7.4)

PLATFORMS
x86_64-darwin-22

DEPENDENCIES
activerecord (= 7.1.0)
activesupport (= 7.1.0)
appraisal
debug
rspec (>= 3.0.0)
rspec-rails
serial_preference!
shoulda
sqlite3 (~> 1.4)

BUNDLED WITH
2.3.26
9 changes: 9 additions & 0 deletions gemfiles/rails_7.2.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# This file was generated by Appraisal

source "https://rubygems.org"

gem "activesupport", "~> 7.2.0"
gem "activerecord", "~> 7.2.0"
gem "sqlite3", "~> 2.0"

gemspec path: "../"
Loading