Blob Blame History Raw
# we have older version of coffee-script in fedora
%global enable_tests 1
%global module_name is-arrayish

Name:           nodejs-%{module_name}
Version:        0.2.1
Release:        3%{?dist}
Summary:        Check if an object can be used like an Array

License:        MIT
URL:            https://github.com/Qix-/node-is-arrayish
Source0:        https://github.com/Qix-/node-%{module_name}/archive/%{version}.tar.gz

BuildArch:      noarch
ExclusiveArch:  %{nodejs_arches} noarch

BuildRequires:  nodejs-packaging

%if 0%{?enable_tests}
BuildRequires: coffee-script
BuildRequires: nodejs-istanbul
BuildRequires: mocha
BuildRequires: npm(should)
%endif

%description
%{summary}.

%prep
%setup -q -n node-%{module_name}-%{version}
rm -rf node_modules

%build
# nothing to build

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

%if 0%{?enable_tests}
%check
%nodejs_symlink_deps --check
mocha --compilers coffee:coffee-script/register
%endif

%files
%doc README.md
%license LICENSE
%{nodejs_sitelib}/%{module_name}

%changelog
* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Mon Dec 21 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.2.1-2
- Enable tests as we have new coffee-script in rawhide

* Mon Dec 21 2015 Parag Nemade <pnemade AT redhat DOT com> - 0.2.1-1
- Initial packaging