Open rleber opened 13 years ago
+1
i am new to thor and wanted to use it to replace Rakefile for packaging gems, but i couldn't find any documentation and my guessing didn't get anywhere:
% gem build thegem.gemspec
ERROR: While executing gem ... (Gem::InvalidSpecificationException)
["Rakefile"] are not files
% cat Thorfile
# enconding: utf-8
$:.unshift File.expand_path("../lib", __FILE__)
require 'thor/rake_compat'
class Default < Thor
include Thor::RakeCompat
require 'bundler'
Bundler::GemHelper.install_tasks
end
% thor -T
default
-------
thor :build # Build thegem-0.0.1.gem into the pkg directory
thor :install # Build and install thegem-0.0.1.gem into system gems
thor :release # Create tag v0.0.1 and build and push thegem-0.0.1.gem to Rubygems
% thor :build
/usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/gem_helper.rb:132:in `sh': ERROR: While executing gem ... (Gem::InvalidSpecificationException) (RuntimeError)
["Rakefile"] are not files
from /usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/gem_helper.rb:44:in `build_gem'
from /usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/gems/1.9.1/gems/bundler-1.0.15/lib/bundler/gem_helper.rb:28:in `block in install'
from /usr/local/Cellar/ruby/1.9.2-p180/lib/ruby/1.9.1/rake.rb:634:in `call'
[...]
% ruby -v
ruby 1.9.2p180 (2011-02-18 revision 30909) [x86_64-darwin10.7.0]
% thor -v
Thor 0.14.6
% gem -v
1.8.5
scratch my comment, just had to recommit with git, Rakefile was still being picked up by git ls-files
It used to be that I could put the following in my Thorfile and get a nice set of gem builder tasks. Now it no longer seems to work
Has this been deprecated? Have the semantics changed?