# Generated from eval_in-0.2.0.gem by gem2rpm -*- rpm-spec -*- %global gem_name eval_in Name: rubygem-%{gem_name} Version: 0.2.0 Release: 1%{?dist} Summary: Evaluates code (Ruby and others) safely by sending it to https://eval.in License: WTFPL URL: https://github.com/JoshCheek/eval_in Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem BuildRequires: ruby(release) BuildRequires: rubygems-devel BuildRequires: ruby # BuildRequires: rubygem(rspec) >= 3.0 # BuildRequires: rubygem(rspec) < 4 # BuildRequires: rubygem(webmock) >= 1.18 # BuildRequires: rubygem(webmock) < 2 BuildArch: noarch %description Safely evaluates code (Ruby and others) by sending it through https://eval.in == Languages and Versions Ruby | MRI 1.0, MRI 1.8.7, MRI 1.9.3, MRI 2.0.0, MRI 2.1 C | GCC 4.4.3, GCC 4.9.1 C++ | C++11 (GCC 4.9.1), GCC 4.4.3, GCC 4.9.1 CoffeeScript | CoffeeScript 1.7.1 (Node 0.10.29) Fortran | F95 (GCC 4.4.3) Haskell | Hugs98 September 2006 Io | Io 20131204 JavaScript | Node 0.10.29 Lua | Lua 5.1.5, Lua 5.2.3 OCaml | OCaml 4.01.0 PHP | PHP 5.5.14 Pascal | Free Pascal 2.6.4 Perl | Perl 5.20.0 Python | CPython 2.7.8, CPython 3.4.1 Slash | Slash HEAD x86 Assembly | NASM 2.07 == Example: It's this simple: result = EvalIn.call 'puts "example"', language: "ruby/mri-2.1" result.output # returns "example\n". . %package doc Summary: Documentation for %{name} Requires: %{name} = %{version}-%{release} BuildArch: noarch %description doc Documentation for %{name}. %prep %setup -q -n %{gem_name}-%{version} %build # Create the gem as gem install only works on a gem file gem build ../%{gem_name}-%{version}.gemspec # %%gem_install compiles any C extensions and installs the gem into ./%%gem_dir # by default, so that we can move it into the buildroot in %%install %gem_install %install mkdir -p %{buildroot}%{gem_dir} cp -a .%{gem_dir}/* \ %{buildroot}%{gem_dir}/ %check pushd .%{gem_instdir} # rspec spec popd %files %dir %{gem_instdir} %exclude %{gem_instdir}/.gitignore %exclude %{gem_instdir}/.travis.yml %{gem_libdir} %exclude %{gem_cache} %{gem_spec} %files doc %doc %{gem_docdir} %{gem_instdir}/Gemfile %doc %{gem_instdir}/Readme.md %{gem_instdir}/eval_in.gemspec %{gem_instdir}/spec %changelog * Tue Apr 19 2022 mockbuilder - 0.2.0-1 - Initial package