diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b2e54c32..e1933f13 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -42,16 +42,29 @@ jobs: with: mongodb-version: ${{ matrix.mongodb-version }} - - name: Original Tests Mongoid Bundle - id: rspec-mongo-original-bundle + - name: Rails 7.0 Tests Mongoid Bundle + id: rspec-mongo-rails7-bundle run: | cd spec/tester_mongo pwd gem install bundler:2.4.12 bundle install -j 5 - - name: Original Tests Mongoid - id: rspec-mongo-original + - name: Rails 7.0 Tests Mongoid + id: rspec-rails7 run: | cd spec/tester_mongo - DRIVER=mongo rspec + RAILS_VERSION=7.0 DRIVER=mongo rspec + + - name: Rails 6.1 Tests Mongoid Bundle + id: rspec-mongo-rails-6-bundle + run: | + cd spec/tester_mongo_rails_6 + gem install bundler:2.4.12 + bundle install -j 5 + + - name: Rails 6.1 Tests Mongoid + id: rspec-rails-6 + run: | + cd spec/tester_mongo_rails_6 + RAILS_VERSION=6.1 DRIVER=mongo rspec diff --git a/spec/tester_mongo/config/application.rb b/spec/tester_mongo/config/application.rb index f327cf71..a65dc13c 100644 --- a/spec/tester_mongo/config/application.rb +++ b/spec/tester_mongo/config/application.rb @@ -26,8 +26,9 @@ module DummyRailsApp class Application < Rails::Application + RAILS_VERSION = ENV["RAILS_VERSION"] || 7.0 # Initialize configuration defaults for originally generated Rails version. - config.load_defaults 7.0 + config.load_defaults RAILS_VERSION # Configuration for the application, engines, and railties goes here. # diff --git a/spec/tester_mongo_rails_6/.gitignore b/spec/tester_mongo_rails_6/.gitignore new file mode 100644 index 00000000..12439e58 --- /dev/null +++ b/spec/tester_mongo_rails_6/.gitignore @@ -0,0 +1,33 @@ +# See https://help.github.com/articles/ignoring-files for more about ignoring files. +# +# If you find yourself ignoring temporary files generated by your text editor +# or operating system, you probably want to add a global ignore instead: +# git config --global core.excludesfile '~/.gitignore_global' + +# Ignore bundler config. +/.bundle + +# Ignore the default SQLite database. +/db/*.sqlite3 +/db/*.sqlite3-* + +# Ignore all logfiles and tempfiles. +/log/* +/tmp/* +!/log/.keep +!/tmp/.keep + +# Ignore pidfiles, but keep the directory. +/tmp/pids/* +!/tmp/pids/ +!/tmp/pids/.keep + +# Ignore uploaded files in development. +/storage/* +!/storage/.keep +/tmp/storage/* +!/tmp/storage/ +!/tmp/storage/.keep + +# Ignore master key for decrypting credentials and more. +/config/master.key diff --git a/spec/tester_mongo_rails_6/.rspec b/spec/tester_mongo_rails_6/.rspec new file mode 120000 index 00000000..0523bcf4 --- /dev/null +++ b/spec/tester_mongo_rails_6/.rspec @@ -0,0 +1 @@ +../tester_mongo/.rspec \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/.ruby-version b/spec/tester_mongo_rails_6/.ruby-version new file mode 120000 index 00000000..a24eb934 --- /dev/null +++ b/spec/tester_mongo_rails_6/.ruby-version @@ -0,0 +1 @@ +../tester_mongo/.ruby-version \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/Gemfile b/spec/tester_mongo_rails_6/Gemfile new file mode 100644 index 00000000..764ee135 --- /dev/null +++ b/spec/tester_mongo_rails_6/Gemfile @@ -0,0 +1,58 @@ +source "https://rubygems.org" +git_source(:github) { |repo| "https://github.com/#{repo}.git" } + +ruby ">= 2.7.0" + +# Bundle edge Rails instead: gem "rails", github: "rails/rails", branch: "main" +gem "rails", "~> 6.1.0" + +# Use sqlite3 as the database for Active Record +gem "sqlite3", "~> 1.4" + +gem "mongoid" + +# Use the Puma web server [https://github.com/puma/puma] +gem "puma", "~> 5.0" + +# Use graphql gem for handle API +gem 'graphql', "~> 2.0.21" + +gem 'graphoid', path: "../../", require: 'graphoid/graphoid' + +# Build JSON APIs with ease [https://github.com/rails/jbuilder] +# gem "jbuilder" + +# Use Redis adapter to run Action Cable in production +# gem "redis", "~> 4.0" + +# Use Kredis to get higher-level data types in Redis [https://github.com/rails/kredis] +# gem "kredis" + +# Use Active Model has_secure_password [https://guides.rubyonrails.org/active_model_basics.html#securepassword] +gem "bcrypt", "~> 3.1.18" + +# Windows does not include zoneinfo files, so bundle the tzinfo-data gem +gem "tzinfo-data", platforms: %i[ mingw mswin x64_mingw jruby ] + +# Reduces boot times through caching; required in config/boot.rb +gem "bootsnap", require: false + +# Use Active Storage variants [https://guides.rubyonrails.org/active_storage_overview.html#transforming-images] +# gem "image_processing", "~> 1.2" + +# Use Rack CORS for handling Cross-Origin Resource Sharing (CORS), making cross-origin AJAX possible +# gem "rack-cors" + +group :development, :test do + # See https://guides.rubyonrails.org/debugging_rails_applications.html#debugging-with-the-debug-gem + gem "debug", platforms: %i[ mri mingw x64_mingw ] + gem "graphiql-rails" + gem "pry-byebug" + gem "rspec-rails" +end + +group :development do + # Speed up commands on slow machines / big apps [https://github.com/rails/spring] + # gem "spring" +end + diff --git a/spec/tester_mongo_rails_6/Gemfile.lock b/spec/tester_mongo_rails_6/Gemfile.lock new file mode 100644 index 00000000..f47d7687 --- /dev/null +++ b/spec/tester_mongo_rails_6/Gemfile.lock @@ -0,0 +1,225 @@ +PATH + remote: ../.. + specs: + graphoid (1.0.0) + graphql (~> 2.0.21) + rails (>= 6.0) + +GEM + remote: https://rubygems.org/ + specs: + actioncable (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) + nio4r (~> 2.0) + websocket-driver (>= 0.6.1) + actionmailbox (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + mail (>= 2.7.1) + actionmailer (6.1.7.3) + actionpack (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activesupport (= 6.1.7.3) + mail (~> 2.5, >= 2.5.4) + rails-dom-testing (~> 2.0) + actionpack (6.1.7.3) + actionview (= 6.1.7.3) + activesupport (= 6.1.7.3) + rack (~> 2.0, >= 2.0.9) + rack-test (>= 0.6.3) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.0, >= 1.2.0) + actiontext (6.1.7.3) + actionpack (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + nokogiri (>= 1.8.5) + actionview (6.1.7.3) + activesupport (= 6.1.7.3) + builder (~> 3.1) + erubi (~> 1.4) + rails-dom-testing (~> 2.0) + rails-html-sanitizer (~> 1.1, >= 1.2.0) + activejob (6.1.7.3) + activesupport (= 6.1.7.3) + globalid (>= 0.3.6) + activemodel (6.1.7.3) + activesupport (= 6.1.7.3) + activerecord (6.1.7.3) + activemodel (= 6.1.7.3) + activesupport (= 6.1.7.3) + activestorage (6.1.7.3) + actionpack (= 6.1.7.3) + activejob (= 6.1.7.3) + activerecord (= 6.1.7.3) + activesupport (= 6.1.7.3) + marcel (~> 1.0) + mini_mime (>= 1.1.0) + activesupport (6.1.7.3) + concurrent-ruby (~> 1.0, >= 1.0.2) + i18n (>= 1.6, < 2) + minitest (>= 5.1) + tzinfo (~> 2.0) + zeitwerk (~> 2.3) + bcrypt (3.1.18) + bootsnap (1.16.0) + msgpack (~> 1.2) + bson (4.15.0) + builder (3.2.4) + byebug (11.1.3) + coderay (1.1.3) + concurrent-ruby (1.2.2) + crass (1.0.6) + date (3.3.3) + debug (1.7.2) + irb (>= 1.5.0) + reline (>= 0.3.1) + diff-lcs (1.5.0) + erubi (1.12.0) + globalid (1.1.0) + activesupport (>= 5.0) + graphiql-rails (1.9.0) + railties + sprockets-rails + graphql (2.0.21) + i18n (1.12.0) + concurrent-ruby (~> 1.0) + io-console (0.6.0) + irb (1.6.4) + reline (>= 0.3.0) + loofah (2.20.0) + crass (~> 1.0.2) + nokogiri (>= 1.5.9) + mail (2.8.1) + mini_mime (>= 0.1.1) + net-imap + net-pop + net-smtp + marcel (1.0.2) + method_source (1.0.0) + mini_mime (1.1.2) + minitest (5.18.0) + mongo (2.18.2) + bson (>= 4.14.1, < 5.0.0) + mongoid (8.0.3) + activemodel (>= 5.1, < 7.1, != 7.0.0) + mongo (>= 2.18.0, < 3.0.0) + ruby2_keywords (~> 0.0.5) + msgpack (1.7.0) + net-imap (0.3.4) + date + net-protocol + net-pop (0.1.2) + net-protocol + net-protocol (0.2.1) + timeout + net-smtp (0.3.3) + net-protocol + nio4r (2.5.9) + nokogiri (1.14.3-x86_64-linux) + racc (~> 1.4) + pry (0.14.2) + coderay (~> 1.1) + method_source (~> 1.0) + pry-byebug (3.10.1) + byebug (~> 11.0) + pry (>= 0.13, < 0.15) + puma (5.6.5) + nio4r (~> 2.0) + racc (1.6.2) + rack (2.2.6.4) + rack-test (2.1.0) + rack (>= 1.3) + rails (6.1.7.3) + actioncable (= 6.1.7.3) + actionmailbox (= 6.1.7.3) + actionmailer (= 6.1.7.3) + actionpack (= 6.1.7.3) + actiontext (= 6.1.7.3) + actionview (= 6.1.7.3) + activejob (= 6.1.7.3) + activemodel (= 6.1.7.3) + activerecord (= 6.1.7.3) + activestorage (= 6.1.7.3) + activesupport (= 6.1.7.3) + bundler (>= 1.15.0) + railties (= 6.1.7.3) + sprockets-rails (>= 2.0.0) + rails-dom-testing (2.0.3) + activesupport (>= 4.2.0) + nokogiri (>= 1.6) + rails-html-sanitizer (1.5.0) + loofah (~> 2.19, >= 2.19.1) + railties (6.1.7.3) + actionpack (= 6.1.7.3) + activesupport (= 6.1.7.3) + method_source + rake (>= 12.2) + thor (~> 1.0) + rake (13.0.6) + reline (0.3.3) + io-console (~> 0.5) + rspec-core (3.12.1) + 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.5) + 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) + ruby2_keywords (0.0.5) + sprockets (4.2.0) + concurrent-ruby (~> 1.0) + rack (>= 2.2.4, < 4) + sprockets-rails (3.4.2) + actionpack (>= 5.2) + activesupport (>= 5.2) + sprockets (>= 3.0.0) + sqlite3 (1.6.2-x86_64-linux) + thor (1.2.1) + timeout (0.3.2) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + websocket-driver (0.7.5) + websocket-extensions (>= 0.1.0) + websocket-extensions (0.1.5) + zeitwerk (2.6.7) + +PLATFORMS + x86_64-linux + +DEPENDENCIES + bcrypt (~> 3.1.18) + bootsnap + debug + graphiql-rails + graphoid! + graphql (~> 2.0.21) + mongoid + pry-byebug + puma (~> 5.0) + rails (~> 6.1.0) + rspec-rails + sqlite3 (~> 1.4) + tzinfo-data + +RUBY VERSION + ruby 3.2.2p53 + +BUNDLED WITH + 2.4.12 diff --git a/spec/tester_mongo_rails_6/README.md b/spec/tester_mongo_rails_6/README.md new file mode 120000 index 00000000..603c5a4a --- /dev/null +++ b/spec/tester_mongo_rails_6/README.md @@ -0,0 +1 @@ +../tester_mongo/README.md \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/Rakefile b/spec/tester_mongo_rails_6/Rakefile new file mode 120000 index 00000000..c987dd46 --- /dev/null +++ b/spec/tester_mongo_rails_6/Rakefile @@ -0,0 +1 @@ +../tester_mongo/Rakefile \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/app b/spec/tester_mongo_rails_6/app new file mode 120000 index 00000000..87b0e43c --- /dev/null +++ b/spec/tester_mongo_rails_6/app @@ -0,0 +1 @@ +../tester_mongo/app \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/bin b/spec/tester_mongo_rails_6/bin new file mode 120000 index 00000000..6c990799 --- /dev/null +++ b/spec/tester_mongo_rails_6/bin @@ -0,0 +1 @@ +../tester_mongo/bin \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/config b/spec/tester_mongo_rails_6/config new file mode 120000 index 00000000..6ab78433 --- /dev/null +++ b/spec/tester_mongo_rails_6/config @@ -0,0 +1 @@ +../tester_mongo/config \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/config.ru b/spec/tester_mongo_rails_6/config.ru new file mode 120000 index 00000000..1ec97de3 --- /dev/null +++ b/spec/tester_mongo_rails_6/config.ru @@ -0,0 +1 @@ +../tester_mongo/config.ru \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/public b/spec/tester_mongo_rails_6/public new file mode 120000 index 00000000..2a360b13 --- /dev/null +++ b/spec/tester_mongo_rails_6/public @@ -0,0 +1 @@ +../tester_mongo/public \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/spec b/spec/tester_mongo_rails_6/spec new file mode 120000 index 00000000..3f512cb9 --- /dev/null +++ b/spec/tester_mongo_rails_6/spec @@ -0,0 +1 @@ +../tester_mongo/spec \ No newline at end of file diff --git a/spec/tester_mongo_rails_6/storage b/spec/tester_mongo_rails_6/storage new file mode 120000 index 00000000..596d1fd0 --- /dev/null +++ b/spec/tester_mongo_rails_6/storage @@ -0,0 +1 @@ +../tester_mongo/storage \ No newline at end of file