Skip to content

Commit

Permalink
[DEX-2410] chore: remove sbmt-dev
Browse files Browse the repository at this point in the history
  • Loading branch information
bibendi committed Sep 4, 2024
1 parent d328d4c commit 73677ad
Show file tree
Hide file tree
Showing 16 changed files with 164 additions and 59 deletions.
6 changes: 3 additions & 3 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ include:

lint:
stage: test
image: dreg.sbmt.io/dhub/library/ruby:3.3
image: ${BUILD_CONF_HARBOR_REGISTRY}/dhub/library/ruby:3.3
tags:
- paas-stage
script:
Expand All @@ -14,11 +14,11 @@ lint:

tests:
stage: test
image: dreg.sbmt.io/dhub/library/ruby:$RUBY_VERSION
image: ${BUILD_CONF_HARBOR_REGISTRY}/dhub/library/ruby:$RUBY_VERSION
tags:
- paas-medium
services:
- name: dreg.sbmt.io/dhub/library/postgres:13
- name: ${BUILD_CONF_HARBOR_REGISTRY}/dhub/library/postgres:13
alias: postgres
variables:
POSTGRES_HOST_AUTH_METHOD: trust
Expand Down
60 changes: 55 additions & 5 deletions .rubocop.yml
Original file line number Diff line number Diff line change
@@ -1,12 +1,62 @@
inherit_gem:
sbmt-dev: config/rubocop.yml
# We want Exclude directives from different
# config files to get merged, not overwritten
inherit_mode:
merge:
- Exclude

AllCops:
TargetRubyVersion: 2.7
TargetRailsVersion: 6.0
NewCops: enable
SuggestExtensions: false
Exclude:
- spec/internal/pkg/**/*

require:
# Performance cops are bundled with Standard
- rubocop-performance
- rubocop-rails
- rubocop-rspec
# Standard's config uses custom cops,
# so it must be loaded
- standard

inherit_gem:
standard: config/base.yml

# rubocop-rails
Rails/SkipsModelValidations:
Enabled: false

# rubocop-rspec
RSpec/AnyInstance:
Enabled: false

RSpec/MultipleExpectations:
Enabled: false

RSpec/LetSetup:
Enabled: false

RSpec/StubbedMock:
Enabled: false

RSpec/MessageSpies:
Enabled: false

RSpec/NestedGroups:
Max: 10

RSpec/ExampleLength:
Max: 70

RSpec/MultipleMemoizedHelpers:
Max: 15

RSpec/DescribeClass:
Exclude:
- spec/internal/pkg/client/**/*
- spec/sbmt/pact/tasks/*

Rails/OverridingEnvVars:
RSpec/EmptyExampleGroup:
Exclude:
- spec/spec_helper.rb
- spec/pact/**/*
3 changes: 2 additions & 1 deletion Appraisals
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ versions_map = {
"6.0" => %w[2.7],
"6.1" => %w[2.7 3.0],
"7.0" => %w[3.1],
"7.1" => %w[3.2, 3.3]
"7.1" => %w[3.2],
"7.2" => %w[3.3]
}

current_ruby_version = RUBY_VERSION.split(".").first(2).join(".")
Expand Down
6 changes: 4 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,20 +11,22 @@ and this project adheres to [Semantic Versioning](http://semver.org/).

### Changed

- Remove sbmt-dev

### Fixed

## [0.11.1] - 2024-08-22

### Fixed
- the `verify_only` config option is now set based on the `PACT_CONSUMER_FULL_NAME` environment variable.
- the `verify_only` config option is now set based on the `PACT_CONSUMER_FULL_NAME` environment variable.
- if the current `consumer_name` does not match the `verify_only` option, then the consumer verification is skipped

## [0.11.0] - 2024-08-07

### Added
- async messages support
- collection matchers
- support of additional includes of proto-files for grpc plugin
- support of additional includes of proto-files for grpc plugin

## [0.10.0] - 2024-08-15

Expand Down
3 changes: 1 addition & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
ARG RUBY_VERSION

FROM dreg.sbmt.io/dhub/library/ruby:$RUBY_VERSION
FROM ruby:$RUBY_VERSION

ARG BUNDLER_VERSION
ARG RUBYGEMS_VERSION
Expand All @@ -12,4 +12,3 @@ RUN gem update --system "${RUBYGEMS_VERSION}" \
&& rm /usr/local/lib/ruby/gems/*/specifications/default/bundler*.gemspec \
&& gem install --default bundler:${BUNDLER_VERSION} \
&& gem install bundler -v ${BUNDLER_VERSION}

10 changes: 2 additions & 8 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -1,17 +1,11 @@
# frozen_string_literal: true

source "https://nexus.sbmt.io/repository/rubygems/"
source ENV.fetch("RUBYGEMS_PUBLIC_SOURCE", "https://rubygems.org/")

gemspec

source "https://nexus.sbmt.io/repository/ruby-gems-sbermarket/" do
source ENV.fetch("RUBYGEMS_PRIVATE_SOURCE", "https://nexus.sbmt.io/repository/ruby-gems-sbermarket/") do
group :development, :test do
gem "sbmt-app"
gem "sbmt-dev"
end
end

group :development, :test do
# https://jira.sbmt.io/browse/DEX-2404
gem "sidekiq", "< 7.3.0"
end
4 changes: 2 additions & 2 deletions docker-compose.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ services:
- bundler_data:/usr/local/bundle

pact-broker:
image: dreg.sbmt.io/dhub/pactfoundation/pact-broker
image: pactfoundation/pact-broker
ports:
- 9292
environment:
Expand All @@ -29,7 +29,7 @@ services:
PACT_BROKER_LOG_LEVEL: DEBUG

pact-cli:
image: dreg.sbmt.io/dhub/pactfoundation/pact-cli
image: pactfoundation/pact-cli
working_dir: /app
depends_on:
- pact-broker
Expand Down
2 changes: 1 addition & 1 deletion lib/sbmt/pact/provider/base_verifier.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ class VerifierError < Sbmt::Pact::Error; end
}.freeze

# env below are set up by pipeline-builder
# see https://gitlab.sbmt.io/paas/cicd/images/pact/pipeline-builder/-/blob/master/internal/commands/consumers-pipeline/ruby.go
# see paas/cicd/images/pact/pipeline-builder/-/blob/master/internal/commands/consumers-pipeline/ruby.go
def initialize(pact_config)
raise ArgumentError, "pact_config must be a subclass of Sbmt::Pact::Provider::PactConfig::Base" unless pact_config.is_a?(::Sbmt::Pact::Provider::PactConfig::Base)
@pact_config = pact_config
Expand Down
16 changes: 13 additions & 3 deletions sbmt-pact.gemspec
Original file line number Diff line number Diff line change
Expand Up @@ -9,10 +9,10 @@ Gem::Specification.new do |spec|

spec.summary = "Pact contract testing helpers"
spec.description = spec.summary
spec.homepage = "https://gitlab.sbmt.io/nstmrt/rubygems/sbmt-pact"
spec.homepage = "https://github.com/Kuper-Tech/sbmt-pact"
spec.required_ruby_version = ">= 2.7.0"

spec.metadata["allowed_push_host"] = "https://nexus.sbmt.io"
spec.metadata["allowed_push_host"] = "https://rubygems.org"

spec.metadata["homepage_uri"] = spec.homepage
spec.metadata["source_code_uri"] = spec.homepage
Expand Down Expand Up @@ -40,8 +40,18 @@ Gem::Specification.new do |spec|
spec.add_development_dependency "combustion", ">= 1.3"
spec.add_development_dependency "rake", ">= 13.0"
spec.add_development_dependency "sbmt-app", ">= 1.43.1"
spec.add_development_dependency "sbmt-dev", ">= 0.17.2"
spec.add_development_dependency "sbmt-kafka_consumer", ">= 2.0.1"
spec.add_development_dependency "sbmt-kafka_producer", ">= 1.0"
spec.add_development_dependency "dry-monads", "~> 1.3"
spec.add_development_dependency "rspec"
spec.add_development_dependency "rspec-rails"
spec.add_development_dependency "rspec_junit_formatter"
spec.add_development_dependency "rubocop"
spec.add_development_dependency "rubocop-rails"
spec.add_development_dependency "rubocop-rspec"
spec.add_development_dependency "rubocop-performance"
spec.add_development_dependency "standard", ">= 1.35.1"
spec.add_development_dependency "vcr", ">= 6.0"
spec.add_development_dependency "webmock", ">= 3.0"
spec.add_development_dependency "gruf-rspec", ">= 0.6.0"
end
12 changes: 6 additions & 6 deletions spec/fixtures/vcr/pact-broker/for_verification.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion spec/fixtures/vcr/pact-broker/not_found.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 73677ad

Please sign in to comment.