From a1bbeaedb92cb6e0ff0692afd1e4e670318ccf78 Mon Sep 17 00:00:00 2001 From: Erik Michaels-Ober Date: Mon, 5 Dec 2016 23:12:25 -0800 Subject: [PATCH] Bump version to 0.6.0 --- Rakefile | 2 +- lib/multi_xml/version.rb | 44 +++++++++++++++++++++++++++++++++++++++- multi_xml.gemspec | 2 +- 3 files changed, 45 insertions(+), 3 deletions(-) diff --git a/Rakefile b/Rakefile index 8209757..d52e584 100644 --- a/Rakefile +++ b/Rakefile @@ -27,7 +27,7 @@ end require 'yardstick/rake/verify' Yardstick::Rake::Verify.new do |verify| - verify.threshold = 47.3 + verify.threshold = 48.8 end task :default => [:spec, :rubocop, :verify_measurements] diff --git a/lib/multi_xml/version.rb b/lib/multi_xml/version.rb index 76812c5..10f916d 100644 --- a/lib/multi_xml/version.rb +++ b/lib/multi_xml/version.rb @@ -1,3 +1,45 @@ module MultiXml - VERSION = '0.5.5'.freeze unless defined?(MultiXML::VERSION) + module Version + module_function + + # @return [Integer] + def major + 0 + end + + # @return [Integer] + def minor + 6 + end + + # @return [Integer] + def patch + 0 + end + + # @return [Integer, NilClass] + def pre + nil + end + + # @return [Hash] + def to_h + { + :major => major, + :minor => minor, + :patch => patch, + :pre => pre, + } + end + + # @return [Array] + def to_a + [major, minor, patch, pre].compact + end + + # @return [String] + def to_s + to_a.join('.') + end + end end diff --git a/multi_xml.gemspec b/multi_xml.gemspec index 5050b01..f3a6ebe 100644 --- a/multi_xml.gemspec +++ b/multi_xml.gemspec @@ -15,5 +15,5 @@ Gem::Specification.new do |spec| spec.require_paths = ['lib'] spec.required_rubygems_version = '>= 1.3.5' spec.summary = 'A generic swappable back-end for XML parsing' - spec.version = MultiXml::VERSION + spec.version = MultiXml::Version end