Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

# Not all dependencies have been satisfied yet.
%global enable_tests 1

Name:       nodejs-winston
Version:    0.7.2
Release:    3%{?dist}
Summary:    A multiple transport asynchronous logging library for Node.js
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/flatiron/winston
Source0:    http://registry.npmjs.org/winston/-/winston-%{version}.tgz

Patch0:     %{name}-0.7.2-Remove-stream-tests.patch

BuildArch:  noarch
%if 0%{?fedora} >= 19
ExclusiveArch: %{nodejs_arches} noarch
%else
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
%endif

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires:  npm(async)
BuildRequires:  npm(colors)
BuildRequires:  npm(combined-stream)
BuildRequires:  npm(cycle)
BuildRequires:  npm(eyes)
BuildRequires:  npm(pkginfo)
BuildRequires:  npm(stack-trace)
BuildRequires:  npm(vows)
%endif

%description
This module is a multiple transport asynchronous logging library for Node.js.

Winston is designed to be a simple and universal logging library with support
for multiple transports. A transport is essentially a storage device for your
logs. Each instance of a winston logger can have multiple transports
configured at different levels. For example, one may want error logs to be
stored in a persistent remote location (like a database), but all logs output
to the console or a local file.

There also seemed to be a lot of logging libraries out there that coupled
their implementation of logging (ie, how the logs are stored/indexed) to the
API that they exposed to the programmer. This library aims to decouple those
parts of the process to make it more flexible and extensible.


%prep
%setup -q -n package
find . -type f -iname '*.js' -exec chmod -x '{}' \;
%patch0 -p1
%nodejs_fixdep request '~2.14'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/winston
cp -pr package.json lib/ \
    %{buildroot}%{nodejs_sitelib}/winston

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
rm -f test/transports/webhook-test.js
%{nodejs_sitelib}/vows/bin/vows --spec --isolate
%endif


%files
%doc CHANGELOG.md LICENSE README.md docs/ examples/
%{nodejs_sitelib}/winston


%changelog
* Tue Aug 20 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.7.2-3
- restrict to compatible arches

* Sat Aug 03 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Mon Jul 01 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.7.2-1
- update to upstream release 0.7.2
- fix spelling in %%summary

* Fri Jun 07 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.7.1-2
- remove execute bit from files that shouldn't have it

* Sun May 26 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.7.1-1
- update to upstream release 0.7.1

* Wed Feb 13 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.6.2-1
- initial package