Bug 984211 - fpaste -l doesn't work with the new paste.fedoraproject.org
fpaste -l doesn't work with the new paste.fedoraproject.org
Product: Fedora
Classification: Fedora
Component: fpaste (Show other bugs)
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ankur Sinha (FranciscoD)
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2013-07-13 12:52 EDT by Renich Bon Ciric
Modified: 2013-10-11 03:20 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2013-10-11 03:20:13 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A patch to fix syntax highlighting (9.58 KB, patch)
2013-07-13 20:44 EDT, Athmane Madjoudj
no flags Details | Diff

  None (edit)
Description Renich Bon Ciric 2013-07-13 12:52:10 EDT
Description of problem:
fpaste -l 'ruby' doesn't work

Version-Release number of selected component (if applicable):

How reproducible:
cat hello.rb | fpaste -l ruby
cat hello.rb | fpaste -l rb

Actual results:
it complains about not knowing what "ruby" is and, when one chooses rb, paste.fedoraproject.org doesn't highlight it.

But, when you set Ruby @ paste.fedoraproject.org as the language, it works fine.

Expected results:
It should work and support all the paste.fedoraproject.org languages.

Additional info:
Comment 1 Athmane Madjoudj 2013-07-13 20:27:44 EDT
Hi Ankur,

We did not check 'validSyntaxOpts' list and 'ext2lang_map' mapping, when we moved to the new pastebin server, they still use the old values.

Il'll attach valid file type/syntax highlighting values in a moment.
Comment 2 Athmane Madjoudj 2013-07-13 20:44:47 EDT
Created attachment 773206 [details]
A patch to fix syntax highlighting

I've attached a patch to fix this issue.


$ cat f.rb | ./fpaste.syn-patch -l ruby
Uploading (0.7KiB)...
http://ur1.ca/emwl7 -> http://paste.fedoraproject.org/25170/37376261
Comment 3 Athmane Madjoudj 2013-07-13 20:46:48 EDT
File type detection also fixed:

]$ fpaste.syn-patch f.rb 
Uploading (0.7KiB)...
http://ur1.ca/emwm1 -> http://paste.fedoraproject.org/25172/73762746
Comment 4 Renich Bon Ciric 2013-07-14 05:27:09 EDT
That was fast, dude. When can we expect the update? ;)
Comment 5 Ankur Sinha (FranciscoD) 2013-07-14 08:13:59 EDT
(In reply to Renich Bon Ciric from comment #4)
> That was fast, dude. When can we expect the update? ;)

If I find the time, tomorrow ;)

Thanks for the patch Athmane. Can you please open a ticket upstream too, so that they have a copy of the patch too? https://fedorahosted.org/fpaste

Warm regards,
Comment 6 Ankur Sinha (FranciscoD) 2013-10-11 03:20:13 EDT
We're carrying a patch in Fedora and the issue has been reported upstream. Closing
Comment 7 Ankur Sinha (FranciscoD) 2013-10-11 03:20:49 EDT

Note You need to log in before you can comment on or make changes to this bug.