puppetlabs / semantic_puppet Goto Github PK
View Code? Open in Web Editor NEWLicense: Other
License: Other
Hi!
When installing 'r10k' through gem, 'semantic_puppet' version 0.1.4 is installed with it.
However when launching r10k an error is raised, which seems to be coming from semantic_puppet:
r10k
/usr/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:31:in `gem_original_require': /usr/lib/ruby/gems/1.8/gems/semantic_puppet-0.1.4/lib/semantic_puppet/version.rb:21: odd number list for Hash (SyntaxError)
...rsion identifier") % {version: ver}
When forcing version 0.1.1 for semantic_puppet the error is not raised.
The relevant environment is the following:
OS: RHEL 6.8
Ruby: ruby 1.8.7 (2013-06-27 patchlevel 374) [x86_64-linux]
There seems to be an interesting error with Ruby 2.2.3 + RSpec 3.4.
From what the error suggest it seems to be a problem between rspec and ruby. This issue is mostly meant for reference. It might be related to https://bugs.ruby-lang.org/issues/11113
TypeError: can't iterate from SemanticPuppet::Version
./spec/unit/semantic_puppet/version_range_spec.rb:30:in `block (3 levels) in test_range'
ruby 2.2.3p173 (2015-08-18 revision 51636) [x86_64-linux]
Gems included by the bundle:
* bundler (1.11.0)
* diff-lcs (1.2.5)
* rake (10.4.2)
* rspec (3.4.0)
* rspec-core (3.4.1)
* rspec-expectations (3.4.0)
* rspec-mocks (3.4.0)
* rspec-support (3.4.1)
* rubygems-tasks (0.2.4)
Over a year ago #40 was merged, but there's no release yet. It'd be great if one was made so I no longer need to use a git version.
per $SUBJ, please include tags in github, so that releases on rubygems can traced back to specific code in github.
In this commit, i18n locale support for translations was enabled. It does not appear that any locale info was added, as well as the .pot file being excluded in .gitignore. This adds a dependency on gettext-setup which has its own dependencies, which today caused issues when a new gettext release dropped support for certain versions of ruby.
Unless I misunderstand how gettext-setup works (which is quite possible!) in the current implementation this simply adds a dependency but provides no benefit. Can this either be enabled if it will be used, or removed to eliminate the dependency if it will not?
I do not have permission to see CODEMGMT-725 to see why gettext-setup was originally chosen.
In Puppet's Jenkins pipelines we build up the module version number based on Jenkins build number and commit hash. On Puppet 4 (semantic puppet 0.1.4) this was working ok, but on Puppet 5 (semantic puppet 1.0) this broke and was giving false results to what are valid version numbers. The version number e.g. 2.1.0-0016-13fae4a9
is valid but semantic puppet returned false to valid?
In https://github.com/puppetlabs/semantic_puppet/blob/master/lib/semantic_puppet/version.rb#L33
prerelease = match[4]
prerelease.nil? || prerelease.split('.').all? { |x| !(x =~ /^0\d+/) }
end
this expects the pre-release identifier to only have digits however according to the semver 2.0 spec:
... Identifiers MUST comprise only ASCII alphanumerics and hyphen [0-9A-Za-z-] ...
http://semver.org/#spec-item-9
Also applies to Semver 1.0 spec
http://semver.org/spec/v1.0.0.html
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.