summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormurphy <murphy@rubychan.de>2009-01-01 13:57:08 +0000
committermurphy <murphy@rubychan.de>2009-01-01 13:57:08 +0000
commitde0fc10606a67c95c27bcadd2f8daaf6820ef1ea (patch)
tree0321b517e19386aa80df646344a65fe38bf83054
parent71c86e1e632865c5dceb51161753c529c36e191d (diff)
downloadcoderay-de0fc10606a67c95c27bcadd2f8daaf6820ef1ea.tar.gz
Made plugin ids case-insensitive.
With this change, upper case lang names are allowed like 'C'.
-rw-r--r--README4
-rw-r--r--Rakefile2
-rw-r--r--bin/coderay6
-rw-r--r--etc/coderay-lib.tmproj14
-rw-r--r--lib/coderay/helpers/plugin.rb2
-rw-r--r--test/scanners/coderay_suite.rb2
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 <coderay cycnus de>.
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 <coderay cycnus de>.
* 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 @@
<string>../ftp.yaml</string>
</dict>
<dict>
+ <key>expanded</key>
+ <true/>
<key>name</key>
<string>etc</string>
<key>regexFolderFilter</key>
<string>!.*/(\.[^/]*|CVS|_darcs|_MTN|\{arch\}|blib|.*~\.nib|.*\.(framework|app|pbproj|pbxproj|xcode(proj)?|bundle|log|aux))$</string>
- <key>selected</key>
- <true/>
<key>sourceDirectory</key>
<string></string>
</dict>
@@ -82,17 +82,21 @@
<key>filename</key>
<string>../Rakefile</string>
<key>lastUsed</key>
- <date>2008-12-25T02:53:00Z</date>
+ <date>2009-01-01T13:31:39Z</date>
</dict>
<dict>
<key>filename</key>
<string>../README</string>
+ <key>lastUsed</key>
+ <date>2009-01-01T13:54:45Z</date>
</dict>
<dict>
<key>filename</key>
<string>../diff</string>
<key>lastUsed</key>
- <date>2008-12-25T02:40:10Z</date>
+ <date>2009-01-01T03:19:25Z</date>
+ <key>selected</key>
+ <true/>
</dict>
<dict>
<key>filename</key>
@@ -112,7 +116,7 @@
<key>filename</key>
<string>../test/scanners/coderay_suite.rb</string>
<key>lastUsed</key>
- <date>2008-12-25T02:39:14Z</date>
+ <date>2009-01-01T13:28:43Z</date>
</dict>
<dict>
<key>filename</key>
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