Permalink
Browse files

Several updates in tasks and documentation

* Enhancements in tasks.
* License have been added.
  • Loading branch information...
1 parent b7baa90 commit 9038fe93afe301e7a0aa0fdbf5a15b580fee889e Hallison Batista committed with Hallison Batista Oct 23, 2009
Showing with 44 additions and 12 deletions.
  1. +21 −0 LICENSE
  2. +6 −6 tasks/documentation.rake
  3. +17 −6 tasks/package.rake
View
21 LICENSE
@@ -0,0 +1,21 @@
+Copyright (c) 2009 Hallison Batista
+
+Permission is hereby granted, free of charge, to any person obtaining a
+copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be included
+in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+
View
@@ -6,12 +6,12 @@ rescue LoadError
end
desc "Generate RDoc API documentation."
-Rake::RDocTask.new("doc") do |doc|
- doc.title = Postview.name
- doc.main = %q{README.rdoc}
- doc.options = %w{--line-numbers --show-hash}
- doc.rdoc_dir = %q{doc}
- doc.rdoc_files.include %w{
+Rake::RDocTask.new("doc:api") do |rdoc|
+ rdoc.title = Postview.name
+ rdoc.main = %q{README.rdoc}
+ rdoc.options = %w{--line-numbers --show-hash}
+ rdoc.rdoc_dir = %q{doc/api}
+ rdoc.rdoc_files.include %w{
HISTORY
LICENSE
README.rdoc
View
@@ -75,15 +75,26 @@ namespace :gem do
spec << gemspec.to_yaml
end
end
- puts "Successfully built #{gemspec_file}"
+ puts "Successfully build #{gemspec_file} file"
end
- desc "Build #{gemspec_file}"
- task :spec => [gemspec_file]
+ desc "Build gem spec file #{gemspec_file}"
+ task :spec => [gemspec_file.to_s]
-end
+ desc "Build gem package #{gemspec.file_name}"
+ task :build => ["gem:spec"] do
+ sh "gem build #{gemspec_file}"
+ end
+
+ desc "Install gem package #{gemspec.file_name}"
+ task :install => ["gem:build"] do
+ sh "gem install #{gemspec.name}-#{gemspec.version}.gem --local"
+ end
+
+ desc "Uninstall gem package #{gemspec.file_name}"
+ task :uninstall do
+ sh "gem uninstall #{gemspec.name} --version #{gemspec.version}"
+ end
-Rake::GemPackageTask.new gemspec do |pkg|
- pkg.need_zip = true
end

0 comments on commit 9038fe9

Please sign in to comment.