From 51ca1ae2d85ab215f7d6f1203571676f141b7845 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Apr 26 2017 09:29:05 +0000 Subject: import rh-nodejs6-nodejs-unique-slug-2.0.0-4.el7 --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9c525f4 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/unique-slug-2.0.0.tgz diff --git a/.rh-nodejs6-nodejs-unique-slug.metadata b/.rh-nodejs6-nodejs-unique-slug.metadata new file mode 100644 index 0000000..a219a8c --- /dev/null +++ b/.rh-nodejs6-nodejs-unique-slug.metadata @@ -0,0 +1 @@ +db6676e7c7cc0629878ff196097c78855ae9f4ab SOURCES/unique-slug-2.0.0.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/nodejs-unique-slug_fix_tests.patch b/SOURCES/nodejs-unique-slug_fix_tests.patch new file mode 100644 index 0000000..444e8fc --- /dev/null +++ b/SOURCES/nodejs-unique-slug_fix_tests.patch @@ -0,0 +1,30 @@ +diff --git a/test/index.js b/test/index.js +index 0f4ccad..6441d67 100644 +--- a/test/index.js ++++ b/test/index.js +@@ -1,13 +1,15 @@ + 'use strict' +-var t = require('tap') ++var test = require('tap').test + var uniqueSlug = require('../index.js') + +-t.plan(5) +-var slugA = uniqueSlug() +-t.is(slugA.length, 8, 'random slugs are 8 chars') +-t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same") +-var base = '/path/to/thingy' +-var slugB = uniqueSlug(base) +-t.is(slugB.length, 8, 'string based slugs are 8 chars') +-t.is(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same') +-t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different') ++test("test all the things", function (t) { ++ t.plan(5) ++ var slugA = uniqueSlug() ++ t.equal(slugA.length, 8, 'random slugs are 8 chars') ++ t.notEqual(slugA, uniqueSlug(), "two slugs aren't the same") ++ var base = '/path/to/thingy' ++ var slugB = uniqueSlug(base) ++ t.equal(slugB.length, 8, 'string based slugs are 8 chars') ++ t.equal(slugB, uniqueSlug(base), 'two string based slugs, from the same string are the same') ++ t.notEqual(slugB, uniqueSlug(slugA), 'two string based slongs, from diff strings are different') ++}); diff --git a/SPECS/nodejs-unique-slug.spec b/SPECS/nodejs-unique-slug.spec new file mode 100644 index 0000000..b0901cf --- /dev/null +++ b/SPECS/nodejs-unique-slug.spec @@ -0,0 +1,80 @@ +%{?scl:%scl_package nodejs-unique-slug} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global packagename unique-slug +%global enable_tests 0 + +Name: %{?scl_prefix}nodejs-unique-slug +Version: 2.0.0 +Release: 4%{?dist} +Summary: Generate a unique character string suitable for use in files and URLs + +License: ISC +URL: https://github.com/iarna/unique-slug.git +Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz +Source1: LICENSE-ISC.txt +# No upstream license file, but one has been requested +# at https://github.com/npm/unique-slug/issues/2 + +Patch0: nodejs-unique-slug_fix_tests.patch +# the version of npm(tap) in Fedora is *very* old, so we have to patch the +# syntax to fit the old version of tap. If tap gets updated, we can remove +# this patch. + +BuildArch: noarch +%if 0%{?fedora} >= 19 +ExclusiveArch: %{nodejs_arches} noarch +%else +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%endif + +BuildRequires: %{?scl_prefix}nodejs-devel +BuildRequires: %{?scl_prefix}npm(imurmurhash) +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}npm(tap) +%endif + +%description +Generate a unique character string suitable for use in files and URLs. + +%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 + +#%check +#%nodejs_symlink_deps --check +#%{__nodejs} -e 'require("./")' +#%if 0%{?enable_tests} +#%{_bindir}/tap --coverage test +#%else +#%{_bindir}/echo "Tests disabled..." +#%endif + +%files +%{!?_licensedir:%global license %doc} +%doc *.md +%license LICENSE-ISC.txt +%{nodejs_sitelib}/%{packagename} + +%changelog +* Thu Sep 15 2016 Zuzana Svetlikova - 2.0.0-4 +- Built for RHSCL + +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.0-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Fri Dec 18 2015 Jared Smith - 2.0.0-2 +- Initial packaging