summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorRyan Davis <ryand@zenspider.com>2013-07-23 16:13:52 -0800
committerRyan Davis <ryand@zenspider.com>2013-07-23 16:13:52 -0800
commitd93fc123c199e5670799071c3a77fc15790fe3fd (patch)
tree8f8fc0af613cdc5a158080f522ed722f4b70e0b6 /lib
parentd99e4b6f614c908fc0b78edda8089d27c0e3304e (diff)
downloadhoe-d93fc123c199e5670799071c3a77fc15790fe3fd.tar.gz
+ Warn and default to MIT license if not set.
[git-p4: depot-paths = "//src/hoe/dev/": change = 8834]
Diffstat (limited to 'lib')
-rw-r--r--lib/hoe.rb10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/hoe.rb b/lib/hoe.rb
index 22b8e31..3923e41 100644
--- a/lib/hoe.rb
+++ b/lib/hoe.rb
@@ -184,6 +184,8 @@ class Hoe
##
# Optional: An array containing the license(s) under which this gem is released.
+ #
+ # Warns and defaults to "MIT" if not set.
attr_accessor :licenses
@@ -557,7 +559,13 @@ class Hoe
check_for_version
- spec.licenses = licenses unless licenses.empty?
+ if licenses.empty?
+ warn "Defaulting gemspec to MIT license."
+ warn "Call license in hoe spec to change."
+ license "MIT"
+ end
+
+ spec.licenses = licenses
run_spec_extras
end