matic-testing 0.2.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: a9609e4cd40635238470811a62416d3ba2a1efa7b55ae677481d6e5ab21ee34e
4
+ data.tar.gz: 95f519ecf6ce2589b63b152a412e3a4bb1c37b1bd74a3c373f05284a9c9e4c4d
5
+ SHA512:
6
+ metadata.gz: 012f4b7dc5beebdc93358c17a2e9810e63204c0b89f0611b2bb0ea5945755c429361b473edc787e6cb0f107ece68ad2e67ec30d9b3d006732a08cbeffcc556c8
7
+ data.tar.gz: 7b72e4c3795f15f27e2ff4974185fdcac0f7464aa018b0fab3791bbb6ae7845c35aa722651e3bf7c8b96bc656145faf7ff13f169bf17f2bf08a93b6d2d94c420
@@ -0,0 +1,86 @@
1
+
2
+ version: 2.1
3
+
4
+ orbs:
5
+ ci: matic/orb-common@0.2
6
+ ruby: circleci/ruby@1.8.0
7
+
8
+ jobs:
9
+
10
+ rspec-test:
11
+ resource_class: small
12
+ parameters:
13
+ ruby-version:
14
+ type: string
15
+ docker:
16
+ - image: cimg/ruby:<< parameters.ruby-version >>
17
+ steps:
18
+ - checkout
19
+ - restore_cache:
20
+ key: gem-v1-cache
21
+ - run:
22
+ name: Install dependencies
23
+ command: |
24
+ bundle config path ~/.bundle
25
+ bundle install --jobs 4 --retry 3
26
+ - save_cache:
27
+ key: gem-v1-cache
28
+ paths:
29
+ - "~/.bundle"
30
+ - run:
31
+ name: Run Rspec
32
+ command: ./bin/rspec
33
+
34
+ release:
35
+ parameters:
36
+ tag:
37
+ type: string
38
+ default: "default-tag"
39
+ docker:
40
+ - image: cimg/ruby:2.6.5
41
+ environment:
42
+ RELEASE_TAG: << parameters.tag >>
43
+ steps:
44
+ - checkout
45
+ - ruby/install-deps
46
+ - run:
47
+ name: Set up credentials
48
+ command: |
49
+ mkdir -p $HOME/.gem
50
+ touch $HOME/.gem/credentials
51
+ chmod 0600 $HOME/.gem/credentials
52
+ printf -- "---\n:rubygems_api_key: $RUBYGEMS_API_KEY\n" > $HOME/.gem/credentials
53
+ - run:
54
+ name: Set version
55
+ command: sed -i "s/[[:digit:]].[[:digit:]].[[:digit:]]/${RELEASE_TAG}/g" $(find . -name "version.rb")
56
+ - run:
57
+ name: Build gem
58
+ command: gem build *.gemspec
59
+ - run:
60
+ name: Push gem
61
+ command: gem push *.gem
62
+
63
+ workflows:
64
+
65
+ matic-testing.build-pull-request:
66
+ when:
67
+ not:
68
+ equal: [ master, << pipeline.git.branch >> ]
69
+ jobs:
70
+
71
+ - rspec-test:
72
+ matrix:
73
+ parameters:
74
+ ruby-version: [ '2.5', '2.6', '2.7' ]
75
+
76
+ matic-testing.release:
77
+ jobs:
78
+
79
+ - release:
80
+ tag: << pipeline.git.tag >>
81
+ context: gem-publishing
82
+ filters:
83
+ branches:
84
+ ignore: /.*/
85
+ tags:
86
+ only: /\d\.\d\.\d/ # It should be [digin dot digit dot digit] format
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.rubocop.yml ADDED
@@ -0,0 +1,10 @@
1
+ Style/StringLiterals:
2
+ Enabled: true
3
+ EnforcedStyle: double_quotes
4
+
5
+ Style/StringLiteralsInInterpolation:
6
+ Enabled: true
7
+ EnforcedStyle: double_quotes
8
+
9
+ Layout/LineLength:
10
+ Max: 120
@@ -0,0 +1,84 @@
1
+ # Contributor Covenant Code of Conduct
2
+
3
+ ## Our Pledge
4
+
5
+ We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion, or sexual identity and orientation.
6
+
7
+ We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
8
+
9
+ ## Our Standards
10
+
11
+ Examples of behavior that contributes to a positive environment for our community include:
12
+
13
+ * Demonstrating empathy and kindness toward other people
14
+ * Being respectful of differing opinions, viewpoints, and experiences
15
+ * Giving and gracefully accepting constructive feedback
16
+ * Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
17
+ * Focusing on what is best not just for us as individuals, but for the overall community
18
+
19
+ Examples of unacceptable behavior include:
20
+
21
+ * The use of sexualized language or imagery, and sexual attention or
22
+ advances of any kind
23
+ * Trolling, insulting or derogatory comments, and personal or political attacks
24
+ * Public or private harassment
25
+ * Publishing others' private information, such as a physical or email
26
+ address, without their explicit permission
27
+ * Other conduct which could reasonably be considered inappropriate in a
28
+ professional setting
29
+
30
+ ## Enforcement Responsibilities
31
+
32
+ Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive, or harmful.
33
+
34
+ Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits, issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for moderation decisions when appropriate.
35
+
36
+ ## Scope
37
+
38
+ This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing the community in public spaces. Examples of representing our community include using an official e-mail address, posting via an official social media account, or acting as an appointed representative at an online or offline event.
39
+
40
+ ## Enforcement
41
+
42
+ Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible for enforcement at 18499500+omaik@users.noreply.github.com. All complaints will be reviewed and investigated promptly and fairly.
43
+
44
+ All community leaders are obligated to respect the privacy and security of the reporter of any incident.
45
+
46
+ ## Enforcement Guidelines
47
+
48
+ Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem in violation of this Code of Conduct:
49
+
50
+ ### 1. Correction
51
+
52
+ **Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the community.
53
+
54
+ **Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation and an explanation of why the behavior was inappropriate. A public apology may be requested.
55
+
56
+ ### 2. Warning
57
+
58
+ **Community Impact**: A violation through a single incident or series of actions.
59
+
60
+ **Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding interactions in community spaces as well as external channels like social media. Violating these terms may lead to a temporary or permanent ban.
61
+
62
+ ### 3. Temporary Ban
63
+
64
+ **Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
65
+
66
+ **Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified period of time. No public or private interaction with the people involved, including unsolicited interaction with those enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
67
+
68
+ ### 4. Permanent Ban
69
+
70
+ **Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
71
+
72
+ **Consequence**: A permanent ban from any sort of public interaction within the community.
73
+
74
+ ## Attribution
75
+
76
+ This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0,
77
+ available at https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
78
+
79
+ Community Impact Guidelines were inspired by [Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
80
+
81
+ [homepage]: https://www.contributor-covenant.org
82
+
83
+ For answers to common questions about this code of conduct, see the FAQ at
84
+ https://www.contributor-covenant.org/faq. Translations are available at https://www.contributor-covenant.org/translations.
data/Gemfile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in matic-testing.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rspec", "~> 3.0"
11
+
12
+ gem "rubocop", "~> 0.80"
data/Gemfile.lock ADDED
@@ -0,0 +1,58 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ matic-testing (0.0.0)
5
+ vcr
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ ast (2.4.2)
11
+ diff-lcs (1.5.0)
12
+ parallel (1.22.1)
13
+ parser (3.1.2.1)
14
+ ast (~> 2.4.1)
15
+ rainbow (3.1.1)
16
+ rake (13.0.6)
17
+ regexp_parser (2.6.0)
18
+ rexml (3.2.5)
19
+ rspec (3.11.0)
20
+ rspec-core (~> 3.11.0)
21
+ rspec-expectations (~> 3.11.0)
22
+ rspec-mocks (~> 3.11.0)
23
+ rspec-core (3.11.0)
24
+ rspec-support (~> 3.11.0)
25
+ rspec-expectations (3.11.1)
26
+ diff-lcs (>= 1.2.0, < 2.0)
27
+ rspec-support (~> 3.11.0)
28
+ rspec-mocks (3.11.1)
29
+ diff-lcs (>= 1.2.0, < 2.0)
30
+ rspec-support (~> 3.11.0)
31
+ rspec-support (3.11.1)
32
+ rubocop (0.93.1)
33
+ parallel (~> 1.10)
34
+ parser (>= 2.7.1.5)
35
+ rainbow (>= 2.2.2, < 4.0)
36
+ regexp_parser (>= 1.8)
37
+ rexml
38
+ rubocop-ast (>= 0.6.0)
39
+ ruby-progressbar (~> 1.7)
40
+ unicode-display_width (>= 1.4.0, < 2.0)
41
+ rubocop-ast (1.23.0)
42
+ parser (>= 3.1.1.0)
43
+ ruby-progressbar (1.11.0)
44
+ unicode-display_width (1.8.0)
45
+ vcr (6.1.0)
46
+
47
+ PLATFORMS
48
+ x86_64-darwin-20
49
+ x86_64-linux
50
+
51
+ DEPENDENCIES
52
+ matic-testing!
53
+ rake (~> 13.0)
54
+ rspec (~> 3.0)
55
+ rubocop (~> 0.80)
56
+
57
+ BUNDLED WITH
58
+ 2.2.32
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2021 Oleh Maikovych
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,115 @@
1
+ # Matic::Testing
2
+
3
+
4
+ ## Installation
5
+
6
+ Add this line to your application's Gemfile:
7
+
8
+ ```ruby
9
+ gem 'matic-testing'
10
+ ```
11
+
12
+ And then execute:
13
+
14
+ $ bundle install
15
+
16
+ Or install it yourself as:
17
+
18
+ $ gem install matic-testing
19
+
20
+ ## Plugins
21
+
22
+ By itself gem does nothing, you need to require the plugin to make some use of it.
23
+
24
+
25
+ ### VCR JSON API
26
+
27
+ Add this line to enable it
28
+
29
+ ```ruby
30
+ require 'matic/testing/vcr_json_api'
31
+ ```
32
+
33
+ #### Features:
34
+
35
+ ##### Custom Cassette serializers.
36
+
37
+ You can use them with `:serialize_with` VCR config.
38
+
39
+ Available options
40
+ ```ruby
41
+ :json_api_serializer # Serializes request and response body as formatted JSON.
42
+ :json_api_serializer_without_headers # Works as previous, additionally removes headers from request and response.
43
+ :json_api_as_yml # Serializes request and response body as formatted YML
44
+ :json_api_as_yml_without_headers # Works as previous, additionally removes headers from request and response.
45
+
46
+ ```
47
+
48
+ ###### Examples:
49
+
50
+ As Rspec metadata:
51
+
52
+ ```ruby
53
+ describe ClassName, vcr: {cassette_name: 'name',
54
+ serialize_with: :json_api_serializer} do
55
+ end
56
+
57
+ ```
58
+
59
+ Through `VCR.use_cassette`
60
+
61
+ ```ruby
62
+ VCR.use_cassette('name', serialize_with: :json_api_serializer) do
63
+ end
64
+ ```
65
+
66
+ Through default options
67
+
68
+ ```ruby
69
+ VCR.configure do |c|
70
+ c.default_cassette_options = {
71
+ serialize_with: :json_api_serializer
72
+ ...
73
+ }
74
+ end
75
+ ```
76
+
77
+ ##### JSON Body request matcher
78
+
79
+ Matches Recorded and Executed Request bodies, but instead of comparing strings, converts JSONs into hashes and does clever matching.
80
+
81
+ Additionally it does better job in reporting what exactly wrong with the request. Like this:
82
+
83
+ ![image](https://user-images.githubusercontent.com/18499500/113133474-5e195e00-9228-11eb-8054-f2b73b751600.png)
84
+
85
+
86
+ ###### Examples:
87
+
88
+ As Rspec metadata:
89
+
90
+ ```ruby
91
+ describe ClassName, vcr: {cassette_name: 'name',
92
+ match_requests_on: %i[uri method json_body]} do
93
+ end
94
+
95
+ ```
96
+
97
+ Through `VCR.use_cassette`
98
+
99
+ ```ruby
100
+ VCR.use_cassette('name', match_requests_on: %i[uri method json_body]) do
101
+ end
102
+ ```
103
+
104
+ Through default options
105
+
106
+ ```ruby
107
+ VCR.configure do |c|
108
+ c.default_cassette_options = {
109
+ match_requests_on: %i[uri method json_body]
110
+ ...
111
+ }
112
+ end
113
+ ```
114
+
115
+
data/Rakefile ADDED
@@ -0,0 +1,12 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
5
+
6
+ RSpec::Core::RakeTask.new(:spec)
7
+
8
+ require "rubocop/rake_task"
9
+
10
+ RuboCop::RakeTask.new
11
+
12
+ task default: %i[spec rubocop]
data/bin/console ADDED
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ #!/usr/bin/env ruby
4
+
5
+ require "bundler/setup"
6
+ require "matic/testing"
7
+
8
+ # You can add fixtures and/or initialization code here to make experimenting
9
+ # with your gem easier. You can also use a different console, if you like.
10
+
11
+ # (If you use this, don't forget to add pry to your Gemfile!)
12
+ # require "pry"
13
+ # Pry.start
14
+
15
+ require "irb"
16
+ IRB.start(__FILE__)
data/bin/rspec ADDED
@@ -0,0 +1 @@
1
+ echo "TODO: add real tests"
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,88 @@
1
+ class JsonApiSerializer
2
+ include VCR::Cassette::Serializers::YAML
3
+ include VCR::Cassette::EncodingErrorHandling
4
+ include VCR::Cassette::SyntaxErrorHandling
5
+
6
+ HTTP_INTERACTIONS = 'http_interactions'.freeze
7
+ REQUEST = 'request'.freeze
8
+ RESPONSE = 'response'.freeze
9
+ HEADERS = 'headers'.freeze
10
+ BODY = 'body'.freeze
11
+ BODY_STRING = 'string'.freeze
12
+
13
+ def initialize(format = :json, remove_headers = false)
14
+ @format = format
15
+ @remove_headers = remove_headers
16
+ end
17
+
18
+ def serialize(hash)
19
+ hash[HTTP_INTERACTIONS].each do |interaction|
20
+ remove_headers(interaction) if @remove_headers
21
+
22
+ serialize_request_body(interaction)
23
+ serialize_response_body(interaction)
24
+ end
25
+
26
+ super(hash)
27
+ end
28
+
29
+ def deserialize(string)
30
+ data = super(string)
31
+ data[HTTP_INTERACTIONS].each do |interaction|
32
+ deserialize_request_body(interaction)
33
+ deserialize_response_body(interaction)
34
+ end
35
+ data
36
+ end
37
+
38
+ private
39
+
40
+ def serialize_request_body(interaction)
41
+ request_body_string = interaction[REQUEST][BODY][BODY_STRING]
42
+ interaction[REQUEST][BODY][BODY_STRING] = serialize_body(request_body_string) if request_body_string.present?
43
+ end
44
+
45
+ def serialize_response_body(interaction)
46
+ response_body_string = interaction[RESPONSE][BODY][BODY_STRING]
47
+ interaction[RESPONSE][BODY][BODY_STRING] = serialize_body(response_body_string)
48
+ end
49
+
50
+ def deserialize_request_body(interaction)
51
+ request_body_string = interaction[REQUEST][BODY][BODY_STRING]
52
+ interaction[REQUEST][BODY][BODY_STRING] = deserialize_body(request_body_string) if request_body_string.present?
53
+ end
54
+
55
+ def deserialize_response_body(interaction)
56
+ response_body_string = interaction[RESPONSE][BODY][BODY_STRING]
57
+ interaction[RESPONSE][BODY][BODY_STRING] = deserialize_body(response_body_string)
58
+ end
59
+
60
+ def remove_headers(interaction)
61
+ interaction[REQUEST].except!(HEADERS)
62
+ interaction[RESPONSE].except!(HEADERS)
63
+ end
64
+
65
+ def serialize_body(body)
66
+ if @format == :json
67
+ JSON.pretty_generate(JSON.parse(body))
68
+ elsif @format == :yml
69
+ JSON.parse(body)
70
+ else
71
+ body
72
+ end
73
+ rescue StandardError => _e
74
+ body
75
+ end
76
+
77
+ def deserialize_body(body)
78
+ if @format == :json
79
+ JSON.parse(body).to_json
80
+ elsif @format == :yml
81
+ body.to_json
82
+ else
83
+ body
84
+ end
85
+ rescue StandardError => _e
86
+ body
87
+ end
88
+ end
@@ -0,0 +1,31 @@
1
+ class DeepDiff
2
+ def self.call(a, b) # rubocop:disable all
3
+ (a.keys | b.keys).each_with_object({}) do |k, diff|
4
+ if a[k] != b[k]
5
+ diff[k] = if a[k].is_a?(Hash) && b[k].is_a?(Hash)
6
+ self.(a[k], b[k])
7
+ else
8
+ { actual: a[k], expected: b[k] }
9
+ end
10
+ end
11
+ diff
12
+ end
13
+ end
14
+ end
15
+
16
+ class JsonBodyMatcher
17
+ def self.call(actual, expected)
18
+ return true if actual.body.blank? && expected.body.blank?
19
+
20
+ DeepDiff.(JSON(actual.body), JSON(expected.body)).tap do |diff|
21
+ if diff.present?
22
+ puts colorize('Difference between request bodies:')
23
+ puts colorize(JSON.pretty_generate(diff))
24
+ end
25
+ end.empty?
26
+ end
27
+
28
+ def self.colorize(string)
29
+ string.respond_to?(:colorize) ? string.colorize(:red) : string
30
+ end
31
+ end
@@ -0,0 +1,13 @@
1
+ require 'vcr'
2
+ require_relative 'vcr_json_api/json_api_serializer'
3
+ require_relative 'vcr_json_api/json_body_matcher'
4
+
5
+ VCR.configure do |config|
6
+ config.cassette_serializers[:json_api_serializer] = JsonApiSerializer.new
7
+ config.cassette_serializers[:json_api_serializer_without_headers] = JsonApiSerializer.new(:json, true)
8
+ config.cassette_serializers[:json_api_as_yml] = JsonApiSerializer.new(:yml)
9
+ config.cassette_serializers[:json_api_as_yml_without_headers] = JsonApiSerializer.new(:yml, true)
10
+ config.register_request_matcher :json_body do |actual, expected|
11
+ JsonBodyMatcher.(actual, expected)
12
+ end
13
+ end
@@ -0,0 +1,7 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Matic
4
+ module Testing
5
+ VERSION = "0.2.5"
6
+ end
7
+ end
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "matic/testing/version"
4
+
5
+ module Matic
6
+ module Testing
7
+ class Error < StandardError; end
8
+ # Your code goes here...
9
+ end
10
+ end
@@ -0,0 +1,29 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "lib/matic/testing/version"
4
+
5
+ Gem::Specification.new do |spec|
6
+ spec.name = "matic-testing"
7
+ spec.version = Matic::Testing::VERSION
8
+ spec.authors = ["Matic Developers"]
9
+ spec.email = ["marko.k@matic.com", "oleh.m@matic.com"]
10
+
11
+ spec.summary = "Matic testing library"
12
+ spec.description = "Librirary with testing helpers for Ruby projects"
13
+ spec.homepage = "https://github.com/matic-insurance/matic-testing"
14
+ spec.license = "MIT"
15
+ spec.required_ruby_version = Gem::Requirement.new(">= 2.3.0")
16
+
17
+ spec.metadata["homepage_uri"] = spec.homepage
18
+ spec.metadata["source_code_uri"] = spec.homepage
19
+ spec.metadata["changelog_uri"] = spec.homepage
20
+
21
+ spec.files = Dir.chdir(File.expand_path(__dir__)) do
22
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
23
+ end
24
+ spec.bindir = "exe"
25
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
26
+ spec.require_paths = ["lib"]
27
+
28
+ spec.add_dependency("vcr")
29
+ end
metadata ADDED
@@ -0,0 +1,80 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: matic-testing
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.2.5
5
+ platform: ruby
6
+ authors:
7
+ - Matic Developers
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-10-24 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: vcr
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ description: Librirary with testing helpers for Ruby projects
28
+ email:
29
+ - marko.k@matic.com
30
+ - oleh.m@matic.com
31
+ executables: []
32
+ extensions: []
33
+ extra_rdoc_files: []
34
+ files:
35
+ - ".circleci/config.yml"
36
+ - ".gitignore"
37
+ - ".rspec"
38
+ - ".rubocop.yml"
39
+ - CODE_OF_CONDUCT.md
40
+ - Gemfile
41
+ - Gemfile.lock
42
+ - LICENSE.txt
43
+ - README.md
44
+ - Rakefile
45
+ - bin/console
46
+ - bin/rspec
47
+ - bin/setup
48
+ - lib/matic/testing.rb
49
+ - lib/matic/testing/vcr_json_api.rb
50
+ - lib/matic/testing/vcr_json_api/json_api_serializer.rb
51
+ - lib/matic/testing/vcr_json_api/json_body_matcher.rb
52
+ - lib/matic/testing/version.rb
53
+ - matic-testing.gemspec
54
+ homepage: https://github.com/matic-insurance/matic-testing
55
+ licenses:
56
+ - MIT
57
+ metadata:
58
+ homepage_uri: https://github.com/matic-insurance/matic-testing
59
+ source_code_uri: https://github.com/matic-insurance/matic-testing
60
+ changelog_uri: https://github.com/matic-insurance/matic-testing
61
+ post_install_message:
62
+ rdoc_options: []
63
+ require_paths:
64
+ - lib
65
+ required_ruby_version: !ruby/object:Gem::Requirement
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ version: 2.3.0
70
+ required_rubygems_version: !ruby/object:Gem::Requirement
71
+ requirements:
72
+ - - ">="
73
+ - !ruby/object:Gem::Version
74
+ version: '0'
75
+ requirements: []
76
+ rubygems_version: 3.1.2
77
+ signing_key:
78
+ specification_version: 4
79
+ summary: Matic testing library
80
+ test_files: []