diff -Nru ruby-semantic-puppet-1.0.1/appveyor.yml ruby-semantic-puppet-1.0.2/appveyor.yml --- ruby-semantic-puppet-1.0.1/appveyor.yml 1970-01-01 00:00:00.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/appveyor.yml 2018-03-18 16:51:20.000000000 +0000 @@ -0,0 +1,18 @@ +version: 1.0.1.{build} +clone_depth: 10 +environment: + matrix: + - RUBY_VERSION: 193 + - RUBY_VERSION: 23-x64 + - RUBY_VERSION: 21-x64 +matrix: + fast_finish: true +install: + - set PATH=C:\Ruby%RUBY_VERSION%\bin;%PATH% + - bundle install --jobs 4 --retry 2 +build: off +test_script: + - ruby -v + - gem -v + - bundle -v + - bundle exec rspec --format documentation --color spec/unit diff -Nru ruby-semantic-puppet-1.0.1/CHANGELOG.md ruby-semantic-puppet-1.0.2/CHANGELOG.md --- ruby-semantic-puppet-1.0.1/CHANGELOG.md 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/CHANGELOG.md 2018-03-18 16:51:20.000000000 +0000 @@ -2,8 +2,14 @@ All notable changes to this project will be documented in this file. This project adheres to [Semantic Versioning](http://semver.org/). +## 1.0.2 - 2018-03-13 +- Removed i18n/gettext configuration and string externalization. After further consideration we have decided that + as a library, semantic_puppet should not be attempting to configure global localization state and the localization + of error messages etc. is the responsibility of the consuming application. +- Added Appveyor CI configuration + ## 1.0.1 - 2017-07-01 -- Fix bug causing pre-release identifiers being considered invalid when they contained letters but started with a zero +- Fix bug causing pre-release identifiers being considered invalid when they contained letters but started with a zero ## 1.0.0 - 2017-04-05 - Complete rewrite of the VersionRange to make it compatible with Node Semver diff -Nru ruby-semantic-puppet-1.0.1/debian/changelog ruby-semantic-puppet-1.0.2/debian/changelog --- ruby-semantic-puppet-1.0.1/debian/changelog 2017-07-13 18:06:44.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/changelog 2018-03-18 16:58:47.000000000 +0000 @@ -1,3 +1,24 @@ +ruby-semantic-puppet (1.0.2-1) unstable; urgency=medium + + * New upstream version 1.0.2 + * d/control: Drop un-needed gettext-setup dependency + * d/patches: Drop un-needed Debian patches + * d/rules: Drop un-needed locale settings + + -- Sebastien Badia Sun, 18 Mar 2018 17:58:47 +0100 + +ruby-semantic-puppet (1.0.1-2) unstable; urgency=medium + + * d/compat: Bump compat version to 11 + * d/control: + + Bump to Standards-Version 4.1.3 (no changes needed) + + Use salsa.debian.org in Vcs-* fields + * d/watch: Bump to version 4 and use HTTPS for URI + * d/copyright: Update copyritght years and use HTTPS for URI + * d/upstream: Added Upstream metadata + + -- Sebastien Badia Tue, 13 Mar 2018 18:39:37 +0100 + ruby-semantic-puppet (1.0.1-1) unstable; urgency=medium * New upstream version 1.0.1 diff -Nru ruby-semantic-puppet-1.0.1/debian/compat ruby-semantic-puppet-1.0.2/debian/compat --- ruby-semantic-puppet-1.0.1/debian/compat 2017-06-08 22:50:15.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/compat 2018-03-13 17:30:43.000000000 +0000 @@ -1 +1 @@ -10 +11 diff -Nru ruby-semantic-puppet-1.0.1/debian/control ruby-semantic-puppet-1.0.2/debian/control --- ruby-semantic-puppet-1.0.1/debian/control 2017-07-13 18:04:55.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/control 2018-03-18 16:52:58.000000000 +0000 @@ -4,11 +4,11 @@ Maintainer: Puppet Package Maintainers Uploaders: Sebastien Badia , Markus Frosch -Build-Depends: debhelper (>= 10), gem2deb, rake, ruby-gettext-setup, ruby-rspec +Build-Depends: debhelper (>= 11), gem2deb, rake, ruby-rspec Homepage: https://github.com/puppetlabs/semantic_puppet -Standards-Version: 4.0.0 -Vcs-Git: https://anonscm.debian.org/git/pkg-puppet/ruby-semantic-puppet.git -Vcs-Browser: https://anonscm.debian.org/cgit/pkg-puppet/ruby-semantic-puppet.git +Standards-Version: 4.1.3 +Vcs-Git: https://salsa.debian.org/puppet-team/ruby-semantic-puppet.git +Vcs-Browser: https://salsa.debian.org/puppet-team/ruby-semantic-puppet Testsuite: autopkgtest-pkg-ruby XS-Ruby-Versions: all @@ -16,7 +16,6 @@ Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ruby | ruby-interpreter, - ruby-gettext-setup, ${misc:Depends}, ${shlibs:Depends} Description: Useful tools for working with semantic versions with Puppet diff -Nru ruby-semantic-puppet-1.0.1/debian/copyright ruby-semantic-puppet-1.0.2/debian/copyright --- ruby-semantic-puppet-1.0.1/debian/copyright 2016-09-11 23:19:36.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/copyright 2018-03-13 17:33:15.000000000 +0000 @@ -1,13 +1,13 @@ -Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: semantic_puppet Source: https://github.com/puppetlabs/semantic_puppet Files: * -Copyright: 2014-2015 Puppet Labs +Copyright: 2014-2018 Puppet Labs License: Apache-2.0 Files: debian/* -Copyright: 2015 Sebastien Badia +Copyright: 2015-2018 Sebastien Badia License: Apache-2.0 Comment: the Debian packaging is licensed under the same terms as the original package. diff -Nru ruby-semantic-puppet-1.0.1/debian/patches/locale_path ruby-semantic-puppet-1.0.2/debian/patches/locale_path --- ruby-semantic-puppet-1.0.1/debian/patches/locale_path 2017-06-08 12:30:30.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/patches/locale_path 1970-01-01 00:00:00.000000000 +0000 @@ -1,16 +0,0 @@ -Description: Adapt locale loading for vendor_ruby installation -Author: Markus Frosch -Last-Update: 2016-07-28 ---- -This patch header follows DEP-3: http://dep.debian.net/deps/dep3/ ---- a/lib/semantic_puppet.rb -+++ b/lib/semantic_puppet.rb -@@ -1,7 +1,7 @@ - require 'gettext-setup' - - module SemanticPuppet -- GettextSetup.initialize(File.absolute_path('../locales', File.dirname(__FILE__))) -+ GettextSetup.initialize(File.absolute_path('./semantic_puppet/locales', File.dirname(__FILE__))) - - autoload :Version, 'semantic_puppet/version' - autoload :VersionRange, 'semantic_puppet/version_range' diff -Nru ruby-semantic-puppet-1.0.1/debian/patches/series ruby-semantic-puppet-1.0.2/debian/patches/series --- ruby-semantic-puppet-1.0.1/debian/patches/series 2017-06-08 22:52:10.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/patches/series 1970-01-01 00:00:00.000000000 +0000 @@ -1 +0,0 @@ -locale_path diff -Nru ruby-semantic-puppet-1.0.1/debian/rules ruby-semantic-puppet-1.0.2/debian/rules --- ruby-semantic-puppet-1.0.1/debian/rules 2017-06-08 12:30:30.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/rules 2018-03-18 16:55:57.000000000 +0000 @@ -4,11 +4,3 @@ %: dh $@ --buildsystem=ruby --with ruby - -override_dh_auto_clean: - dh_auto_clean - rm -rf lib/semantic_puppet/locales - -override_dh_auto_build: - dh_auto_build - cp -r locales lib/semantic_puppet/ diff -Nru ruby-semantic-puppet-1.0.1/debian/upstream/metadata ruby-semantic-puppet-1.0.2/debian/upstream/metadata --- ruby-semantic-puppet-1.0.1/debian/upstream/metadata 1970-01-01 00:00:00.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/upstream/metadata 2018-03-13 17:33:15.000000000 +0000 @@ -0,0 +1,4 @@ +--- +Name: semantic_puppet +Repository: https://github.com/puppetlabs/semantic_puppet.git +Repository-Browse: https://github.com/puppetlabs/semantic_puppet.git diff -Nru ruby-semantic-puppet-1.0.1/debian/watch ruby-semantic-puppet-1.0.2/debian/watch --- ruby-semantic-puppet-1.0.1/debian/watch 2016-09-11 23:19:36.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/debian/watch 2018-03-13 17:36:14.000000000 +0000 @@ -1,2 +1,2 @@ -version=3 -http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/semantic_puppet .*/semantic_puppet-(.*).tar.gz +version=4 +https://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/semantic_puppet .*/semantic_puppet-(.*).tar.gz diff -Nru ruby-semantic-puppet-1.0.1/lib/semantic_puppet/gem_version.rb ruby-semantic-puppet-1.0.2/lib/semantic_puppet/gem_version.rb --- ruby-semantic-puppet-1.0.1/lib/semantic_puppet/gem_version.rb 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/lib/semantic_puppet/gem_version.rb 2018-03-18 16:51:20.000000000 +0000 @@ -1,3 +1,3 @@ module SemanticPuppet - VERSION = '1.0.1' + VERSION = '1.0.2' end diff -Nru ruby-semantic-puppet-1.0.1/lib/semantic_puppet/version_range.rb ruby-semantic-puppet-1.0.2/lib/semantic_puppet/version_range.rb --- ruby-semantic-puppet-1.0.1/lib/semantic_puppet/version_range.rb 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/lib/semantic_puppet/version_range.rb 2018-03-18 16:51:20.000000000 +0000 @@ -74,7 +74,7 @@ # Split on whitespace simples = range.split(RANGE_SPLIT).map do |simple| match_data = SIMPLE_EXPR.match(simple) - raise ArgumentError, _("Unparsable version range: \"%{range}\"") % { range: range_string } unless match_data + raise ArgumentError, "Unparsable version range: \"#{range_string}\"" unless match_data operand = match_data[2] # Case based on operator @@ -104,7 +104,7 @@ def self.parse_partial(expr) match_data = PARTIAL_EXPR.match(expr) - raise ArgumentError, _("Unparsable version range: \"%{expr}\"") % { expr: expr } unless match_data + raise ArgumentError, "Unparsable version range: \"#{expr}\"" unless match_data match_data end private_class_method :parse_partial @@ -332,7 +332,7 @@ # @return [VersionRange] the common subset # @api public def intersection(other) - raise ArgumentError, _("value must be a %{type}") % { :type => self.class.name } unless other.is_a?(VersionRange) + raise ArgumentError, "value must be a #{self.class.name}" unless other.is_a?(VersionRange) result = @ranges.map { |range| other.ranges.map { |o_range| range.intersection(o_range) } }.flatten result.compact! result.uniq! diff -Nru ruby-semantic-puppet-1.0.1/lib/semantic_puppet/version.rb ruby-semantic-puppet-1.0.2/lib/semantic_puppet/version.rb --- ruby-semantic-puppet-1.0.1/lib/semantic_puppet/version.rb 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/lib/semantic_puppet/version.rb 2018-03-18 16:51:20.000000000 +0000 @@ -15,7 +15,7 @@ def self.parse(ver) match, major, minor, patch, prerelease, build = *ver.match(REGEX_FULL_RX) - raise ValidationFailure, _("Unable to parse '%{version}' as a semantic version identifier") % {version: ver} unless match + raise ValidationFailure, "Unable to parse '#{ver}' as a semantic version identifier" unless match new(major.to_i, minor.to_i, patch.to_i, parse_prerelease(prerelease), parse_build(build)).freeze end @@ -42,7 +42,7 @@ return nil unless prerelease prerelease.split('.').map do |x| if x =~ /^\d+$/ - raise ValidationFailure, _('Numeric pre-release identifiers MUST NOT contain leading zeroes') if x.length > 1 && x.start_with?('0') + raise ValidationFailure, 'Numeric pre-release identifiers MUST NOT contain leading zeroes' if x.length > 1 && x.start_with?('0') x.to_i else x diff -Nru ruby-semantic-puppet-1.0.1/lib/semantic_puppet.rb ruby-semantic-puppet-1.0.2/lib/semantic_puppet.rb --- ruby-semantic-puppet-1.0.1/lib/semantic_puppet.rb 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/lib/semantic_puppet.rb 2018-03-18 16:51:20.000000000 +0000 @@ -1,8 +1,4 @@ -require 'gettext-setup' - module SemanticPuppet - GettextSetup.initialize(File.absolute_path('../locales', File.dirname(__FILE__))) - autoload :Version, 'semantic_puppet/version' autoload :VersionRange, 'semantic_puppet/version_range' autoload :Dependency, 'semantic_puppet/dependency' diff -Nru ruby-semantic-puppet-1.0.1/locales/config.yaml ruby-semantic-puppet-1.0.2/locales/config.yaml --- ruby-semantic-puppet-1.0.1/locales/config.yaml 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/locales/config.yaml 1970-01-01 00:00:00.000000000 +0000 @@ -1,21 +0,0 @@ ---- -# This is the project-specific configuration file for setting up -# fast_gettext for your project. -gettext: - # This is used for the name of the .pot and .po files; they will be - # called .pot? - project_name: 'semantic_puppet' - # This is used in comments in the .pot and .po files to indicate what - # project the files belong to and should bea little more desctiptive than - # - package_name: Semantic Puppet Gem - # The locale that the default messages in the .pot file are in - default_locale: en - # The email used for sending bug reports. - bugs_address: docs@puppetlabs.com - # The holder of the copyright. - copyright_holder: Puppet, Inc. - # Patterns for +Dir.glob+ used to find all files that might contain - # translatable content, relative to the project root directory - source_files: - - 'lib/**/*.rb' diff -Nru ruby-semantic-puppet-1.0.1/Rakefile ruby-semantic-puppet-1.0.2/Rakefile --- ruby-semantic-puppet-1.0.1/Rakefile 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/Rakefile 2018-03-18 16:51:20.000000000 +0000 @@ -56,12 +56,3 @@ rescue LoadError warn "[Warning]: Could not load `bundler/gem_tasks`." end - -# Gettext tasks -begin - spec = Gem::Specification.find_by_name 'gettext-setup' - load "#{spec.gem_dir}/lib/tasks/gettext.rake" - GettextSetup.initialize(File.absolute_path('locales', File.dirname(__FILE__))) -rescue LoadError - warn "[Warning]: Could not load gettext tasks." -end diff -Nru ruby-semantic-puppet-1.0.1/README.md ruby-semantic-puppet-1.0.2/README.md --- ruby-semantic-puppet-1.0.1/README.md 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/README.md 2018-03-18 16:51:20.000000000 +0000 @@ -12,10 +12,6 @@ For sparse, but accurate documentation, please see the docs directory. -Note that this is a 0 release version, and things can change. Expect that the -version and version range code to stay relatively stable, but the module -dependency code is expected to change. - This library is used by a number of Puppet Labs projects, including [Puppet](https://github.com/puppetlabs/puppet) and [r10k](https://github.com/puppetlabs/r10k). @@ -23,9 +19,8 @@ Requirements ------------ -Semantic_puppet will work on several ruby versions, including 1.9.3, 2.0.0, and -2.1.0. Ruby 1.8.7 is immediately deprecated as it is in -[r10k](https://github.com/puppetlabs/r10k). +Semantic_puppet will work on several ruby versions, including 1.9.3, +2.0.0, 2.1.9 and 2.4.1. Please see the exact matrix in `.travis.yml`. No gem/library requirements. @@ -48,40 +43,22 @@ Usage ----- -SemanticPuppet is intended to be used as a library. +SemanticPuppet is intended to be used as a library. ### Version Range Operator Support -SemanticPuppet will support the same version range operators as those used when -publishing modules to [Puppet Forge](https://forge.puppetlabs.com) which is -documented at -[Publishing Modules on the Puppet Forge](https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#dependencies-in-metadatajson). - -### i18n - -When adding new error or log messages please follow the instructions for -[writing translatable code](https://github.com/puppetlabs/gettext-setup-gem#writing-translatable-code). - -The SemanticPuppet gem will default to outputing all error messages in English, but you may set the locale -using the `FastGettext.set_locale` method. If translations do not exist for the language you request then the gem will -default to English. The `set_locale` method will return the locale, as a string, that FastGettext will now -use to report PuppetForge errors. - -``` ruby -# Assuming the German translations exist, this will set the reporting language -# to German - -locale = FastGettext.set_locale "de_DE" - -# If it successfully finds Germany's locale, locale will be "de_DE" -# If it fails to find any German locale, locale will be "en" -``` +SemanticPuppet will support the same version range operators as those +used when publishing modules to [Puppet +Forge](https://forge.puppetlabs.com) which is documented at [Publishing +Modules on the Puppet +Forge](https://docs.puppetlabs.com/puppet/latest/reference/modules_publishing.html#dependencies-in-metadatajson). Contributors ------------ -Pieter van de Bruggen wrote the library originally, with additions by Alex -Dreyer, Jesse Scott and Anderson Mills. +Pieter van de Bruggen wrote the library originally. See +[https://github.com/puppetlabs/semantic_puppet/graphs/contributors](https://github.com/puppetlabs/semantic_puppet/graphs/contributors) +for a list of contributors. ## Maintenance @@ -90,4 +67,5 @@ * Jesse Scott, jesse@puppet.com * Anderson Mills, anderson@puppet.com -Tickets: File at https://tickets.puppet.com/browse/FORGE +Tickets: File at +[https://tickets.puppet.com/browse/FORGE](https://tickets.puppet.com/browse/FORGE) diff -Nru ruby-semantic-puppet-1.0.1/semantic_puppet.gemspec ruby-semantic-puppet-1.0.2/semantic_puppet.gemspec --- ruby-semantic-puppet-1.0.1/semantic_puppet.gemspec 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/semantic_puppet.gemspec 2018-03-18 16:51:20.000000000 +0000 @@ -22,8 +22,6 @@ # Dependencies s.required_ruby_version = '>= 1.9.3' - s.add_dependency "gettext-setup", ">= 0.3" - s.add_development_dependency "json", "~> 1.8.3" if RUBY_VERSION < '2.0' s.add_development_dependency "rake" s.add_development_dependency "rspec" diff -Nru ruby-semantic-puppet-1.0.1/.travis.yml ruby-semantic-puppet-1.0.2/.travis.yml --- ruby-semantic-puppet-1.0.1/.travis.yml 2017-07-13 17:58:11.000000000 +0000 +++ ruby-semantic-puppet-1.0.2/.travis.yml 2018-03-18 16:51:20.000000000 +0000 @@ -1,14 +1,29 @@ --- language: ruby + cache: bundler + +before_install: + - bundle -v + - rm Gemfile.lock || true + - gem update --system + - gem update bundler + - gem --version + - bundle -v + script: "bundle exec rspec --color --format documentation spec/unit" + notifications: email: false + sudo: false + rvm: - - "2.3.1" + - "2.4.1" - "2.1.9" + - "2.0.0" - "1.9.3" - "jruby-19mode" + jdk: - oraclejdk8