Sha256: bc88ba5a6bc7f9b5f563ad156a29874b79f166a6009c259165f12b9ad2ad1afd

Contents?: true

Size: 382 Bytes

Versions: 10

Compression:

Stored size: 382 Bytes

Contents

class CompareLinker
  class Formatter
    class Base
      private

      def downgrade?(old_ver, new_ver, old_tag, new_tag)
        Gem::Version.new(new_ver) < Gem::Version.new(old_ver) ||
          (old_tag && new_tag && Gem::Version.new(to_ver(new_tag)) < Gem::Version.new(to_ver(old_tag)))
      end

      def to_ver(tag)
        tag.sub(/\Av/, '')
      end
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
compare_linker-1.2.1 lib/compare_linker/formatter/base.rb
compare_linker-1.2.0 lib/compare_linker/formatter/base.rb
compare_linker-1.1.9 lib/compare_linker/formatter/base.rb
compare_linker-1.1.8 lib/compare_linker/formatter/base.rb
compare_linker-1.1.7 lib/compare_linker/formatter/base.rb
compare_linker-1.1.6 lib/compare_linker/formatter/base.rb
compare_linker-1.1.5 lib/compare_linker/formatter/base.rb
compare_linker-1.1.4 lib/compare_linker/formatter/base.rb
compare_linker-1.1.3 lib/compare_linker/formatter/base.rb
compare_linker-1.1.2 lib/compare_linker/formatter/base.rb