Sha256: 4ce2de3294fc17cac23651daac1673855fe68bce43682de0d371fd62e3dbbe77

Contents?: true

Size: 656 Bytes

Versions: 8

Compression:

Stored size: 656 Bytes

Contents

module GitCompound
  module Worker
    # Worker that detects if component name and its manifest name matches
    # This is important because it is additional verification of consistency
    # of manifests
    #
    class NameConstraintChecker < Worker
      def visit_component(component)
        return unless component.manifest.exists?

        component_name = component.name
        manifest_name  = component.manifest.name

        return if component_name == manifest_name
        raise NameConstraintError, "Name of component `#{component_name}` " \
          "does not match name in its manifest (`#{manifest_name}`) !"
      end
    end
  end
end

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
git_compound-0.2.2 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.2.1 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.2.0 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.1.2 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.1.1 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.1.0 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.0.10 lib/git_compound/worker/name_constraint_checker.rb
git_compound-0.0.9 lib/git_compound/worker/name_constraint_checker.rb