From 5240c791a16ab9581dc2fceae573de643cc18431 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:40:15 +0000 Subject: import rh-nodejs6-nodejs-read-cmd-shim-1.0.1-4.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..c8b84f1 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/read-cmd-shim-1.0.1.tgz diff --git a/.rh-nodejs6-nodejs-read-cmd-shim.metadata b/.rh-nodejs6-nodejs-read-cmd-shim.metadata new file mode 100644 index 0000000..c4af3a5 --- /dev/null +++ b/.rh-nodejs6-nodejs-read-cmd-shim.metadata @@ -0,0 +1 @@ +2d5d157786a37c055d22077c32c53f8329e91c7b SOURCES/read-cmd-shim-1.0.1.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/LICENSE-ISC.txt b/SOURCES/LICENSE-ISC.txt new file mode 100644 index 0000000..8351a30 --- /dev/null +++ b/SOURCES/LICENSE-ISC.txt @@ -0,0 +1,11 @@ +Permission to use, copy, modify, and/or distribute this software for any +purpose with or without fee is hereby granted, provided that the above +copyright notice and this permission notice appear in all copies. + +THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES +WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR +ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES +WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN +ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF +OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. diff --git a/SOURCES/read-cmd-shim_fix-tests.patch b/SOURCES/read-cmd-shim_fix-tests.patch new file mode 100644 index 0000000..e87100d --- /dev/null +++ b/SOURCES/read-cmd-shim_fix-tests.patch @@ -0,0 +1,145 @@ +diff --git a/test/integration.js b/test/integration.js +index 269f964..443a2cf 100644 +--- a/test/integration.js ++++ b/test/integration.js +@@ -19,7 +19,7 @@ test('setup', function (t) { + t.error(er) + cmdShim(testShbang + '.js', testShbang, function (er) { + t.error(er) +- t.done() ++ t.end() + }) + }) + }) +@@ -28,16 +28,16 @@ test('async-read-no-shbang', function (t) { + t.plan(2) + readCmdShim(testShimCmd, function (er, dest) { + t.error(er) +- t.is(dest, '..\\basic.js') +- t.done() ++ t.is(dest, '..\\integration.js') ++ t.end() + }) + }) + + test('sync-read-no-shbang', function (t) { + t.plan(1) + var dest = readCmdShim.sync(testShimCmd) +- t.is(dest, '..\\basic.js') +- t.done() ++ t.is(dest, '..\\integration.js') ++ t.end() + }) + + test('async-read-shbang', function (t) { +@@ -45,7 +45,7 @@ test('async-read-shbang', function (t) { + readCmdShim(testShbangCmd, function (er, dest) { + t.error(er) + t.is(dest, 'test-shbang.js') +- t.done() ++ t.end() + }) + }) + +@@ -53,23 +53,23 @@ test('sync-read-shbang', function (t) { + t.plan(1) + var dest = readCmdShim.sync(testShbangCmd) + t.is(dest, 'test-shbang.js') +- t.done() ++ t.end() + }) + + test('async-read-no-shbang-cygwin', function (t) { + t.plan(2) + readCmdShim(testShim, function (er, dest) { + t.error(er) +- t.is(dest, '../basic.js') +- t.done() ++ t.is(dest, '../integration.js') ++ t.end() + }) + }) + + test('sync-read-no-shbang-cygwin', function (t) { + t.plan(1) + var dest = readCmdShim.sync(testShim) +- t.is(dest, '../basic.js') +- t.done() ++ t.is(dest, '../integration.js') ++ t.end() + }) + + test('async-read-shbang-cygwin', function (t) { +@@ -77,7 +77,7 @@ test('async-read-shbang-cygwin', function (t) { + readCmdShim(testShbang, function (er, dest) { + t.error(er) + t.is(dest, 'test-shbang.js') +- t.done() ++ t.end() + }) + }) + +@@ -85,7 +85,7 @@ test('sync-read-shbang-cygwin', function (t) { + t.plan(1) + var dest = readCmdShim.sync(testShbang) + t.is(dest, 'test-shbang.js') +- t.done() ++ t.end() + }) + + test('async-read-dir', function (t) { +@@ -93,14 +93,14 @@ test('async-read-dir', function (t) { + readCmdShim(workDir, function (er) { + t.ok(er) + t.is(er.code, 'EISDIR', "cmd-shims can't be directories") +- t.done() ++ t.end() + }) + }) + + test('sync-read-dir', function (t) { + t.plan(1) + t.throws(function () { readCmdShim.sync(workDir) }, "cmd-shims can't be directories") +- t.done() ++ t.end() + }) + + test('async-read-not-there', function (t) { +@@ -108,14 +108,14 @@ test('async-read-not-there', function (t) { + readCmdShim('/path/to/nowhere', function (er, dest) { + t.ok(er, 'missing files throw errors') + t.is(er.code, 'ENOENT', "cmd-shim file doesn't exist") +- t.done() ++ t.end() + }) + }) + + test('sync-read-not-there', function (t) { + t.plan(1) + t.throws(function () { readCmdShim.sync('/path/to/nowhere') }, "cmd-shim file doesn't exist") +- t.done() ++ t.end() + }) + + test('async-read-not-shim', function (t) { +@@ -123,17 +123,17 @@ test('async-read-not-shim', function (t) { + readCmdShim(__filename, function (er, dest) { + t.ok(er) + t.is(er.code, 'ENOTASHIM', 'shim file specified is not a shim') +- t.done() ++ t.end() + }) + }) + + test('sync-read-not-shim', function (t) { + t.plan(1) + t.throws(function () { readCmdShim.sync(__filename) }, 'shim file specified is not a shim') +- t.done() ++ t.end() + }) + + test('cleanup', function (t) { + rimraf.sync(workDir) +- t.done() ++ t.end() + }) diff --git a/SPECS/nodejs-read-cmd-shim.spec b/SPECS/nodejs-read-cmd-shim.spec new file mode 100644 index 0000000..d28285f --- /dev/null +++ b/SPECS/nodejs-read-cmd-shim.spec @@ -0,0 +1,82 @@ +%{?scl:%scl_package nodejs-read-cmd-shim} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global packagename read-cmd-shim +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-read-cmd-shim +Version: 1.0.1 +Release: 4%{?dist} +Summary: Figure out what a cmd-shim is pointing at + +License: ISC +URL: https://github.com/npm/read-cmd-shim.git +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz +Source1: LICENSE-ISC.txt +# license file requested upstream at https://github.com/npm/read-cmd-shim/issues/1 + +Patch0: read-cmd-shim_fix-tests.patch +# patch to fix the tests, submitted upstream at https://github.com/npm/read-cmd-shim/pull/2 + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: %{?scl_prefix}nodejs-devel +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(cmd-shim) +BuildRequires: %{?scl_prefix}npm(graceful-fs) +BuildRequires: %{?scl_prefix}npm(rimraf) +BuildRequires: %{?scl_prefix}npm(tap) +%endif + +%description +Figure out what a cmd-shim is pointing at. This acts as the equivalent of +fs.readlink. + +%prep +%setup -q -n package +cp -p %{SOURCE1} . +%patch0 -p1 + +%build +# nothing to do! + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} +cp -pr package.json *.js \ + %{buildroot}%{nodejs_sitelib}/%{packagename} + +%nodejs_symlink_deps + +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +%{__nodejs} -e 'require("./")' +%{_bindir}/tap test/*.js +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license LICENSE-ISC.txt +%{nodejs_sitelib}/%{packagename} + +%changelog +* Thu Sep 15 2016 Zuzana Svetlikova - 1.0.1-4 +- Built for RHSCL + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.1-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Thu Dec 31 2015 Tom Hughes - 1.0.1-2 +- Require npm(graceful-fs) for tests + +* Thu Dec 17 2015 Jared Smith - 1.0.1-1 +- Initial packaging \ No newline at end of file