Removing rake dependency on testing and associated patch

f38
Matt Hicks 13 years ago
parent 998cbc7225
commit 21dd706da9

@ -1,51 +0,0 @@
diff --git a/Rakefile b/Rakefile
index 3936a10..d8001a9 100644
--- a/Rakefile
+++ b/Rakefile
@@ -1,17 +1,10 @@
require 'date'
require 'rake/clean'
-require 'rake/extensiontask'
require 'digest/md5'
task :default => :test
# ==========================================================
-# Ruby Extension
-# ==========================================================
-
-Rake::ExtensionTask.new('redcarpet')
-
-# ==========================================================
# Testing
# ==========================================================
@@ -20,10 +13,10 @@ Rake::TestTask.new('test:unit') do |t|
t.test_files = FileList['test/*_test.rb']
t.ruby_opts += ['-rubygems'] if defined? Gem
end
-task 'test:unit' => [:compile]
+task 'test:unit'
desc 'Run conformance tests (MARKDOWN_TEST_VER=1.0)'
-task 'test:conformance' => [:compile] do |t|
+task 'test:conformance' do |t|
script = "#{pwd}/bin/redcarpet"
test_version = ENV['MARKDOWN_TEST_VER'] || '1.0.3'
lib_dir = "#{pwd}/lib"
@@ -33,13 +26,13 @@ task 'test:conformance' => [:compile] do |t|
end
desc 'Run version 1.0 conformance suite'
-task 'test:conformance:1.0' => [:compile] do |t|
+task 'test:conformance:1.0' do |t|
ENV['MARKDOWN_TEST_VER'] = '1.0'
Rake::Task['test:conformance'].invoke
end
desc 'Run 1.0.3 conformance suite'
-task 'test:conformance:1.0.3' => [:compile] do |t|
+task 'test:conformance:1.0.3' do |t|
ENV['MARKDOWN_TEST_VER'] = '1.0.3'
Rake::Task['test:conformance'].invoke
end

@ -21,12 +21,11 @@
Summary: A fast, safe and extensible Markdown to (X)HTML parser
Name: rubygem-%{gem_name}
Version: 2.1.1
Release: 1%{?dist}
Release: 2%{?dist}
Group: Development/Languages
License: ISC
URL: http://github.com/tanoku/redcarpet
Source0: http://rubygems.org/gems/%{gem_name}-%{version}.gem
Patch0: remove_rake_extension.patch
Requires: ruby(abi) = %{rubyabi}
%if 0%{?el6}
@ -58,15 +57,8 @@ BuildArch: noarch
Documentation for %{name}
%prep
gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
%patch0 -p1
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
%build
mkdir -p .%{gem_dir}
gem build %{gem_name}.gemspec
export CONFIGURE_ARGS="--with-cflags='%{optflags}'"
# gem install compiles any C extensions and installs into a directory
@ -78,7 +70,7 @@ gem install -V \
--bindir ./%{_bindir} \
--force \
--rdoc \
%{gem_name}-%{version}.gem
%{SOURCE0}
# Fix permissions
chmod 644 ./%{gem_dir}/gems/%{gem_name}-%{version}/COPYING
@ -101,7 +93,7 @@ rm %{buildroot}%{gem_instdir}/ext/redcarpet/*.so
%check
pushd .%{gem_instdir}
rake test:unit
ruby -rubygems -Ilib test/redcarpet_test.rb
popd
%files
@ -124,5 +116,8 @@ popd
%changelog
* Fri May 18 2012 Matt Hicks <mhicks@redhat.com> - 2.1.1-2
- Cleaning up spec to remove patch and rake testing dependency
* Thu Apr 26 2012 Matt Hicks <mhicks@redhat.com> - 2.1.1-1
- Initial package

Loading…
Cancel
Save