I have a RAILS plugin for coffeescript testing
https://github.com/bradphelan/jasminerice
with a gemspec defined as
# Provide a simple gemspec so you can easily use your
# project in your rails apps through git.
Gem::Specification.new do |s|
s.name = "jasminerice"
s.summary = "Pain free coffeescript unit testing for Rails 3.1 using jasmine"
s.description = "Full support for the Rails 3.1 asset pipeline when bdd'ing your coffeescript or javascript using jasmine"
s.files = `git ls-files`.split "\n"
s.authors = ["Brad Phelan"]
s.version = "0.0.6"
s.platform = Gem::Platform::RUBY
s.add_dependency( 'haml' )
end
At the bottom I have added the haml dependency. If jasminerice is included in the client Gemfile as
gem 'jasminerice'
then it fails because ‘haml’ is not included. If haml is included explicity as
gem 'jasminerice'
gem 'haml'
then all is ok. This doesn’t mesh with my understanding of Gemfiles and gemspecs. Is there something obvious I have missed.
I think you’re missing a
gemspecline in your gems Gemfile.From http://yehudakatz.com/2010/12/16/clarifying-the-roles-of-the-gemspec-and-gemfile/ :