diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..9179b0a --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/sorted-object-1.0.0.tgz diff --git a/.nodejs010-nodejs-sorted-object.metadata b/.nodejs010-nodejs-sorted-object.metadata new file mode 100644 index 0000000..751ff3b --- /dev/null +++ b/.nodejs010-nodejs-sorted-object.metadata @@ -0,0 +1 @@ +5d1f4f9c1fb2cd48965967304e212eb44cfb6d05 SOURCES/sorted-object-1.0.0.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/SPECS/nodejs-sorted-object.spec b/SPECS/nodejs-sorted-object.spec new file mode 100644 index 0000000..7b8c2a5 --- /dev/null +++ b/SPECS/nodejs-sorted-object.spec @@ -0,0 +1,48 @@ +%{?scl:%scl_package nodejs-sorted-object} +%{!?scl:%global pkg_name %{name}} + +%nodejs_find_provides_and_requires +Name: %{?scl_prefix}nodejs-sorted-object +Version: 1.0.0 +Release: 3%{?dist} +Summary: Returns a copy of an object with its keys sorted +License: WTFPL +Group: Development/Languages/Other +Url: https://github.com/domenic/sorted-object +Source: http://registry.npmjs.org/sorted-object/-/sorted-object-%{version}.tgz +BuildRequires: nodejs010 +BuildRoot: %{_tmppath}/%{pkg_name}-%{version}-build +BuildArch: noarch +ExclusiveArch: %{ix86} x86_64 %{arm} noarch + +%description +Although objects in JavaScript are theoretically unsorted, in practice most engines use insertion order—at least, ignoring numeric keys. This manifests itself most prominently when dealing with an object's JSON serialization. + +So, for example, you might be trying to serialize some object to a JSON file. But every time you write it, it ends up being output in a different order, depending on how you created it in the first place! This makes for some ugly diffs. + +sorted-object gives you the answer. Just use this package to create a version of your object with its keys sorted before serializing, and you'll get a consistent order every time. + +%prep +%setup -q -n package + +%build + +%install +mkdir -p %{buildroot}%{nodejs_sitelib}/sorted-object +cp -pr package.json lib \ + %{buildroot}%{nodejs_sitelib}/sorted-object/ + +%files +%defattr(-,root,root,-) +%doc README.md LICENSE.txt +%{nodejs_sitelib}/sorted-object + +%changelog +* Tue Jan 13 2015 Tomas Hrcka - 1.0.0-3 +- Remove undefined macro + +* Mon Jan 12 2015 Tomas Hrcka - 1.0.0-2 +- Enable software collection support + +* Mon Jan 12 2015 Tomas Hrcka - 1.0.0-1 +- Initial build