[rubygem-safe_yaml] Initial import (#985622).

tdawson tdawson at fedoraproject.org
Mon Jul 29 20:32:30 UTC 2013


commit 7485307ca853361085e5f0a5f665c65015c5ab71
Author: Troy Dawson <tdawson at redhat.com>
Date:   Mon Jul 29 15:32:19 2013 -0500

    Initial import (#985622).

 .gitignore             |    1 +
 rubygem-safe_yaml.spec |   93 ++++++++++++++++++++++++++++++++++++++++++++++++
 sources                |    1 +
 3 files changed, 95 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..371b470 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/safe_yaml-0.9.4.gem
diff --git a/rubygem-safe_yaml.spec b/rubygem-safe_yaml.spec
new file mode 100644
index 0000000..5b067e0
--- /dev/null
+++ b/rubygem-safe_yaml.spec
@@ -0,0 +1,93 @@
+%global gem_name safe_yaml
+# Although there are tests
+# the dependancies aren't in Fedora yet
+%global enable_tests 0
+
+Summary:       Parse YAML safely
+Name:          rubygem-%{gem_name}
+Version:       0.9.4
+Release:       2%{?dist}
+Group:         Development/Languages
+License:       MIT
+URL:           http://dtao.github.com/safe_yaml/
+Source0:       https://rubygems.org/gems/%{gem_name}-%{version}.gem
+Requires:      ruby(release)
+Requires:      ruby(rubygems) 
+BuildRequires: ruby(release)
+BuildRequires: rubygems-devel
+%if 0%{?enable_tests}
+BuildRequires: rubygem(hashie)
+BuildRequires: rubygem(heredoc_unindent)
+BuildRequires: rubygem(ostruct)
+BuildRequires: rubygem(rspec)
+BuildRequires: rubygem(yaml)
+%endif
+BuildArch:     noarch
+Provides:      rubygem(%{gem_name}) = %{version}
+
+%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}
+Group:     Documentation
+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
+
+%build
+gem build %{gem_name}.gemspec
+%gem_install
+
+%install
+mkdir -p %{buildroot}%{gem_dir}
+cp -a ./%{gem_dir}/* %{buildroot}%{gem_dir}/
+
+# Remove build leftovers.
+rm -rf %{buildroot}%{gem_instdir}/{.rvmrc,.document,.require_paths,.gitignore,.travis.yml,.rspec,.gemtest,.yard*}
+rm -rf %{buildroot}%{gem_instdir}/%{gem_name}.gemspec
+
+%if 0%{?enable_tests}
+%check
+pushd .%{gem_instdir}
+rspec -Ilib spec
+popd
+%endif
+
+%files
+%doc %{gem_instdir}/LICENSE.txt
+%dir %{gem_instdir}
+%{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
+* Mon Jul 22 2013  Troy Dawson <tdawson at redhat.com> - 0.9.4-2
+- Updated tests
+
+* Wed Jul 17 2013  Troy Dawson <tdawson at redhat.com> - 0.9.4-1
+- Update to 0.9.4
+
+* Fri Jun 14 2013  Troy Dawson <tdawson at redhat.com> - 0.9.3-1
+- Initial package
diff --git a/sources b/sources
index e69de29..5671f3d 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+9788eb941a0935853679ee186a3d481b  safe_yaml-0.9.4.gem


More information about the scm-commits mailing list