Uploaded image for project: 'Puppet'
  1. Puppet
  2. PUP-6341

SemanticPuppet::Dependency::ModuleRelease should implement operator eql? and operator '=='

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Normal
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: PUP 4.6.0
    • Component/s: None
    • Labels:
      None
    • Template:
    • Acceptance Criteria:
      Hide

      That SemanticPuppet does not fail spec tests on Runyby >= 2.3.0.

      Show
      That SemanticPuppet does not fail spec tests on Runyby >= 2.3.0.
    • Story Points:
      1
    • Sprint:
      Language 2016-06-01
    • Release Notes:
      Bug Fix
    • Release Notes Summary:
      Semantic Puppet (support for semver) gem was updated with fixes for problems on Ruby >= 2.3.0.

      Description

      The SemanticPuppet::Dependency::ModuleRelease class does not implement eql? or '==' which, when using Ruby versions >= 2.3.0 means that when compared using '==', it ends up in '<=>'. That method simply assumes that its argument is a SemanticPuppet::Dependency::ModuleRelease which then fails when a release is compared to something else. Example:

      mod_rel == nil
      

      results in the following error:

      undefined method `priority' for nil:NilClass
           # "./lib/semantic_puppet/dependency/module_release.rb:36:in `<=>'
      

        Attachments

          Issue Links

            Activity

              jsd-sla-details-panel

                People

                • Assignee:
                  Unassigned
                  Reporter:
                  thomas.hallgren Thomas Hallgren
                • Votes:
                  0 Vote for this issue
                  Watchers:
                  3 Start watching this issue

                  Dates

                  • Created:
                    Updated:
                    Resolved: