From cb4959477b4bdeaf8afe69e505c2f4629a6edf1e Mon Sep 17 00:00:00 2001 From: Miro HronĨok Date: Jan 04 2021 10:18:29 +0000 Subject: Orphaned for 6+ weeks --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index cd8638c..0000000 --- a/.gitignore +++ /dev/null @@ -1 +0,0 @@ -/log-driver-1.2.5.tgz diff --git a/LICENSE b/LICENSE deleted file mode 100644 index 86b41a4..0000000 --- a/LICENSE +++ /dev/null @@ -1,6 +0,0 @@ -Copyright (c) 2014, Gregg Caines, gregg@caines.ca - -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/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/index.js b/index.js deleted file mode 100644 index 776b426..0000000 --- a/index.js +++ /dev/null @@ -1,79 +0,0 @@ -var should = require('should'); -var logger = require('../index'); -var defaultLogger = require('../index').logger; -var sinon = require('sinon-restore'); -var logged = ""; -var oldConsoleLog = console.log; - -/* NOTE: console.log is mocked in these tests, so any uses of it will be - * appended to the variabled "logged". This will include any calls you - * make to console.log() for the purpose of debugging in these tests. - * - * use oldConsoleLog() instead if you need to console.log() for - * debugging; - */ - - -describe("logdriver", function(){ - beforeEach(function(){ - logged = ""; - sinon.stub(console, 'log', function(str){ - logged += str + "\n"; - }); - }); - afterEach(function(){ - sinon.restoreAll(); - console.log = oldConsoleLog; - logged = ""; - }); - it ("provides a default instance of logger with default levels", function(){ - var mylogger = defaultLogger; - should.exist(mylogger.error); - should.exist(mylogger.warn); - should.exist(mylogger.info); - should.exist(mylogger.debug); - should.exist(mylogger.trace); - mylogger.level.should.equal('trace'); - }); - it ("allows log level possibilities to be specified", function(){ - var mylogger = logger({ levels : - ['superimportant', - 'checkthisout', - 'whocares']}); - should.exist(mylogger.superimportant); - }); - it ("allows log level to be specified, and doesn't log below that level", function(){ - var mylogger = logger({ level : false}); - mylogger.info("info test"); - mylogger.warn("warn test"); - mylogger.error("error test"); - mylogger.trace("trace test"); - logged.should.equal(''); - }); - it ("allows you to specify a log level of false to suppress all output", function(){ - var mylogger = logger({ level : 'info'}); - mylogger.info("info test"); - mylogger.warn("warn test"); - mylogger.error("error test"); - mylogger.trace("trace test"); - var lines = logged.split("\n"); - lines[0].should.include('[info]'); - lines[1].should.include('[warn]'); - lines[2].should.include('[error]'); - lines[0].should.include('info test'); - lines[1].should.include('warn test'); - lines[2].should.include('error test'); - - }); - - - it ("allows you to override the default format", function(){ - var mylogger = logger({ - format : function(){ - return JSON.stringify(arguments); - } - }); - mylogger.error("here's an error"); - JSON.parse(logged).should.eql({"0":"error","1":"here's an error"}); - }); -}); diff --git a/nodejs-log-driver.spec b/nodejs-log-driver.spec deleted file mode 100644 index ff0e6b9..0000000 --- a/nodejs-log-driver.spec +++ /dev/null @@ -1,104 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -%global packagename log-driver -%global enable_tests 1 - -Name: nodejs-log-driver -Version: 1.2.5 -Release: 11%{?dist} -Summary: A simple logging framework for logging to stdout - -License: ISC -URL: https://github.com/cainus/logdriver.git -Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz -# releases aren't tagged in github, so pull the test from master -Source1: https://raw.githubusercontent.com/cainus/logdriver/master/test/index.js -# license file is in upstream master branch, but not yet in a release tarball -Source2: https://raw.githubusercontent.com/cainus/logdriver/master/LICENSE -# fix testing syntax -Patch0: nodejs-log-driver_fix-test-syntax.patch - -ExclusiveArch: %{nodejs_arches} noarch -BuildArch: noarch - -BuildRequires: nodejs-packaging -%if 0%{?enable_tests} -BuildRequires: mocha -BuildRequires: npm(should) -BuildRequires: npm(sinon-restore) -%endif - -Requires: nodejs - -%description -A simple logging framework for logging to stdout - - -%prep -%setup -q -n package -# test file -mkdir test -cp -p %{SOURCE1} test/ -cp -p %{SOURCE2} . - -%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 -/usr/bin/mocha -R spec -%endif - - -%files -%{!?_licensedir:%global license %doc} -%license LICENSE -%doc *.md -%{nodejs_sitelib}/%{packagename} - - - -%changelog -* Sat Aug 01 2020 Fedora Release Engineering - 1.2.5-11 -- Second attempt - Rebuilt for - https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Tue Jul 28 2020 Fedora Release Engineering - 1.2.5-10 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild - -* Wed Jan 29 2020 Fedora Release Engineering - 1.2.5-9 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild - -* Thu Jul 25 2019 Fedora Release Engineering - 1.2.5-8 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.2.5-7 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.2.5-6 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Thu Feb 08 2018 Fedora Release Engineering - 1.2.5-5 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild - -* Thu Jul 27 2017 Fedora Release Engineering - 1.2.5-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild - -* Fri Feb 10 2017 Fedora Release Engineering - 1.2.5-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild - -* Sat Aug 06 2016 Jared Smith - 1.2.5-2 -- Add LICENSE file from upstream master - -* Thu Oct 15 2015 Jared Smith - 1.2.5-1 -- Initial packaging diff --git a/nodejs-log-driver_fix-test-syntax.patch b/nodejs-log-driver_fix-test-syntax.patch deleted file mode 100644 index 51d6773..0000000 --- a/nodejs-log-driver_fix-test-syntax.patch +++ /dev/null @@ -1,23 +0,0 @@ -diff --git a/test/index.js b/test/index.js -index 776b426..f7702d2 100644 ---- a/test/index.js -+++ b/test/index.js -@@ -57,12 +57,12 @@ describe("logdriver", function(){ - mylogger.error("error test"); - mylogger.trace("trace test"); - var lines = logged.split("\n"); -- lines[0].should.include('[info]'); -- lines[1].should.include('[warn]'); -- lines[2].should.include('[error]'); -- lines[0].should.include('info test'); -- lines[1].should.include('warn test'); -- lines[2].should.include('error test'); -+ lines[0].should.match(/\[info\]/); -+ lines[1].should.match(/\[warn\]/); -+ lines[2].should.match(/\[error\]/); -+ lines[0].should.match(/info test/); -+ lines[1].should.match(/warn test/); -+ lines[2].should.match(/error test/); - - }); - diff --git a/sources b/sources deleted file mode 100644 index f7c29d1..0000000 --- a/sources +++ /dev/null @@ -1 +0,0 @@ -cace7c165844b649c41d0a0dfcd5c13f log-driver-1.2.5.tgz