Blob Blame History Raw
%{?nodejs_find_provides_and_requires}

%global enable_tests 1

Name:       nodejs-detective
Version:    2.3.0
Release:    1%{?dist}
Summary:    Node.js module to find all calls to require()
License:    MIT
Group:      System Environment/Libraries
URL:        https://github.com/substack/node-detective
Source0:    http://registry.npmjs.org/detective/-/detective-%{version}.tgz

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(escodegen)
BuildRequires:  npm(esprima)
BuildRequires:  npm(tap)
%endif

%description
Node.js module to find all calls to require(), no matter how crazily nested,
using a proper walk of the AST.

%prep
%setup -q -n package
%nodejs_fixdep esprima '~1.1'
%nodejs_fixdep escodegen '~1.3'


%build
#nothing to do


%install
mkdir -p %{buildroot}%{nodejs_sitelib}/detective
cp -pr package.json index.js \
    %{buildroot}%{nodejs_sitelib}/detective

%nodejs_symlink_deps


%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
%tap test/*.js
%endif


%files
%doc LICENSE readme.markdown example/
%{nodejs_sitelib}/detective


%changelog
* Fri Apr 18 2014 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.3.0-1
- update to upstream release 2.3.0

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

* Wed Jul 17 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.1.2-2
- enable tests

* Wed May 29 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 2.1.2-1
- update to upstream release 2.1.2

* Tue Feb 05 2013 Jamie Nguyen <jamielinux@fedoraproject.org> - 0.2.1-1
- initial package