From de0fc10606a67c95c27bcadd2f8daaf6820ef1ea Mon Sep 17 00:00:00 2001 From: murphy Date: Thu, 1 Jan 2009 13:57:08 +0000 Subject: Made plugin ids case-insensitive. With this change, upper case lang names are allowed like 'C'. --- README | 4 +++- Rakefile | 2 +- bin/coderay | 6 +++--- etc/coderay-lib.tmproj | 14 +++++++++----- lib/coderay/helpers/plugin.rb | 2 +- test/scanners/coderay_suite.rb | 2 +- 6 files changed, 18 insertions(+), 12 deletions(-) diff --git a/README b/README index 6d2af51..7b6977f 100644 --- a/README +++ b/README @@ -77,7 +77,7 @@ Please report errors in this documentation to . scanner. * everyone who uses CodeBB on http://www.rubyforen.de, http://www.python-forum.de, and http://www.infhu.de/mx (down) -* iGEL, magichisoka, manveru, WoNáDo and everyone I forgot from rubyforen.de +* iGEL, magichisoka, manveru, WoNáDo and everyone I forgot from rubyforen.de * Dethix from ruby-mine.de * zickzackw * Dookie (who is no longer with us...) and Leonidas from http://www.python-forum.de @@ -88,6 +88,7 @@ Please report errors in this documentation to . * Josh Goebel for another version of the JavaScript scanner and a Diff scanner. * Jonathan Younger for pointing out the licence confusion caused by wrong LICENSE file. * Jeremy Hinegardner for finding the shebang-on-empty-file bug in FileType. +* The folks at redmine.org - thank you for using and fixing CodeRay! * matz and all Ruby gods and gurus * The inventors of: the computer, the internet, the true color display, HTML & CSS, VIM, RUBY, pizza, microwaves, guitars, scouting, programming, anime, @@ -102,6 +103,7 @@ Where would we be without all those people? Seras and Hikari (my PCs) * RDE[http://homepage2.nifty.com/sakazuki/rde_e.html], VIM[http://vim.org] and TextMate[http://macromates.com] * Subversion[http://subversion.tigris.org/] +* Redmine[http://redmine.org/] * Firefox[http://www.mozilla.org/products/firefox/], Firebug[http://getfirebug.com/], and Thunderbird[http://www.mozilla.org/products/thunderbird/] diff --git a/Rakefile b/Rakefile index 9e61f8e..086a674 100644 --- a/Rakefile +++ b/Rakefile @@ -13,7 +13,7 @@ def EXTRA_FILES.in folder end end -task :default => :test +task :default => ['19', :test] task :upload => %w( gem:upload doc:upload example:upload ) diff --git a/bin/coderay b/bin/coderay index 5247761..61841b7 100644 --- a/bin/coderay +++ b/bin/coderay @@ -27,11 +27,11 @@ Example: if first if first[/-(\w+)/] == first - lang = $1.to_sym + lang = $1 input = $stdin.read tokens = :scan elsif first == '-' - lang = $1.to_sym + lang = $1 input = $stdin.read tokens = :scan else @@ -46,7 +46,7 @@ Example: if second if second[/-(\w+)/] == second - format = $1.to_sym + format = $1 else raise 'Invalid format (must be -xxx).' end diff --git a/etc/coderay-lib.tmproj b/etc/coderay-lib.tmproj index b21dd0a..5a7bf19 100644 --- a/etc/coderay-lib.tmproj +++ b/etc/coderay-lib.tmproj @@ -29,12 +29,12 @@ ../ftp.yaml + expanded + name etc regexFolderFilter !.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle|log|aux))$ - selected - sourceDirectory @@ -82,17 +82,21 @@ filename ../Rakefile lastUsed - 2008-12-25T02:53:00Z + 2009-01-01T13:31:39Z filename ../README + lastUsed + 2009-01-01T13:54:45Z filename ../diff lastUsed - 2008-12-25T02:40:10Z + 2009-01-01T03:19:25Z + selected + filename @@ -112,7 +116,7 @@ filename ../test/scanners/coderay_suite.rb lastUsed - 2008-12-25T02:39:14Z + 2009-01-01T13:28:43Z filename diff --git a/lib/coderay/helpers/plugin.rb b/lib/coderay/helpers/plugin.rb index d03dcfb..4ae8e7a 100644 --- a/lib/coderay/helpers/plugin.rb +++ b/lib/coderay/helpers/plugin.rb @@ -245,7 +245,7 @@ protected id elsif id.is_a? String if id[/\w+/] == id - id.to_sym + id.downcase.to_sym else raise ArgumentError, "Invalid id: '#{id}' given." end diff --git a/test/scanners/coderay_suite.rb b/test/scanners/coderay_suite.rb index f5fb7fe..03c91f6 100644 --- a/test/scanners/coderay_suite.rb +++ b/test/scanners/coderay_suite.rb @@ -126,7 +126,7 @@ module CodeRay end def lang - @lang ||= name[/[\w_]+$/].downcase.to_sym + @lang ||= name[/[\w_]+$/].downcase end def extension extension = nil -- cgit v1.2.1