lib/license_finder/license/definitions.rb in license_finder-6.7.0 vs lib/license_finder/license/definitions.rb in license_finder-6.8.0
- old
+ new
@@ -17,10 +17,11 @@
gplv3,
isc,
lgpl,
lgpl2_1,
mit,
+ mpl1_1,
mpl2,
newbsd,
ofl,
python,
ruby,
@@ -180,11 +181,35 @@
url: 'http://opensource.org/licenses/mit-license',
matcher: matcher
)
end
+ def mpl1_1
+ header_regexp = /Mozilla Public Licen[sc]e.*Version 1\.1/im
+
+ header_regexp_matcher = Matcher.from_regex(header_regexp)
+ mpl1_1_tmpl = Template.named('MPL1_1')
+
+ matcher = AnyMatcher.new(
+ HeaderMatcher.new(header_regexp_matcher, 2),
+ Matcher.from_template(mpl1_1_tmpl)
+ )
+
+ License.new(
+ short_name: 'MPL1_1',
+ pretty_name: 'Mozilla Public License 1.1',
+ other_names: [
+ 'MPL-1.1',
+ 'Mozilla Public License, Version 1.1',
+ 'Mozilla Public License version 1.1'
+ ],
+ url: 'https://www.mozilla.org/media/MPL/1.1/index.0c5913925d40.txt',
+ matcher: matcher
+ )
+ end
+
def mpl2
- header_regexp = /Mozilla Public Licen[sc]e, version 2.0/
+ header_regexp = /Mozilla Public Licen[sc]e, version 2\.0/
matcher = AnyMatcher.new(
Matcher.from_template(Template.named('MPL2')),
HeaderMatcher.new(Matcher.from_regex(header_regexp))
)