From cfeeb04ce9da5b6c3408e34cebdfa4c3a9e1cde1 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 13 Oct 2023 15:55:22 +0100 Subject: [PATCH 1/3] chore: update deps and add gh ci --- .github/workflows/test.yml | 23 +++++++++++++++++++++++ .gitignore | 4 ++++ .travis.yml | 3 --- Gemfile | 10 +++++----- pact_broker/Gemfile | 5 ++++- pact_broker/config.ru | 1 + 6 files changed, 37 insertions(+), 9 deletions(-) create mode 100644 .github/workflows/test.yml delete mode 100644 .travis.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..368c766 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,23 @@ +name: Test + +on: [push, pull_request] + +jobs: + test: + strategy: + fail-fast: false + matrix: + ruby_version: ["2.7","3.0","3.1","3.2"] + os: ["ubuntu-latest","windows-latest","macos-latest"] + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + - uses: ruby/setup-ruby@v1 + with: + ruby-version: ${{ matrix.ruby_version }} + - run: "bundle install" + - run: "bundle exec rake spec" + - run: "bundle exec rake pact:verify:foobar" + if: matrix.os != 'windows-latest' + - run: "ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/spec/pacts/foo-bar.json" + if: matrix.os == 'windows-latest' \ No newline at end of file diff --git a/.gitignore b/.gitignore index 796e459..133b9a7 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,5 @@ pact_broker/log +Gemfile.lock +*.sqlite3 +/log +/provider/reports \ No newline at end of file diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index d2e7277..0000000 --- a/.travis.yml +++ /dev/null @@ -1,3 +0,0 @@ -language: ruby -rvm: -- 2.4 diff --git a/Gemfile b/Gemfile index 4d3d1e1..a2c46de 100644 --- a/Gemfile +++ b/Gemfile @@ -5,11 +5,11 @@ if ENV['X_PACT_DEVELOPMENT'] gem "pact-support", path: '../pact-support' gem "pact-mock_service", path: '../pact-mock_service' else - gem "pact", "~> 1.12" + gem "pact", "~> 1.63" end gem "pact_broker-client" -gem "rake", "~> 12.0" -gem "rspec", "~> 3.6" -gem "faraday", "~> 0.12" -gem "pry-byebug", "~> 3.4" +gem "rake", "~> 12" +gem "rspec", "~> 3" +gem "faraday", "~> 1.0", "< 3.0" +gem "pry-byebug", "~> 3" diff --git a/pact_broker/Gemfile b/pact_broker/Gemfile index cba6278..d51588f 100644 --- a/pact_broker/Gemfile +++ b/pact_broker/Gemfile @@ -1,7 +1,10 @@ source 'https://rubygems.org' gem 'rake' -gem 'pact_broker', '~>2.0' +gem 'pact_broker', '~>2' gem 'sqlite3' gem 'thin' gem 'pry-byebug' + +gem "sucker_punch", git: "https://github.com/pact-foundation/sucker_punch.git", + ref: "fix/rename-is-singleton-class-method-2" \ No newline at end of file diff --git a/pact_broker/config.ru b/pact_broker/config.ru index 1503a70..b42fed2 100644 --- a/pact_broker/config.ru +++ b/pact_broker/config.ru @@ -5,6 +5,7 @@ require 'pact_broker' DATABASE_CREDENTIALS = {adapter: "sqlite", database: "pact_broker_database.sqlite3", :encoding => 'utf8'} app = PactBroker::App.new do | config | + config.log_stream = "stdout" config.database_connection = Sequel.connect(DATABASE_CREDENTIALS.merge(:logger => config.logger)) end From caf8bced13e902cd800e659817b55311a607d594 Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 13 Oct 2023 15:56:10 +0100 Subject: [PATCH 2/3] chore: rm lock files --- Gemfile.lock | 97 -------------------- pact_broker/Gemfile.lock | 191 --------------------------------------- 2 files changed, 288 deletions(-) delete mode 100644 Gemfile.lock delete mode 100644 pact_broker/Gemfile.lock diff --git a/Gemfile.lock b/Gemfile.lock deleted file mode 100644 index 371dd05..0000000 --- a/Gemfile.lock +++ /dev/null @@ -1,97 +0,0 @@ -GEM - remote: http://rubygems.org/ - specs: - awesome_print (1.8.0) - byebug (11.1.3) - coderay (1.1.3) - diff-lcs (1.4.4) - faraday (0.17.3) - multipart-post (>= 1.2, < 3) - filelock (1.1.1) - find_a_port (1.0.1) - httparty (0.18.1) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - json (2.3.1) - method_source (1.0.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2020.0512) - multi_xml (0.6.0) - multipart-post (2.1.1) - pact (1.51.1) - pact-mock_service (~> 3.0, >= 3.3.1) - pact-support (~> 1.9) - rack-test (>= 0.6.3, < 2.0.0) - rspec (~> 3.0) - term-ansicolor (~> 1.0) - thor (>= 0.20, < 2.0) - webrick (~> 1.3) - pact-mock_service (3.6.2) - filelock (~> 1.1) - find_a_port (~> 1.0.1) - json - pact-support (~> 1.12, >= 1.12.0) - rack (~> 2.0) - rspec (>= 2.14) - term-ansicolor (~> 1.0) - thor (>= 0.19, < 2.0) - webrick (~> 1.3) - pact-support (1.15.1) - awesome_print (~> 1.1) - randexp (~> 0.1.7) - rspec (>= 2.14) - term-ansicolor (~> 1.0) - pact_broker-client (1.27.0) - httparty - json - rake - table_print (~> 1.5) - term-ansicolor - thor (~> 0.20) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) - rack (2.2.3) - rack-test (1.1.0) - rack (>= 1.0, < 3) - rake (12.3.3) - randexp (0.1.7) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - sync (0.5.0) - table_print (1.5.7) - term-ansicolor (1.7.1) - tins (~> 1.0) - thor (0.20.3) - tins (1.25.0) - sync - webrick (1.6.0) - -PLATFORMS - ruby - -DEPENDENCIES - faraday (~> 0.12) - pact (~> 1.12) - pact_broker-client - pry-byebug (~> 3.4) - rake (~> 12.0) - rspec (~> 3.6) - -BUNDLED WITH - 1.17.3 diff --git a/pact_broker/Gemfile.lock b/pact_broker/Gemfile.lock deleted file mode 100644 index bf709ea..0000000 --- a/pact_broker/Gemfile.lock +++ /dev/null @@ -1,191 +0,0 @@ -GEM - remote: https://rubygems.org/ - specs: - as-notifications (1.0.1) - awesome_print (1.8.0) - byebug (11.1.3) - coderay (1.1.3) - concurrent-ruby (1.1.7) - crass (1.0.6) - daemons (1.3.1) - declarative (0.0.20) - declarative-builder (0.1.0) - declarative-option (< 0.2.0) - declarative-option (0.1.0) - diff-lcs (1.4.4) - disposable (0.4.7) - declarative (>= 0.0.9, < 1.0.0) - declarative-builder (< 0.2.0) - declarative-option (< 0.2.0) - representable (>= 2.4.0, <= 3.1.0) - uber (< 0.2.0) - dry-configurable (0.11.6) - concurrent-ruby (~> 1.0) - dry-core (~> 0.4, >= 0.4.7) - dry-equalizer (~> 0.2) - dry-container (0.7.2) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (0.4.9) - concurrent-ruby (~> 1.0) - dry-equalizer (0.3.0) - dry-logic (0.4.2) - dry-container (~> 0.2, >= 0.2.6) - dry-core (~> 0.2) - dry-equalizer (~> 0.2) - dry-types (0.10.3) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1) - dry-container (~> 0.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - inflecto (~> 0.0.0, >= 0.0.2) - dry-validation (0.10.7) - concurrent-ruby (~> 1.0) - dry-configurable (~> 0.1, >= 0.1.3) - dry-core (~> 0.2, >= 0.2.1) - dry-equalizer (~> 0.2) - dry-logic (~> 0.4, >= 0.4.0) - dry-types (~> 0.9, >= 0.9.0) - eventmachine (1.2.7) - haml (5.1.2) - temple (>= 0.8.0) - tilt - httparty (0.18.1) - mime-types (~> 3.0) - multi_xml (>= 0.5.2) - i18n (1.8.5) - concurrent-ruby (~> 1.0) - inflecto (0.0.2) - json (2.3.1) - method_source (1.0.0) - mime-types (3.3.1) - mime-types-data (~> 3.2015) - mime-types-data (3.2020.0512) - mini_portile2 (2.6.1) - multi_json (1.15.0) - multi_xml (0.6.0) - mustermann (1.1.1) - ruby2_keywords (~> 0.0.1) - nokogiri (1.12.5) - mini_portile2 (~> 2.6.1) - racc (~> 1.4) - nokogumbo (2.0.2) - nokogiri (~> 1.8, >= 1.8.4) - pact-support (1.15.1) - awesome_print (~> 1.1) - randexp (~> 0.1.7) - rspec (>= 2.14) - term-ansicolor (~> 1.0) - pact_broker (2.59.2) - dry-logic (= 0.4.2) - dry-types (~> 0.10.3) - dry-validation (~> 0.10.5) - haml (~> 5.0) - httparty (~> 0.14) - json (~> 2.3) - pact-support (~> 1.14, >= 1.14.1) - padrino-core (~> 0.14, >= 0.14.3) - rack (~> 2.2, >= 2.2.3) - rack-protection (>= 2.0.8.1, < 3.0) - redcarpet (~> 3.3, >= 3.3.2) - reform (~> 2.3, >= 2.3.1) - roar (~> 1.1) - sanitize (~> 5.2, >= 5.2.1) - semantic_logger (~> 4.3) - semver2 (~> 3.4.2) - sequel (~> 5.28) - sinatra (>= 2.0.8.1, < 3.0) - sucker_punch (~> 2.0) - table_print (~> 1.5) - webmachine (= 1.5.0) - padrino-core (0.15.0) - padrino-support (= 0.15.0) - sinatra (>= 2.0.0) - thor (~> 0.18) - padrino-support (0.15.0) - pry (0.13.1) - coderay (~> 1.1) - method_source (~> 1.0) - pry-byebug (3.9.0) - byebug (~> 11.0) - pry (~> 0.13.0) - racc (1.5.2) - rack (2.2.3) - rack-protection (2.0.8.1) - rack - rake (13.0.1) - randexp (0.1.7) - redcarpet (3.5.0) - reform (2.3.3) - disposable (>= 0.4.2, < 0.5.0) - representable (>= 2.4.0, < 3.1.0) - uber (< 0.2.0) - representable (3.0.4) - declarative (< 0.1.0) - declarative-option (< 0.2.0) - uber (< 0.2.0) - roar (1.1.0) - representable (~> 3.0.0) - rspec (3.9.0) - rspec-core (~> 3.9.0) - rspec-expectations (~> 3.9.0) - rspec-mocks (~> 3.9.0) - rspec-core (3.9.2) - rspec-support (~> 3.9.3) - rspec-expectations (3.9.2) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-mocks (3.9.1) - diff-lcs (>= 1.2.0, < 2.0) - rspec-support (~> 3.9.0) - rspec-support (3.9.3) - ruby2_keywords (0.0.2) - sanitize (5.2.1) - crass (~> 1.0.2) - nokogiri (>= 1.8.0) - nokogumbo (~> 2.0) - semantic_logger (4.7.2) - concurrent-ruby (~> 1.0) - semver2 (3.4.2) - sequel (5.35.0) - sinatra (2.0.8.1) - mustermann (~> 1.0) - rack (~> 2.0) - rack-protection (= 2.0.8.1) - tilt (~> 2.0) - sqlite3 (1.4.2) - sucker_punch (2.1.2) - concurrent-ruby (~> 1.0) - sync (0.5.0) - table_print (1.5.7) - temple (0.8.2) - term-ansicolor (1.7.1) - tins (~> 1.0) - thin (1.7.2) - daemons (~> 1.0, >= 1.0.9) - eventmachine (~> 1.0, >= 1.0.4) - rack (>= 1, < 3) - thor (0.20.3) - tilt (2.0.10) - tins (1.25.0) - sync - uber (0.1.0) - webmachine (1.5.0) - as-notifications (~> 1.0) - i18n (>= 0.4.0) - multi_json - -PLATFORMS - ruby - -DEPENDENCIES - pact_broker (~> 2.0) - pry-byebug - rake - sqlite3 - thin - -BUNDLED WITH - 1.17.3 From bfa672dbf48b1f3c6ff0b4191f4b92347258ceff Mon Sep 17 00:00:00 2001 From: Yousaf Nabi Date: Fri, 13 Oct 2023 16:01:41 +0100 Subject: [PATCH 3/3] chore: rm appveyor --- .appveyor.yml | 17 ----------------- 1 file changed, 17 deletions(-) delete mode 100644 .appveyor.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index ad352db..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,17 +0,0 @@ -# fix lineendings in Windows -init: - - git config --global core.autocrlf input - -build: off - -cache: - - vendor/bundle - -install: - - set PATH=C:\Ruby24-x64\bin;%PATH% - - bundle config --local path vendor/bundle - - bundle install - -test_script: - - bundle exec rake spec - - bundle exec C:/Ruby24-x64/bin/ruby.exe -S pact verify --pact-helper ./provider/spec/pact_helper.rb --pact-uri ./consumer/spec/pacts/foo-bar.json