[nodejs-oauth] Initial import of nodejs-oauth

Tom Hughes tomh at fedoraproject.org
Mon Mar 11 12:36:22 UTC 2013


commit 18e720a063072d1b47f4bdfec100d9774009f243
Author: Tom Hughes <tom at compton.nu>
Date:   Mon Mar 11 12:35:40 2013 +0000

    Initial import of nodejs-oauth

 .gitignore              |    1 +
 nodejs-oauth-sha1.patch |   30 ++++++++++++++++++++
 nodejs-oauth.spec       |   71 +++++++++++++++++++++++++++++++++++++++++++++++
 sources                 |    1 +
 4 files changed, 103 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..0abd4bf 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/oauth-0.9.10.tgz
diff --git a/nodejs-oauth-sha1.patch b/nodejs-oauth-sha1.patch
new file mode 100644
index 0000000..7af4da3
--- /dev/null
+++ b/nodejs-oauth-sha1.patch
@@ -0,0 +1,30 @@
+commit 0042dd65adeb78c82dfffa83820397be6c8a54dd
+Author: Tom Hughes <tom at compton.nu>
+Date:   Sun Mar 10 18:42:50 2013 +0000
+
+    Remove fallback to javascript SHA1 implementation
+
+diff --git a/lib/oauth.js b/lib/oauth.js
+index be3c6d6..fdbc6b2 100644
+--- a/lib/oauth.js
++++ b/lib/oauth.js
+@@ -1,5 +1,4 @@
+ var crypto= require('crypto'),
+-    sha1= require('./sha1'),
+     http= require('http'),
+     https= require('https'),
+     URL= require('url'),
+@@ -198,12 +197,7 @@ exports.OAuth.prototype._createSignature= function(signatureBase, tokenSecret) {
+      hash= key;
+    }
+    else {
+-       if( crypto.Hmac ) {
+-         hash = crypto.createHmac("sha1", key).update(signatureBase).digest("base64");
+-       }
+-       else {
+-         hash= sha1.HMACSHA1(key, signatureBase);  
+-       }
++       hash = crypto.createHmac("sha1", key).update(signatureBase).digest("base64");
+    }
+    return hash;
+ }
diff --git a/nodejs-oauth.spec b/nodejs-oauth.spec
new file mode 100644
index 0000000..bb3aeb8
--- /dev/null
+++ b/nodejs-oauth.spec
@@ -0,0 +1,71 @@
+%global enable_tests 0
+
+Name:           nodejs-oauth
+Version:        0.9.10
+Release:        1%{?dist}
+Summary:        Library for interacting with OAuth 1.0, 1.0A, 2 and Echo
+
+License:        MIT
+URL:            https://github.com/ciaranj/node-oauth
+Source0:        http://registry.npmjs.org/oauth/-/oauth-%{version}.tgz
+# Remove fallback to bundled SHA1 implementation
+Patch0:         nodejs-oauth-sha1.patch
+BuildArch:      noarch
+
+BuildRequires:  nodejs-devel
+
+%if 0%{?enable_tests}
+BuildRequires:  npm(vows)
+%endif
+
+%description
+Library for interacting with OAuth 1.0, 1.0A, 2 and Echo. Provides
+simplified client access and allows for construction of more complex
+APIs and OAuth providers.
+
+
+%prep
+%setup -q -n package
+%patch0 -p1
+rm -rf node_modules lib/sha1.js tests/sha1.js
+
+
+%build
+
+
+%if 0%{?enable_tests}
+%check
+ln -s %{nodejs_sitelib} .
+%{nodejs_sitelib}/vows/bin/vows tests/* --spec
+%endif
+
+
+%install
+mkdir -p %{buildroot}/%{nodejs_sitelib}/oauth
+cp -pr package.json index.js lib %{buildroot}/%{nodejs_sitelib}/oauth
+%nodejs_symlink_deps
+
+
+%files
+%doc LICENSE Readme.md examples
+%{nodejs_sitelib}/oauth
+
+
+%changelog
+* Sun Mar 10 2013 Tom Hughes <tom at compton.nu> - 0.9.10-1
+- Update to 0.9.10 upstream release
+
+* Sun Mar 10 2013 Tom Hughes <tom at compton.nu> - 0.9.8-4
+- Remove fallback to bundled SHA1 implementation
+
+* Sat Mar  9 2013 Tom Hughes <tom at compton.nu> - 0.9.8-3
+- Replace bundled sha1.js with a dependency on jshashes
+- Remove BSD from license
+
+* Sat Mar  2 2013 Tom Hughes <tom at compton.nu> - 0.9.8-2
+- Link node_modules for tests
+- Improve description
+- Add BSD to license
+
+* Sun Feb 10 2013 Tom Hughes <tom at compton.nu> - 0.9.8-1
+- Initial build of 0.9.8
diff --git a/sources b/sources
index e69de29..817316d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+57b6fae6fea53cb4b010dba20914ca8e  oauth-0.9.10.tgz


More information about the scm-commits mailing list