From ae24fb7ba7c6bc59b4ed12e84577b1d38fbf54ae Mon Sep 17 00:00:00 2001 From: Mohan Boddu Date: May 10 2019 18:14:41 +0000 Subject: Revert "Orphaned for 6+ weeks" Unretirement for https://pagure.io/releng/issue/8349 This reverts commit 7c4308d8d6a932a12d6cee8d5063e5a7d96879ff. --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..0c53948 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +/har-validator-a71163c.tar.gz diff --git a/dead.package b/dead.package deleted file mode 100644 index 5204a84..0000000 --- a/dead.package +++ /dev/null @@ -1 +0,0 @@ -Orphaned for 6+ weeks diff --git a/nodejs-har-validator-should8.patch b/nodejs-har-validator-should8.patch new file mode 100644 index 0000000..1c10a95 --- /dev/null +++ b/nodejs-har-validator-should8.patch @@ -0,0 +1,85 @@ +commit c66cfc8820efdfdac580ede98414e970dda4e84d +Author: Tom Hughes +Date: Sat Dec 19 17:30:37 2015 +0000 + + Update to should 8.x which now includes should-promised + +diff --git a/package.json b/package.json +index 1a69e52..351f9c0 100644 +--- a/package.json ++++ b/package.json +@@ -43,8 +43,7 @@ + "istanbul": "^0.4.0", + "mocha": "^2.3.4", + "require-directory": "^2.1.1", +- "should": "^7.1.1", +- "should-promised": "^0.3.1", ++ "should": "^8.0.2", + "standard": "^5.4.1" + }, + "dependencies": { +diff --git a/test/index.js b/test/index.js +index 05c481c..2416f68 100644 +--- a/test/index.js ++++ b/test/index.js +@@ -6,8 +6,6 @@ var fixtures = require('./fixtures') + var validate = require('..') + var ValidationError = require('../lib/error') + +-require('should-promised') +- + describe('Promises', function () { + it('should return a Promise', function () { + validate().should.be.a.Promise() +diff --git a/test/log.js b/test/log.js +index 7d1c0cb..1bcd3a7 100644 +--- a/test/log.js ++++ b/test/log.js +@@ -6,8 +6,6 @@ var fixtures = require('./fixtures') + var validate = require('..') + var ValidationError = require('../lib/error') + +-require('should-promised') +- + describe('Full HAR', function () { + it('should fail with empty object', function () { + validate({}).should.be.rejectedWith(ValidationError, { +diff --git a/test/misc.js b/test/misc.js +index fbf3a7c..6b342b9 100644 +--- a/test/misc.js ++++ b/test/misc.js +@@ -4,8 +4,6 @@ + + var validate = require('..') + +-require('should-promised') +- + describe('Cache Entry', function () { + it('should allow null beforeRequest', function () { + var cache = { +diff --git a/test/request.js b/test/request.js +index 4422f5c..5c446a5 100644 +--- a/test/request.js ++++ b/test/request.js +@@ -6,8 +6,6 @@ var fixtures = require('./fixtures') + var validate = require('..') + var ValidationError = require('../lib/error') + +-require('should-promised') +- + describe('Request Only', function () { + it('should fail with empty object', function () { + validate.request({}).should.be.rejectedWith(ValidationError, { +diff --git a/test/response.js b/test/response.js +index e4bfd0f..2761b6d 100644 +--- a/test/response.js ++++ b/test/response.js +@@ -6,8 +6,6 @@ var fixtures = require('./fixtures') + var validate = require('..') + var ValidationError = require('../lib/error') + +-require('should-promised') +- + describe('Response Only', function () { + it('should fail with empty object', function () { + validate.response({}).should.be.rejectedWith(ValidationError, { diff --git a/nodejs-har-validator.spec b/nodejs-har-validator.spec new file mode 100644 index 0000000..46cda60 --- /dev/null +++ b/nodejs-har-validator.spec @@ -0,0 +1,103 @@ +# needed for building on el6 +%{?nodejs_find_provides_and_requires} + +%global enable_tests 1 +%global srcname har-validator + +%global commit0 a71163c62b8786a41d503248fb60893598f3c26f +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) +%global owner ahmadnassri + +Name: nodejs-%{srcname} +Version: 2.0.3 +Release: 8%{?dist} +Summary: Extremely fast HTTP Archive (HAR) validator using JSON Schema +License: ISC +URL: https://github.com/%{owner}/%{srcname} +Source0: https://github.com/%{owner}/%{srcname}/archive/%{commit0}.tar.gz#/%{srcname}-%{shortcommit0}.tar.gz +# https://github.com/ahmadnassri/har-validator/pull/15 +Patch0: nodejs-har-validator-should8.patch + +BuildArch: noarch + +%if 0%{?rhel} == 6 +ExclusiveArch: %{ix86} x86_64 %{arm} noarch +%else +ExclusiveArch: %{nodejs_arches} noarch +%endif + +BuildRequires: nodejs-packaging + +%if 0%{?enable_tests} +BuildRequires: npm(mocha) +BuildRequires: npm(require-directory) +BuildRequires: npm(pinkie-promise) +BuildRequires: npm(is-my-json-valid) +BuildRequires: npm(should) >= 8.0.0 +%endif + +%description +%{summary}. + +%prep +%autosetup -p 1 -n %{srcname}-%{commit0} +rm -rf node_modules + +%nodejs_fixdep chalk +%nodejs_fixdep commander '2.x' + +%build +#nothing to do + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} + +cp -pr package.json lib/ bin/ \ + %{buildroot}%{nodejs_sitelib}/%{srcname} + +mkdir -p %{buildroot}%{_bindir} +ln -s %{nodejs_sitelib}/%{srcname}/bin/har-validator \ + %{buildroot}%{_bindir}/har-validator + +%nodejs_symlink_deps + +%if 0%{?enable_tests} +%check +%nodejs_symlink_deps --check +mocha +%endif + +%files +%{!?_licensedir:%global license %doc} +%doc README.md +%license LICENSE +%{nodejs_sitelib}/%{srcname} +%{_bindir}/har-validator + +%changelog +* Fri Feb 01 2019 Fedora Release Engineering - 2.0.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild + +* Fri Jul 13 2018 Fedora Release Engineering - 2.0.3-7 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild + +* Thu Feb 08 2018 Fedora Release Engineering - 2.0.3-6 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild + +* Wed Jul 26 2017 Fedora Release Engineering - 2.0.3-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Fri Feb 10 2017 Fedora Release Engineering - 2.0.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Feb 04 2016 Fedora Release Engineering - 2.0.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Sat Dec 19 2015 Tom Hughes - 2.0.3-2 +- Patch tests to work with should 8.x + +* Sun Dec 06 2015 Piotr Popieluch - 2.0.3-1 +- Update to 2.0.3 + +* Wed Nov 18 2015 Piotr Popieluch - 2.0.2-1 +- Initial package diff --git a/sources b/sources new file mode 100644 index 0000000..a891f75 --- /dev/null +++ b/sources @@ -0,0 +1 @@ +577b299bd9a9adbb6297a9665df11aca har-validator-a71163c.tar.gz