Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tuwilof/fitting
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 4.0.4
Choose a base ref
...
head repository: tuwilof/fitting
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: master
Choose a head ref
  • 12 commits
  • 6 files changed
  • 3 contributors

Commits on Oct 16, 2023

  1. add exit for invalid case

    tuwilof committed Oct 16, 2023
    Copy the full SHA
    29c905e View commit details
  2. add new version 4.1.0

    tuwilof committed Oct 16, 2023
    Copy the full SHA
    188deae View commit details

Commits on Jan 16, 2024

  1. Copy the full SHA
    3ba91bb View commit details
  2. Merge pull request #160 from ngoral/color_code_report

    Print report green if no failures
    tuwilof authored Jan 16, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    a1028a4 View commit details
  3. add new version 4.2.0

    tuwilof committed Jan 16, 2024
    Copy the full SHA
    e681a79 View commit details

Commits on Apr 3, 2024

  1. change home page

    tuwilof committed Apr 3, 2024
    Copy the full SHA
    73777d6 View commit details
  2. add new version 4.2.1

    tuwilof committed Apr 3, 2024
    Copy the full SHA
    723b54e View commit details
  3. change links

    tuwilof committed Apr 3, 2024
    Copy the full SHA
    a4d21c6 View commit details
  4. remove broken image

    tuwilof committed Apr 3, 2024
    Copy the full SHA
    2bebf4a View commit details

Commits on May 14, 2024

  1. not fail if webmock not used

    tuwilof committed May 14, 2024
    Copy the full SHA
    28f1dbd View commit details
  2. add new version 4.2.2

    tuwilof committed May 14, 2024
    Copy the full SHA
    7a23bc3 View commit details

Commits on Jul 9, 2024

  1. add link for join in community

    tuwilof committed Jul 9, 2024
    Copy the full SHA
    a4b5190 View commit details
Showing with 43 additions and 8 deletions.
  1. +20 −0 CHANGELOG.md
  2. +11 −3 README.md
  3. +1 −1 fitting.gemspec
  4. +1 −1 lib/fitting.rb
  5. +9 −2 lib/fitting/log.rb
  6. +1 −1 lib/fitting/version.rb
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,25 @@
# Change log

### 4.2.2 - 2024-05-14

* fixes
* not fail if webmock not used

### 4.2.1 - 2024-04-04

* patch
* change home page

### 4.2.0 - 2024-01-17

* features
* print report green if no failures

### 4.1.0 - 2023-10-16

* features
* add exit for invalid case

### 4.0.4 - 2023-10-06

* patch
14 changes: 11 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -4,12 +4,16 @@
alt="Fitting avatar: Documents with hangers"
src="./images/logo.png">



Library add improve test log, validate its according to your API documentation, show the documentation coverage with log.

Test log setting supports RSpec test and WebMock stubbing for Ruby On Rails application, API documentation supports API Blueprint and OpenAPI.

This reduces the costs of support, testers and analysts.

[Telegram community for any Fitting related questions](https://t.me/+NFojMTCFJ-1iNDYy)

Log
```text
FITTING incoming request {"method":"POST","path":"/public/api/v1/inboxes/tEX5JiZyceiwuKMi1oN9Sf8S/contacts","body":{},"response":{"status":200,"content_type":"application/json","body":{"source_id":"00dbf18d-879e-47cb-ac45-e9aece266eb1","pubsub_token":"ktn6YwPus57JDf4e59eFPom5","id":3291,"name":"shy-surf-401","email":null,"phone_number":null}},"title":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb:9","group":"./spec/controllers/public/api/v1/inbox/contacts_controller_spec.rb","host":"www.example.com"}
@@ -275,7 +279,7 @@ APIs:
##### Tomograph
To use additional features of the pre-converted [tomograph](https://github.com/funbox/tomograph)
To use additional features of the pre-converted [tomograph](https://github.com/tuwilof/tomograph)
example
@@ -416,13 +420,17 @@ Debug:
content-type: application/json
```

## Community

Join us on [Telegram](https://t.me/+NFojMTCFJ-1iNDYy).

## Contributing

Bug reports and pull requests are welcome on GitHub at [github.com/funbox/fitting](https://github.com/funbox/fitting).
Bug reports and pull requests are welcome on GitHub at [github.com/tuwilof/fitting](https://github.com/tuwilof/fitting).
This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.

## License

The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).

[![Sponsored by FunBox](https://funbox.ru/badges/sponsored_by_funbox_centered.svg)](https://funbox.ru)
[Sponsored by FunBox](https://funbox.ru)
2 changes: 1 addition & 1 deletion fitting.gemspec
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ Gem::Specification.new do |spec|

spec.summary = 'Coverage API Blueprint, Swagger and OpenAPI with RSpec'
spec.description = 'Coverage API Blueprint, Swagger and OpenAPI with RSpec for easily make high-quality API and documenatiton'
spec.homepage = 'https://github.com/matchtechnologies/fitting'
spec.homepage = 'https://github.com/tuwilof/fitting'
spec.license = 'MIT'

spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
2 changes: 1 addition & 1 deletion lib/fitting.rb
Original file line number Diff line number Diff line change
@@ -45,7 +45,7 @@ def logger
end

config.after(:each) do
WebMock::CallbackRegistry.reset
WebMock::CallbackRegistry.reset if Object.const_defined?('WebMock')
end

config.after(:suite) do
11 changes: 9 additions & 2 deletions lib/fitting/log.rb
Original file line number Diff line number Diff line change
@@ -96,7 +96,14 @@ def self.report(logs)
Fitting::Log.failure(logs).each_with_index do |log, index|
puts "\e[31m #{index + 1}) #{log.error.class} #{log.error.message}\n\n\e[0m"
end
print "\e[31m#{logs.size} examples, #{Fitting::Log.failure(logs).size} failure, #{Fitting::Log.pending(logs).size} pending\e[0m\n"

failure_count = Fitting::Log.failure(logs).size
color_code = failure_count > 0 ? 31 : 32
print "\e[#{color_code}m#{logs.size} examples, #{failure_count} failure, #{Fitting::Log.pending(logs).size} pending\e[0m\n"

unless Fitting::Log.failure(logs).size <= 0
exit 1
end
end
end
end
end
2 changes: 1 addition & 1 deletion lib/fitting/version.rb
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
module Fitting
VERSION = '4.0.4'.freeze
VERSION = '4.2.2'.freeze
end