|
Jared K. Smith |
4f06173 |
%{?nodejs_find_provides_and_requires}
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%global packagename read-file
|
|
Jared K. Smith |
4f06173 |
%global enable_tests 1
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
Name: nodejs-read-file
|
|
Jared K. Smith |
4f06173 |
Version: 0.2.0
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
307c8a7 |
Release: 6%{?dist}
|
|
Jared K. Smith |
4f06173 |
Summary: Thin wrapper around fs.readFile and fs.readFileSync
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
License: MIT
|
|
Jared K. Smith |
4f06173 |
URL: https://github.com/jonschlinkert/read-file
|
|
Jared K. Smith |
4f06173 |
Source0: https://registry.npmjs.org/%{packagename}/-/%{packagename}-%{version}.tgz
|
|
Jared K. Smith |
4f06173 |
# The test files are not included in the npm tarball.
|
|
Jared K. Smith |
4f06173 |
Source1: https://raw.githubusercontent.com/jonschlinkert/read-file/master/test.js
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
BuildArch: noarch
|
|
Jared K. Smith |
4f06173 |
%if 0%{?fedora} >= 19
|
|
Jared K. Smith |
4f06173 |
ExclusiveArch: %{nodejs_arches} noarch
|
|
Jared K. Smith |
4f06173 |
%else
|
|
Jared K. Smith |
4f06173 |
ExclusiveArch: %{ix86} x86_64 %{arm} noarch
|
|
Jared K. Smith |
4f06173 |
%endif
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
BuildRequires: nodejs-packaging
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
4f06173 |
BuildRequires: mocha
|
|
Jared K. Smith |
4f06173 |
%endif
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%description
|
|
Jared K. Smith |
4f06173 |
Thin wrapper around fs.readFile and fs.readFileSync that also strips byte order
|
|
Jared K. Smith |
4f06173 |
marks when `utf8` encoding is chosen. Also optionally replaces windows newlines
|
|
Jared K. Smith |
4f06173 |
with unix newlines.
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%prep
|
|
Jared K. Smith |
4f06173 |
%autosetup -n package
|
|
Jared K. Smith |
4f06173 |
# setup the tests
|
|
Jared K. Smith |
4f06173 |
cp -p %{SOURCE1} .
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
mkdir fixtures
|
|
Jared K. Smith |
4f06173 |
echo -n "FILE CONTENTS!!!" > fixtures/a.txt
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%build
|
|
Jared K. Smith |
4f06173 |
# nothing to do
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%install
|
|
Jared K. Smith |
4f06173 |
mkdir -p %{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
4f06173 |
cp -pr package.json index.js \
|
|
Jared K. Smith |
4f06173 |
%{buildroot}%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%nodejs_symlink_deps
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%check
|
|
Jared K. Smith |
4f06173 |
%nodejs_symlink_deps --check
|
|
Jared K. Smith |
4f06173 |
%{__nodejs} -e 'require("./")'
|
|
Jared K. Smith |
4f06173 |
%if 0%{?enable_tests}
|
|
Jared K. Smith |
4f06173 |
NODE_ENV=test %{_bindir}/mocha -R spec
|
|
Jared K. Smith |
4f06173 |
%else
|
|
Jared K. Smith |
4f06173 |
%{_bindir}/echo -e "\e[101m -=#=- Tests disabled -=#=- \e[0m"
|
|
Jared K. Smith |
4f06173 |
%endif
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%files
|
|
Jared K. Smith |
4f06173 |
%{!?_licensedir:%global license %doc}
|
|
Jared K. Smith |
4f06173 |
%doc *.md
|
|
Jared K. Smith |
4f06173 |
%license LICENSE
|
|
Jared K. Smith |
4f06173 |
%{nodejs_sitelib}/%{packagename}
|
|
Jared K. Smith |
4f06173 |
|
|
Jared K. Smith |
4f06173 |
%changelog
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
307c8a7 |
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-6
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
307c8a7 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
307c8a7 |
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
01a19e9 |
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-5
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
01a19e9 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
01a19e9 |
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
eb4b917 |
* Thu Feb 08 2018 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-4
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
eb4b917 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
eb4b917 |
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
d65ccc1 |
* Thu Jul 27 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-3
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
d65ccc1 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
d65ccc1 |
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
bfdce50 |
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 0.2.0-2
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
bfdce50 |
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
|
|
![](https://seccdn.libravatar.org/avatar/66cca4ddfe914918eb13788577f8ad64d709ccf9f83b384b49228bb9a83a1533?s=16&d=retro) |
bfdce50 |
|
|
Jared K. Smith |
4f06173 |
* Fri Jul 29 2016 Jared Smith <jsmith@fedoraproject.org> - 0.2.0-1
|
|
Jared K. Smith |
4f06173 |
- Initial packaging
|