package initialize
This commit is contained in:
parent
112ee5cef5
commit
9c26e28640
@ -0,0 +1,19 @@
|
|||||||
|
From 9dd1e8d9ad0396a8c9092c2e9f17d498c58e0208 Mon Sep 17 00:00:00 2001
|
||||||
|
From: elifoster <elifosterwy@gmail.com>
|
||||||
|
Date: Tue, 5 Dec 2017 14:30:13 -0800
|
||||||
|
Subject: [PATCH] Fix uninitialized constant DateTime Close #80
|
||||||
|
|
||||||
|
---
|
||||||
|
lib/safe_yaml/parse/date.rb | 2 ++
|
||||||
|
1 file changed, 2 insertions(+)
|
||||||
|
|
||||||
|
diff --git a/lib/safe_yaml/parse/date.rb b/lib/safe_yaml/parse/date.rb
|
||||||
|
index cd3c62a..3a30a8b 100644
|
||||||
|
--- a/lib/safe_yaml/parse/date.rb
|
||||||
|
+++ b/lib/safe_yaml/parse/date.rb
|
||||||
|
@@ -1,3 +1,5 @@
|
||||||
|
+require 'time'
|
||||||
|
+
|
||||||
|
module SafeYAML
|
||||||
|
class Parse
|
||||||
|
class Date
|
||||||
78
rubygem-safe_yaml.spec
Normal file
78
rubygem-safe_yaml.spec
Normal file
@ -0,0 +1,78 @@
|
|||||||
|
%global gem_name safe_yaml
|
||||||
|
%global enable_tests 0
|
||||||
|
Summary: Parse YAML safely
|
||||||
|
Name: rubygem-%{gem_name}
|
||||||
|
Version: 1.0.4
|
||||||
|
Release: 1
|
||||||
|
License: MIT
|
||||||
|
URL: http://dtao.github.com/safe_yaml/
|
||||||
|
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
|
||||||
|
# Fix Ruby 2.5 compatibility.
|
||||||
|
# https://github.com/dtao/safe_yaml/pull/90
|
||||||
|
Patch0: rubygem-safe_yaml-1.0.4-Fix-uninitialized-constant-DateTime.patch
|
||||||
|
BuildRequires: ruby(release) rubygems-devel
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
BuildRequires: rubygem(hashie) rubygem(rspec)
|
||||||
|
%endif
|
||||||
|
BuildArch: noarch
|
||||||
|
%description
|
||||||
|
The SafeYAML gem provides an alternative implementation of
|
||||||
|
YAML.load suitable for accepting user input in Ruby applications.
|
||||||
|
Unlike Ruby's built-in implementation of YAML.load, SafeYAML's
|
||||||
|
version will not expose apps to arbitrary code execution exploits.
|
||||||
|
|
||||||
|
%package doc
|
||||||
|
Summary: Documentation for %{name}
|
||||||
|
Requires: %{name} = %{version}-%{release}
|
||||||
|
BuildArch: noarch
|
||||||
|
%description doc
|
||||||
|
Documentation for %{name}
|
||||||
|
|
||||||
|
%prep
|
||||||
|
gem unpack %{SOURCE0}
|
||||||
|
%setup -q -D -T -n %{gem_name}-%{version}
|
||||||
|
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
|
||||||
|
%patch0 -p1
|
||||||
|
|
||||||
|
%build
|
||||||
|
gem build %{gem_name}.gemspec
|
||||||
|
%gem_install
|
||||||
|
|
||||||
|
%install
|
||||||
|
mkdir -p %{buildroot}%{gem_dir}
|
||||||
|
cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
|
||||||
|
mkdir -p %{buildroot}%{_bindir}
|
||||||
|
cp -a ./%{_bindir}/* %{buildroot}%{_bindir}
|
||||||
|
find %{buildroot}%{gem_instdir}/bin -type f | xargs chmod a+x
|
||||||
|
rm -rf %{buildroot}%{gem_instdir}/{.rvmrc,.document,.require_paths,.gitignore,.travis.yml,.rspec,.gemtest,.yard*}
|
||||||
|
rm -rf %{buildroot}%{gem_instdir}/%{gem_name}.gemspec
|
||||||
|
rm -rf %{buildroot}%{gem_instdir}/bundle_install_all_ruby_versions.sh
|
||||||
|
%if 0%{?enable_tests}
|
||||||
|
|
||||||
|
%check
|
||||||
|
pushd .%{gem_instdir}
|
||||||
|
rspec -Ilib spec
|
||||||
|
popd
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%files
|
||||||
|
%{_bindir}/safe_yaml
|
||||||
|
%doc %{gem_instdir}/LICENSE.txt
|
||||||
|
%dir %{gem_instdir}
|
||||||
|
%{gem_instdir}/bin
|
||||||
|
%{gem_libdir}
|
||||||
|
%exclude %{gem_cache}
|
||||||
|
%{gem_spec}
|
||||||
|
|
||||||
|
%files doc
|
||||||
|
%doc %{gem_instdir}/CHANGES.md
|
||||||
|
%doc %{gem_instdir}/README.md
|
||||||
|
%doc %{gem_docdir}
|
||||||
|
%{gem_instdir}/Rakefile
|
||||||
|
%{gem_instdir}/Gemfile
|
||||||
|
%{gem_instdir}/run_specs_all_ruby_versions.sh
|
||||||
|
%{gem_instdir}/spec
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Wed Aug 19 2020 xiezheng <xiezheng4@huawei.com> - 1.0.4-1
|
||||||
|
- package init
|
||||||
4
rubygem-safe_yaml.yaml
Normal file
4
rubygem-safe_yaml.yaml
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
on_control: github
|
||||||
|
src_repo: dtao/safe_yaml
|
||||||
|
tag_prefix: ""
|
||||||
|
separator: "."
|
||||||
BIN
safe_yaml-1.0.4.gem
Normal file
BIN
safe_yaml-1.0.4.gem
Normal file
Binary file not shown.
Loading…
x
Reference in New Issue
Block a user