Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 690789 Details for
Bug 906221
[PATCH] support the npm registry
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
support the npm registry
0001-support-the-npm-registry.patch (text/plain), 1.95 KB, created by
T.C. Hollingsworth
on 2013-01-31 07:30:21 UTC
(
hide
)
Description:
support the npm registry
Filename:
MIME Type:
Creator:
T.C. Hollingsworth
Created:
2013-01-31 07:30:21 UTC
Size:
1.95 KB
patch
obsolete
>From b3ae8fdb70b015cebc11f4c1c7986222bbd0b355 Mon Sep 17 00:00:00 2001 >From: "T.C. Hollingsworth" <tchollingsworth@gmail.com> >Date: Thu, 31 Jan 2013 00:23:19 -0700 >Subject: [PATCH] support the npm registry > >adds a NPM-DEFAULT URL and regex >--- > cnucnu/package_list.py | 12 ++++++++++++ > 1 file changed, 12 insertions(+) > >diff --git a/cnucnu/package_list.py b/cnucnu/package_list.py >index e821fad..a63fe5b 100755 >--- a/cnucnu/package_list.py >+++ b/cnucnu/package_list.py >@@ -158,6 +158,10 @@ class Package(object): > # strip "rubygem-" prefix only if name was not overridden > if not name_override and name.startswith("rubygem-"): > name = name[len("rubygem-"):] >+ elif regex == "NPM-DEFAULT": >+ # strip "nodejs-" prefix only if name was not overridden >+ if not name_override and name.startswith("nodejs-"): >+ name = name[len("nodejs-"):] > > # no elif here, because the previous regex aliases are only for name altering > if regex == "DEFAULT": >@@ -176,6 +180,8 @@ class Package(object): > regex = 'href="([0-9][0-9.]*)/"' > elif regex == "RUBYGEMS-DEFAULT": > regex = '"gem_uri":"http:\/\/rubygems.org\/gems\/%s-([0-9.]*?)\.gem"' % re.escape(name) >+ elif regex == "NPM-DEFAULT": >+ regex = '"version":"([0-9.]*?)"' > > self.__regex = regex > self._invalidate_caches() >@@ -234,6 +240,12 @@ class Package(object): > if not name_override and name.startswith("rubygem-"): > name = name[len("rubygem-"):] > url = "http://rubygems.org/api/v1/gems/%s.json" % name >+ elif url == "NPM-DEFAULT": >+ # strip "nodejs-" prefix only if name was not overridden >+ if not name_override and name.startswith("nodejs-"): >+ name = name[len("nodejs-"):] >+ url = "http://registry.npmjs.org/%s" % name >+ > > self.__url = url > self.html = None >-- >1.7.10.1 >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 906221
: 690789