Rakefile in dm-serializer-0.10.1 vs Rakefile in dm-serializer-0.10.2

- old
+ new

@@ -1,24 +1,33 @@ -require 'pathname' +require 'rubygems' +require 'rake' -ROOT = Pathname(__FILE__).dirname.expand_path -JRUBY = RUBY_PLATFORM =~ /java/ -WINDOWS = Gem.win_platform? -SUDO = (WINDOWS || JRUBY) ? '' : ('sudo' unless ENV['SUDOLESS']) +begin + gem 'jeweler', '~> 1.4' + require 'jeweler' -require ROOT + 'lib/dm-serializer/version' + Jeweler::Tasks.new do |gem| + gem.name = 'dm-serializer' + gem.summary = 'DataMapper plugin for serializing Resources and Collections' + gem.description = gem.summary + gem.email = 'vandenberg.guy [a] gmail [d] com' + gem.homepage = 'http://github.com/datamapper/dm-more/tree/master/%s' % gem.name + gem.authors = [ 'Guy van den Berg' ] -AUTHOR = 'Guy van den Berg' -EMAIL = 'vandenberg.guy [a] gmail [d] com' -GEM_NAME = 'dm-serializer' -GEM_VERSION = DataMapper::Serializer::VERSION -GEM_DEPENDENCIES = [['dm-core', GEM_VERSION]] -GEM_CLEAN = %w[ log pkg coverage ] -GEM_EXTRAS = { :has_rdoc => true, :extra_rdoc_files => %w[ README.rdoc LICENSE TODO History.rdoc ] } + gem.rubyforge_project = 'datamapper' -PROJECT_NAME = 'datamapper' -PROJECT_URL = "http://github.com/datamapper/dm-more/tree/master/#{GEM_NAME}" -PROJECT_DESCRIPTION = PROJECT_SUMMARY = 'DataMapper plugin for serializing DataMapper objects' + gem.add_dependency 'dm-core', '~> 0.10.2' + gem.add_dependency 'fastercsv', '~> 1.5.0' + gem.add_dependency 'json_pure', '~> 1.2.0' -[ ROOT, ROOT.parent ].each do |dir| - Pathname.glob(dir.join('tasks/**/*.rb').to_s).each { |f| require f } + #gem.add_development_dependency 'libxml-ruby', '~> 1.1.3' # not available on JRuby + gem.add_development_dependency 'nokogiri', '~> 1.4.1' + gem.add_development_dependency 'rspec', '~> 1.2.9' + gem.add_development_dependency 'yard', '~> 0.4.0' + end + + Jeweler::GemcutterTasks.new + + FileList['tasks/**/*.rake'].each { |task| import task } +rescue LoadError + puts 'Jeweler (or a dependency) not available. Install it with: gem install jeweler' end