From 7fb84385eb9e66ad919850879b97f3179ef46373 Mon Sep 17 00:00:00 2001 From: Fedora Release Engineering Date: Aug 08 2019 16:05:13 +0000 Subject: nodejs-git-raw-commits fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675488 --- diff --git a/.gitignore b/.gitignore deleted file mode 100644 index 00b3993..0000000 --- a/.gitignore +++ /dev/null @@ -1,3 +0,0 @@ -/git-raw-commits-1.3.3.tgz -/git-raw-commits-1.3.6.tgz -/test.js diff --git a/LICENSE-MIT-stevemao.txt b/LICENSE-MIT-stevemao.txt deleted file mode 100644 index a313c89..0000000 --- a/LICENSE-MIT-stevemao.txt +++ /dev/null @@ -1,22 +0,0 @@ -(The MIT License) - -Copyright (c) Steve Mao [https://github.com/stevemao] - -Permission is hereby granted, free of charge, to any person obtaining -a copy of this software and associated documentation files (the -'Software'), to deal in the Software without restriction, including -without limitation the rights to use, copy, modify, merge, publish, -distribute, sublicense, and/or sell copies of the Software, and to -permit persons to whom the Software is furnished to do so, subject to -the following conditions: - -The above copyright notice and this permission notice shall be -included in all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND, -EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. -IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY -CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, -TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE -SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. diff --git a/dead.package b/dead.package new file mode 100644 index 0000000..e5ff8a2 --- /dev/null +++ b/dead.package @@ -0,0 +1 @@ +nodejs-git-raw-commits fails to build from source: https://bugzilla.redhat.com/show_bug.cgi?id=1675488 diff --git a/nodejs-git-raw-commits.spec b/nodejs-git-raw-commits.spec deleted file mode 100644 index ceda76e..0000000 --- a/nodejs-git-raw-commits.spec +++ /dev/null @@ -1,95 +0,0 @@ -%{?nodejs_find_provides_and_requires} - -%global packagename git-raw-commits - -# Tests run locally, but timeout in mock, probably due to lack of network -# access -%global enable_tests 0 - -Name: nodejs-git-raw-commits -Version: 1.3.6 -Release: 4%{?dist} -Summary: Get raw git commits out of your repository using git-log(1) - -License: MIT -URL: https://github.com/conventional-changelog/git-raw-commits -Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz -# The test files are not included in the npm tarball. -Source1: https://raw.githubusercontent.com/conventional-changelog/conventional-changelog/%{packagename}%40%{version}/packages/git-raw-commits/test.js - -ExclusiveArch: %{nodejs_arches} noarch -BuildArch: noarch - -BuildRequires: nodejs-packaging -BuildRequires: npm(dargs) -BuildRequires: npm(meow) -BuildRequires: npm(lodash.template) -BuildRequires: npm(split2) -BuildRequires: npm(through2) -%if 0%{?enable_tests} -BuildRequires: mocha -BuildRequires: npm(chai) -BuildRequires: npm(shelljs) -%endif - -%description -Get raw git commits out of your repository using git-log(1) - - -%prep -%autosetup -n package -p1 -# setup the tests -cp -p %{SOURCE1} . - -sed -i '1s/env //' cli.js - -%nodejs_fixdep dargs -%nodejs_fixdep lodash.template - -%if 0%{?enable_tests} -%nodejs_fixdep chai -%nodejs_fixdep mocha -%endif - -%build -# nothing to do! - -%install -mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename} -cp -pr package.json cli.js 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 -%doc README.md CHANGELOG.md -%license LICENSE.md -%{nodejs_sitelib}/%{packagename} - -%changelog -* Thu Jul 25 2019 Fedora Release Engineering - 1.3.6-4 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild - -* Fri Feb 01 2019 Fedora Release Engineering - 1.3.6-3 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild - -* Fri Jul 13 2018 Fedora Release Engineering - 1.3.6-2 -- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild - -* Tue Mar 27 2018 jsmith - 1.3.6-1 -- Update to upstream 1.3.6 release - -* Wed Feb 21 2018 Jared Smith - 1.3.3-1 -- Update to upstream 1.3.3 release - -* Sun May 7 2017 Jared Smith - 1.2.0-1 -- Initial packaging diff --git a/sources b/sources deleted file mode 100644 index 5edc3dc..0000000 --- a/sources +++ /dev/null @@ -1,2 +0,0 @@ -SHA512 (git-raw-commits-1.3.6.tgz) = b2fb0adbab50f2f10a9ccb214c36ad488412303773f02c4822a2acbcfa9bb55db712d9b0e9535a1408adbbccf067456b3a77bb173b703f244bc4aeff0c851342 -SHA512 (test.js) = 74b3251a35c9075eee23a254dd25767ee0e7c83976313c3ef28522d0d05b9445e8610bbee873b46e65e051ec9d6270801c3075bd432b4289251d83d24e61be8a diff --git a/test.js b/test.js deleted file mode 100644 index 628ad79..0000000 --- a/test.js +++ /dev/null @@ -1,188 +0,0 @@ -'use strict' -var expect = require('chai').expect -var gitRawCommits = require('./') -var mocha = require('mocha') -var it = mocha.it -var shell = require('shelljs') -var through = require('through2') -var writeFileSync = require('fs').writeFileSync -var mkdirp = require('mkdirp') - -shell.config.silent = true -shell.rm('-rf', 'tmp') -shell.mkdir('tmp') -shell.cd('tmp') -shell.exec('git init') - -it('should emit an error and the error should not be read only if there is no commits', function (done) { - gitRawCommits() - .on('error', function (err) { - expect(err).to.be.ok // eslint-disable-line no-unused-expressions - err.message = 'error message' - done() - }) - .pipe(through(function () { - done('should error') - }, function () { - done('should error') - })) -}) - -it('should execute the command without error', function (done) { - mkdirp.sync('./packages/foo') - writeFileSync('./packages/foo/test1', '') - shell.exec('git add --all && git commit -m"First commit"') - writeFileSync('test2', '') - shell.exec('git add --all && git commit -m"Second commit"') - writeFileSync('test3', '') - shell.exec('git add --all && git commit -m"Third commit"') - - gitRawCommits() - .on('close', done) - .on('error', done) -}) - -it('should get commits without `options` (`options.from` defaults to first commit)', function (done) { - var i = 0 - - gitRawCommits() - .pipe(through(function (chunk, enc, cb) { - chunk = chunk.toString() - - if (i === 0) { - expect(chunk).to.equal('Third commit\n\n') - } else if (i === 1) { - expect(chunk).to.equal('Second commit\n\n') - } else { - expect(chunk).to.equal('First commit\n\n') - } - - i++ - cb() - }, function () { - expect(i).to.equal(3) - done() - })) -}) - -it('should honour `options.from`', function (done) { - var i = 0 - - gitRawCommits({ - from: 'HEAD~1' - }) - .pipe(through(function (chunk, enc, cb) { - chunk = chunk.toString() - - expect(chunk).to.equal('Third commit\n\n') - - i++ - cb() - }, function () { - expect(i).to.equal(1) - done() - })) -}) - -it('should honour `options.to`', function (done) { - var i = 0 - - gitRawCommits({ - to: 'HEAD^' - }) - .pipe(through(function (chunk, enc, cb) { - chunk = chunk.toString() - - if (i === 0) { - expect(chunk).to.equal('Second commit\n\n') - } else { - expect(chunk).to.equal('First commit\n\n') - } - - i++ - cb() - }, function () { - expect(i).to.equal(2) - done() - })) -}) - -it('should honour `options.format`', function (done) { - var i = 0 - - gitRawCommits({ - format: 'what%n%B' - }) - .pipe(through(function (chunk, enc, cb) { - chunk = chunk.toString() - - if (i === 0) { - expect(chunk).to.equal('what\nThird commit\n\n') - } else if (i === 1) { - expect(chunk).to.equal('what\nSecond commit\n\n') - } else { - expect(chunk).to.equal('what\nFirst commit\n\n') - } - - i++ - cb() - }, function () { - expect(i).to.equal(3) - done() - })) -}) - -it('should allow commits to be scoped to a specific directory', function (done) { - var i = 0 - var output = '' - - gitRawCommits({ - path: './packages/foo' - }) - .pipe(through(function (chunk, enc, cb) { - output += chunk.toString() - - i++ - cb() - }, function () { - expect(i).to.equal(1) - expect(output).to.match(/First commit/) - expect(output).to.not.match(/Second commit/) - done() - })) -}) - -it('should show your git-log command', function (done) { - gitRawCommits({ - format: 'what%n%B', - debug: function (cmd) { - expect(cmd).to.include('Your git-log command is:\ngit log --format') - done() - } - }) -}) - -it('should prevent variable expansion on windows', function (done) { - var i = 0 - - gitRawCommits({ - format: '%%cd%n%B' - }) - .pipe(through(function (chunk, enc, cb) { - chunk = chunk.toString() - - if (i === 0) { - expect(chunk).to.equal('%cd\nThird commit\n\n') - } else if (i === 1) { - expect(chunk).to.equal('%cd\nSecond commit\n\n') - } else { - expect(chunk).to.equal('%cd\nFirst commit\n\n') - } - - i++ - cb() - }, function () { - expect(i).to.equal(3) - done() - })) -})