Skip to content

Commit

Permalink
[Added] WTFPL License
Browse files Browse the repository at this point in the history
  • Loading branch information
forelabs committed Apr 24, 2020
1 parent 6851d7a commit ec62917
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 1 deletion.
14 changes: 13 additions & 1 deletion lib/license_finder/license/definitions.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,8 @@ def all
ofl,
python,
ruby,
simplifiedbsd
simplifiedbsd,
wtfpl
]
end

Expand Down Expand Up @@ -289,6 +290,17 @@ def simplifiedbsd
url: 'http://opensource.org/licenses/bsd-license'
)
end

def wtfpl
License.new(
short_name: 'WTFPL',
pretty_name: 'Do What The Fuck You Want To Public License',
other_names: [
'WTFPL V2'
],
url: 'http://www.wtfpl.net/'
)
end
end
end
end
14 changes: 14 additions & 0 deletions lib/license_finder/license/templates/WTFPL.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
Version 2, December 2004

Copyright (C) 2004 Sam Hocevar <sam@hocevar.net>

Everyone is permitted to copy and distribute verbatim or modified
copies of this license document, and changing it is allowed as long
as the name is changed.

DO WHAT THE FUCK YOU WANT TO PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION

0. You just DO WHAT THE FUCK YOU WANT TO.

8 changes: 8 additions & 0 deletions spec/lib/license_finder/license/definitions_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -189,3 +189,11 @@
expect(described_class.find_by_name('SimplifiedBSD').url).to be
end
end

describe LicenseFinder::License, 'WTFPL' do
it 'should be recognized' do
expect(described_class.find_by_name('WTFPL').url).to be
expect(described_class.find_by_name('WTFPL V2').url).to be
expect(described_class.find_by_name('Do What The Fuck You Want To Public License').url).to be
end
end

0 comments on commit ec62917

Please sign in to comment.