diff --git a/.travis.yml b/.travis.yml index ea70447..4f700d2 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,9 +1,11 @@ -# configuration settings for http://travis-ci.org -sudo: false - language: ruby rvm: - - 2.2.4 - - 2.1.8 - - 2.0.0 - - rbx + - 2.4 + - 2.5 + - 2.6 + - 2.7 + - 3.0 + - 3.1 + - 3.2 + - 3.3 + - 3.4 diff --git a/HISTORY.md b/HISTORY.md index 0f3430d..77288ab 100644 --- a/HISTORY.md +++ b/HISTORY.md @@ -1,5 +1,13 @@ ## HEAD +* Add Ruby 3.4 compatibility +* Fix frozen string literal warnings by avoiding in-place string mutations +* Update minimum Ruby version to 2.4 (from 2.0) +* Update SimpleCov dependency to >= 0.17 (from ~> 0.7.1) +* Update Bundler dependency to >= 1.0 (from ~> 1.0) to allow modern versions +* Update Travis CI config to test Ruby 2.4-3.4 +* Fix deprecated Minitest assertion (use assert_nil instead of assert_equal nil) + ## 0.3.1 (2015-12-23) * Fix edge case when zone file has multiple `ORIGIN` directives. diff --git a/dns-zone.gemspec b/dns-zone.gemspec index e9ac75b..0ccc83c 100644 --- a/dns-zone.gemspec +++ b/dns-zone.gemspec @@ -19,15 +19,15 @@ spec = Gem::Specification.new do |s| #s.default_executable = 'dns-zone' # min ruby version - s.required_ruby_version = ::Gem::Requirement.new(">= 2.0") + s.required_ruby_version = ::Gem::Requirement.new(">= 2.4") # cross platform gem dependencies #s.add_dependency('gli') #s.add_dependency('paint') - s.add_development_dependency('bundler', '~> 1.0') + s.add_development_dependency('bundler', '>= 1.0') s.add_development_dependency('rake', '>= 9.0') s.add_development_dependency('minitest', '~> 5.0') - s.add_development_dependency('simplecov', '~> 0.7.1') + s.add_development_dependency('simplecov', '>= 0.17') s.add_development_dependency('yard', '~> 0.8') s.add_development_dependency('inch', '~> 0.6') s.add_development_dependency('guard-minitest', '~> 2.0') diff --git a/lib/dns/zone.rb b/lib/dns/zone.rb index 8e6fcee..4c0a070 100644 --- a/lib/dns/zone.rb +++ b/lib/dns/zone.rb @@ -59,7 +59,7 @@ def dump content << rr.dump end - content.join("\n") << "\n" + content.join("\n") + "\n" end # Generates pretty output of the zone and its records. @@ -75,7 +75,7 @@ def dump_pretty last_type = rr.type end - content.join("\n") << "\n" + content.join("\n") + "\n" end # Load the provided zone file data into a new DNS::Zone object. @@ -132,7 +132,7 @@ def self.extract_entries(string) entries = [] mode = :line - entry = '' + entry = String.new parentheses_ref_count = 0 @@ -140,7 +140,7 @@ def self.extract_entries(string) # strip comments unless escaped # strip comments, unless its escaped. # skip semicolons within "quote segments" (TXT records) - line = line.gsub(/((?