diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..aa922e0 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/is-property-1.0.2.tgz diff --git a/.rh-nodejs6-nodejs-is-property.metadata b/.rh-nodejs6-nodejs-is-property.metadata new file mode 100644 index 0000000..667c5be --- /dev/null +++ b/.rh-nodejs6-nodejs-is-property.metadata @@ -0,0 +1 @@ +57fe1c4e48474edd65b09911f26b1cd4095dda84 SOURCES/is-property-1.0.2.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/test.js b/SOURCES/test.js new file mode 100644 index 0000000..da35a36 --- /dev/null +++ b/SOURCES/test.js @@ -0,0 +1,16 @@ +"use strict" +var isProperty = require("../is-property.js") +require("tape")("is-property", function(t) { + + t.assert(isProperty("foo")) + t.assert(!isProperty(".foo")) + t.assert(!isProperty("a.b.c")) + t.assert(isProperty("_joke")) + t.assert(isProperty("j_a_b_c")) + t.assert(isProperty("f00")) + t.assert(!isProperty("0bad")) + t.assert(isProperty("break")) + t.assert(!isProperty("@context")) + + t.end() +}) \ No newline at end of file diff --git a/SPECS/nodejs-is-property.spec b/SPECS/nodejs-is-property.spec new file mode 100644 index 0000000..6bee0cb --- /dev/null +++ b/SPECS/nodejs-is-property.spec @@ -0,0 +1,61 @@ +%{?scl:%scl_package nodejs-%{srcname}} +%{!?scl:%global pkg_name %{name}} + +%{?nodejs_find_provides_and_requires} + +%global srcname is-property + +Name: %{?scl_prefix}nodejs-%{srcname} +Version: 1.0.2 +Release: 3%{?dist} +Summary: Tests if a json property can be safely accessed using the .syntax + +License: MIT +URL: https://github.com/mikolalysenko/is-property +Source0: https://registry.npmjs.org/%{srcname}/-/%{srcname}-%{version}.tgz +Source1: https://raw.githubusercontent.com/mikolalysenko/is-property/master/test/test.js + +BuildArch: noarch +ExclusiveArch: %{nodejs_arches} noarch + +BuildRequires: %{?scl_prefix}nodejs-devel +#BuildRequires: %{?scl_prefix}npm(tap) +#BuildRequires: %{?scl_prefix}npm(tape) + +%description +%{summary}. + +%prep +%setup -q -n package +rm -rf node_modules +mkdir test +cp -p %{SOURCE1} ./test + +%build +# nothing to build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/%{srcname} +cp -pr package.json is-property.js \ + %{buildroot}%{nodejs_sitelib}/%{srcname} + +%nodejs_symlink_deps + +#%check +#%nodejs_symlink_deps --check +#tap test/*.js + +%files +%doc README.md +%license LICENSE +%{nodejs_sitelib}/%{srcname} + +%changelog +* Wed Sep 14 2016 Zuzana Svetlikova - 1.0.2-3 +- Built for RHSCL + +* Thu Feb 04 2016 Fedora Release Engineering - 1.0.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Wed Oct 28 2015 Piotr Popieluch - 1.0.2-1 +- Initial packaging