I have a Gemfile as part of rails app, which I am converting to a gem.
gem "jruby-openssl", "0.7.4"
gem "nokogiri"
gem 'xml-simple', :require => 'xmlsimple'
gem "httpclient"
How do I write, the .gemspec file, for the gem I create from this? The gemspec I wrote looks like this.
Gem::Specification.new do |s|
s.name = "my_gem"
s.platform = Gem::Platform::RUBY
s.authors = [""]
s.email = [""]
s.homepage = ""
s.summary = %q{MyGem}
s.description = %q{MyGem}
s.files = Dir["{app,lib,config,public,db}/**/*"] + ["Rakefile", "Gemfile"]
s.require_paths = ["lib"]
s.add_dependency 'nokogiri', '>= 1.5.0'
s.add_dependency('xml-simple')
s.add_dependency 'httpclient'
end
However, the xmlsimple object is not called, because, the add dependency cannot take the same parameters as a regular gem call. How do I write the gemspec to call xmlsimple like its done in the Gemfile ?