Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 12 additions & 2 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,15 @@ commands:
- &cache-key gem-cache-v4-{{ checksum "<< parameters.path >>/<< parameters.gemspec-file >>" }}-<< parameters.ruby-image >>
- gem-cache-v4-{{ checksum "<< parameters.path >>/<< parameters.gemspec-file >>" }}
- gem-cache-v4-
- when:
condition:
equal: [ jruby:9.4-dev-jdk11, << parameters.ruby-image >> ]
steps:
- run:
name: Install Git
command: |
apt-get update
apt-get install -y git
- run:
name: Install dependencies
command: |
Expand All @@ -72,6 +81,7 @@ commands:
- run:
name: Collecting coverage reports
command: |
apt-get update && apt-get install -y perl
curl -Os https://uploader.codecov.io/latest/linux/codecov
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM
curl -Os https://uploader.codecov.io/latest/linux/codecov.SHA256SUM.sig
Expand Down Expand Up @@ -271,10 +281,10 @@ workflows:
- client-r2.4
- tests-ruby:
name: client-jruby
ruby-image: "jruby:9.3.1.0-jdk11"
ruby-image: "jruby:9.4-dev-jdk11"
- tests-ruby:
name: APIs-jruby
ruby-image: "jruby:9.3.1.0-jdk11"
ruby-image: "jruby:9.4-dev-jdk11"
gemspec-file: influxdb-client-apis.gemspec
path: ./apis
requires:
Expand Down
2 changes: 2 additions & 0 deletions .rubocop-cops.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,3 +40,5 @@ Metrics/PerceivedComplexity:
Max: 15
Metrics/ParameterLists:
Max: 10
Style/EmptyLiteral:
Enabled: false
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
## 3.3.0 [unreleased]

### CI
1. [152](https://github.com/influxdata/influxdb-client-ruby/pull/152):
- Switches the JRuby jobs from jruby:9.3.1.0-jdk11 to jruby:9.4-dev-jdk11.
- Adds a monkeypatch for REXML::Document#initialize to tolerate malformed XML emitted during Cobertura report formatting.

1. [#149](https://github.com/influxdata/influxdb-client-ruby/pull/149): Fix FrozenError in Point#to_line_protocol when frozen string literals are enabled

## 3.2.0 [2024-11-27]
Expand Down
20 changes: 20 additions & 0 deletions apis/test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,26 @@
if ENV['CI'] == 'true'
require 'simplecov-cobertura'
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

# Monkeypatch REXML to handle malformed XML from simplecov-cobertura 1.4.2/2.1.0
# see: https://github.com/dashingrocket/simplecov-cobertura/issues/31
# TODO: remove this when simplecov-cobertura is updated
require 'rexml/document'
module REXML
class Document
alias original_initialize initialize
def initialize(source = nil, context = {})
if source.is_a?(String) && source.include?('Generated by simplecov-cobertura') && !source.include?('<coverage')
source_with_root = source + "\n<coverage/>"
original_initialize(source_with_root, context)
# Remove the dummy root element so simplecov-cobertura can add its own
delete_element('/coverage')
else
original_initialize(source, context)
end
end
end
end
end

$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
Expand Down
20 changes: 20 additions & 0 deletions test/test_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,26 @@
if ENV['CI'] == 'true'
require 'simplecov-cobertura'
SimpleCov.formatter = SimpleCov::Formatter::CoberturaFormatter

# Monkeypatch REXML to handle malformed XML from simplecov-cobertura 1.4.2/2.1.0
# see: https://github.com/dashingrocket/simplecov-cobertura/issues/31
# TODO: remove this when simplecov-cobertura is updated
require 'rexml/document'
module REXML
class Document
alias original_initialize initialize
def initialize(source = nil, context = {})
if source.is_a?(String) && source.include?('Generated by simplecov-cobertura') && !source.include?('<coverage')
source_with_root = source + "\n<coverage/>"
original_initialize(source_with_root, context)
# Remove the dummy root element so simplecov-cobertura can add its own
delete_element('/coverage')
else
original_initialize(source, context)
end
end
end
end
end

$LOAD_PATH.unshift File.expand_path('../lib', __dir__)
Expand Down