Hello community, here is the log from the commit of package rubygem-ruby_dep for openSUSE:Factory checked in at 2016-08-25 09:55:21 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/rubygem-ruby_dep (Old) and /work/SRC/openSUSE:Factory/.rubygem-ruby_dep.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "rubygem-ruby_dep" Changes: -------- --- /work/SRC/openSUSE:Factory/rubygem-ruby_dep/rubygem-ruby_dep.changes 2016-07-21 08:15:51.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.rubygem-ruby_dep.new/rubygem-ruby_dep.changes 2016-08-25 09:55:24.000000000 +0200 @@ -1,0 +2,6 @@ +Wed Aug 3 04:36:11 UTC 2016 - [email protected] + +- updated to version 1.4.0 + no changelog found + +------------------------------------------------------------------- Old: ---- ruby_dep-1.3.1.gem New: ---- ruby_dep-1.4.0.gem ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ rubygem-ruby_dep.spec ++++++ --- /var/tmp/diff_new_pack.6Fqa3m/_old 2016-08-25 09:55:26.000000000 +0200 +++ /var/tmp/diff_new_pack.6Fqa3m/_new 2016-08-25 09:55:26.000000000 +0200 @@ -24,16 +24,16 @@ # Name: rubygem-ruby_dep -Version: 1.3.1 +Version: 1.4.0 Release: 0 %define mod_name ruby_dep %define mod_full_name %{mod_name}-%{version} BuildRoot: %{_tmppath}/%{name}-%{version}-build -BuildRequires: ruby-macros >= 5 -BuildRequires: %{ruby => 2.0} BuildRequires: %{ruby < 3} -BuildRequires: %{ruby >= 2.0.0} +BuildRequires: %{ruby => 2.2} +BuildRequires: %{ruby >= 2.2.5} BuildRequires: %{rubygem gem2rpm} +BuildRequires: ruby-macros >= 5 Url: https://github.com/e2/ruby_dep Source: http://rubygems.org/gems/%{mod_full_name}.gem Source1: gem2rpm.yml ++++++ ruby_dep-1.3.1.gem -> ruby_dep-1.4.0.gem ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/.travis.yml new/.travis.yml --- old/.travis.yml 2016-05-06 18:22:43.000000000 +0200 +++ new/.travis.yml 2016-08-03 03:11:54.000000000 +0200 @@ -1,12 +1,11 @@ sudo: false language: ruby bundler_args: --without development +env: JRUBY_OPTS='--server -Xcompile.invokedynamic=false' rvm: - - 2.0.0 - - 2.1.9 - - 2.2.4 - 2.2.5 - 2.3.1 - - jruby-9.0.5.0 -before_install: gem install bundler -v 1.12.1 + - jruby-9.1.2.0 + +before_install: gem install bundler -v 1.12.5 cache: bundler diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/README.md new/README.md --- old/README.md 2016-05-06 18:22:43.000000000 +0200 +++ new/README.md 2016-08-03 03:11:54.000000000 +0200 @@ -4,16 +4,24 @@ ## Description -RubyDep helps users avoid incompatible, buggy and insecure Ruby versions. +RubyDep does 2 things right now: -It's for gem owners to add to their runtime dependencies in their gemspec. +1. Helps end users avoid incompatible, buggy and insecure Ruby versions. +2. Helps gem owners manage their gem's `required_ruby_version` gemspec field based on `.travis.yml`. -1. It automatically sets your gemspec's `required_ruby_version` based on rubies tested in your `.travis-yml` -2. It warns users of your project if they're using a buggy or vulnerable version of Ruby +## Quick info + +- if you want to know how to disable the warnings, see here: https://github.com/e2/ruby_dep/wiki/Disabling-warnings +- for a list of Ruby versions that can be used to install ruby_dep, see here: https://travis-ci.org/e2/ruby_dep +- if your version of Ruby is not supported, open a new issue and explain your situation/problem +- when in doubt, open a new issue or [read the FAQ on the Wiki](https://github.com/e2/ruby_dep/wiki/FAQ). +- gems using RubyDep are designed to not be installable on a given Ruby version, unless it's specifically declared supported by those gems - but it's ok to ask for supporting your Ruby if you're stuck on an older version (for whatever reason) +- discussions about Ruby versions can get complex and frustrating - please be patient and constructive, and open-minded about solutions - especially if you're having problems -NOTE: RubyDep uses it's own approach on itself. This means it can only be installed on Ruby versions tested here: [check out the Travis build status](https://travis-ci.org/e2/ruby_dep). If you need support for an different/older version of Ruby, open an issue with "backport" in the title and provide a compelling case for supporting the version of Ruby you need. -When in doubt, open a new issue or [read the FAQ on the Wiki](https://github.com/e2/ruby_dep/wiki/FAQ). +## Supported Ruby versions: + +NOTE: RubyDep uses it's own approach on itself. This means it can only be installed on Ruby versions tested here: [check out the Travis build status](https://travis-ci.org/e2/ruby_dep). If you need support for an different/older version of Ruby, open an issue with "backport" in the title and provide a compelling case for supporting the version of Ruby you need. ## Problem 1: "Which version of Ruby does your project support?" Files old/checksums.yaml.gz and new/checksums.yaml.gz differ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/logger.rb new/lib/ruby_dep/logger.rb --- old/lib/ruby_dep/logger.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/ruby_dep/logger.rb 2016-08-03 03:11:54.000000000 +0200 @@ -0,0 +1,16 @@ +module RubyDep + class Logger + def initialize(device, prefix) + @device = device + @prefix = prefix + end + + def warning(msg) + @device.puts @prefix + msg + end + + def notice(msg) + @device.puts @prefix + msg + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/quiet.rb new/lib/ruby_dep/quiet.rb --- old/lib/ruby_dep/quiet.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/ruby_dep/quiet.rb 2016-08-03 03:11:54.000000000 +0200 @@ -0,0 +1,3 @@ +require 'ruby_dep/warning' + +RubyDep::Warning.new.silence! diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/ruby_version.rb new/lib/ruby_dep/ruby_version.rb --- old/lib/ruby_dep/ruby_version.rb 1970-01-01 01:00:00.000000000 +0100 +++ new/lib/ruby_dep/ruby_version.rb 2016-08-03 03:11:54.000000000 +0200 @@ -0,0 +1,58 @@ + +module RubyDep + class RubyVersion + attr_reader :status # NOTE: monkey-patched by acceptance tests + attr_reader :version + attr_reader :engine + + def initialize(ruby_version, engine) + @engine = engine + @version = Gem::Version.new(ruby_version) + @status = detect_status + end + + def recognized? + info.any? + end + + def recommended(status) + current = Gem::Version.new(@version) + info.select do |key, value| + value == status && Gem::Version.new(key) > current + end.keys.reverse + end + + private + + VERSION_INFO = { + 'ruby' => { + '2.3.1' => :unknown, + '2.3.0' => :buggy, + '2.2.5' => :unknown, + '2.2.4' => :buggy, + '2.2.0' => :insecure, + '2.1.9' => :buggy, + '2.0.0' => :insecure + }, + + 'jruby' => { + '2.3.0' => :unknown, # jruby-9.1.2.0, jruby-9.1.0.0 + '2.2.3' => :buggy, # jruby-9.0.5.0 + '2.2.0' => :insecure + } + }.freeze + + def info + @info ||= VERSION_INFO[@engine] || {} + end + + def detect_status + return :untracked unless recognized? + + info.each do |ruby, status| + return status if @version >= Gem::Version.new(ruby) + end + :insecure + end + end +end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/travis/ruby_version.rb new/lib/ruby_dep/travis/ruby_version.rb --- old/lib/ruby_dep/travis/ruby_version.rb 2016-05-06 18:22:43.000000000 +0200 +++ new/lib/ruby_dep/travis/ruby_version.rb 2016-08-03 03:11:54.000000000 +0200 @@ -48,6 +48,8 @@ end def jruby_version(version) + return '2.3.0' if version == '9.1.2.0' + return '2.3.0' if version == '9.1.0.0' return '2.2.3' if version == '9.0.5.0' return '2.2.2' if version == '9.0.4.0' raise Error::Unrecognized::JRubyVersion, version diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/version.rb new/lib/ruby_dep/version.rb --- old/lib/ruby_dep/version.rb 2016-05-06 18:22:43.000000000 +0200 +++ new/lib/ruby_dep/version.rb 2016-08-03 03:11:54.000000000 +0200 @@ -1,3 +1,3 @@ module RubyDep - VERSION = '1.3.1'.freeze + VERSION = '1.4.0'.freeze end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/lib/ruby_dep/warning.rb new/lib/ruby_dep/warning.rb --- old/lib/ruby_dep/warning.rb 2016-05-06 18:22:43.000000000 +0200 +++ new/lib/ruby_dep/warning.rb 2016-08-03 03:11:54.000000000 +0200 @@ -1,96 +1,97 @@ +require 'ruby_dep/logger' +require 'ruby_dep/ruby_version' + module RubyDep + PROJECT_URL = 'http://github.com/e2/ruby_dep'.freeze + class Warning + DISABLING_ENVIRONMENT_VAR = 'RUBY_DEP_GEM_SILENCE_WARNINGS'.freeze PREFIX = 'RubyDep: WARNING: '.freeze - MSG_BUGGY = 'Your Ruby is outdated/buggy.'.freeze - MSG_INSECURE = 'Your Ruby has security vulnerabilities!'.freeze - MSG_HOW_TO_DISABLE = ' (To disable warnings, set'\ - ' RUBY_DEP_GEM_SILENCE_WARNINGS=1)'.freeze + WARNING = { + insecure: 'Your Ruby has security vulnerabilities!'.freeze, + buggy: 'Your Ruby is outdated/buggy.'.freeze, + untracked: 'Your Ruby may not be supported.'.freeze + }.freeze + + NOTICE_RECOMMENDATION = 'Your Ruby is: %s (%s).'\ + ' Recommendation: upgrade to %s.'.freeze + + NOTICE_BUGGY_ALTERNATIVE = '(Or, at least to %s)'.freeze - OPEN_ISSUE_FOR_UNRECOGNIZED = 'If this version is important,'\ - ' please open an issue at http://github.com/e2/ruby_dep'.freeze + NOTICE_HOW_TO_DISABLE = '(To disable warnings, see:'\ + "#{PROJECT_URL}/wiki/Disabling-warnings )".freeze + + NOTICE_OPEN_ISSUE = 'If you need this version supported,'\ + " please open an issue at #{PROJECT_URL}".freeze + + def initialize + @version = RubyVersion.new(RUBY_VERSION, RUBY_ENGINE) + @logger = Logger.new(STDERR, PREFIX) + end def show_warnings return if silenced? - case (status = check_ruby) - when :insecure - warn_ruby(MSG_INSECURE, status) - when :buggy - warn_ruby(MSG_BUGGY, status) - when :unknown - else - raise "Unknown problem type: #{problem.inspect}" - end + return warn_ruby(WARNING[status]) if WARNING.key?(status) + return if status == :unknown + raise "Unknown problem type: #{problem.inspect}" end - private - - VERSION_INFO = { - 'ruby' => { - '2.3.1' => :unknown, - '2.3.0' => :buggy, - '2.2.5' => :unknown, - '2.2.4' => :buggy, - '2.2.0' => :insecure, - '2.1.9' => :buggy, - '2.0.0' => :insecure - }, - - 'jruby' => { - '2.2.3' => :unknown, # jruby-9.0.5.0 - '2.2.0' => :insecure - } - }.freeze - - def check_ruby - version = Gem::Version.new(RUBY_VERSION) - current_ruby_info.each do |ruby, status| - return status if version >= Gem::Version.new(ruby) - end - :insecure + def silence! + ENV[DISABLING_ENVIRONMENT_VAR] = '1' end + private + def silenced? - value = ENV['RUBY_DEP_GEM_SILENCE_WARNINGS'] + value = ENV[DISABLING_ENVIRONMENT_VAR] (value || '0') !~ /^0|false|no|n$/ end - def warn_ruby(msg, status) - STDERR.puts PREFIX + msg + MSG_HOW_TO_DISABLE - STDERR.puts PREFIX + recommendation(status) + def status + @version.status end - def recommendation(status) - msg = "Your Ruby is: #{RUBY_VERSION}" - return msg + recommendation_for_unknown unless recognized? - - msg += " (#{status})." - msg += " Recommendation: install #{recommended(:unknown).join(' or ')}." - return msg unless status == :insecure + def warn_ruby(msg) + @logger.warning(msg) + @logger.notice(recommendation) + @logger.notice(NOTICE_HOW_TO_DISABLE) + end - msg + " (Or, at least to #{recommended(:buggy).join(' or ')})" + def recommendation + return unrecognized_msg unless @version.recognized? + return recommendation_msg unless status == :insecure + [recommendation_msg, safer_alternatives_msg].join(' ') end - def recommended(status) - current = Gem::Version.new(RUBY_VERSION) - current_ruby_info.select do |key, value| - value == status && Gem::Version.new(key) > current - end.keys.reverse + def unrecognized_msg + format( + "Your Ruby is: %s '%s' (unrecognized). %s", + @version.version, + @version.engine, + NOTICE_OPEN_ISSUE + ) end - def current_ruby_info - VERSION_INFO[RUBY_ENGINE] || {} + def recommended_versions + @version.recommended(:unknown) end - def recognized? - current_ruby_info.any? + def buggy_alternatives + @version.recommended(:buggy) end - def recommendation_for_unknown + def recommendation_msg format( - " '%s' (unrecognized). %s", RUBY_ENGINE, - OPEN_ISSUE_FOR_UNRECOGNIZED + NOTICE_RECOMMENDATION, + @version.version, + status, + recommended_versions.join(' or ') ) end + + def safer_alternatives_msg + format(NOTICE_BUGGY_ALTERNATIVE, buggy_alternatives.join(' or ')) + end end end diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/metadata new/metadata --- old/metadata 2016-05-06 18:22:43.000000000 +0200 +++ new/metadata 2016-08-03 03:11:54.000000000 +0200 @@ -1,14 +1,14 @@ --- !ruby/object:Gem::Specification name: ruby_dep version: !ruby/object:Gem::Version - version: 1.3.1 + version: 1.4.0 platform: ruby authors: - Cezary Baginski autorequire: bindir: exe cert_chain: [] -date: 2016-05-06 00:00:00.000000000 Z +date: 2016-08-03 00:00:00.000000000 Z dependencies: - !ruby/object:Gem::Dependency name: bundler @@ -39,6 +39,9 @@ - LICENSE.txt - README.md - lib/ruby_dep.rb +- lib/ruby_dep/logger.rb +- lib/ruby_dep/quiet.rb +- lib/ruby_dep/ruby_version.rb - lib/ruby_dep/travis.rb - lib/ruby_dep/travis/ruby_version.rb - lib/ruby_dep/version.rb @@ -55,10 +58,10 @@ requirements: - - "~>" - !ruby/object:Gem::Version - version: '2.0' + version: '2.2' - - ">=" - !ruby/object:Gem::Version - version: 2.0.0 + version: 2.2.5 required_rubygems_version: !ruby/object:Gem::Requirement requirements: - - ">=" @@ -66,7 +69,7 @@ version: '0' requirements: [] rubyforge_project: -rubygems_version: 2.5.1 +rubygems_version: 2.6.6 signing_key: specification_version: 4 summary: Extracts supported Ruby versions from Travis file
