Permalink
Browse files

basic gemification

  • Loading branch information...
1 parent f7c792f commit d9072e2dc3bee5890f9fc3c8230de57ea5bd5e36 @cldwalker committed Feb 5, 2012
Showing with 58 additions and 1 deletion.
  1. +1 −1 .gemspec
  2. +22 −0 LICENSE.txt
  3. +35 −0 Rakefile
View
@@ -19,6 +19,6 @@ Gem::Specification.new do |s|
s.add_development_dependency 'bacon-bits'
s.add_development_dependency 'bahia', '>= 0.3.0'
s.files = Dir.glob(%w[{lib,test}/**/*.rb bin/* [A-Z]*.{txt,rdoc} ext/**/*.{rb,c} **/deps.rip]) + %w{Rakefile .gemspec}
- s.extra_rdoc_files = ["README.rdoc", "LICENSE.txt"]
+ s.extra_rdoc_files = ["README.md", "LICENSE.txt"]
s.license = 'MIT'
end
View
@@ -0,0 +1,22 @@
+The MIT LICENSE
+
+Copyright (c) 2010 Gabriel Horner
+
+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
@@ -0,0 +1,35 @@
+require 'rake'
+require 'fileutils'
+
+def gemspec
+ @gemspec ||= eval(File.read('.gemspec'), binding, '.gemspec')
+end
+
+desc "Build the gem"
+task :gem=>:gemspec do
+ sh "gem build .gemspec"
+ FileUtils.mkdir_p 'pkg'
+ FileUtils.mv "#{gemspec.name}-#{gemspec.version}.gem", 'pkg'
+end
+
+desc "Install the gem locally"
+task :install => :gem do
+ sh %{gem install pkg/#{gemspec.name}-#{gemspec.version}}
+end
+
+desc "Generate the gemspec"
+task :generate do
+ puts gemspec.to_ruby
+end
+
+desc "Validate the gemspec"
+task :gemspec do
+ gemspec.validate
+end
+
+desc 'Run tests'
+task :test do |t|
+ sh 'bacon -q -Ilib -I. test/*_test.rb'
+end
+
+task :default => :test

0 comments on commit d9072e2

Please sign in to comment.