From d8652a4c88312562af5a230d825d15cf5de282bd Mon Sep 17 00:00:00 2001 From: Andrejs Cunskis Date: Fri, 9 Jun 2023 22:20:12 +0300 Subject: [PATCH] Use bootboot for testing with oj gem --- .github/workflows/test.yml | 4 +- .gitignore | 3 - Gemfile | 11 +- Gemfile.lock | 186 ++++++++++++++++++++++++ Gemfile_next.lock | 186 ++++++++++++++++++++++++ allure-cucumber/spec/spec_helper.rb | 2 +- allure-rspec/spec/spec_helper.rb | 2 +- allure-ruby-commons/spec/spec_helper.rb | 2 +- 8 files changed, 387 insertions(+), 9 deletions(-) create mode 100644 Gemfile.lock create mode 100644 Gemfile_next.lock diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 120d1525..38c20901 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -38,7 +38,7 @@ jobs: - name: Set up Ruby ${{ matrix.ruby }} uses: ruby/setup-ruby@v1 env: - WITH_OJ_GEM: ${{ matrix.oj }} + DEPENDENCIES_OJ: ${{ matrix.oj }} with: ruby-version: ${{ matrix.ruby }} bundler-cache: true @@ -46,7 +46,7 @@ jobs: uses: paambaati/codeclimate-action@v4.0.0 env: CC_TEST_REPORTER_ID: be263ef9412dc65a7aa8dfb6e8162d5c7cfb3307fae0a444cde9dd6ca6f52848 - WITH_OJ_GEM: ${{ matrix.oj }} + DEPENDENCIES_OJ: ${{ matrix.oj }} RUBY_VERSION: ${{ matrix.ruby }} with: coverageCommand: bundle exec rake test:coverage diff --git a/.gitignore b/.gitignore index 9df50df2..07782a43 100644 --- a/.gitignore +++ b/.gitignore @@ -19,6 +19,3 @@ coverage vendor/bundle tmp allure-results - -# Lockfile -Gemfile.lock diff --git a/Gemfile b/Gemfile index ff31cbc2..27a1c529 100644 --- a/Gemfile +++ b/Gemfile @@ -2,6 +2,8 @@ source "https://rubygems.org" +plugin "bootboot", "~> 0.2.2" + gem "allure-cucumber", path: "allure-cucumber" gem "allure-rspec", path: "allure-rspec" gem "allure-ruby-commons", path: "allure-ruby-commons" @@ -16,10 +18,17 @@ end group :test do gem "climate_control", "~> 1.2.0" - gem "oj", "~> 3.14" if ENV["WITH_OJ_GEM"] == "true" gem "rspec", "~> 3.12.0" gem "rubocop", "~> 1.52.0" gem "rubocop-performance", "~> 1.18.0" gem "simplecov", "~> 0.22.0" gem "simplecov-console", "~> 0.9.1" end + +Plugin.send(:load_plugin, "bootboot") if Plugin.installed?("bootboot") + +if ENV["DEPENDENCIES_OJ"] + enable_dual_booting if Plugin.installed?("bootboot") + + gem "oj", "~> 3.14" +end diff --git a/Gemfile.lock b/Gemfile.lock new file mode 100644 index 00000000..d9889299 --- /dev/null +++ b/Gemfile.lock @@ -0,0 +1,186 @@ +PATH + remote: allure-cucumber + specs: + allure-cucumber (2.21.2) + allure-ruby-commons (= 2.21.2) + cucumber (>= 4.0.0, < 9) + +PATH + remote: allure-rspec + specs: + allure-rspec (2.21.2) + allure-ruby-commons (= 2.21.2) + rspec-core (>= 3.8, < 4) + +PATH + remote: allure-ruby-commons + specs: + allure-ruby-commons (2.21.2) + mime-types (>= 3.3, < 4) + require_all (>= 2, < 4) + rspec-expectations (~> 3.12) + uuid (>= 2.3, < 3) + +GEM + remote: https://rubygems.org/ + specs: + ansi (1.5.0) + ast (2.4.2) + backport (1.2.0) + benchmark (0.2.1) + builder (3.2.4) + climate_control (1.2.0) + colorize (0.8.1) + cucumber (8.0.0) + builder (~> 3.2, >= 3.2.4) + cucumber-ci-environment (~> 9.0, >= 9.0.4) + cucumber-core (~> 11.0, >= 11.0.0) + cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-html-formatter (~> 19.1, >= 19.1.0) + cucumber-messages (~> 18.0, >= 18.0.0) + diff-lcs (~> 1.5, >= 1.5.0) + mime-types (~> 3.4, >= 3.4.1) + multi_test (~> 1.1, >= 1.1.0) + sys-uname (~> 1.2, >= 1.2.2) + cucumber-ci-environment (9.2.0) + cucumber-core (11.0.0) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-tag-expressions (~> 4.1, >= 4.1.0) + cucumber-cucumber-expressions (15.2.0) + cucumber-gherkin (23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-html-formatter (19.2.0) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-messages (18.0.0) + cucumber-tag-expressions (4.1.0) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + diff-lcs (1.5.0) + docile (1.4.0) + e2mmap (0.1.0) + ffi (1.15.5) + io-console (0.6.0) + irb (1.6.4) + reline (>= 0.3.0) + jaro_winkler (1.5.5) + json (2.6.3) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + macaddr (1.7.2) + systemu (~> 2.6.5) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2023.0218.1) + multi_test (1.1.0) + nokogiri (1.15.2-arm64-darwin) + racc (~> 1.4) + oj (3.15.0) + parallel (1.23.0) + parser (3.2.2.1) + ast (~> 2.4.1) + racc (1.7.0) + rainbow (3.1.1) + rake (13.0.6) + rbs (2.8.4) + regexp_parser (2.8.0) + reline (0.3.4) + io-console (~> 0.5) + require_all (3.0.0) + reverse_markdown (2.1.1) + nokogiri + rexml (3.2.5) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + 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-support (3.12.0) + rubocop (1.52.0) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.28.1) + parser (>= 3.2.1.0) + rubocop-performance (1.18.0) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + ruby-progressbar (1.13.0) + semver2 (3.4.2) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-console (0.9.1) + ansi + simplecov + terminal-table + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + solargraph (0.49.0) + backport (~> 1.2) + benchmark + bundler (~> 2.0) + diff-lcs (~> 1.4) + e2mmap + jaro_winkler (~> 1.5) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.1) + parser (~> 3.0) + rbs (~> 2.0) + reverse_markdown (~> 2.0) + rubocop (~> 1.38) + thor (~> 1.0) + tilt (~> 2.0) + yard (~> 0.9, >= 0.9.24) + sys-uname (1.2.3) + ffi (~> 1.1) + systemu (2.6.5) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.2.2) + tilt (2.1.0) + unicode-display_width (2.4.2) + uuid (2.3.9) + macaddr (~> 1.0) + yard (0.9.34) + +PLATFORMS + arm64-darwin-22 + +DEPENDENCIES + allure-cucumber! + allure-rspec! + allure-ruby-commons! + climate_control (~> 1.2.0) + colorize (~> 0.8.1) + debug (~> 1.8) + oj (~> 3.14) + rake (~> 13.0.6) + rspec (~> 3.12.0) + rubocop (~> 1.52.0) + rubocop-performance (~> 1.18.0) + semver2 (~> 3.4) + simplecov (~> 0.22.0) + simplecov-console (~> 0.9.1) + solargraph (~> 0.49.0) + +BUNDLED WITH + 2.4.12 diff --git a/Gemfile_next.lock b/Gemfile_next.lock new file mode 100644 index 00000000..d9889299 --- /dev/null +++ b/Gemfile_next.lock @@ -0,0 +1,186 @@ +PATH + remote: allure-cucumber + specs: + allure-cucumber (2.21.2) + allure-ruby-commons (= 2.21.2) + cucumber (>= 4.0.0, < 9) + +PATH + remote: allure-rspec + specs: + allure-rspec (2.21.2) + allure-ruby-commons (= 2.21.2) + rspec-core (>= 3.8, < 4) + +PATH + remote: allure-ruby-commons + specs: + allure-ruby-commons (2.21.2) + mime-types (>= 3.3, < 4) + require_all (>= 2, < 4) + rspec-expectations (~> 3.12) + uuid (>= 2.3, < 3) + +GEM + remote: https://rubygems.org/ + specs: + ansi (1.5.0) + ast (2.4.2) + backport (1.2.0) + benchmark (0.2.1) + builder (3.2.4) + climate_control (1.2.0) + colorize (0.8.1) + cucumber (8.0.0) + builder (~> 3.2, >= 3.2.4) + cucumber-ci-environment (~> 9.0, >= 9.0.4) + cucumber-core (~> 11.0, >= 11.0.0) + cucumber-cucumber-expressions (~> 15.1, >= 15.1.1) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-html-formatter (~> 19.1, >= 19.1.0) + cucumber-messages (~> 18.0, >= 18.0.0) + diff-lcs (~> 1.5, >= 1.5.0) + mime-types (~> 3.4, >= 3.4.1) + multi_test (~> 1.1, >= 1.1.0) + sys-uname (~> 1.2, >= 1.2.2) + cucumber-ci-environment (9.2.0) + cucumber-core (11.0.0) + cucumber-gherkin (~> 23.0, >= 23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-tag-expressions (~> 4.1, >= 4.1.0) + cucumber-cucumber-expressions (15.2.0) + cucumber-gherkin (23.0.1) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-html-formatter (19.2.0) + cucumber-messages (~> 18.0, >= 18.0.0) + cucumber-messages (18.0.0) + cucumber-tag-expressions (4.1.0) + debug (1.8.0) + irb (>= 1.5.0) + reline (>= 0.3.1) + diff-lcs (1.5.0) + docile (1.4.0) + e2mmap (0.1.0) + ffi (1.15.5) + io-console (0.6.0) + irb (1.6.4) + reline (>= 0.3.0) + jaro_winkler (1.5.5) + json (2.6.3) + kramdown (2.4.0) + rexml + kramdown-parser-gfm (1.1.0) + kramdown (~> 2.0) + macaddr (1.7.2) + systemu (~> 2.6.5) + mime-types (3.4.1) + mime-types-data (~> 3.2015) + mime-types-data (3.2023.0218.1) + multi_test (1.1.0) + nokogiri (1.15.2-arm64-darwin) + racc (~> 1.4) + oj (3.15.0) + parallel (1.23.0) + parser (3.2.2.1) + ast (~> 2.4.1) + racc (1.7.0) + rainbow (3.1.1) + rake (13.0.6) + rbs (2.8.4) + regexp_parser (2.8.0) + reline (0.3.4) + io-console (~> 0.5) + require_all (3.0.0) + reverse_markdown (2.1.1) + nokogiri + rexml (3.2.5) + rspec (3.12.0) + rspec-core (~> 3.12.0) + rspec-expectations (~> 3.12.0) + rspec-mocks (~> 3.12.0) + rspec-core (3.12.2) + rspec-support (~> 3.12.0) + rspec-expectations (3.12.3) + 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-support (3.12.0) + rubocop (1.52.0) + json (~> 2.3) + parallel (~> 1.10) + parser (>= 3.2.0.0) + rainbow (>= 2.2.2, < 4.0) + regexp_parser (>= 1.8, < 3.0) + rexml (>= 3.2.5, < 4.0) + rubocop-ast (>= 1.28.0, < 2.0) + ruby-progressbar (~> 1.7) + unicode-display_width (>= 2.4.0, < 3.0) + rubocop-ast (1.28.1) + parser (>= 3.2.1.0) + rubocop-performance (1.18.0) + rubocop (>= 1.7.0, < 2.0) + rubocop-ast (>= 0.4.0) + ruby-progressbar (1.13.0) + semver2 (3.4.2) + simplecov (0.22.0) + docile (~> 1.1) + simplecov-html (~> 0.11) + simplecov_json_formatter (~> 0.1) + simplecov-console (0.9.1) + ansi + simplecov + terminal-table + simplecov-html (0.12.3) + simplecov_json_formatter (0.1.4) + solargraph (0.49.0) + backport (~> 1.2) + benchmark + bundler (~> 2.0) + diff-lcs (~> 1.4) + e2mmap + jaro_winkler (~> 1.5) + kramdown (~> 2.3) + kramdown-parser-gfm (~> 1.1) + parser (~> 3.0) + rbs (~> 2.0) + reverse_markdown (~> 2.0) + rubocop (~> 1.38) + thor (~> 1.0) + tilt (~> 2.0) + yard (~> 0.9, >= 0.9.24) + sys-uname (1.2.3) + ffi (~> 1.1) + systemu (2.6.5) + terminal-table (3.0.2) + unicode-display_width (>= 1.1.1, < 3) + thor (1.2.2) + tilt (2.1.0) + unicode-display_width (2.4.2) + uuid (2.3.9) + macaddr (~> 1.0) + yard (0.9.34) + +PLATFORMS + arm64-darwin-22 + +DEPENDENCIES + allure-cucumber! + allure-rspec! + allure-ruby-commons! + climate_control (~> 1.2.0) + colorize (~> 0.8.1) + debug (~> 1.8) + oj (~> 3.14) + rake (~> 13.0.6) + rspec (~> 3.12.0) + rubocop (~> 1.52.0) + rubocop-performance (~> 1.18.0) + semver2 (~> 3.4) + simplecov (~> 0.22.0) + simplecov-console (~> 0.9.1) + solargraph (~> 0.49.0) + +BUNDLED WITH + 2.4.12 diff --git a/allure-cucumber/spec/spec_helper.rb b/allure-cucumber/spec/spec_helper.rb index 10f8571b..4df0c34d 100644 --- a/allure-cucumber/spec/spec_helper.rb +++ b/allure-cucumber/spec/spec_helper.rb @@ -18,7 +18,7 @@ config.before do |example| example.epic("allure-cucumber") example.parameter("ruby", ENV["RUBY_VERSION"]) - example.parameter("oj", ENV["WITH_OJ_GEM"]) + example.parameter("oj", ENV["DEPENDENCIES_OJ"]) end end diff --git a/allure-rspec/spec/spec_helper.rb b/allure-rspec/spec/spec_helper.rb index 32b55081..b01bd416 100644 --- a/allure-rspec/spec/spec_helper.rb +++ b/allure-rspec/spec/spec_helper.rb @@ -17,7 +17,7 @@ config.before do |example| example.epic("allure-rspec") example.parameter("ruby", ENV["RUBY_VERSION"]) - example.parameter("oj", ENV["WITH_OJ_GEM"]) + example.parameter("oj", ENV["DEPENDENCIES_OJ"]) end end diff --git a/allure-ruby-commons/spec/spec_helper.rb b/allure-ruby-commons/spec/spec_helper.rb index 8c78d93f..af8aae76 100644 --- a/allure-ruby-commons/spec/spec_helper.rb +++ b/allure-ruby-commons/spec/spec_helper.rb @@ -18,7 +18,7 @@ config.before do |example| example.epic("allure-ruby-commons") example.parameter("ruby", ENV["RUBY_VERSION"]) - example.parameter("oj", ENV["WITH_OJ_GEM"]) + example.parameter("oj", ENV["DEPENDENCIES_OJ"]) end end