|
|
50012f |
%{?scl:%scl_package nodejs-%{npm_name}}
|
|
|
50012f |
%{!?scl:%global pkg_name %{name}}
|
|
|
50012f |
|
|
|
50012f |
%{?nodejs_find_provides_and_requires}
|
|
|
50012f |
%global npm_name undefsafe
|
|
|
50012f |
|
|
|
50012f |
# Tests disabled due to dependencies not in brew yet
|
|
|
50012f |
%global enable_tests 0
|
|
|
50012f |
|
|
|
50012f |
Summary: Undefined safe way of extracting object properties
|
|
|
50012f |
Name: %{?scl_prefix}nodejs-%{npm_name}
|
|
|
50012f |
Version: 0.0.3
|
|
|
50012f |
Release: 6%{?dist}
|
|
|
50012f |
License: MIT
|
|
|
50012f |
URL: https://github.com/remy/undefsafe
|
|
|
50012f |
Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz
|
|
|
50012f |
Source1: https://raw.githubusercontent.com/kasicka/undefsafe/454e910123b1c24d5af2e0acc151591fc6c1d4dc/LICENSE
|
|
|
50012f |
# https://github.com/remy/undefsafe/pull/3
|
|
|
50012f |
BuildRequires: %{?scl_prefix}nodejs-devel
|
|
|
50012f |
ExclusiveArch: %{nodejs_arches} noarch
|
|
|
50012f |
BuildArch: noarch
|
|
|
50012f |
|
|
|
50012f |
%if 0%{?enable_tests}
|
|
|
50012f |
BuildRequires: %{?scl_prefix}nodejs(mocha)
|
|
|
50012f |
%endif
|
|
|
50012f |
|
|
|
50012f |
%description
|
|
|
50012f |
Undefined safe way of extracting object properties
|
|
|
50012f |
|
|
|
50012f |
Simple function for retrieving deep object properties
|
|
|
50012f |
without getting "Cannot read property 'X' of undefined"
|
|
|
50012f |
|
|
|
50012f |
%prep
|
|
|
50012f |
%setup -q -n package
|
|
|
50012f |
cp -p %{SOURCE1} .
|
|
|
50012f |
|
|
|
50012f |
%build
|
|
|
50012f |
|
|
|
50012f |
%install
|
|
|
50012f |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
|
|
50012f |
cp -pr lib package.json %{buildroot}%{nodejs_sitelib}/%{npm_name}
|
|
|
50012f |
|
|
|
50012f |
%nodejs_symlink_deps
|
|
|
50012f |
|
|
|
50012f |
%if 0%{?enable_tests}
|
|
|
50012f |
|
|
|
50012f |
%check
|
|
|
50012f |
%nodejs_symlink_deps --check
|
|
|
50012f |
mocha --ui bdd test/**/*.test.js
|
|
|
50012f |
%endif
|
|
|
50012f |
|
|
|
50012f |
%files
|
|
|
50012f |
%doc README.md LICENSE
|
|
|
50012f |
%{nodejs_sitelib}/%{npm_name}
|
|
|
50012f |
|
|
|
50012f |
%changelog
|
|
|
50012f |
* Mon Jul 03 2017 Zuzana Svetlikova <zsvetlik@redhat.com> - 0.0.3-6
|
|
|
50012f |
- rh-nodejs8 rebuild
|
|
|
50012f |
|
|
|
50012f |
* Thu Jun 09 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 0.0.3-5
|
|
|
50012f |
- Resolves: rhbz#1334856 , fixes wrong license
|
|
|
50012f |
|
|
|
50012f |
* Tue Feb 16 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 0.0.3-4
|
|
|
50012f |
- Use macro in -runtime dependency
|
|
|
50012f |
|
|
|
50012f |
* Sun Feb 14 2016 Zuzana Svetlikova <zsvetlik@redhat.com> - 0.0.3-3
|
|
|
50012f |
- Rebuilt with updated metapackage
|
|
|
50012f |
|
|
|
50012f |
* Wed Jan 06 2016 Tomas Hrcka <thrcka@redhat.com> - 0.0.3-2
|
|
|
50012f |
- Enable scl macros
|
|
|
50012f |
|
|
|
50012f |
* Mon Dec 14 2015 Troy Dawson <tdawson@redhat.com> - 0.0.3-1
|
|
|
50012f |
- Initial package
|