Rakefile in ruby_fgraph-0.0.11 vs Rakefile in ruby_fgraph-0.0.12
- old
+ new
@@ -1,45 +1,50 @@
-#
-# To change this template, choose Tools | Templates
-# and open the template in the editor.
-
-
require 'rubygems'
require 'rake'
-require 'rake/clean'
-require 'rake/gempackagetask'
-require 'rake/rdoctask'
-require 'rake/testtask'
-spec = Gem::Specification.new do |s|
- s.name = 'ruby_fgraph'
- s.version = '0.0.11'
- s.has_rdoc = true
- s.extra_rdoc_files = ['README', 'LICENSE']
- s.summary = 'Your summary here'
- s.description = s.summary
- s.author = 'randx'
- s.email = 'railsonweb@gmail.com'
- # s.executables = ['your_executable_here']
- s.files = %w(LICENSE README Rakefile) + Dir.glob("{bin,lib,spec}/**/*")
- s.require_path = "lib"
- # s.bindir = "bin"
+begin
+ require 'jeweler'
+ Jeweler::Tasks.new do |gem|
+ gem.name = "ruby_fgraph"
+ gem.summary = %Q{Lite gem for iteracting with facebook graph api.}
+ gem.description = %Q{Lite gem for iteracting with facebook graph api.}
+ gem.email = "railsonweb@gmail.com"
+ gem.homepage = "http://github.com/randx/Facebook-Graph-Gem"
+ gem.authors = ["Dmitriy Zaporozhets"]
+ gem.add_dependency 'oauth2', '~> 0.0.11'
+ gem.add_development_dependency "rspec", ">= 1.2.9"
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
+ end
+ Jeweler::GemcutterTasks.new
+
+ task :spec => :check_dependencies
+rescue LoadError
+ puts "Jeweler (or a dependency) not available. Install it with: gem install jeweler"
end
-Rake::GemPackageTask.new(spec) do |p|
- p.gem_spec = spec
- p.need_tar = true
- p.need_zip = true
+begin
+ require 'spec/rake/spectask'
+ Spec::Rake::SpecTask.new(:spec) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.spec_files = FileList['spec/**/*_spec.rb']
+ end
+
+ Spec::Rake::SpecTask.new(:rcov) do |spec|
+ spec.libs << 'lib' << 'spec'
+ spec.pattern = 'spec/**/*_spec.rb'
+ spec.rcov = true
+ end
+
+ task :default => :spec
+rescue LoadError
+ puts "RSpec (or a dependency) not available. Install it with: gem install rspec"
end
+require 'rake/rdoctask'
Rake::RDocTask.new do |rdoc|
- files =['README', 'LICENSE', 'lib/**/*.rb']
- rdoc.rdoc_files.add(files)
- rdoc.main = "README" # page to start on
- rdoc.title = "FGraph Docs"
- rdoc.rdoc_dir = 'doc/rdoc' # rdoc output folder
- rdoc.options << '--line-numbers'
-end
+ version = File.exist?('VERSION') ? File.read('VERSION') : ""
-Rake::TestTask.new do |t|
- t.test_files = FileList['test/**/*.rb']
+ rdoc.rdoc_dir = 'rdoc'
+ rdoc.title = "ruby_fgraph #{version}"
+ rdoc.rdoc_files.include('README*')
+ rdoc.rdoc_files.include('lib/**/*.rb')
end