Permalink
Browse files

drop Rake, use Make

  • Loading branch information...
1 parent e6518ee commit b8124e695ab23fa8cd5658096d91275d0eae5f14 @jmettraux committed Apr 1, 2016
Showing with 23 additions and 84 deletions.
  1. +23 −0 Makefile
  2. +0 −83 Rakefile
  3. +0 −1 rufus-scheduler.gemspec
View
@@ -0,0 +1,23 @@
+
+NAME = \
+ $(shell ruby -e "s = eval(File.read(Dir['*.gemspec'][0])); puts s.name")
+VERSION = \
+ $(shell ruby -e "s = eval(File.read(Dir['*.gemspec'][0])); puts s.version")
+
+
+gemspec_validate:
+ @echo "---"
+ ruby -e "s = eval(File.read(Dir['*.gemspec'].first)); p s.validate"
+ @echo "---"
+
+name: gemspec_validate
+ @echo "$(NAME) $(VERSION)"
+
+build: gemspec_validate
+ gem build $(NAME).gemspec
+ mkdir -p pkg
+ mv $(NAME)-$(VERSION).gem pkg/
+
+push: build
+ gem push pkg/$(NAME)-$(VERSION).gem
+
View
@@ -1,83 +0,0 @@
-
-require 'rubygems'
-
-require 'rake'
-require 'rake/clean'
-require 'rdoc/task'
-
-
-#
-# clean
-
-CLEAN.include('pkg', 'rdoc')
-
-
-#
-# test / spec
-
-#task :spec => :check_dependencies do
-task :spec do
- exec 'rspec spec/'
-end
-task :test => :spec
-
-task :default => :spec
-
-
-#
-# gem
-
-GEMSPEC_FILE = Dir['*.gemspec'].first
-GEMSPEC = eval(File.read(GEMSPEC_FILE))
-GEMSPEC.validate
-
-
-desc %{
- builds the gem and places it in pkg/
-}
-task :build do
-
- sh "gem build #{GEMSPEC_FILE}"
- sh "mkdir -p pkg"
- sh "mv #{GEMSPEC.name}-#{GEMSPEC.version}.gem pkg/"
-end
-
-desc %{
- builds the gem and pushes it to rubygems.org
-}
-task :push => :build do
-
- sh "gem push pkg/#{GEMSPEC.name}-#{GEMSPEC.version}.gem"
-end
-
-
-#
-# rdoc
-#
-# make sure to have rdoc 2.5.x to run that
-
-Rake::RDocTask.new do |rd|
-
- rd.main = 'README.txt'
- rd.rdoc_dir = "rdoc/#{GEMSPEC.name}"
-
- rd.rdoc_files.include('README.rdoc', 'CHANGELOG.txt', 'lib/**/*.rb')
-
- rd.title = "#{GEMSPEC.name} #{GEMSPEC.version}"
-end
-
-
-#
-# upload_rdoc
-
-desc %{
- upload the rdoc to rubyforge
-}
-task :upload_rdoc => [ :clean, :rdoc ] do
-
- account = 'jmettraux@rubyforge.org'
- webdir = '/var/www/gforge-projects/rufus'
-
- sh "rsync -azv -e ssh rdoc/#{GEMSPEC.name} #{account}:#{webdir}/"
-end
-
@@ -28,7 +28,6 @@ job scheduler for Ruby (at, cron, in and every jobs).
#s.add_runtime_dependency 'tzinfo'
- s.add_development_dependency 'rake'
s.add_development_dependency 'rspec', '>= 2.13.0'
s.add_development_dependency 'chronic'
s.add_development_dependency 'tzinfo'

0 comments on commit b8124e6

Please sign in to comment.