Sha256: f9c0849f2f933d89e2727bd1ac8f4b5005e8a110d6934b9a90514ebe0c3a14ea

Contents?: true

Size: 441 Bytes

Versions: 21

Compression:

Stored size: 441 Bytes

Contents

module Licensee
  module Matchers
    class Cabal < Licensee::Matchers::Package
      # While we could parse the cabal file, prefer
      # a lenient regex for speed and security. Moar parsing moar problems.
      LICENSE_REGEX = /^\s*license\s*\:\s*([a-z\-0-9\.]+)\s*$/ix

      private

      def license_property
        match = @file.content.match LICENSE_REGEX
        match[1].downcase if match && match[1]
      end
    end
  end
end

Version data entries

21 entries across 21 versions & 1 rubygems

Version Path
licensee-9.10.1 lib/licensee/matchers/cabal.rb
licensee-9.10.0 lib/licensee/matchers/cabal.rb
licensee-9.9.4 lib/licensee/matchers/cabal.rb
licensee-9.9.3 lib/licensee/matchers/cabal.rb
licensee-9.9.2 lib/licensee/matchers/cabal.rb
licensee-9.9.1 lib/licensee/matchers/cabal.rb
licensee-9.9.0 lib/licensee/matchers/cabal.rb
licensee-9.9.0.beta.3 lib/licensee/matchers/cabal.rb
licensee-9.9.0.beta.2 lib/licensee/matchers/cabal.rb
licensee-9.8.0 lib/licensee/matchers/cabal.rb
licensee-9.7.0 lib/licensee/matchers/cabal.rb
licensee-9.6.0 lib/licensee/matchers/cabal.rb
licensee-9.5.0 lib/licensee/matchers/cabal.rb
licensee-9.4.0 lib/licensee/matchers/cabal.rb
licensee-9.3.1 lib/licensee/matchers/cabal.rb
licensee-9.3.0 lib/licensee/matchers/cabal.rb
licensee-9.2.1 lib/licensee/matchers/cabal.rb
licensee-9.2.0 lib/licensee/matchers/cabal.rb
licensee-9.1.0 lib/licensee/matchers/cabal.rb
licensee-9.0.0 lib/licensee/matchers/cabal.rb