diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 309368a..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/parse-ms-1.0.1.tgz diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..5204a84 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +Orphaned for 6+ weeks diff --git a/nodejs-parse-ms.spec b/nodejs-parse-ms.spec deleted file mode 100644 index 9664529..0000000 --- a/nodejs-parse-ms.spec +++ /dev/null @@ -1,96 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -%global packagename parse-ms -%global enable_tests 1 - -Name: nodejs-parse-ms -Version: 1.0.1 -Release: 10%{?dist} -Summary: Parse milliseconds into an object - -License: MIT -URL: https://github.com/sindresorhus/parse-ms -Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz -# The test files are not included in the npm tarball. -Source1: https://raw.githubusercontent.com/sindresorhus/parse-ms/v%{version}/test.js - -ExclusiveArch: %{nodejs_arches} noarch -BuildArch: noarch - -BuildRequires: nodejs-packaging -%if 0%{?enable_tests} -BuildRequires: mocha -%endif - -%description -Parse milliseconds into an object - - -%prep -%setup -q -n package -# setup the tests -cp -p %{SOURCE1} . - - -%build -# nothing to do! - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} -cp -pr package.json index.js \ - %{buildroot}%{nodejs_sitelib}/%{packagename} - -%nodejs_symlink_deps - -%check -%nodejs_symlink_deps --check -%{__nodejs} -e 'require("./")' -%if 0%{?enable_tests} -%{_bindir}/mocha -R spec -%else -%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m" -%endif - - -%files -%{!?_licensedir:%global license %doc} -%doc *.md -%license license -%{nodejs_sitelib}/%{packagename} - - - -%changelog -* Sat Aug 01 2020 Fedora Release Engineering - 1.0.1-10 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 1.0.1-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 1.0.1-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 1.0.1-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.0.1-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.0.1-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Feb 08 2018 Fedora Release Engineering - 1.0.1-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.0.1-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.0.1-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Thu Jul 28 2016 Jared Smith - 1.0.1-1 -- Update to upstream 1.0.1 release - -* Thu Oct 22 2015 Jared Smith - 1.0.0-1 -- Initial packaging diff --git a/sources b/sources deleted file mode 100644 index e49d544..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -5e5fe6e1e5e550943dafdb5d0b140b11 parse-ms-1.0.1.tgz diff --git a/test.js b/test.js deleted file mode 100644 index b6650ab..0000000 --- a/test.js +++ /dev/null @@ -1,95 +0,0 @@ -'use strict'; -var assert = require('assert'); -var parseMs = require('./'); - -it('should parse milliseconds into an object', function () { - assert.deepEqual(parseMs(1000 + 400), { - days: 0, - hours: 0, - minutes: 0, - seconds: 1, - milliseconds: 400 - }); - - assert.deepEqual(parseMs(1000 * 55), { - days: 0, - hours: 0, - minutes: 0, - seconds: 55, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 67), { - days: 0, - hours: 0, - minutes: 1, - seconds: 7, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 60 * 5), { - days: 0, - hours: 0, - minutes: 5, - seconds: 0, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 60 * 67), { - days: 0, - hours: 1, - minutes: 7, - seconds: 0, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 60 * 60 * 12), { - days: 0, - hours: 12, - minutes: 0, - seconds: 0, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 60 * 60 * 40), { - days: 1, - hours: 16, - minutes: 0, - seconds: 0, - milliseconds: 0 - }); - - assert.deepEqual(parseMs(1000 * 60 * 60 * 999), { - days: 41, - hours: 15, - minutes: 0, - seconds: 0, - milliseconds: 0 - }); -}); - -it('should handle negative millisecond values', function () { - [ - 100 + 400, - 1000 * 55, - 1000 * 67, - 1000 * 60 * 5, - 1000 * 60 * 67, - 1000 * 60 * 60 * 12, - 1000 * 60 * 60 * 40, - 1000 * 60 * 60 * 999 - ].forEach(function (ms) { - var positive = parseMs(ms); - var negative = parseMs(-ms); - [ - 'days', - 'hours', - 'minutes', - 'seconds', - 'milliseconds' - ].forEach(function (key) { - assert.equal(negative[key], -positive[key]); - }); - }); -}); -