rspec-sonarqube-formatter 1.5.0 → 1.6.0

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e9378935eef77745446fb466eaa798a73fff4ebb9e107ca7c68f38d75ef12564
4
- data.tar.gz: 60e4d11543493817df83c352f033ce4c76fcf0ab566e9571014fc2ac2506b551
3
+ metadata.gz: 8e666d71282240830c03b462d328316141e3624a36cff76935ee3bcf09a5adc6
4
+ data.tar.gz: cb319179ff685fc7b2fe140764aeb973a5b4a550ca9b8f96ac8c862a9178189f
5
5
  SHA512:
6
- metadata.gz: c7956bfa97261ff662a16b33c2ad09471be3f5ee8688c53b8c5eb5a5c302c1f1ded9750b7fa0207abdf408ac4b07d23216f4c974ac99dbbd0b2c811481af80c1
7
- data.tar.gz: a511933f90e38673f4751b152eb8b0b741cb1043008de3b0e4fe5a5ce6a47ab62c92f4573dffe0fcee9687021edb1c86d5f987ec5dc5139780f26efd34555afa
6
+ metadata.gz: 4668349cbc3527460579a4d62b8fbfd5af960a5c7a0c7a40141cca3d6960a659a9a18064150e0375d1b001b2b7b1cf801870c35e9e7602827ef4c1970254d7b1
7
+ data.tar.gz: cfe7186bb9f43e233967a3538353c2f3c358839113ad3e728a55dba662f991f57c7ac06b13e92df0030a8407afbfa5e2110194268e21081ce1b29c7404d8810b
data/.codeclimate.yml CHANGED
@@ -1,10 +1,16 @@
1
+ ---
1
2
  version: "2"
2
3
  plugins:
3
4
  fixme:
4
5
  enabled: true
5
6
  bundler-audit:
6
7
  enabled: true
8
+ channel: bundler-audit-0-9-1
7
9
  editorconfig:
8
10
  enabled: true
11
+ channel: stable
12
+ config:
13
+ editorconfig: .editorconfig
9
14
  rubocop:
10
15
  enabled: true
16
+ channel: beta
@@ -0,0 +1,15 @@
1
+ ---
2
+ version: 2
3
+ updates:
4
+ - package-ecosystem: bundler
5
+ directory: "/"
6
+ schedule:
7
+ interval: daily
8
+ time: "04:00"
9
+ open-pull-requests-limit: 10
10
+ reviewers:
11
+ - otherguy
12
+ assignees:
13
+ - otherguy
14
+ labels:
15
+ - "dependabot \U0001F916"
@@ -0,0 +1,86 @@
1
+ name: Ruby CI
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ tags:
8
+ - "*"
9
+ pull_request:
10
+ branches:
11
+ - main
12
+ types:
13
+ - opened
14
+ - synchronize
15
+ - reopened
16
+ release:
17
+ types:
18
+ - published
19
+
20
+ jobs:
21
+ # Test and Lint
22
+ test:
23
+ runs-on: ${{ matrix.os }}-latest
24
+
25
+ strategy:
26
+ matrix:
27
+ os:
28
+ - ubuntu
29
+ - macos
30
+ ruby:
31
+ - head
32
+ - '3.3'
33
+ - '3.2'
34
+ - '3.1'
35
+ continue-on-error: ${{ endsWith(matrix.ruby, 'head') }}
36
+
37
+ steps:
38
+ - uses: actions/checkout@v4
39
+ - name: Set up Ruby ${{ matrix.ruby }}
40
+ uses: ruby/setup-ruby@v1
41
+ with:
42
+ ruby-version: ${{ matrix.ruby }}
43
+ - name: Install dependencies
44
+ run: bundle install
45
+ - name: Run linting
46
+ run: bundle exec rubocop
47
+ - name: Run tests
48
+ run: bundle exec rspec spec
49
+
50
+ # SonarCloud, Codecov, etc.
51
+ external:
52
+ name: SonarCloud, Codecov and CodeClimate Analysis
53
+ runs-on: ubuntu-latest
54
+ steps:
55
+ - uses: actions/checkout@v4
56
+ with:
57
+ fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
58
+ - name: Set up Ruby
59
+ uses: ruby/setup-ruby@v1
60
+ - name: Install dependencies
61
+ run: bundle install
62
+ - name: Run linting
63
+ run: bundle exec rubocop --format progress --format json --out rubocop.json
64
+ - name: Run tests
65
+ run: bundle exec rspec spec
66
+ # SonarCloud
67
+ - name: SonarCloud Scan
68
+ uses: SonarSource/sonarcloud-github-action@master
69
+ env:
70
+ GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
71
+ SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
72
+ # Codecov
73
+ - uses: codecov/codecov-action@v4
74
+ with:
75
+ fail_ci_if_error: true
76
+ verbose: true
77
+ env:
78
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
79
+ # CodeClimate
80
+ - uses: paambaati/codeclimate-action@v9.0.0
81
+ env:
82
+ CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
83
+ with:
84
+ debug: true
85
+ coverageLocations: |
86
+ coverage/lcov.info:lcov
@@ -0,0 +1,37 @@
1
+ name: Publish Gem
2
+
3
+ on:
4
+ release:
5
+ types:
6
+ - published
7
+
8
+ jobs:
9
+ build:
10
+ name: Build + Publish
11
+ runs-on: ubuntu-latest
12
+ permissions:
13
+ contents: write
14
+ steps:
15
+ - uses: actions/checkout@v4
16
+ - name: Set up Ruby
17
+ uses: ruby/setup-ruby@v1
18
+ - name: Install dependencies
19
+ run: bundle install
20
+ - name: Publish to RubyGems
21
+ run: |
22
+ bundle exec rake version["${{ github.ref_name }}"]
23
+ bundle exec gem build --strict
24
+ gem push "rspec-sonarqube-formatter-${{ github.ref_name }}.gem"
25
+
26
+ # Update version to next beta version
27
+ NEXT_PATCH_TAG=$(echo "${{ github.ref_name }}" | awk 'BEGIN{FS=OFS="."} {$3+=1} 1')
28
+ BETA_TAG="${NEXT_PATCH_TAG}.pre"
29
+ bundle exec rake version["${BETA_TAG}"]
30
+ bundle install
31
+ env:
32
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
33
+ - uses: stefanzweifel/git-auto-commit-action@v5
34
+ with:
35
+ commit_message: Update version
36
+ file_pattern: '*.gemspec Gemfile.lock'
37
+ branch: main
data/.rubocop.yml CHANGED
@@ -1,3 +1,4 @@
1
+ ---
1
2
  # Common configuration.
2
3
  AllCops:
3
4
  NewCops: enable
@@ -6,11 +7,11 @@ AllCops:
6
7
  - rake
7
8
  DisplayStyleGuide: true
8
9
  ExtraDetails: true
9
- TargetRubyVersion: 2.4
10
+ TargetRubyVersion: 3.1
10
11
  Exclude:
11
12
  - 'vendor/**/*'
12
13
  - 'bin/**/*'
13
- SuggestExtensions: false
14
+ SuggestExtensions: true
14
15
 
15
16
  # and/&& or/|| should not be replaced!
16
17
  # http://www.virtuouscode.com/2010/08/02/using-and-and-or-in-ruby/
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.7.2
1
+ 3.3.5
data/.tool-versions ADDED
@@ -0,0 +1 @@
1
+ ruby 3.3.5
@@ -1,3 +1,3 @@
1
1
  {
2
2
  "ruby.rubocop.useBundler": true
3
- }
3
+ }
data/Gemfile CHANGED
@@ -6,3 +6,13 @@ git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
6
6
 
7
7
  # Specify your gem's dependencies in rspec_sonarqube_formatter.gemspec
8
8
  gemspec
9
+
10
+ group :development, :test do
11
+ gem 'bundler', '~> 2.5'
12
+ gem 'rake', '~> 13.2'
13
+ gem 'rubocop', '~> 1.66'
14
+ gem 'simplecov', '~> 0.22'
15
+ gem 'simplecov-html', '~> 0.12'
16
+ gem 'simplecov-json', '~> 0.2'
17
+ gem 'simplecov-lcov', '~> 0.8'
18
+ end
data/Gemfile.lock CHANGED
@@ -1,82 +1,79 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- rspec-sonarqube-formatter (1.0.0.pre.local)
5
- htmlentities (~> 4.3.3)
4
+ rspec-sonarqube-formatter (1.6.0)
5
+ htmlentities (~> 4.3)
6
6
  rspec (~> 3.0)
7
7
 
8
8
  GEM
9
9
  remote: https://rubygems.org/
10
10
  specs:
11
11
  ast (2.4.2)
12
- coveralls (0.8.23)
13
- json (>= 1.8, < 3)
14
- simplecov (~> 0.16.1)
15
- term-ansicolor (~> 1.3)
16
- thor (>= 0.19.4, < 2.0)
17
- tins (~> 1.6)
18
- diff-lcs (1.4.4)
19
- docile (1.3.2)
12
+ diff-lcs (1.5.1)
13
+ docile (1.4.1)
20
14
  htmlentities (4.3.4)
21
- json (2.3.1)
22
- parallel (1.20.1)
23
- parser (3.0.0.0)
15
+ json (2.7.2)
16
+ language_server-protocol (3.17.0.3)
17
+ parallel (1.26.3)
18
+ parser (3.3.5.0)
24
19
  ast (~> 2.4.1)
25
- rainbow (3.0.0)
26
- rake (13.0.3)
27
- regexp_parser (2.0.3)
28
- rexml (3.2.4)
29
- rspec (3.10.0)
30
- rspec-core (~> 3.10.0)
31
- rspec-expectations (~> 3.10.0)
32
- rspec-mocks (~> 3.10.0)
33
- rspec-core (3.10.0)
34
- rspec-support (~> 3.10.0)
35
- rspec-expectations (3.10.0)
20
+ racc
21
+ racc (1.8.1)
22
+ rainbow (3.1.1)
23
+ rake (13.2.1)
24
+ regexp_parser (2.9.2)
25
+ rspec (3.13.0)
26
+ rspec-core (~> 3.13.0)
27
+ rspec-expectations (~> 3.13.0)
28
+ rspec-mocks (~> 3.13.0)
29
+ rspec-core (3.13.1)
30
+ rspec-support (~> 3.13.0)
31
+ rspec-expectations (3.13.2)
36
32
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.10.0)
38
- rspec-mocks (3.10.0)
33
+ rspec-support (~> 3.13.0)
34
+ rspec-mocks (3.13.1)
39
35
  diff-lcs (>= 1.2.0, < 2.0)
40
- rspec-support (~> 3.10.0)
41
- rspec-support (3.10.0)
42
- rubocop (1.10.0)
36
+ rspec-support (~> 3.13.0)
37
+ rspec-support (3.13.1)
38
+ rubocop (1.66.1)
39
+ json (~> 2.3)
40
+ language_server-protocol (>= 3.17.0)
43
41
  parallel (~> 1.10)
44
- parser (>= 3.0.0.0)
42
+ parser (>= 3.3.0.2)
45
43
  rainbow (>= 2.2.2, < 4.0)
46
- regexp_parser (>= 1.8, < 3.0)
47
- rexml
48
- rubocop-ast (>= 1.2.0, < 2.0)
44
+ regexp_parser (>= 2.4, < 3.0)
45
+ rubocop-ast (>= 1.32.2, < 2.0)
49
46
  ruby-progressbar (~> 1.7)
50
- unicode-display_width (>= 1.4.0, < 3.0)
51
- rubocop-ast (1.4.1)
52
- parser (>= 2.7.1.5)
53
- ruby-progressbar (1.11.0)
54
- simplecov (0.16.1)
47
+ unicode-display_width (>= 2.4.0, < 3.0)
48
+ rubocop-ast (1.32.3)
49
+ parser (>= 3.3.1.0)
50
+ ruby-progressbar (1.13.0)
51
+ simplecov (0.22.0)
55
52
  docile (~> 1.1)
56
- json (>= 1.8, < 3)
57
- simplecov-html (~> 0.10.0)
58
- simplecov-html (0.10.2)
53
+ simplecov-html (~> 0.11)
54
+ simplecov_json_formatter (~> 0.1)
55
+ simplecov-html (0.12.3)
59
56
  simplecov-json (0.2.3)
60
57
  json
61
58
  simplecov
62
- term-ansicolor (1.7.1)
63
- tins (~> 1.0)
64
- thor (0.20.3)
65
- tins (1.22.2)
66
- unicode-display_width (2.0.0)
59
+ simplecov-lcov (0.8.0)
60
+ simplecov_json_formatter (0.1.4)
61
+ unicode-display_width (2.5.0)
67
62
 
68
63
  PLATFORMS
64
+ arm64-darwin-23
69
65
  ruby
70
66
  x86_64-darwin-19
71
67
 
72
68
  DEPENDENCIES
73
- bundler (~> 2.2.0)
74
- coveralls (~> 0.8.23)
75
- rake (~> 13.0.1)
69
+ bundler (~> 2.5)
70
+ rake (~> 13.2)
76
71
  rspec-sonarqube-formatter!
77
- rubocop (~> 1.10.0)
78
- simplecov (~> 0.16.1)
79
- simplecov-json (~> 0.2.0)
72
+ rubocop (~> 1.66)
73
+ simplecov (~> 0.22)
74
+ simplecov-html (~> 0.12)
75
+ simplecov-json (~> 0.2)
76
+ simplecov-lcov (~> 0.8)
80
77
 
81
78
  BUNDLED WITH
82
- 2.2.0
79
+ 2.5.17
data/LICENSE.md CHANGED
@@ -1,7 +1,7 @@
1
1
  The MIT License (MIT)
2
2
  =====================
3
3
 
4
- Copyright © `2019` `Alexander Graf`
4
+ Copyright © 2019–2024 [Alexander Graf](https://basecamp.tirol/)
5
5
 
6
6
  Permission is hereby granted, free of charge, to any person
7
7
  obtaining a copy of this software and associated documentation
data/README.md CHANGED
@@ -1,33 +1,27 @@
1
1
  # RSpec SonarQube Formatter
2
2
 
3
- [RSpec 3](https://rspec.info/) formatter that generates an XML file for [SonarQube](https://www.sonarqube.org/) 6.2+, using
4
- the [Generic Test Data](https://docs.sonarqube.org/latest/analysis/generic-test/) format.
5
-
6
- [![Gem Version](https://img.shields.io/gem/v/rspec-sonarqube-formatter)][rubygems]
7
- [![Downloads](https://img.shields.io/gem/dt/rspec-sonarqube-formatter)][rubygems]
8
- [![GitHub issues](https://img.shields.io/github/issues/otherguy/rspec-sonarqube-formatter)][issues]
9
- [![Travis](https://img.shields.io/travis/com/otherguy/rspec-sonarqube-formatter)][travis]
10
- [![Quality Gate Status](https://sonarcloud.io/api/project_badges/measure?project=otherguy_rspec-sonarqube-formatter&metric=alert_status)][sonarqube]
11
- [![Coveralls](https://img.shields.io/coveralls/github/otherguy/rspec-sonarqube-formatter)][coveralls]
12
- [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/otherguy/rspec-sonarqube-formatter)][codeclimate]
13
- [![License](https://img.shields.io/github/license/otherguy/rspec-sonarqube-formatter)][license]
3
+ [RSpec 3](https://rspec.info/) formatter that generates an XML file for [SonarQube](https://www.sonarqube.org/) and
4
+ [SonarCloud][sonarcloud]️, using the [Generic Test Data](https://docs.sonarqube.org/latest/analysis/generic-test/) format.
5
+
6
+ [![Gem Version](https://img.shields.io/gem/v/rspec-sonarqube-formatter?style=for-the-badge&logo=rubygems&logoColor=aaa&color=367cd3)][rubygems]
7
+ [![Gem Downloads](https://img.shields.io/gem/dt/rspec-sonarqube-formatter?style=for-the-badge&logo=ruby&logoColor=aaa&color=367cd3)][rubygems]
8
+ [![GitHub issues](https://img.shields.io/github/issues/otherguy/rspec-sonarqube-formatter?style=for-the-badge&logo=github)][issues]
9
+ [![License](https://img.shields.io/github/license/otherguy/rspec-sonarqube-formatter?style=for-the-badge&logo=readthedocs&logoColor=aaa)][license]
10
+ [![Codecov](https://img.shields.io/codecov/c/github/otherguy/rspec-sonarqube-formatter?style=for-the-badge&logo=codecov&logoColor=aaa)][codecov]
11
+ [![Sonar Quality Gate](https://img.shields.io/sonar/quality_gate/otherguy_rspec-sonarqube-formatter?server=https%3A%2F%2Fsonarcloud.io&style=for-the-badge&logo=sonarcloud&logoColor=aaa)][sonarcloud]
12
+ [![Violations](https://img.shields.io/sonar/violations/otherguy_rspec-sonarqube-formatter?server=https%3A%2F%2Fsonarcloud.io&format=short&style=for-the-badge&logo=sonarcloud&logoColor=aaa)][sonarcloud]
13
+ [![Code Climate maintainability](https://img.shields.io/codeclimate/maintainability/otherguy/rspec-sonarqube-formatter?style=for-the-badge&logo=codeclimate)][codeclimate]
14
14
 
15
- [rubygems]: https://rubygems.org/gems/rspec-sonarqube-formatter
16
- [issues]: https://github.com/otherguy/rspec-sonarqube-formatter/issues
17
- [travis]: https://travis-ci.com/otherguy/rspec-sonarqube-formatter
18
- [coveralls]: https://coveralls.io/github/otherguy/rspec-sonarqube-formatter
19
- [codeclimate]: https://codeclimate.com/github/otherguy/rspec-sonarqube-formatter
20
- [sonarqube]: https://sonarcloud.io/dashboard?id=otherguy_rspec-sonarqube-formatter
21
- [license]: https://github.com/otherguy/rspec-sonarqube-formatter/blob/master/LICENSE.md
22
15
 
23
16
  ## Features 🌈
24
17
 
25
- This formatter generates an XML report that can be read by [SonarQube](https://www.sonarqube.org/) 6.2+.
26
- Out of the box, SonarQube 6.2+ supports generic formats for test coverage and test execution import. Using the XML file
27
- generated by this gem, you get an overview of test executions (`passed`, `skipped`, `failed`)
28
- and the time in milliseconds it took to execute these.
18
+ This formatter generates an XML report that can be read by [SonarQube](https://www.sonarqube.org/) and [SonarCloud][sonarcloud]️.
29
19
 
30
- [![Sonarcloud.io](documentation/sonarcloud.png)][sonarqube]️
20
+ Out of the box, SonarQube 6.2+ and SonarCloud support generic formats for test coverage and test execution import.
21
+ Using the XML file generated by this gem, you get an overview of test executions (`passed`, `skipped`, `failed`) and
22
+ the time in milliseconds it took to execute these.
23
+
24
+ [![Sonarcloud.io](documentation/sonarcloud.png)][sonarcloud]️
31
25
 
32
26
  ## Installation 🚀
33
27
 
@@ -35,17 +29,20 @@ Add the gem to your application's `Gemfile`:
35
29
 
36
30
  ```ruby
37
31
  # RSpec formatters
38
- gem 'rspec-sonarqube-formatter', '~> 1.4', require: false
32
+ gem 'rspec-sonarqube-formatter', '~> 1.6', require: false
39
33
  ```
40
34
 
41
35
  Then, update your bundle:
42
36
 
43
- $ bundle install
37
+ ```bash
38
+ $ bundle install
39
+ ```
44
40
 
45
41
  Or install it manually using:
46
42
 
47
- $ gem install rspec-sonarqube-formatter
48
-
43
+ ```bash
44
+ $ gem install rspec-sonarqube-formatter
45
+ ```
49
46
 
50
47
  ## Usage 🛠
51
48
 
@@ -70,8 +67,8 @@ Alternatively, edit your `.rspec` file to define your formatters there:
70
67
  --format documentation
71
68
  ```
72
69
 
73
- To make SonarQube read the test report, specify the path to the generated XML in your
74
- [`sonar-project.properties`](sonar-project.properties) or configure it in the SonarQube GUI.
70
+ To make SonarQube read the test report, specify the path to the generated XML in your
71
+ [`sonar-project.properties`](sonar-project.properties) or configure it in the SonarQube GUI.
75
72
 
76
73
  ```bash
77
74
  # sonar-project.properties
@@ -85,7 +82,6 @@ published to [RubyGems.org](https://rubygems.org/gems/rspec-sonarqube-formatter)
85
82
 
86
83
  Thank you to [`@witjoh`](https://github.com/witjoh) for the original work ♥️!
87
84
 
88
-
89
85
  ## Contributing 🚧
90
86
 
91
87
  Bug reports and pull requests are welcome on GitHub at [`otherguy/rspec-sonarqube-formatter`](https://github.com/otherguy/rspec-sonarqube-formatter).
@@ -93,14 +89,21 @@ Bug reports and pull requests are welcome on GitHub at [`otherguy/rspec-sonarqub
93
89
  After checking out the repository, you need to install dependencies:
94
90
 
95
91
  ```bash
96
- gem install bundler -v 2.2.0
92
+ gem install bundler
97
93
  bundle install
98
94
  ```
99
95
 
100
- Then, run `bundle exec rake spec` to run the test suite.
96
+ Then, run `bundle exec rake spec` to run the test suite.
101
97
 
102
98
  To install this gem on your local machine, run `bundle exec rake install`.
103
99
 
104
- Please check your contributions with RuboCop by running `bundle exec rubocop`.
100
+ Please check your contributions with RuboCop by running `bundle exec rubocop`.
101
+
102
+ Releases are built from tags automatically and pushed to [RubyGems.org][rubygems].
105
103
 
106
- Releases are built from tags automatically on [Travis][travis] and pushed to [RubyGems.org][rubygems].
104
+ [rubygems]: https://rubygems.org/gems/rspec-sonarqube-formatter
105
+ [issues]: https://github.com/otherguy/rspec-sonarqube-formatter/issues
106
+ [codecov]: https://app.codecov.io/gh/otherguy/rspec-sonarqube-formatter
107
+ [codeclimate]: https://codeclimate.com/github/otherguy/rspec-sonarqube-formatter
108
+ [sonarcloud]: https://sonarcloud.io/dashboard?id=otherguy_rspec-sonarqube-formatter
109
+ [license]: https://github.com/otherguy/rspec-sonarqube-formatter/blob/main/LICENSE.md
data/Rakefile CHANGED
@@ -5,4 +5,6 @@ require 'rspec/core/rake_task'
5
5
 
6
6
  RSpec::Core::RakeTask.new(:spec)
7
7
 
8
+ Dir.glob('tasks/*.rake').each { |r| import r }
9
+
8
10
  task default: :spec
data/SECURITY.md CHANGED
@@ -6,14 +6,13 @@ These versions are supported:
6
6
 
7
7
  | Version | Supported |
8
8
  | ------- | ------------------ |
9
- | 1.1.0 | :white_check_mark: |
10
- | 1.0.0 | :white_check_mark: |
11
- | < 1.0 | :x: |
9
+ | 1.6.0 | :white_check_mark: |
10
+ | < 1.6 | :x: |
12
11
 
13
12
  ## Reporting a Vulnerability
14
13
 
15
- Please report any vulnerabilities
16
- [as an issue](https://github.com/otherguy/rspec-sonarqube-formatter/issues)
14
+ Please report any vulnerabilities
15
+ [as an issue](https://github.com/otherguy/rspec-sonarqube-formatter/issues)
17
16
  and tag it with `security`.
18
17
 
19
18
  Expect a response within 24 hours. Any vulnerabilities will be fixed
@@ -3,6 +3,8 @@
3
3
  require 'htmlentities'
4
4
 
5
5
  class RspecSonarqubeFormatter
6
+ attr_reader :output
7
+
6
8
  ::RSpec::Core::Formatters.register self,
7
9
  :start, :stop, :example_group_started, :example_started, :example_passed, :example_failed, :example_pending
8
10
 
data/renovate.json ADDED
@@ -0,0 +1,5 @@
1
+ {
2
+ "extends": [
3
+ "config:base"
4
+ ]
5
+ }
@@ -4,26 +4,23 @@ lib = File.expand_path('lib', __dir__)
4
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
5
5
 
6
6
  Gem::Specification.new do |spec|
7
- spec.name = 'rspec-sonarqube-formatter'
7
+ spec.name = 'rspec-sonarqube-formatter'
8
8
 
9
- # rubocop:disable Gemspec/DuplicatedAssignment
10
- spec.version = '1.0.0-local'
11
- spec.version = ENV.fetch('TRAVIS_TAG') { spec.version }.to_s if ENV['TRAVIS']
12
- # rubocop:enable Gemspec/DuplicatedAssignment
13
-
14
- spec.platform = Gem::Platform::RUBY
15
- spec.authors = ['Alexander Graf']
16
- spec.email = ['alex@otherguy.uo']
9
+ spec.version = '1.6.0'
10
+ spec.platform = Gem::Platform::RUBY
11
+ spec.authors = ['Alexander Graf']
12
+ spec.email = ['alex@otherguy.uo']
17
13
 
18
14
  spec.metadata = {
19
- 'bug_tracker_uri' => 'https://github.com/otherguy/rspec-sonarqube-formatter/issues',
20
- 'source_code_uri' => 'https://github.com/otherguy/rspec-sonarqube-formatter'
15
+ 'bug_tracker_uri' => 'https://github.com/otherguy/rspec-sonarqube-formatter/issues',
16
+ 'source_code_uri' => 'https://github.com/otherguy/rspec-sonarqube-formatter',
17
+ 'rubygems_mfa_required' => 'true'
21
18
  }
22
19
 
23
- spec.summary = 'Generic test data formatter for SonarQube'
24
- spec.description = 'Generates an XML report that the SonarQube Generic Test Data parser can understand'
25
- spec.homepage = 'https://github.com/otherguy/rspec-sonarqube-formatter'
26
- spec.license = 'MIT'
20
+ spec.summary = 'Generic test data formatter for SonarQube'
21
+ spec.description = 'Generates an XML report that the SonarQube Generic Test Data parser can understand'
22
+ spec.homepage = 'https://github.com/otherguy/rspec-sonarqube-formatter'
23
+ spec.license = 'MIT'
27
24
 
28
25
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(spec)/}) }
29
26
 
@@ -31,15 +28,8 @@ Gem::Specification.new do |spec|
31
28
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
32
29
  spec.require_paths = ['lib']
33
30
 
34
- spec.required_ruby_version = '>= 2.4.0'
31
+ spec.required_ruby_version = '>= 3.1'
35
32
 
36
- spec.add_dependency 'htmlentities', '~> 4.3.3'
33
+ spec.add_dependency 'htmlentities', '~> 4.3'
37
34
  spec.add_dependency 'rspec', '~> 3.0'
38
-
39
- spec.add_development_dependency 'bundler', '~> 2.2.0'
40
- spec.add_development_dependency 'coveralls', '~> 0.8.23'
41
- spec.add_development_dependency 'rake', '~> 13.0.1'
42
- spec.add_development_dependency 'rubocop', '~> 1.10.0'
43
- spec.add_development_dependency 'simplecov', '~> 0.16.1'
44
- spec.add_development_dependency 'simplecov-json', '~> 0.2.0'
45
35
  end
@@ -26,6 +26,5 @@ sonar.ruby.rubocop.reportPaths=rubocop.json
26
26
  sonar.ruby.coverage.reportPaths=coverage/.resultset.json
27
27
 
28
28
  # External links
29
- sonar.links.ci=https://travis-ci.com/otherguy/rspec-sonarqube-formatter
30
29
  sonar.links.issue=https://github.com/otherguy/rspec-sonarqube-formatter/issues
31
30
  sonar.links.scm=https://github.com/otherguy/rspec-sonarqube-formatter
@@ -0,0 +1,40 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'rubygems'
4
+
5
+ desc 'Bump version of this gem'
6
+ task :version, [:version] do |_task, args|
7
+ args.with_defaults(version: nil)
8
+
9
+ gemspec_file_path = 'rspec-sonarqube-formatter.gemspec'
10
+
11
+ spec = Gem::Specification.load(gemspec_file_path)
12
+ current_version = spec.version.to_s
13
+
14
+ if args[:version].nil?
15
+ puts "Version: #{current_version}"
16
+ exit 0
17
+ end
18
+
19
+ unless /(\d+)\.(\d+)\.(\d+)/.match?(args[:version])
20
+ puts "#{args[:version]} needs to be a major/minor/patch SemVer version number!"
21
+ exit 1
22
+ end
23
+
24
+ version_pattern = /spec.version\s+= '(.+)'/
25
+
26
+ # Read the current version from file
27
+ content = File.read(gemspec_file_path)
28
+
29
+ unless content.match(version_pattern)
30
+ puts "Error in #{version_file_path} file! Cannot determine current version!"
31
+ exit 1
32
+ end
33
+
34
+ puts "Updating gem version from #{current_version} to #{args[:version]}..."
35
+ File.open(gemspec_file_path, 'w') do |file|
36
+ file.puts content.sub(version_pattern, %(spec.version = '#{args[:version]}'))
37
+ end
38
+
39
+ puts "Version set to #{args[:version]}"
40
+ end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rspec-sonarqube-formatter
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.0
4
+ version: 1.6.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Alexander Graf
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2021-02-15 00:00:00.000000000 Z
11
+ date: 2024-09-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: htmlentities
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 4.3.3
19
+ version: '4.3'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 4.3.3
26
+ version: '4.3'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rspec
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -38,90 +38,6 @@ dependencies:
38
38
  - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '3.0'
41
- - !ruby/object:Gem::Dependency
42
- name: bundler
43
- requirement: !ruby/object:Gem::Requirement
44
- requirements:
45
- - - "~>"
46
- - !ruby/object:Gem::Version
47
- version: 2.2.0
48
- type: :development
49
- prerelease: false
50
- version_requirements: !ruby/object:Gem::Requirement
51
- requirements:
52
- - - "~>"
53
- - !ruby/object:Gem::Version
54
- version: 2.2.0
55
- - !ruby/object:Gem::Dependency
56
- name: coveralls
57
- requirement: !ruby/object:Gem::Requirement
58
- requirements:
59
- - - "~>"
60
- - !ruby/object:Gem::Version
61
- version: 0.8.23
62
- type: :development
63
- prerelease: false
64
- version_requirements: !ruby/object:Gem::Requirement
65
- requirements:
66
- - - "~>"
67
- - !ruby/object:Gem::Version
68
- version: 0.8.23
69
- - !ruby/object:Gem::Dependency
70
- name: rake
71
- requirement: !ruby/object:Gem::Requirement
72
- requirements:
73
- - - "~>"
74
- - !ruby/object:Gem::Version
75
- version: 13.0.1
76
- type: :development
77
- prerelease: false
78
- version_requirements: !ruby/object:Gem::Requirement
79
- requirements:
80
- - - "~>"
81
- - !ruby/object:Gem::Version
82
- version: 13.0.1
83
- - !ruby/object:Gem::Dependency
84
- name: rubocop
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - "~>"
88
- - !ruby/object:Gem::Version
89
- version: 1.10.0
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - "~>"
95
- - !ruby/object:Gem::Version
96
- version: 1.10.0
97
- - !ruby/object:Gem::Dependency
98
- name: simplecov
99
- requirement: !ruby/object:Gem::Requirement
100
- requirements:
101
- - - "~>"
102
- - !ruby/object:Gem::Version
103
- version: 0.16.1
104
- type: :development
105
- prerelease: false
106
- version_requirements: !ruby/object:Gem::Requirement
107
- requirements:
108
- - - "~>"
109
- - !ruby/object:Gem::Version
110
- version: 0.16.1
111
- - !ruby/object:Gem::Dependency
112
- name: simplecov-json
113
- requirement: !ruby/object:Gem::Requirement
114
- requirements:
115
- - - "~>"
116
- - !ruby/object:Gem::Version
117
- version: 0.2.0
118
- type: :development
119
- prerelease: false
120
- version_requirements: !ruby/object:Gem::Requirement
121
- requirements:
122
- - - "~>"
123
- - !ruby/object:Gem::Version
124
- version: 0.2.0
125
41
  description: Generates an XML report that the SonarQube Generic Test Data parser can
126
42
  understand
127
43
  email:
@@ -131,15 +47,15 @@ extensions: []
131
47
  extra_rdoc_files: []
132
48
  files:
133
49
  - ".codeclimate.yml"
134
- - ".dependabot/config.yml"
135
50
  - ".editorconfig"
51
+ - ".github/dependabot.yml"
52
+ - ".github/workflows/ci.yml"
53
+ - ".github/workflows/publish.yml"
136
54
  - ".gitignore"
137
- - ".mergify.yml"
138
55
  - ".rspec"
139
56
  - ".rubocop.yml"
140
- - ".ruby-gemset"
141
57
  - ".ruby-version"
142
- - ".travis.yml"
58
+ - ".tool-versions"
143
59
  - ".vscode/settings.json"
144
60
  - Gemfile
145
61
  - Gemfile.lock
@@ -149,14 +65,17 @@ files:
149
65
  - SECURITY.md
150
66
  - documentation/sonarcloud.png
151
67
  - lib/rspec_sonarqube_formatter.rb
68
+ - renovate.json
152
69
  - rspec-sonarqube-formatter.gemspec
153
70
  - sonar-project.properties
71
+ - tasks/version.rake
154
72
  homepage: https://github.com/otherguy/rspec-sonarqube-formatter
155
73
  licenses:
156
74
  - MIT
157
75
  metadata:
158
76
  bug_tracker_uri: https://github.com/otherguy/rspec-sonarqube-formatter/issues
159
77
  source_code_uri: https://github.com/otherguy/rspec-sonarqube-formatter
78
+ rubygems_mfa_required: 'true'
160
79
  post_install_message:
161
80
  rdoc_options: []
162
81
  require_paths:
@@ -165,14 +84,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
165
84
  requirements:
166
85
  - - ">="
167
86
  - !ruby/object:Gem::Version
168
- version: 2.4.0
87
+ version: '3.1'
169
88
  required_rubygems_version: !ruby/object:Gem::Requirement
170
89
  requirements:
171
- - - ">"
90
+ - - ">="
172
91
  - !ruby/object:Gem::Version
173
- version: 1.3.1
92
+ version: '0'
174
93
  requirements: []
175
- rubygems_version: 3.0.8
94
+ rubygems_version: 3.5.16
176
95
  signing_key:
177
96
  specification_version: 4
178
97
  summary: Generic test data formatter for SonarQube
@@ -1,13 +0,0 @@
1
- # https://dependabot.com/
2
- version: 1
3
- update_configs:
4
- - package_manager: "ruby:bundler"
5
- directory: "/"
6
- update_schedule: "live"
7
- default_reviewers:
8
- - "otherguy"
9
- default_assignees:
10
- - "otherguy"
11
- default_labels:
12
- - "dependabot 🤖"
13
- version_requirement_updates: "auto"
data/.mergify.yml DELETED
@@ -1,28 +0,0 @@
1
- pull_request_rules:
2
-
3
- # Automatically merge Dependabot Pull Requests
4
- - name: Automatic merge for Dependabot
5
- conditions:
6
- - author=dependabot-preview[bot]
7
- - status-success=Travis CI - Pull Request
8
- - base=master
9
- actions:
10
- merge:
11
- method: squash
12
- strict: smart
13
-
14
- # Delete branch after automatic merge
15
- - name: Delete branch after merge
16
- conditions:
17
- - merged
18
- actions:
19
- delete_head_branch: {}
20
-
21
- # Remove outdated reviews
22
- - name: Remove outdated reviews
23
- conditions:
24
- - base=master
25
- actions:
26
- dismiss_reviews:
27
- approved: True
28
- changes_requested: True
data/.ruby-gemset DELETED
@@ -1 +0,0 @@
1
- rspec-sonarqube-formatter
data/.travis.yml DELETED
@@ -1,60 +0,0 @@
1
- language: ruby
2
- os: linux
3
- cache: bundler
4
-
5
- env:
6
- global:
7
- # This is a write-only ID that can only post test reports.
8
- - CC_TEST_REPORTER_ID=fe29c7a08645a8e6de55dd7d55b2ae357d92ae9ee154874c900b5a6faa3ec8ec
9
- - GIT_COMMITTED_AT=$(if [ "$TRAVIS_PULL_REQUEST" == "false" ]; then git log -1 --pretty=format:%ct; else git log -1 --skip 1 --pretty=format:%ct; fi)
10
-
11
- rvm:
12
- - 2.4
13
- - 2.5
14
- - 2.6
15
- - 2.7
16
-
17
- before_install: gem install bundler
18
-
19
- install:
20
- - bundle install --jobs=$(nproc) --retry=3
21
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
22
- - chmod +x ./cc-test-reporter
23
- - ./cc-test-reporter before-build
24
-
25
- script:
26
- - bundle exec rake spec
27
- - bundle exec rubocop --format progress --format json --out rubocop.json
28
- - sonar-scanner
29
-
30
- after_script:
31
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
32
-
33
- addons:
34
- sonarcloud:
35
- organization: otherguy
36
- token:
37
- secure: o3T/a0jNWWHRQhsbH2NvdFYbC8fugnWwQD1QUdMR/s2/GzPRTud6eQlBP15bxY3kedEtwXx/368A5urO/ciIQf+OFiG9/fMdLU2PUgZgX8y8OMuD7w3nVHTSbPTj4ZOytMWZwGDThms/yCfYlnc7LaiDJTVWDSMXGU1UCpwyTkxAnr/4rXqK6YMAR4eqFLyzNw2b0JC0C/PRbIU7So4hfzqe4O0DC0VfVmrqRjlp6sfX5/KHPPXSgW/CETpR6JrS4SV7xVjW8nsBXHUFWGl1RCLSUf8CT58kLCO0Vl+OAqcUbTGQJVMlLSYc5YgdFqtacCXw5eJUIb+sCot91IyV2uz98tfhWd8BXolifVUEhsdQd17GpaKHUlT+if28TUUgUMVbLEXoUqwHtfFY6dHjui2oRElFpRYyOlqedcgM1MLzvnK8DGTRWuhuoYZmVUkDsE28vauGP/UWgykLrMc6wFwPW042NMrXzEiifLmXihU+lW4eFYOW0wWP9sKjJxsbuVw4WGbRuhHLjuXwGXOOqoe30nxeNpKcZetSETDjexpYeOTyj205vYuTUPLsrOXU5oEduBmnN3ZNcAY5WoqcTqp8CR++eIEVNq9oqyLrM9t/MRCLv2ndF6VRsJLJ0cD5KGoYj3clJN9R8O6yHpksHO7GIiUGsuzCcMkL9dIWcZ4=
38
-
39
- notifications:
40
- slack:
41
- secure: vPOzM6Sg5OQKgkzAnKOeSGFwpfslmSynoTJ1UiNa3b4qeZPHqabs+IGe54gtWEepC3YqlcIjZ8pLoKDYJP4xic75RILeeVs1Ya//5/0yiUshE/yKWvHDY7p6ozKo0LAgX9Ean9q5OvMDJXBImoBBmqKyfNOT/IVKMML2d/LwK2MJQuJmOjWQS++f8l4ZTbnoLC59uPP6MvaPf0QktspxTEP5sKjDd/5DDkzkBGueu8jFHzXjkjozrj6rRk1Jiexh9BsNJCFnz3/nurrg1NXCNlFk0BLCcop5VTKjuibSqO+U8x5DAon2nuFz7dVAi7vC8l9fL/pnYhb5x2e2XXt3VtisadG302ysVekFlDCzQ+zD4LudzBQDaOH8OQW+5+noK8qDXV0IAPeKZzT8Nb1/LkJMiNzVQiLHlOYThDGUj9+9qb6MsigzxFUjhTQN5XmarVy7p2xMO5pzNPXIPd2dEJVrabaFWoOL+Qog/Om8GBKmxsToJR8f6oVk8SDK3Q9cPjoZQoujyRiK3acTK+srT+J2nCnPwU0Sy/RRRbvmvIUDwNbJ8jkeYBs0y1aXk8SsMKRqzdrLNq/5YvyjzzMUGzrDdJAkqywwIV0ROLdsqBC+cIPAJoJF7s5b7kTM1EGy01IuLGxJ8EJ3UYOl1KXRzoAafBb6pWEL34Tu0OSMj3Q=
42
-
43
- deploy:
44
- - provider: rubygems
45
- cleanup: false
46
- api_key:
47
- secure: fThOZtHGWfz6JCETpxPtY5/Q/2JwuRMPdtnkUH+591p8ymLfCPW/1UlmJiETvKVVScFh5tLnCKp7bFPhi3/U3Ld1A1c/sG7A+ibpi4kWegiz4V99aAl8Rn/GxL/Bfzx/JTFKXtdgVig5m2vvhSiOHnN/8go18YUXsMKdC9s9pRQBNnv+reVUgiGj88W0NjhtPrBGNtKqk/eekGdjEvdwAYlAAgQ6ZeXgepKtbA3ZU1EwvMsl7RyjLtJ+Bk/nafFWYASbt9RDo2quGYEpSdviIPT8T4ssYT+GNbxOoJ0DVPF/xPreruue58Xa2bvClCU/kb4JUXKIrVbPT4sYJTKZl8LQ/AkjO6NAvsc+MM5wjcJMDLiSgLNa3FMsO58mLYpwS+UG8n09qHD9kSaILyWhhg3A4uXODuL5y942tvEkMt0ZmkVl1i2Ey/5RD7AfFCqz2j+/iJdbUsMBZtZ1iT5h4/W3FGDd5neXTgZJ5qVsxxbt0GyPkg9Du3hgPYpUX9T/CX4FcAKJiilhayw+NDR4wO3Q9ILL+JZwojpNUv0A4EKTDzJ6xeU0iEqyKTtYqiWvHdgCjBXk1RLmLugmAt3391Rjty5wgIiawoTGvNv26tOPk94Iic6Xo4P9vZRtu3YDjXZ4JofFRGOhUazWgVfH9JRYHsT7XOBOPuOMx8aK83w=
48
- gem: rspec-sonarqube-formatter
49
- on:
50
- tags: true
51
- rvm: 2.7
52
- - provider: releases
53
- file_glob: true
54
- api_key:
55
- secure: Qfkej2Tk4iyZS/yzL+g1TMHi+K+8TSCUtYENW3w9daR+0iejicwVHTT01wQT77zUaJ+n5i5B6lXfYIjqA7MivBHf27qJy+6cf4iFZB0kU7KGNv9bXZlXW9T5GZQ8jx1QsIefdqNqmu7Eqjuq9EhrhqrR3dfAeaBXdMX2HiIOEYzhjckJBtGrwPB96SNGTbSnVwwHa8+aHe58DrAvuh6WYBGu8NLJYKpyj8LY7iOBpm15+nx0Lkofj8p0jtUWXCFMOEoWJICY7+Rzqf9badTQJVvcIyJsr9I5GsOkrzrW07DrCsDC1EZHYep2LDjdI5LVU3i8uIfY6MBhvRzATrka7Ho1HDKxTSSLuK7vUxERlb/uf19MYbcV9SniMRwspds2/r+W6YRwM9Yrk0sfo6ZVg3qXs7Ll3jbs7nUjBq8yVIIXLVgwQ7JgmnPgsMQ05PcSc1GZG5rJ+sgbapbTLhss3ygsXPpJg7Tfu3JzJ6zAHrPc/I3HWVvYV2mz7rqhKiXVHKEDN9yULDGIBKgrNZmvyinJhPQay1a1h/jLfX5hp0wSjUeiyZKmdKYOu/6a4myrq+GHaUwtGyWcAk1DzX0d1sMptSKKmj56vjAiLZtGawVazkMdYzMZ5szOCI2wz1ps2A+3h28TL8UOSGCjZgx3dyuXBY9QHweEAJqDy7FlFN8=
56
- file: "*.gem"
57
- cleanup: false
58
- on:
59
- tags: true
60
- rvm: 2.7