diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9b8e9d6 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/undefsafe-0.0.3.tgz diff --git a/.rh-nodejs6-nodejs-undefsafe.metadata b/.rh-nodejs6-nodejs-undefsafe.metadata new file mode 100644 index 0000000..5cab098 --- /dev/null +++ b/.rh-nodejs6-nodejs-undefsafe.metadata @@ -0,0 +1 @@ +ecca3a03e56b9af17385baac812ac83b994a962f SOURCES/undefsafe-0.0.3.tgz diff --git a/README.md b/README.md deleted file mode 100644 index 98f42b4..0000000 --- a/README.md +++ /dev/null @@ -1,4 +0,0 @@ -The master branch has no content - -Look at the c7 branch if you are working with CentOS-7, or the c4/c5/c6 branch for CentOS-4, 5 or 6 -If you find this file in a distro specific branch, it means that no content has been checked in yet diff --git a/SOURCES/LICENSE b/SOURCES/LICENSE new file mode 100644 index 0000000..caaf03a --- /dev/null +++ b/SOURCES/LICENSE @@ -0,0 +1,22 @@ +The MIT License (MIT) + +Copyright © 2016 Remy Sharp, http://remysharp.com + +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/SPECS/nodejs-undefsafe.spec b/SPECS/nodejs-undefsafe.spec new file mode 100644 index 0000000..fb9a64e --- /dev/null +++ b/SPECS/nodejs-undefsafe.spec @@ -0,0 +1,70 @@ +%{?scl:%scl_package nodejs-%{npm_name}} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} +%global npm_name undefsafe + +# Tests disabled due to dependencies not in brew yet +%global enable_tests 0 + +Summary: Undefined safe way of extracting object properties +Name: %{?scl_prefix}nodejs-%{npm_name} +Version: 0.0.3 +Release: 5%{?dist} +License: MIT +URL: https://github.com/remy/undefsafe +Source0: http://registry.npmjs.org/%{npm_name}/-/%{npm_name}-%{version}.tgz +Source1: https://raw.githubusercontent.com/kasicka/undefsafe/454e910123b1c24d5af2e0acc151591fc6c1d4dc/LICENSE +# https://github.com/remy/undefsafe/pull/3 +BuildRequires: %{?scl_prefix}nodejs-devel +ExclusiveArch: %{nodejs_arches} noarch +BuildArch: noarch + +%if 0%{?enable_tests} +BuildRequires: %{?scl_prefix}nodejs(mocha) +%endif + +%description +Undefined safe way of extracting object properties + +Simple function for retrieving deep object properties +without getting "Cannot read property 'X' of undefined" + +%prep +%setup -q -n package +cp -p %{SOURCE1} . + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{npm_name} +cp -pr lib package.json %{buildroot}%{nodejs_sitelib}/%{npm_name} + +%nodejs_symlink_deps + +%if 0%{?enable_tests} + +%check +%nodejs_symlink_deps --check +mocha --ui bdd test/**/*.test.js +%endif + +%files +%doc README.md LICENSE +%{nodejs_sitelib}/%{npm_name} + +%changelog +* Thu Jun 09 2016 Zuzana Svetlikova - 0.0.3-5 +- Resolves: rhbz#1334856 , fixes wrong license + +* Tue Feb 16 2016 Zuzana Svetlikova - 0.0.3-4 +- Use macro in -runtime dependency + +* Sun Feb 14 2016 Zuzana Svetlikova - 0.0.3-3 +- Rebuilt with updated metapackage + +* Wed Jan 06 2016 Tomas Hrcka - 0.0.3-2 +- Enable scl macros + +* Mon Dec 14 2015 Troy Dawson - 0.0.3-1 +- Initial package