lib/licensee.rb in licensee-9.11.0 vs lib/licensee.rb in licensee-9.12.0
- old
+ new
@@ -1,5 +1,7 @@
+# frozen_string_literal: true
+
require_relative 'licensee/version'
require 'forwardable'
require 'pathname'
require 'yaml'
@@ -17,11 +19,11 @@
# Over which percent is a match considered a match by default
CONFIDENCE_THRESHOLD = 98
# Base domain from which to build license URLs
- DOMAIN = 'http://choosealicense.com'.freeze
+ DOMAIN = 'http://choosealicense.com'
class << self
attr_writer :confidence_threshold
# Returns an array of Licensee::License instances
@@ -47,10 +49,10 @@
def confidence_threshold
@confidence_threshold ||= CONFIDENCE_THRESHOLD
end
# Inverse of the confidence threshold, represented as a float
- # By default this will be 0.05
+ # By default this will be 0.02
def inverse_confidence_threshold
@inverse_confidence_threshold ||=
(1 - Licensee.confidence_threshold / 100.0).round(2)
end
end