Sha256: cc69482e4c638e7d689d6a2386b981267ddfd9c3c608a5d1ea1e3a3cb421ec38

Contents?: true

Size: 789 Bytes

Versions: 12

Compression:

Stored size: 789 Bytes

Contents

Dir[File.join(File.dirname(__FILE__), "release_filters", "*.rb")].each(&method(:require))

class StructuredChangelog
  class IllegalQuery < StandardError; end

  module ReleaseFilters
    def self.filter_for(query)
      filter_class = filter_class_for_query(query)

      raise IllegalQuery.new(query) unless filter_class

      filter_class.new(query)
    end

    def self.filter_class_for_query(query)
      filter_classes.find do |filter_class|
        filter_class.appropriate_for_query?(query)
      end
    end

    def self.filter_classes
      [
        MatchesCurrentVersion,
        MatchesAllVersions,
        MatchesSingleVersion,
        MatchesVersionsGreaterThanOrEqualTo,
        MatchesVersionsLessThanOrEqualTo,
        MatchesVersionsBetween
      ]
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
structured_changelog-0.11.2 lib/structured_changelog/release_filters.rb
structured_changelog-0.11.1 lib/structured_changelog/release_filters.rb
structured_changelog-0.11.0 lib/structured_changelog/release_filters.rb
structured_changelog-0.10.2 lib/structured_changelog/release_filters.rb
structured_changelog-0.10.1 lib/structured_changelog/release_filters.rb
structured_changelog-0.10.0 lib/structured_changelog/release_filters.rb
structured_changelog-0.8.3 lib/structured_changelog/release_filters.rb
structured_changelog-0.8.2 lib/structured_changelog/release_filters.rb
structured_changelog-0.8.1 lib/structured_changelog/release_filters.rb
structured_changelog-0.8.0 lib/structured_changelog/release_filters.rb
structured_changelog-0.7.2 lib/structured_changelog/release_filters.rb
structured_changelog-0.7.1 lib/structured_changelog/release_filters.rb