debian/0000755000000000000000000000000012177746446007210 5ustar debian/ruby-tests.rake0000644000000000000000000000166412167471636012177 0ustar require 'gem2deb/rake/testtask' require 'rspec/core/rake_task' require 'fileutils' # task 'default' => [:spec, 'original-test'] task 'default' => :spec Rake::TestTask.new('original-test') do |tasklib| tasklib.test_files = FileList['original-tests/*.tests.rb'] end task_cls = RSpec::Core::RakeTask rspec_opts_setting_proc = proc do |task| task.rspec_opts = ['-fs'] end # Proc for initializing each spec-tasks by common parameters setting = proc do |st| st.ruby_opts = %w(-Ku) end desc "Verify all spec files." task_cls.new do |st| setting.call(st) st.pattern = 'spec/*.rb' end desc "Verify all spec files with specdocs." task_cls.new(:specd) do |st| setting.call(st) rspec_opts_setting_proc.call(st) st.pattern = 'spec/*.rb' end namespace :spec do Dir.glob('spec/*.rb') do |path| desc "Verify '#{path}'" task_cls.new(File.basename(path, '.rb')) do |st| setting.call(st) st.pattern = path end end end debian/watch0000644000000000000000000000015312167471636010233 0ustar version=3 http://pkg-ruby-extras.alioth.debian.org/cgi-bin/gemwatch/bluefeather .*/bluefeather-(.*).tar.gz debian/manpages0000644000000000000000000000002512167471636010716 0ustar debian/bluefeather.1 debian/patches/0000755000000000000000000000000012167471636010632 5ustar debian/patches/0001-Import-Upstream-HEAD-bzr-r50.patch0000644000000000000000000002217012167471636017201 0ustar From: Debian Ruby Extras Maintainers Date: Sat, 9 Feb 2013 14:04:44 +0900 Subject: Import Upstream HEAD: bzr r50 Forwarded: not-needed Applied-Upstream: http://bazaar.launchpad.net/~tetradice1011/bluefeather/master/revision/50 --- Rakefile.rb | 115 ++++++++++++++++++++++------------- lib/bluefeather.rb | 2 +- original-tests/00_Class.tests.rb | 15 +---- original-tests/05_Markdown.tests.rb | 5 +- original-tests/10_Bug.tests.rb | 5 +- original-tests/15_Contrib.tests.rb | 5 +- original-tests/bftestcase.rb | 4 +- original-tests/some_prob.tests.rb | 5 +- spec/table.rb | 4 ++ spec/win32.rb | 4 +- 10 files changed, 98 insertions(+), 66 deletions(-) diff --git a/Rakefile.rb b/Rakefile.rb index e17d2e2..bd242e0 100644 --- a/Rakefile.rb +++ b/Rakefile.rb @@ -13,9 +13,26 @@ require 'rake/testtask' require 'rake/gempackagetask' -require 'spec/rake/spectask' require 'rake/clean' + +# Adaptable to both RSpec 1 and 2 +rspec_version = nil +begin + # for RSpec 2 + require 'rspec/core/rake_task' + rspec_version = 2 +rescue LoadError + begin + # for RSpec 1 + require 'spec/rake/spectask' + rspec_version = 1 + rescue LoadError + puts "RSpec is not available." + end +end + + $KCODE = 'u' unless defined?(Encoding) $LOAD_PATH.unshift './lib' require 'bluefeather' @@ -123,48 +140,64 @@ Rake::TestTask.new('original-test') do |tasklib| end -# Proc for initializing each spec-tasks by common parameters -setting = proc do |st| - st.libs << ['./lib'] - st.ruby_opts = %w(-Ku) -end - - -desc "Verify all spec files." -Spec::Rake::SpecTask.new do |st| - setting.call(st) - st.spec_files = FileList['spec/*.rb'] -end - -desc "Verify all spec files with specdocs." -Spec::Rake::SpecTask.new(:specd) do |st| - setting.call(st) - st.spec_opts << '-fs' - st.spec_files = FileList['spec/*.rb'] -end - - - -namespace :spec do - Dir.glob('spec/*.rb') do |path| - desc "Verify '#{path}'" - Spec::Rake::SpecTask.new(File.basename(path, '.rb')) do |st| - setting.call(st) - st.spec_files = FileList[path] +if rspec_version then + case rspec_version + when 1 + task_cls = Spec::Rake::SpecTask + rspec_opts_setting_proc = proc do |task| + task.spec_opts << '-fs' + end + when 2 + task_cls = RSpec::Core::RakeTask + rspec_opts_setting_proc = proc do |task| + task.rspec_opts = ['-fs'] end + else + raise 'unknown rspec version.' end -end - -namespace :specd do - Dir.glob('spec/*.rb') do |path| - desc "Verify '#{path}' with specdocs." - Spec::Rake::SpecTask.new(File.basename(path, '.rb')) do |st| - setting.call(st) - st.spec_opts << '-fs' - st.spec_files = FileList[path] + + # Proc for initializing each spec-tasks by common parameters + setting = proc do |st| + st.ruby_opts = %w(-Ku) + end + + + desc "Verify all spec files." + task_cls.new do |st| + setting.call(st) + st.pattern = 'spec/*.rb' + end + + desc "Verify all spec files with specdocs." + task_cls.new(:specd) do |st| + setting.call(st) + rspec_opts_setting_proc.call(st) + st.pattern = 'spec/*.rb' + end + + + + namespace :spec do + Dir.glob('spec/*.rb') do |path| + desc "Verify '#{path}'" + task_cls.new(File.basename(path, '.rb')) do |st| + setting.call(st) + st.pattern = path + end end end + + namespace :specd do + Dir.glob('spec/*.rb') do |path| + desc "Verify '#{path}' with specdocs." + task_cls.new(File.basename(path, '.rb')) do |st| + setting.call(st) + rspec_opts_setting_proc.call(st) + st.pattern = path + end + end + end + + desc '= spec + original-test' + task 'test-all' => [:spec, 'original-test'] end - -desc '= spec + original-test' -task 'test-all' => [:spec, 'original-test'] \ No newline at end of file diff --git a/lib/bluefeather.rb b/lib/bluefeather.rb index ece5d94..5bc0106 100644 --- a/lib/bluefeather.rb +++ b/lib/bluefeather.rb @@ -737,9 +737,9 @@ module BlueFeather text = transform_definition_lists( text, rs ) # BlueFeather Extension text = transform_code_blocks( text, rs ) text = transform_block_quotes( text, rs ) + text = transform_tables(text, rs) text = hide_html_blocks( text, rs ) - text = transform_tables(text, rs) text = form_paragraphs( text, rs ) rs.block_transform_depth -= 1 diff --git a/original-tests/00_Class.tests.rb b/original-tests/00_Class.tests.rb index 4de17c2..2143940 100644 --- a/original-tests/00_Class.tests.rb +++ b/original-tests/00_Class.tests.rb @@ -8,8 +8,9 @@ # Changes: [2009-02-14] adapt to BlueFeather if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase ) - basedir = File::dirname( __FILE__ ) - require File::join( basedir, 'bftestcase' ) + require 'pathname' + $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s + require 'bftestcase' end @@ -18,14 +19,6 @@ class BlueFeatherClassTestCase < BlueFeather::TestCase TestString = "foo" - def test_00_class_constant - printTestHeader "BlueFeather: Class Constant" - - assert Object::constants.include?( "BlueFeather" ), - "No BlueFeather constant in Object" - assert_instance_of Module, BlueFeather - end - def test_01_instantiation printTestHeader "BlueFeather: Instantiation" rval = nil @@ -36,7 +29,5 @@ class BlueFeatherClassTestCase < BlueFeather::TestCase } end - - end diff --git a/original-tests/05_Markdown.tests.rb b/original-tests/05_Markdown.tests.rb index f0c0aaa..bc1f4ff 100644 --- a/original-tests/05_Markdown.tests.rb +++ b/original-tests/05_Markdown.tests.rb @@ -8,8 +8,9 @@ # Changes: [2009-02-14] adapt to BlueFeather if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase ) - basedir = File::dirname( __FILE__ ) - require File::join( basedir, 'bftestcase' ) + require 'pathname' + $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s + require 'bftestcase' end diff --git a/original-tests/10_Bug.tests.rb b/original-tests/10_Bug.tests.rb index 7e50b50..6800ec6 100644 --- a/original-tests/10_Bug.tests.rb +++ b/original-tests/10_Bug.tests.rb @@ -8,8 +8,9 @@ # Changes: [2009-02-14] adapt to BlueFeather if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase ) - basedir = File::dirname( __FILE__ ) - require File::join( basedir, 'bftestcase' ) + require 'pathname' + $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s + require 'bftestcase' end diff --git a/original-tests/15_Contrib.tests.rb b/original-tests/15_Contrib.tests.rb index a45a839..97c05ed 100644 --- a/original-tests/15_Contrib.tests.rb +++ b/original-tests/15_Contrib.tests.rb @@ -10,8 +10,9 @@ # Changes: [2009-02-14] adapt to BlueFeather if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase ) - basedir = File::dirname( __FILE__ ) - require File::join( basedir, 'bftestcase' ) + require 'pathname' + $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s + require 'bftestcase' end diff --git a/original-tests/bftestcase.rb b/original-tests/bftestcase.rb index 6a61e56..ddd3183 100644 --- a/original-tests/bftestcase.rb +++ b/original-tests/bftestcase.rb @@ -40,7 +40,7 @@ # # == Remakers # -# * Dice (BlueFeather => BlueFeather) +# * Dice (BlueCloth => BlueFeather) # #:include: COPYRIGHT # @@ -87,6 +87,7 @@ module BlueFeather end } klass.methodCounter = 0 + super end @@ -225,7 +226,6 @@ module BlueFeather olddb = $DEBUG $DEBUG = true end - super $DEBUG = olddb unless olddb.nil? diff --git a/original-tests/some_prob.tests.rb b/original-tests/some_prob.tests.rb index 863c03a..74f02e9 100644 --- a/original-tests/some_prob.tests.rb +++ b/original-tests/some_prob.tests.rb @@ -2,8 +2,9 @@ # additional test: since BlueFeather 0.32 if !defined?( BlueFeather ) || !defined?( BlueFeather::TestCase ) - basedir = File::dirname( __FILE__ ) - require File::join( basedir, 'bftestcase' ) + require 'pathname' + $LOAD_PATH << Pathname.new(__FILE__).dirname.expand_path.to_s + require 'bftestcase' end diff --git a/spec/table.rb b/spec/table.rb index 1ace8f8..0f52cd0 100644 --- a/spec/table.rb +++ b/spec/table.rb @@ -31,6 +31,10 @@ describe 'Simple Table:' do cells[2]['style'].should == 'text-align: center' end end + + specify "purity" do + @doc.should_not have_element('p table') + end end diff --git a/spec/win32.rb b/spec/win32.rb index 4e1cc91..fe55ca6 100644 --- a/spec/win32.rb +++ b/spec/win32.rb @@ -17,8 +17,8 @@ if RUBY_PLATFORM =~ /win|mingw/ then File.exist?(@unix_path).should be_true File.exist?(@dos_path).should be_true - system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@unix_path}").should be_true - system("ruby -I #{@lib_dir} #{@cmd_path} --verbose #{@dos_path}").should be_true + system("ruby -I #{@lib_dir} #{@cmd_path} --quiet #{@unix_path}").should be_true + system("ruby -I #{@lib_dir} #{@cmd_path} --quiet #{@dos_path}").should be_true end after do debian/patches/series0000644000000000000000000000000012167471636012035 0ustar debian/compat0000644000000000000000000000000212167471636010401 0ustar 9 debian/ruby-bluefeather.docs0000644000000000000000000000004012167471636013314 0ustar readme_en.txt readme_ja.txt doc debian/ruby-bluefeather.doc-base0000644000000000000000000000060712177746366014060 0ustar Document: ruby-bluefeather Title: BlueFeather Manual Author: Dice Abstract: BlueFeather Manual Documents of BlueFeather - pure Ruby Library for Extended Markdown Extra Section: Programming/Ruby Format: HTML Index: /usr/share/doc/ruby-bluefeather/doc/en/index.html Files: /usr/share/doc/ruby-bluefeather/doc/en/*.html /usr/share/doc/ruby-bluefeather/doc/*.html debian/control0000644000000000000000000000163512177745207010612 0ustar Source: ruby-bluefeather Section: ruby Priority: optional Maintainer: Debian Ruby Extras Maintainers Uploaders: Youhei SASAKI Build-Depends: debhelper (>= 9.0.0), gem2deb (>= 0.3.0~), rake, ruby-rspec, ruby-nokogiri Standards-Version: 3.9.4 Vcs-Git: git://anonscm.debian.org/pkg-ruby-extras/ruby-bluefeather.git Vcs-Browser: http://anonscm.debian.org/gitweb?p=pkg-ruby-extras/ruby-bluefeather.git;a=summary Homepage: http://ruby.morphball.net/bluefeather/ XS-Ruby-Versions: all Package: ruby-bluefeather Architecture: all XB-Ruby-Versions: ${ruby:Versions} Depends: ${shlibs:Depends}, ${misc:Depends}, ruby | ruby-interpreter Description: Extend Markdown Converter written in Ruby BlueFeather is software for converting text written by extended Markdown like PHP Markdown Extra to html. It is pair of command-line tool and pure Ruby library. debian/bluefeather.10000644000000000000000000000261712167471636011561 0ustar .\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.40.5. .TH BLUEFEATHER "1" "January 2012" "bluefeather 0.40 (2010-04-29)" "Extended Markdown Convertor" .SH NAME bluefeather \- Bluefeather .SH SYNOPSIS .B bluefeather [\fIoptions\fR] \fIfile1 \fR[\fIfile2 file3 \fR..] .SH DESCRIPTION bluefeather \- Extended Markdown Converter .SH OPTIONS .TP \fB\-e\fR, \fB\-\-encoding\fR NAME parse input files as encoding of NAME: .IP s[hift(_\-)jis] / e[uc\-jp] / u[tf\-8] / a[scii] .IP default: 'utf\-8' .TP \fB\-f\fR, \fB\-\-format\fR TYPE specify format: .IP t[ext] => text mode .IP d[ocument] => document mode .TP \fB\-\-force\fR write even if target files have not changed. (default: only if target files have changed) .TP \fB\-h\fR, \fB\-\-help\fR show this help. .TP \fB\-o\fR, \fB\-\-output\fR DIR output files to DIR. (default: same as input file) .TP \fB\-q\fR, \fB\-\-quiet\fR no output to stderr. .TP \fB\-\-suffix\fR .SUF specify suffix of output files. (default: '.html') .TP \fB\-v\fR, \fB\-\-verbose\fR verbose mode \- output detail of operation. .TP \fB\-\-version\fR show BlueFeather version. .SS "Advanced Usage:" .IP * If specify files only '\-', bluefeather read from stdin and write to stdout. .SS "Example:" .IP bluefeather *.bftext *.bfdoc bluefeather \fB\-v\fR \fB\-\-sufix\fR .xhtml \fB\-o\fR ../ sample.markdown bluefeather \- .SS "More info:" .IP see debian/rules0000755000000000000000000000036312177745525010267 0ustar #!/usr/bin/make -f %: dh $@ --buildsystem=ruby --with ruby override_dh_installdocs: dh_installdocs ( cd $(CURDIR)/debian/ruby-bluefeather/usr/share/doc/ruby-bluefeather/doc/en && \ rm -f black.css && \ ln -s ../black.css black.css ) debian/changelog0000644000000000000000000000124012177746446011057 0ustar ruby-bluefeather (0.41-2) unstable; urgency=low [ Cédric Boutillier ] * use canonical URI in Vcs-* fields [ Youhei SASAKI ] * Move from experimental to unstable * Bump Standard Version: 3.9.4 * Add doc-base support -- Youhei SASAKI Tue, 06 Aug 2013 00:48:59 +0900 ruby-bluefeather (0.41-1) experimental; urgency=low * Imported Upstream version 0.41 * Drop patches: upstream fixed -- Youhei SASAKI Mon, 01 Apr 2013 01:22:37 +0900 ruby-bluefeather (0.40-1) unstable; urgency=low * Initial release (Closes: #590816) -- Youhei SASAKI Sat, 09 Feb 2013 15:24:46 +0900 debian/source/0000755000000000000000000000000012167471636010503 5ustar debian/source/format0000644000000000000000000000001412167471636011711 0ustar 3.0 (quilt) debian/copyright0000644000000000000000000000261412167471636011141 0ustar Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ Upstream-Name: bluefeather Source: Files: * Copyright: 2010 Dice License: GPL-2+ Files: lib/bluefeather.rb original-tests/*.rb Copyright: 2004 The FaerieMUD Consortium. 2009 Dice License: GPL-2+ Files: original-tests/data/re-overflow2.txt Copyright: 1997-1998,2000-2001,2004 Steve Nygard. License: GPL-2+ Files: debian/* Copyright: 2013 Youhei SASAKI License: GPL-2+ License: GPL-2+ This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. . You should have received a copy of the GNU General Public License along with this package; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA . On Debian systems, the full text of the GNU General Public License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'.