diff --git a/Appraisals b/Appraisals index d588d6d..5f07c7e 100644 --- a/Appraisals +++ b/Appraisals @@ -1,19 +1,39 @@ -appraise "4.0" do - gem "rails", "~> 4.0.12" -end - -appraise "4.1" do - gem "rails", "~> 4.1.8" -end - +# appraise "4.0" do +# gem "rails", "~> 4.0.12" +# gem 'sqlite3', '~> 1.3.6', :platforms => [:ruby] +# gem "pg", "~> 0.11" +# gem 'bigdecimal', '1.3.5' +# end +# +# appraise "4.1" do +# gem "rails", "~> 4.1.8" +# gem 'sqlite3', '~> 1.3.6', :platforms => [:ruby] +# gem "pg", "~> 0.11" +# gem 'bigdecimal', '1.3.5' +# end +# appraise "4.2" do gem "rails", "~> 4.2.0" + gem 'sqlite3', '~> 1.3.6', :platforms => [:ruby] + gem "pg", "~> 0.11" + gem 'bigdecimal', '1.3.5' end appraise "5.2" do gem "rails", "~> 5.2.0" + gem 'sqlite3', '~> 1.3.6', :platforms => [:ruby] + gem "pg", "~> 0.11" + gem 'bigdecimal', '1.3.5' end appraise "6.0" do gem "rails", "~> 6.0.2" + gem "sqlite3", "~> 1.4" + gem "pg", "~> 0.11" +end + +appraise "7.0" do + gem "rails", "7.0.3" + gem "sqlite3", "~> 1.4" + gem "pg", "~> 1.1" end diff --git a/Gemfile b/Gemfile index 2a638bd..7e5ed64 100644 --- a/Gemfile +++ b/Gemfile @@ -3,6 +3,5 @@ source "http://rubygems.org" gem 'rubysl', '~> 2.0', :platforms => [:rbx] gem 'activerecord-jdbcsqlite3-adapter', :platforms => [:jruby] -gem 'sqlite3', '~> 1.3.6', :platforms => [:ruby] gemspec diff --git a/Gemfile.lock b/Gemfile.lock index 7cfa2ab..21bf554 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -1,48 +1,47 @@ PATH remote: . specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) GEM remote: http://rubygems.org/ specs: - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) - activerecord (6.0.2.1) - activemodel (= 6.0.2.1) - activesupport (= 6.0.2.1) - activesupport (6.0.2.1) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activesupport (7.0.3) concurrent-ruby (~> 1.0, >= 1.0.2) - i18n (>= 0.7, < 2) - minitest (~> 5.1) - tzinfo (~> 1.1) - zeitwerk (~> 2.2) - appraisal (2.2.0) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) - concurrent-ruby (1.1.5) - diff-lcs (1.3) + concurrent-ruby (1.1.10) + diff-lcs (1.5.0) ffi2-generators (0.1.1) - i18n (1.8.2) + i18n (1.10.0) concurrent-ruby (~> 1.0) - minitest (5.14.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + minitest (5.15.0) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -150,7 +149,7 @@ GEM rubysl-curses (2.0.1) rubysl-date (2.0.9) rubysl-delegate (2.0.1) - rubysl-digest (2.0.8) + rubysl-digest (2.1) rubysl-drb (2.0.1) rubysl-e2mmap (2.0.0) rubysl-english (2.0.0) @@ -200,7 +199,7 @@ GEM rubysl-observer (2.0.0) rubysl-open-uri (2.0.0) rubysl-open3 (2.0.0) - rubysl-openssl (2.10) + rubysl-openssl (2.13) rubysl-optparse (2.0.1) rubysl-shellwords (~> 2.0) rubysl-ostruct (2.1.0) @@ -245,12 +244,10 @@ GEM rubysl-xmlrpc (2.0.0) rubysl-yaml (2.1.0) rubysl-zlib (2.0.1) - sqlite3 (1.3.13) - thor (0.20.3) - thread_safe (0.3.6) - tzinfo (1.2.6) - thread_safe (~> 0.1) - zeitwerk (2.2.2) + sqlite3 (1.4.2) + thor (1.2.1) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) PLATFORMS ruby @@ -262,7 +259,7 @@ DEPENDENCIES rake (~> 13.0.1) rspec (>= 3.8.0) rubysl (~> 2.0) - sqlite3 (~> 1.3.6) + sqlite3 (>= 1.3.6) BUNDLED WITH 1.17.3 diff --git a/gemfiles/4.0.gemfile b/gemfiles/4.0.gemfile index 7809fc5..564c19d 100644 --- a/gemfiles/4.0.gemfile +++ b/gemfiles/4.0.gemfile @@ -5,6 +5,8 @@ source "http://rubygems.org" gem "rubysl", "~> 2.0", platforms: [:rbx] gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] gem "sqlite3", "~> 1.3.6", platforms: [:ruby] +gem "pg", "~> 0.11" +gem "bigdecimal", "1.3.5" gem "rails", "~> 4.0.12" gemspec path: "../" diff --git a/gemfiles/4.0.gemfile.lock b/gemfiles/4.0.gemfile.lock index a887bca..3c29a15 100644 --- a/gemfiles/4.0.gemfile.lock +++ b/gemfiles/4.0.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) @@ -32,23 +32,25 @@ GEM multi_json (~> 1.3) thread_safe (~> 0.1) tzinfo (~> 0.3.37) - appraisal (2.2.0) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) arel (4.0.2) + bigdecimal (1.3.5) builder (3.1.4) - concurrent-ruby (1.1.4) - diff-lcs (1.3) + concurrent-ruby (1.1.10) + diff-lcs (1.5.0) erubis (2.7.0) ffi2-generators (0.1.1) i18n (0.9.5) concurrent-ruby (~> 1.0) mail (2.7.1) mini_mime (>= 0.1.1) - mini_mime (1.0.1) + mini_mime (1.1.2) minitest (4.7.5) - multi_json (1.13.1) + multi_json (1.15.0) + pg (0.21.0) rack (1.5.5) rack-test (0.6.3) rack (>= 1.0) @@ -65,20 +67,20 @@ GEM activesupport (= 4.0.13) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -186,7 +188,7 @@ GEM rubysl-curses (2.0.1) rubysl-date (2.0.9) rubysl-delegate (2.0.1) - rubysl-digest (2.0.8) + rubysl-digest (2.1) rubysl-drb (2.0.1) rubysl-e2mmap (2.0.0) rubysl-english (2.0.0) @@ -236,7 +238,7 @@ GEM rubysl-observer (2.0.0) rubysl-open-uri (2.0.0) rubysl-open3 (2.0.0) - rubysl-openssl (2.10) + rubysl-openssl (2.13) rubysl-optparse (2.0.1) rubysl-shellwords (~> 2.0) rubysl-ostruct (2.1.0) @@ -289,9 +291,9 @@ GEM activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) sqlite3 (1.3.13) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) - tzinfo (0.3.55) + tzinfo (0.3.60) PLATFORMS ruby @@ -299,7 +301,9 @@ PLATFORMS DEPENDENCIES activerecord-jdbcsqlite3-adapter appraisal (>= 1.0.2) + bigdecimal (= 1.3.5) nilify_blanks! + pg (~> 0.11) rails (~> 4.0.12) rake (~> 13.0.1) rspec (>= 3.8.0) diff --git a/gemfiles/4.1.gemfile b/gemfiles/4.1.gemfile index 32bc447..a837962 100644 --- a/gemfiles/4.1.gemfile +++ b/gemfiles/4.1.gemfile @@ -5,6 +5,8 @@ source "http://rubygems.org" gem "rubysl", "~> 2.0", platforms: [:rbx] gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] gem "sqlite3", "~> 1.3.6", platforms: [:ruby] +gem "pg", "~> 0.11" +gem "bigdecimal", "1.3.5" gem "rails", "~> 4.1.8" gemspec path: "../" diff --git a/gemfiles/4.1.gemfile.lock b/gemfiles/4.1.gemfile.lock index dab6956..b2107e0 100644 --- a/gemfiles/4.1.gemfile.lock +++ b/gemfiles/4.1.gemfile.lock @@ -1,7 +1,7 @@ PATH remote: .. specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) @@ -34,14 +34,15 @@ GEM minitest (~> 5.1) thread_safe (~> 0.1) tzinfo (~> 1.1) - appraisal (2.2.0) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) arel (5.0.1.20140414130214) - builder (3.2.3) - concurrent-ruby (1.1.4) - diff-lcs (1.3) + bigdecimal (1.3.5) + builder (3.2.4) + concurrent-ruby (1.1.10) + diff-lcs (1.5.0) erubis (2.7.0) ffi2-generators (0.1.1) i18n (0.9.5) @@ -49,8 +50,9 @@ GEM json (1.8.6) mail (2.7.1) mini_mime (>= 0.1.1) - mini_mime (1.0.1) - minitest (5.11.3) + mini_mime (1.1.2) + minitest (5.15.0) + pg (0.21.0) rack (1.5.5) rack-test (0.6.3) rack (>= 1.0) @@ -69,20 +71,20 @@ GEM activesupport (= 4.1.16) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -190,7 +192,7 @@ GEM rubysl-curses (2.0.1) rubysl-date (2.0.9) rubysl-delegate (2.0.1) - rubysl-digest (2.0.8) + rubysl-digest (2.1) rubysl-drb (2.0.1) rubysl-e2mmap (2.0.0) rubysl-english (2.0.0) @@ -240,7 +242,7 @@ GEM rubysl-observer (2.0.0) rubysl-open-uri (2.0.0) rubysl-open3 (2.0.0) - rubysl-openssl (2.10) + rubysl-openssl (2.13) rubysl-optparse (2.0.1) rubysl-shellwords (~> 2.0) rubysl-ostruct (2.1.0) @@ -293,9 +295,9 @@ GEM activesupport (>= 3.0) sprockets (>= 2.8, < 4.0) sqlite3 (1.3.13) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) PLATFORMS @@ -304,7 +306,9 @@ PLATFORMS DEPENDENCIES activerecord-jdbcsqlite3-adapter appraisal (>= 1.0.2) + bigdecimal (= 1.3.5) nilify_blanks! + pg (~> 0.11) rails (~> 4.1.8) rake (~> 13.0.1) rspec (>= 3.8.0) diff --git a/gemfiles/4.2.gemfile b/gemfiles/4.2.gemfile index 6157797..409d586 100644 --- a/gemfiles/4.2.gemfile +++ b/gemfiles/4.2.gemfile @@ -4,7 +4,9 @@ source "http://rubygems.org" gem "rubysl", "~> 2.0", platforms: [:rbx] gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] -gem "sqlite3", "~> 1.3.6", platforms: [:ruby] gem "rails", "~> 4.2.0" +gem "sqlite3", "~> 1.3.6", platforms: [:ruby] +gem "pg", "~> 0.11" +gem "bigdecimal", "1.3.5" gemspec path: "../" diff --git a/gemfiles/4.2.gemfile.lock b/gemfiles/4.2.gemfile.lock index 1f962bd..7a5c996 100644 --- a/gemfiles/4.2.gemfile.lock +++ b/gemfiles/4.2.gemfile.lock @@ -1,113 +1,117 @@ PATH remote: .. specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) GEM remote: http://rubygems.org/ specs: - actionmailer (4.2.11) - actionpack (= 4.2.11) - actionview (= 4.2.11) - activejob (= 4.2.11) + actionmailer (4.2.11.3) + actionpack (= 4.2.11.3) + actionview (= 4.2.11.3) + activejob (= 4.2.11.3) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 1.0, >= 1.0.5) - actionpack (4.2.11) - actionview (= 4.2.11) - activesupport (= 4.2.11) + actionpack (4.2.11.3) + actionview (= 4.2.11.3) + activesupport (= 4.2.11.3) rack (~> 1.6) rack-test (~> 0.6.2) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (4.2.11) - activesupport (= 4.2.11) + actionview (4.2.11.3) + activesupport (= 4.2.11.3) builder (~> 3.1) erubis (~> 2.7.0) rails-dom-testing (~> 1.0, >= 1.0.5) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (4.2.11) - activesupport (= 4.2.11) + activejob (4.2.11.3) + activesupport (= 4.2.11.3) globalid (>= 0.3.0) - activemodel (4.2.11) - activesupport (= 4.2.11) + activemodel (4.2.11.3) + activesupport (= 4.2.11.3) builder (~> 3.1) - activerecord (4.2.11) - activemodel (= 4.2.11) - activesupport (= 4.2.11) + activerecord (4.2.11.3) + activemodel (= 4.2.11.3) + activesupport (= 4.2.11.3) arel (~> 6.0) - activesupport (4.2.11) + activesupport (4.2.11.3) i18n (~> 0.7) minitest (~> 5.1) thread_safe (~> 0.3, >= 0.3.4) tzinfo (~> 1.1) - appraisal (2.2.0) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) arel (6.0.4) - builder (3.2.3) - concurrent-ruby (1.1.4) - crass (1.0.4) - diff-lcs (1.3) + bigdecimal (1.3.5) + builder (3.2.4) + concurrent-ruby (1.1.10) + crass (1.0.6) + diff-lcs (1.5.0) erubis (2.7.0) ffi2-generators (0.1.1) globalid (0.4.2) activesupport (>= 4.2.0) i18n (0.9.5) concurrent-ruby (~> 1.0) - loofah (2.2.3) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - mini_mime (1.0.1) - mini_portile2 (2.4.0) - minitest (5.11.3) - nokogiri (1.10.1) - mini_portile2 (~> 2.4.0) - rack (1.6.11) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + nokogiri (1.13.6) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + pg (0.21.0) + racc (1.6.0) + rack (1.6.13) rack-test (0.6.3) rack (>= 1.0) - rails (4.2.11) - actionmailer (= 4.2.11) - actionpack (= 4.2.11) - actionview (= 4.2.11) - activejob (= 4.2.11) - activemodel (= 4.2.11) - activerecord (= 4.2.11) - activesupport (= 4.2.11) + rails (4.2.11.3) + actionmailer (= 4.2.11.3) + actionpack (= 4.2.11.3) + actionview (= 4.2.11.3) + activejob (= 4.2.11.3) + activemodel (= 4.2.11.3) + activerecord (= 4.2.11.3) + activesupport (= 4.2.11.3) bundler (>= 1.3.0, < 2.0) - railties (= 4.2.11) + railties (= 4.2.11.3) sprockets-rails - rails-deprecated_sanitizer (1.0.3) + rails-deprecated_sanitizer (1.0.4) activesupport (>= 4.2.0.alpha) rails-dom-testing (1.0.9) activesupport (>= 4.2.0, < 5.0) nokogiri (~> 1.6) rails-deprecated_sanitizer (>= 1.0.1) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (4.2.11) - actionpack (= 4.2.11) - activesupport (= 4.2.11) + rails-html-sanitizer (1.4.3) + loofah (~> 2.3) + railties (4.2.11.3) + actionpack (= 4.2.11.3) + activesupport (= 4.2.11.3) rake (>= 0.8.7) thor (>= 0.18.1, < 2.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -215,7 +219,7 @@ GEM rubysl-curses (2.0.1) rubysl-date (2.0.9) rubysl-delegate (2.0.1) - rubysl-digest (2.0.8) + rubysl-digest (2.1) rubysl-drb (2.0.1) rubysl-e2mmap (2.0.0) rubysl-english (2.0.0) @@ -265,7 +269,7 @@ GEM rubysl-observer (2.0.0) rubysl-open-uri (2.0.0) rubysl-open3 (2.0.0) - rubysl-openssl (2.10) + rubysl-openssl (2.13) rubysl-optparse (2.0.1) rubysl-shellwords (~> 2.0) rubysl-ostruct (2.1.0) @@ -310,17 +314,17 @@ GEM rubysl-xmlrpc (2.0.0) rubysl-yaml (2.1.0) rubysl-zlib (2.0.1) - sprockets (3.7.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) + sprockets-rails (3.2.2) actionpack (>= 4.0) activesupport (>= 4.0) sprockets (>= 3.0.0) sqlite3 (1.3.13) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) PLATFORMS @@ -329,7 +333,9 @@ PLATFORMS DEPENDENCIES activerecord-jdbcsqlite3-adapter appraisal (>= 1.0.2) + bigdecimal (= 1.3.5) nilify_blanks! + pg (~> 0.11) rails (~> 4.2.0) rake (~> 13.0.1) rspec (>= 3.8.0) diff --git a/gemfiles/5.2.gemfile b/gemfiles/5.2.gemfile index 4159e93..27c6f61 100644 --- a/gemfiles/5.2.gemfile +++ b/gemfiles/5.2.gemfile @@ -4,7 +4,9 @@ source "http://rubygems.org" gem "rubysl", "~> 2.0", platforms: [:rbx] gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] -gem "sqlite3", "~> 1.3.6", platforms: [:ruby] gem "rails", "~> 5.2.0" +gem "sqlite3", "~> 1.3.6", platforms: [:ruby] +gem "pg", "~> 0.11" +gem "bigdecimal", "1.3.5" gemspec path: "../" diff --git a/gemfiles/5.2.gemfile.lock b/gemfiles/5.2.gemfile.lock index ea1ba49..38f848c 100644 --- a/gemfiles/5.2.gemfile.lock +++ b/gemfiles/5.2.gemfile.lock @@ -1,125 +1,127 @@ PATH remote: .. specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) GEM remote: http://rubygems.org/ specs: - actioncable (5.2.2) - actionpack (= 5.2.2) + actioncable (5.2.8) + actionpack (= 5.2.8) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailer (5.2.2) - actionpack (= 5.2.2) - actionview (= 5.2.2) - activejob (= 5.2.2) + actionmailer (5.2.8) + actionpack (= 5.2.8) + actionview (= 5.2.8) + activejob (= 5.2.8) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (5.2.2) - actionview (= 5.2.2) - activesupport (= 5.2.2) - rack (~> 2.0) + actionpack (5.2.8) + actionview (= 5.2.8) + activesupport (= 5.2.8) + rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.2) - actionview (5.2.2) - activesupport (= 5.2.2) + actionview (5.2.8) + activesupport (= 5.2.8) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.0.3) - activejob (5.2.2) - activesupport (= 5.2.2) + activejob (5.2.8) + activesupport (= 5.2.8) globalid (>= 0.3.6) - activemodel (5.2.2) - activesupport (= 5.2.2) - activerecord (5.2.2) - activemodel (= 5.2.2) - activesupport (= 5.2.2) + activemodel (5.2.8) + activesupport (= 5.2.8) + activerecord (5.2.8) + activemodel (= 5.2.8) + activesupport (= 5.2.8) arel (>= 9.0) - activestorage (5.2.2) - actionpack (= 5.2.2) - activerecord (= 5.2.2) - marcel (~> 0.3.1) - activesupport (5.2.2) + activestorage (5.2.8) + actionpack (= 5.2.8) + activerecord (= 5.2.8) + marcel (~> 1.0.0) + activesupport (5.2.8) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - appraisal (2.2.0) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) arel (9.0.0) - builder (3.2.3) - concurrent-ruby (1.1.4) - crass (1.0.4) - diff-lcs (1.3) - erubi (1.8.0) + bigdecimal (1.3.5) + builder (3.2.4) + concurrent-ruby (1.1.10) + crass (1.0.6) + diff-lcs (1.5.0) + erubi (1.10.0) ffi2-generators (0.1.1) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.5.3) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.2.3) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - method_source (0.9.2) - mimemagic (0.3.3) - mini_mime (1.0.1) - mini_portile2 (2.4.0) - minitest (5.11.3) - nio4r (2.3.1) - nokogiri (1.10.1) - mini_portile2 (~> 2.4.0) - rack (2.0.6) + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + nio4r (2.5.8) + nokogiri (1.13.6) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + pg (0.21.0) + racc (1.6.0) + rack (2.2.3.1) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (5.2.2) - actioncable (= 5.2.2) - actionmailer (= 5.2.2) - actionpack (= 5.2.2) - actionview (= 5.2.2) - activejob (= 5.2.2) - activemodel (= 5.2.2) - activerecord (= 5.2.2) - activestorage (= 5.2.2) - activesupport (= 5.2.2) + rails (5.2.8) + actioncable (= 5.2.8) + actionmailer (= 5.2.8) + actionpack (= 5.2.8) + actionview (= 5.2.8) + activejob (= 5.2.8) + activemodel (= 5.2.8) + activerecord (= 5.2.8) + activestorage (= 5.2.8) + activesupport (= 5.2.8) bundler (>= 1.3.0) - railties (= 5.2.2) + railties (= 5.2.8) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.0.4) - loofah (~> 2.2, >= 2.2.2) - railties (5.2.2) - actionpack (= 5.2.2) - activesupport (= 5.2.2) + rails-html-sanitizer (1.4.3) + loofah (~> 2.3) + railties (5.2.8) + actionpack (= 5.2.8) + activesupport (= 5.2.8) method_source rake (>= 0.8.7) thor (>= 0.19.0, < 2.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -227,7 +229,7 @@ GEM rubysl-curses (2.0.1) rubysl-date (2.0.9) rubysl-delegate (2.0.1) - rubysl-digest (2.0.8) + rubysl-digest (2.1) rubysl-drb (2.0.1) rubysl-e2mmap (2.0.0) rubysl-english (2.0.0) @@ -277,7 +279,7 @@ GEM rubysl-observer (2.0.0) rubysl-open-uri (2.0.0) rubysl-open3 (2.0.0) - rubysl-openssl (2.10) + rubysl-openssl (2.13) rubysl-optparse (2.0.1) rubysl-shellwords (~> 2.0) rubysl-ostruct (2.1.0) @@ -322,21 +324,21 @@ GEM rubysl-xmlrpc (2.0.0) rubysl-yaml (2.1.0) rubysl-zlib (2.0.1) - sprockets (3.7.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.3.13) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) - tzinfo (1.2.5) + tzinfo (1.2.9) thread_safe (~> 0.1) - websocket-driver (0.7.0) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.3) + websocket-extensions (0.1.5) PLATFORMS ruby @@ -344,7 +346,9 @@ PLATFORMS DEPENDENCIES activerecord-jdbcsqlite3-adapter appraisal (>= 1.0.2) + bigdecimal (= 1.3.5) nilify_blanks! + pg (~> 0.11) rails (~> 5.2.0) rake (~> 13.0.1) rspec (>= 3.8.0) diff --git a/gemfiles/6.0.gemfile b/gemfiles/6.0.gemfile index 5cc0e71..c1ae253 100644 --- a/gemfiles/6.0.gemfile +++ b/gemfiles/6.0.gemfile @@ -4,7 +4,8 @@ source "http://rubygems.org" gem "rubysl", "~> 2.0", platforms: [:rbx] gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] -gem "sqlite3", "~> 1.4.2", platforms: [:ruby] gem "rails", "~> 6.0.2" +gem "sqlite3", "~> 1.4" +gem "pg", "~> 0.11" gemspec path: "../" diff --git a/gemfiles/6.0.gemfile.lock b/gemfiles/6.0.gemfile.lock index 59d7f36..af6ed50 100644 --- a/gemfiles/6.0.gemfile.lock +++ b/gemfiles/6.0.gemfile.lock @@ -1,140 +1,141 @@ PATH remote: .. specs: - nilify_blanks (1.3.0) + nilify_blanks (1.4.0) activerecord (>= 4.0.0) activesupport (>= 4.0.0) GEM remote: http://rubygems.org/ specs: - actioncable (6.0.2.1) - actionpack (= 6.0.2.1) + actioncable (6.0.5) + actionpack (= 6.0.5) nio4r (~> 2.0) websocket-driver (>= 0.6.1) - actionmailbox (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionmailbox (6.0.5) + actionpack (= 6.0.5) + activejob (= 6.0.5) + activerecord (= 6.0.5) + activestorage (= 6.0.5) + activesupport (= 6.0.5) mail (>= 2.7.1) - actionmailer (6.0.2.1) - actionpack (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) + actionmailer (6.0.5) + actionpack (= 6.0.5) + actionview (= 6.0.5) + activejob (= 6.0.5) mail (~> 2.5, >= 2.5.4) rails-dom-testing (~> 2.0) - actionpack (6.0.2.1) - actionview (= 6.0.2.1) - activesupport (= 6.0.2.1) + actionpack (6.0.5) + actionview (= 6.0.5) + activesupport (= 6.0.5) rack (~> 2.0, >= 2.0.8) rack-test (>= 0.6.3) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.0, >= 1.2.0) - actiontext (6.0.2.1) - actionpack (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + actiontext (6.0.5) + actionpack (= 6.0.5) + activerecord (= 6.0.5) + activestorage (= 6.0.5) + activesupport (= 6.0.5) nokogiri (>= 1.8.5) - actionview (6.0.2.1) - activesupport (= 6.0.2.1) + actionview (6.0.5) + activesupport (= 6.0.5) builder (~> 3.1) erubi (~> 1.4) rails-dom-testing (~> 2.0) rails-html-sanitizer (~> 1.1, >= 1.2.0) - activejob (6.0.2.1) - activesupport (= 6.0.2.1) + activejob (6.0.5) + activesupport (= 6.0.5) globalid (>= 0.3.6) - activemodel (6.0.2.1) - activesupport (= 6.0.2.1) - activerecord (6.0.2.1) - activemodel (= 6.0.2.1) - activesupport (= 6.0.2.1) - activestorage (6.0.2.1) - actionpack (= 6.0.2.1) - activejob (= 6.0.2.1) - activerecord (= 6.0.2.1) - marcel (~> 0.3.1) - activesupport (6.0.2.1) + activemodel (6.0.5) + activesupport (= 6.0.5) + activerecord (6.0.5) + activemodel (= 6.0.5) + activesupport (= 6.0.5) + activestorage (6.0.5) + actionpack (= 6.0.5) + activejob (= 6.0.5) + activerecord (= 6.0.5) + marcel (~> 1.0) + activesupport (6.0.5) concurrent-ruby (~> 1.0, >= 1.0.2) i18n (>= 0.7, < 2) minitest (~> 5.1) tzinfo (~> 1.1) - zeitwerk (~> 2.2) - appraisal (2.2.0) + zeitwerk (~> 2.2, >= 2.2.2) + appraisal (2.4.1) bundler rake thor (>= 0.14.0) builder (3.2.4) - concurrent-ruby (1.1.5) + concurrent-ruby (1.1.10) crass (1.0.6) - diff-lcs (1.3) - erubi (1.9.0) + diff-lcs (1.5.0) + erubi (1.10.0) ffi2-generators (0.1.1) - globalid (0.4.2) - activesupport (>= 4.2.0) - i18n (1.8.2) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.10.0) concurrent-ruby (~> 1.0) - loofah (2.4.0) + loofah (2.18.0) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.1) mini_mime (>= 0.1.1) - marcel (0.3.3) - mimemagic (~> 0.3.2) - method_source (0.9.2) - mimemagic (0.3.3) - mini_mime (1.0.2) - mini_portile2 (2.4.0) - minitest (5.14.0) - nio4r (2.5.2) - nokogiri (1.10.7) - mini_portile2 (~> 2.4.0) - rack (2.1.2) + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + nio4r (2.5.8) + nokogiri (1.13.6) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + pg (0.21.0) + racc (1.6.0) + rack (2.2.3.1) rack-test (1.1.0) rack (>= 1.0, < 3) - rails (6.0.2.1) - actioncable (= 6.0.2.1) - actionmailbox (= 6.0.2.1) - actionmailer (= 6.0.2.1) - actionpack (= 6.0.2.1) - actiontext (= 6.0.2.1) - actionview (= 6.0.2.1) - activejob (= 6.0.2.1) - activemodel (= 6.0.2.1) - activerecord (= 6.0.2.1) - activestorage (= 6.0.2.1) - activesupport (= 6.0.2.1) + rails (6.0.5) + actioncable (= 6.0.5) + actionmailbox (= 6.0.5) + actionmailer (= 6.0.5) + actionpack (= 6.0.5) + actiontext (= 6.0.5) + actionview (= 6.0.5) + activejob (= 6.0.5) + activemodel (= 6.0.5) + activerecord (= 6.0.5) + activestorage (= 6.0.5) + activesupport (= 6.0.5) bundler (>= 1.3.0) - railties (= 6.0.2.1) + railties (= 6.0.5) sprockets-rails (>= 2.0.0) rails-dom-testing (2.0.3) activesupport (>= 4.2.0) nokogiri (>= 1.6) - rails-html-sanitizer (1.3.0) + rails-html-sanitizer (1.4.3) loofah (~> 2.3) - railties (6.0.2.1) - actionpack (= 6.0.2.1) - activesupport (= 6.0.2.1) + railties (6.0.5) + actionpack (= 6.0.5) + activesupport (= 6.0.5) method_source rake (>= 0.8.7) thor (>= 0.20.3, < 2.0) - rake (13.0.1) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.1) - rspec-support (~> 3.9.1) - rspec-expectations (3.9.1) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.2) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) rubysl (2.2.0) rubysl-abbrev (~> 2.0) rubysl-base64 (~> 2.0) @@ -337,22 +338,22 @@ GEM rubysl-xmlrpc (2.0.0) rubysl-yaml (2.1.0) rubysl-zlib (2.0.1) - sprockets (3.7.2) + sprockets (4.0.3) concurrent-ruby (~> 1.0) rack (> 1, < 3) - sprockets-rails (3.2.1) - actionpack (>= 4.0) - activesupport (>= 4.0) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) sprockets (>= 3.0.0) sqlite3 (1.4.2) - thor (0.20.3) + thor (1.2.1) thread_safe (0.3.6) - tzinfo (1.2.6) + tzinfo (1.2.9) thread_safe (~> 0.1) - websocket-driver (0.7.1) + websocket-driver (0.7.5) websocket-extensions (>= 0.1.0) - websocket-extensions (0.1.4) - zeitwerk (2.2.2) + websocket-extensions (0.1.5) + zeitwerk (2.5.4) PLATFORMS ruby @@ -361,11 +362,12 @@ DEPENDENCIES activerecord-jdbcsqlite3-adapter appraisal (>= 1.0.2) nilify_blanks! + pg (~> 0.11) rails (~> 6.0.2) rake (~> 13.0.1) rspec (>= 3.8.0) rubysl (~> 2.0) - sqlite3 (~> 1.4.2) + sqlite3 (~> 1.4) BUNDLED WITH 1.17.3 diff --git a/gemfiles/7.0.gemfile b/gemfiles/7.0.gemfile new file mode 100644 index 0000000..052e92b --- /dev/null +++ b/gemfiles/7.0.gemfile @@ -0,0 +1,11 @@ +# This file was generated by Appraisal + +source "http://rubygems.org" + +gem "rubysl", "~> 2.0", platforms: [:rbx] +gem "activerecord-jdbcsqlite3-adapter", platforms: [:jruby] +gem "rails", "7.0.3" +gem "sqlite3", "~> 1.4" +gem "pg", "~> 1.1" + +gemspec path: "../" diff --git a/gemfiles/7.0.gemfile.lock b/gemfiles/7.0.gemfile.lock new file mode 100644 index 0000000..8b7cf66 --- /dev/null +++ b/gemfiles/7.0.gemfile.lock @@ -0,0 +1,392 @@ +PATH + remote: .. + specs: + nilify_blanks (1.4.0) + activerecord (>= 4.0.0) + activesupport (>= 4.0.0) + +GEM + remote: http://rubygems.org/ + specs: + actioncable (7.0.3) + actionpack (= 7.0.3) + activesupport (= 7.0.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (7.0.3) + actionpack (= 7.0.3) + activejob (= 7.0.3) + activerecord (= 7.0.3) + activestorage (= 7.0.3) + activesupport (= 7.0.3) + mail (>= 2.7.1) + net-imap + net-pop + net-smtp + actionmailer (7.0.3) + actionpack (= 7.0.3) + actionview (= 7.0.3) + activejob (= 7.0.3) + activesupport (= 7.0.3) + mail (~> 2.5, >= 2.5.4) + net-imap + net-pop + net-smtp + rails-dom-testing (~> 2.0) + actionpack (7.0.3) + actionview (= 7.0.3) + activesupport (= 7.0.3) + rack (~> 2.0, >= 2.2.0) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (7.0.3) + actionpack (= 7.0.3) + activerecord (= 7.0.3) + activestorage (= 7.0.3) + activesupport (= 7.0.3) + globalid (>= 0.6.0) + nokogiri (>= 1.8.5) + actionview (7.0.3) + activesupport (= 7.0.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (7.0.3) + activesupport (= 7.0.3) + globalid (>= 0.3.6) + activemodel (7.0.3) + activesupport (= 7.0.3) + activerecord (7.0.3) + activemodel (= 7.0.3) + activesupport (= 7.0.3) + activestorage (7.0.3) + actionpack (= 7.0.3) + activejob (= 7.0.3) + activerecord (= 7.0.3) + activesupport (= 7.0.3) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (7.0.3) + 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) + diff-lcs (1.5.0) + digest (3.1.0) + erubi (1.10.0) + ffi2-generators (0.1.1) + globalid (1.0.0) + activesupport (>= 5.0) + i18n (1.10.0) + concurrent-ruby (~> 1.0) + loofah (2.18.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.7.1) + mini_mime (>= 0.1.1) + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.2) + mini_portile2 (2.8.0) + minitest (5.15.0) + net-imap (0.2.3) + digest + net-protocol + strscan + net-pop (0.1.1) + digest + net-protocol + timeout + net-protocol (0.1.3) + timeout + net-smtp (0.3.1) + digest + net-protocol + timeout + nio4r (2.5.8) + nokogiri (1.13.6) + mini_portile2 (~> 2.8.0) + racc (~> 1.4) + pg (1.3.5) + racc (1.6.0) + rack (2.2.3.1) + rack-test (1.1.0) + rack (>= 1.0, < 3) + rails (7.0.3) + actioncable (= 7.0.3) + actionmailbox (= 7.0.3) + actionmailer (= 7.0.3) + actionpack (= 7.0.3) + actiontext (= 7.0.3) + actionview (= 7.0.3) + activejob (= 7.0.3) + activemodel (= 7.0.3) + activerecord (= 7.0.3) + activestorage (= 7.0.3) + activesupport (= 7.0.3) + bundler (>= 1.15.0) + railties (= 7.0.3) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.4.3) + loofah (~> 2.3) + railties (7.0.3) + actionpack (= 7.0.3) + activesupport (= 7.0.3) + method_source + rake (>= 12.2) + thor (~> 1.0) + zeitwerk (~> 2.5) + rake (13.0.6) + rspec (3.11.0) + rspec-core (~> 3.11.0) + rspec-expectations (~> 3.11.0) + rspec-mocks (~> 3.11.0) + rspec-core (3.11.0) + rspec-support (~> 3.11.0) + rspec-expectations (3.11.0) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.11.0) + rspec-mocks (3.11.1) + diff-lcs (>= 1.2.0, < 2.0) + rspec-support (~> 3.11.0) + rspec-support (3.11.0) + rubysl (2.2.0) + rubysl-abbrev (~> 2.0) + rubysl-base64 (~> 2.0) + rubysl-benchmark (~> 2.0) + rubysl-bigdecimal (~> 2.0) + rubysl-cgi (~> 2.0) + rubysl-cgi-session (~> 2.0) + rubysl-cmath (~> 2.0) + rubysl-complex (~> 2.0) + rubysl-continuation (~> 2.0) + rubysl-coverage (~> 2.0) + rubysl-csv (~> 2.0) + rubysl-curses (~> 2.0) + rubysl-date (~> 2.0) + rubysl-delegate (~> 2.0) + rubysl-digest (~> 2.0) + rubysl-drb (~> 2.0) + rubysl-e2mmap (~> 2.0) + rubysl-english (~> 2.0) + rubysl-enumerator (~> 2.0) + rubysl-erb (~> 2.0) + rubysl-etc (~> 2.0) + rubysl-expect (~> 2.0) + rubysl-fcntl (~> 2.0) + rubysl-fiber (~> 2.0) + rubysl-fileutils (~> 2.0) + rubysl-find (~> 2.0) + rubysl-forwardable (~> 2.0) + rubysl-getoptlong (~> 2.0) + rubysl-gserver (~> 2.0) + rubysl-io-console (~> 2.0) + rubysl-io-nonblock (~> 2.0) + rubysl-io-wait (~> 2.0) + rubysl-ipaddr (~> 2.0) + rubysl-irb (~> 2.1) + rubysl-logger (~> 2.0) + rubysl-mathn (~> 2.0) + rubysl-matrix (~> 2.0) + rubysl-mkmf (~> 2.0) + rubysl-monitor (~> 2.0) + rubysl-mutex_m (~> 2.0) + rubysl-net-ftp (~> 2.0) + rubysl-net-http (~> 2.0) + rubysl-net-imap (~> 2.0) + rubysl-net-pop (~> 2.0) + rubysl-net-protocol (~> 2.0) + rubysl-net-smtp (~> 2.0) + rubysl-net-telnet (~> 2.0) + rubysl-nkf (~> 2.0) + rubysl-observer (~> 2.0) + rubysl-open-uri (~> 2.0) + rubysl-open3 (~> 2.0) + rubysl-openssl (~> 2.0) + rubysl-optparse (~> 2.0) + rubysl-ostruct (~> 2.0) + rubysl-pathname (~> 2.0) + rubysl-prettyprint (~> 2.0) + rubysl-prime (~> 2.0) + rubysl-profile (~> 2.0) + rubysl-profiler (~> 2.0) + rubysl-pstore (~> 2.0) + rubysl-pty (~> 2.0) + rubysl-rational (~> 2.0) + rubysl-resolv (~> 2.0) + rubysl-rexml (~> 2.0) + rubysl-rinda (~> 2.0) + rubysl-rss (~> 2.0) + rubysl-scanf (~> 2.0) + rubysl-securerandom (~> 2.0) + rubysl-set (~> 2.0) + rubysl-shellwords (~> 2.0) + rubysl-singleton (~> 2.0) + rubysl-socket (~> 2.0) + rubysl-stringio (~> 2.0) + rubysl-strscan (~> 2.0) + rubysl-sync (~> 2.0) + rubysl-syslog (~> 2.0) + rubysl-tempfile (~> 2.0) + rubysl-thread (~> 2.0) + rubysl-thwait (~> 2.0) + rubysl-time (~> 2.0) + rubysl-timeout (~> 2.0) + rubysl-tmpdir (~> 2.0) + rubysl-tsort (~> 2.0) + rubysl-un (~> 2.0) + rubysl-unicode_normalize (~> 2.0) + rubysl-uri (~> 2.0) + rubysl-weakref (~> 2.0) + rubysl-webrick (~> 2.0) + rubysl-xmlrpc (~> 2.0) + rubysl-yaml (~> 2.0) + rubysl-zlib (~> 2.0) + rubysl-abbrev (2.0.4) + rubysl-base64 (2.0.0) + rubysl-benchmark (2.0.1) + rubysl-bigdecimal (2.0.2) + rubysl-cgi (2.0.1) + rubysl-cgi-session (2.1.0) + rubysl-cmath (2.0.0) + rubysl-complex (2.0.0) + rubysl-continuation (2.0.0) + rubysl-coverage (2.1) + rubysl-csv (2.0.2) + rubysl-english (~> 2.0) + rubysl-curses (2.0.1) + rubysl-date (2.0.9) + rubysl-delegate (2.0.1) + rubysl-digest (2.1) + rubysl-drb (2.0.1) + rubysl-e2mmap (2.0.0) + rubysl-english (2.0.0) + rubysl-enumerator (2.0.0) + rubysl-erb (2.0.2) + rubysl-etc (2.0.3) + ffi2-generators (~> 0.1) + rubysl-expect (2.0.0) + rubysl-fcntl (2.0.4) + ffi2-generators (~> 0.1) + rubysl-fiber (2.0.0) + rubysl-fileutils (2.0.3) + rubysl-find (2.0.1) + rubysl-forwardable (2.0.1) + rubysl-getoptlong (2.0.0) + rubysl-gserver (2.0.0) + rubysl-socket (~> 2.0) + rubysl-thread (~> 2.0) + rubysl-io-console (2.0.0) + rubysl-io-nonblock (2.0.0) + rubysl-io-wait (2.0.0) + rubysl-ipaddr (2.0.0) + rubysl-irb (2.1.1) + rubysl-e2mmap (~> 2.0) + rubysl-mathn (~> 2.0) + rubysl-thread (~> 2.0) + rubysl-logger (2.1.0) + rubysl-mathn (2.0.0) + rubysl-matrix (2.1.0) + rubysl-e2mmap (~> 2.0) + rubysl-mkmf (2.1) + rubysl-fileutils (~> 2.0) + rubysl-shellwords (~> 2.0) + rubysl-monitor (2.1) + rubysl-mutex_m (2.0.0) + rubysl-net-ftp (2.0.1) + rubysl-net-http (2.0.4) + rubysl-cgi (~> 2.0) + rubysl-erb (~> 2.0) + rubysl-singleton (~> 2.0) + rubysl-net-imap (2.0.1) + rubysl-net-pop (2.0.1) + rubysl-net-protocol (2.0.1) + rubysl-net-smtp (2.0.1) + rubysl-net-telnet (2.0.0) + rubysl-nkf (2.0.1) + rubysl-observer (2.0.0) + rubysl-open-uri (2.0.0) + rubysl-open3 (2.0.0) + rubysl-openssl (2.13) + rubysl-optparse (2.0.1) + rubysl-shellwords (~> 2.0) + rubysl-ostruct (2.1.0) + rubysl-pathname (2.3) + rubysl-prettyprint (2.0.3) + rubysl-prime (2.0.1) + rubysl-profile (2.0.0) + rubysl-profiler (2.1) + rubysl-pstore (2.0.0) + rubysl-pty (2.0.3) + rubysl-rational (2.0.1) + rubysl-resolv (2.1.2) + rubysl-rexml (2.0.4) + rubysl-rinda (2.0.1) + rubysl-rss (2.0.0) + rubysl-scanf (2.0.0) + rubysl-securerandom (2.0.0) + rubysl-set (2.0.1) + rubysl-shellwords (2.0.0) + rubysl-singleton (2.0.0) + rubysl-socket (2.2.1) + rubysl-fcntl (~> 2.0) + rubysl-stringio (2.3) + rubysl-strscan (2.0.0) + rubysl-sync (2.0.0) + rubysl-syslog (2.1.0) + ffi2-generators (~> 0.1) + rubysl-tempfile (2.0.1) + rubysl-thread (2.1) + rubysl-thwait (2.0.0) + rubysl-time (2.0.3) + rubysl-timeout (2.0.0) + rubysl-tmpdir (2.0.1) + rubysl-tsort (2.0.1) + rubysl-un (2.0.0) + rubysl-fileutils (~> 2.0) + rubysl-optparse (~> 2.0) + rubysl-unicode_normalize (2.0) + rubysl-uri (2.0.0) + rubysl-weakref (2.0.0) + rubysl-webrick (2.0.0) + rubysl-xmlrpc (2.0.0) + rubysl-yaml (2.1.0) + rubysl-zlib (2.0.1) + sqlite3 (1.4.2) + strscan (3.0.3) + thor (1.2.1) + timeout (0.3.0) + tzinfo (2.0.4) + concurrent-ruby (~> 1.0) + websocket-driver (0.7.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.5.4) + +PLATFORMS + ruby + +DEPENDENCIES + activerecord-jdbcsqlite3-adapter + appraisal (>= 1.0.2) + nilify_blanks! + pg (~> 1.1) + rails (= 7.0.3) + rake (~> 13.0.1) + rspec (>= 3.8.0) + rubysl (~> 2.0) + sqlite3 (~> 1.4) + +BUNDLED WITH + 1.17.3 diff --git a/lib/nilify_blanks.rb b/lib/nilify_blanks.rb index 32da33d..11f23cb 100644 --- a/lib/nilify_blanks.rb +++ b/lib/nilify_blanks.rb @@ -9,7 +9,7 @@ module NilifyBlanks end module ClassMethods - DEFAULT_TYPES = [:string, :text, :citext] + DEFAULT_TYPES = [:string, :text, :citext, :hstore] DEFAULT_CALLBACK = :validation @@define_nilify_blank_methods_lock = Mutex.new @@ -66,12 +66,90 @@ def define_nilify_blank_methods def nilify_blanks (nilify_blanks_columns || []).each do |column| value = read_attribute(column) - next unless value.is_a?(String) + + next unless [String, Array, Hash].include?(value.class) next unless value.respond_to?(:blank?) - write_attribute(column, nil) if value.blank? + write_attribute(column, nilify(value)) if nilifiable? value end end + + private + def nilify(value) + return value unless nilifiable? value + + case value + when String + nilify_string(value) + when Array + nilify_array(value) + when Hash + nilify_hash(value) + else + value + end + end + + def nilify_string(string) + nil + end + + def nilify_array(array) + return nil if array.empty? + + nilified_array = array.map do |element| + nilify element + end.reject(&:blank?) + + nilified_array.empty? ? nil : nilified_array + end + + def nilify_hash(hash) + return nil if hash.empty? + + nilified_hash = hash.transform_values do |value| + nilify value + end.reject do |_key, value| + value.blank? + end + + nilified_hash.empty? ? nil : nilified_hash + end + + def nilifiable?(value) + case value + when String + nilifiable_string?(value) + when Array + nilifiable_array?(value) + when Hash + nilifiable_hash?(value) + when NilClass + true + else + false + end + end + + def nilifiable_string?(string) + string.blank? + end + + def nilifiable_array?(array) + return true if array.empty? + + array.any? do |element| + nilifiable? element + end + end + + def nilifiable_hash?(hash) + return true if hash.empty? + + hash.any? do |_key, value| + nilifiable? value + end + end end require "nilify_blanks/railtie" diff --git a/nilify_blanks.gemspec b/nilify_blanks.gemspec index 3541d6c..55347bb 100644 --- a/nilify_blanks.gemspec +++ b/nilify_blanks.gemspec @@ -22,5 +22,4 @@ Gem::Specification.new do |s| s.add_development_dependency("rake", "~> 13.0.1") s.add_development_dependency("rspec", [">= 3.8.0"]) s.add_development_dependency("appraisal", [">= 1.0.2"]) - s.add_development_dependency("sqlite3", [">= 1.3.6"]) end diff --git a/spec/db/database.yml b/spec/db/database.yml index 3b4a96a..9a9c288 100644 --- a/spec/db/database.yml +++ b/spec/db/database.yml @@ -18,4 +18,4 @@ mysql: host: localhost username: root password: - database: nilify_blanks_plugin_test \ No newline at end of file + database: nilify_blanks_plugin_test diff --git a/spec/db/database.yml.erb b/spec/db/database.yml.erb new file mode 100644 index 0000000..2d755ad --- /dev/null +++ b/spec/db/database.yml.erb @@ -0,0 +1,21 @@ +sqlite: + adapter: sqlite + database: spec/db/test.sqlite + +sqlite3: + adapter: sqlite3 + database: spec/db/test.sqlite3 + +postgresql: + adapter: postgresql + username: <%= ENV["USER"] %> + password: <%= ENV["USER"] %> + database: nilify_blanks_plugin_test + min_messages: ERROR + +mysql: + adapter: mysql + host: localhost + username: root + password: + database: nilify_blanks_plugin_test diff --git a/spec/db/schema.rb b/spec/db/schema.rb index 5fd4fc2..57eeaf9 100644 --- a/spec/db/schema.rb +++ b/spec/db/schema.rb @@ -1,4 +1,19 @@ +def postgresql? + ENV["DB"] == "postgresql" +end + +if postgresql? + connection = PG.connect(dbname: "postgres") + connection.exec("DROP DATABASE nilify_blanks_plugin_test") + connection.exec("CREATE DATABASE nilify_blanks_plugin_test") + connection.finish +end + ActiveRecord::Schema.define(:version => 0) do + if postgresql? + enable_extension "hstore" + enable_extension 'citext' + end create_table :posts, :force => true do |t| t.string :first_name @@ -10,6 +25,8 @@ t.integer :views t.integer :category_id t.string :blog_id + t.string :tags, array: true if postgresql? + t.hstore :metadata if postgresql? + t.hstore :objects, array: true if postgresql? end - end diff --git a/spec/nilify_blanks_spec.rb b/spec/nilify_blanks_spec.rb index 08418dd..d66ffb1 100644 --- a/spec/nilify_blanks_spec.rb +++ b/spec/nilify_blanks_spec.rb @@ -7,12 +7,36 @@ class Post < ActiveRecord::Base nilify_blanks end - @post = Post.new(:first_name => '', :last_name => '', :title => '', :summary => '', :body => '', :slug => '', :views => 0, :blog_id => '') + @post = Post.new( + :first_name => '', + :last_name => '', + :title => '', + :summary => '', + :body => '', + :slug => '', + :views => 0, + :blog_id => '', + ) + + def postgresql? + ENV["DB"] == "postgresql" + end + + if postgresql? + @post.tags = ["", nil] + @post.metadata = { "foo" => "", "bar" => nil } + @post.objects = [{}, nil, { "foo" => "", "bar" => nil }] + end + @post.save end - it "should recognize all non-null string, text, citext columns" do - expect(Post.nilify_blanks_columns).to eq(['first_name', 'title', 'summary', 'body', 'slug', 'blog_id']) + it "should recognize all non-null string, text, citext, array, hstore columns" do + if postgresql? + expect(Post.nilify_blanks_columns).to eq(['first_name', 'title', 'summary', 'body', 'slug', 'blog_id', 'tags', 'metadata', 'objects']) + else + expect(Post.nilify_blanks_columns).to eq(['first_name', 'title', 'summary', 'body', 'slug', 'blog_id']) + end end it "should convert all blanks to nils" do @@ -22,6 +46,9 @@ class Post < ActiveRecord::Base expect(@post.body).to be_nil expect(@post.slug).to be_nil expect(@post.blog_id).to be_nil + expect(@post.tags).to be_nil if postgresql? + expect(@post.metadata).to be_nil if postgresql? + expect(@post.objects).to be_nil if postgresql? end it "should leave not-null last name field alone" do @@ -44,11 +71,34 @@ class PostWithNullables < ActiveRecord::Base nilify_blanks :nullables_only => false end - @post = PostWithNullables.new(:first_name => '', :last_name => '', :title => '', :summary => '', :body => '', :slug => '', :views => 0, :blog_id => '') + @post = PostWithNullables.new( + :first_name => '', + :last_name => '', + :title => '', + :summary => '', + :body => '', + :slug => '', + :views => 0, + :blog_id => '', + ) + + def postgresql? + ENV["DB"] == "postgresql" + end + + if postgresql? + @post.tags = ["", nil] + @post.metadata = { "foo" => "", "bar" => nil } + @post.objects = [{}, nil, { "foo" => "", "bar" => nil }] + end end - it "should recognize all (even null) string, text, citext columns" do - expect(PostWithNullables.nilify_blanks_columns).to eq(['first_name', 'last_name', 'title', 'summary', 'body', 'slug', 'blog_id']) + it "should recognize all (even null) string, text, citext, array, hstore columns" do + if postgresql? + expect(PostWithNullables.nilify_blanks_columns).to eq(['first_name', 'last_name', 'title', 'summary', 'body', 'slug', 'blog_id', 'tags', 'metadata', 'objects']) + else + expect(PostWithNullables.nilify_blanks_columns).to eq(['first_name', 'last_name', 'title', 'summary', 'body', 'slug', 'blog_id']) + end end end @@ -122,17 +172,35 @@ class PostExceptFirstNameAndTitle < ActiveRecord::Base end @post = PostExceptFirstNameAndTitle.new(:first_name => '', :last_name => '', :title => '', :summary => '', :body => '', :slug => '', :views => 0) + + def postgresql? + ENV["DB"] == "postgresql" + end + + if postgresql? + @post.tags = ["", nil] + @post.metadata = { "foo" => "", "bar" => nil } + @post.objects = [{}, nil, { "foo" => "", "bar" => nil }] + end + @post.save end - it "should recognize only summary, body, and views" do - expect(PostExceptFirstNameAndTitle.nilify_blanks_columns).to eq(['summary', 'body', 'slug']) + it "should recognize only summary, body, views, tags, metadata and objects" do + if postgresql? + expect(PostExceptFirstNameAndTitle.nilify_blanks_columns).to eq(['summary', 'body', 'slug', 'tags', 'metadata', 'objects']) + else + expect(PostExceptFirstNameAndTitle.nilify_blanks_columns).to eq(['summary', 'body', 'slug']) + end end - it "should convert summary and body blanks to nils" do + it "should convert summary, body, tags and metadata blanks to nils" do expect(@post.summary).to be_nil expect(@post.body).to be_nil expect(@post.slug).to be_nil + expect(@post.tags).to be_nil if postgresql? + expect(@post.metadata).to be_nil if postgresql? + expect(@post.objects).to be_nil if postgresql? end it "should leave other fields alone" do @@ -234,6 +302,10 @@ class InheritedPost < ActiveRecord::Base class Post < ActiveRecord::Base nilify_blanks end + + def postgresql? + ENV["DB"] == "postgresql" + end end it { is_expected.to nilify_blanks_for(:first_name) } @@ -242,6 +314,9 @@ class Post < ActiveRecord::Base it { is_expected.to nilify_blanks_for(:body) } it { is_expected.to nilify_blanks_for(:slug) } it { is_expected.to nilify_blanks_for(:blog_id) } + it { is_expected.to nilify_blanks_for(:tags) } if postgresql? + it { is_expected.to nilify_blanks_for(:metadata) } if postgresql? + it { is_expected.to nilify_blanks_for(:objects) } if postgresql? it { is_expected.to_not nilify_blanks_for(:id) } it { is_expected.to_not nilify_blanks_for(:last_name) } diff --git a/spec/spec_helper.rb b/spec/spec_helper.rb index f2dc76e..c315c8b 100644 --- a/spec/spec_helper.rb +++ b/spec/spec_helper.rb @@ -5,9 +5,17 @@ require "yaml" # Establish DB Connection -config = YAML::load(IO.read(File.join(File.dirname(__FILE__), 'db', 'database.yml'))) +config = YAML::load(ERB.new(IO.read(File.join(File.dirname(__FILE__), 'db', 'database.yml.erb'))).result) ActiveRecord::Base.configurations = {'test' => config[ENV['DB'] || 'sqlite3']} -ActiveRecord::Base.establish_connection(ActiveRecord::Base.configurations['test']) + +test_config = + if ActiveRecord::VERSION::MAJOR == 7 + ActiveRecord::Base.configurations.find_db_config('test') + else + ActiveRecord::Base.configurations['test'] + end + +ActiveRecord::Base.establish_connection(test_config) # Load Test Schema into the Database load(File.dirname(__FILE__) + "/db/schema.rb")