diff --git a/.gitignore b/.gitignore index 74c22ab..3e0fc92 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ /JSON-Grep-6a96698f42475975375b027b4d3bf5d8511b4a8f.tar.gz +/jgrep-1.4.0.gem diff --git a/0001-Fix-test-run.patch b/0001-Fix-test-run.patch deleted file mode 100644 index d5e90db..0000000 --- a/0001-Fix-test-run.patch +++ /dev/null @@ -1,48 +0,0 @@ -From c390416f30d2295a54693f36ec708ba1933dbe6d Mon Sep 17 00:00:00 2001 -From: Lubomir Rintel -Date: Tue, 29 Apr 2014 15:18:52 +0200 -Subject: [PATCH] Fix test run - -Failures: - - 1) JGrep#has_complex? should return true if complex statement is present in an array - Failure/Error: result = JGrep::has_complex?({"foo" => ["bar" => 1]}, [["statement","foo.bar=1"]]) - NoMethodError: - undefined method `first' for "foo.bar=1":String - # ./lib/jgrep.rb:306:in `has_complex?' - # ./spec/unit/jgrep_spec.rb:124:in `block (3 levels) in ' - - 2) JGrep#has_complex? should return false if complex statement is not present in an array - Failure/Error: result = JGrep::has_complex?({"foo" => ["bar" => 1]}, [["statement","foo.bar=0"]]) - NoMethodError: - undefined method `first' for "foo.bar=0":String - # ./lib/jgrep.rb:306:in `has_complex?' - # ./spec/unit/jgrep_spec.rb:129:in `block (3 levels) in ' - -Finished in 0.04232 seconds -70 examples, 2 failures - -Failed examples: - -rspec ./spec/unit/jgrep_spec.rb:123 # JGrep#has_complex? should return true if complex statement is present in an array -rspec ./spec/unit/jgrep_spec.rb:128 # JGrep#has_complex? should return false if complex statement is not present in an array ---- - lib/jgrep.rb | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/lib/jgrep.rb b/lib/jgrep.rb -index 9519758..c2d77f6 100644 ---- a/lib/jgrep.rb -+++ b/lib/jgrep.rb -@@ -303,7 +303,7 @@ module JGrep - break - end - end -- field = field[1].first.split(/=|<|>/).first -+ field = [field[1]].flatten.first.split(/=|<|>/).first - - field.split(".").each_with_index do |item, i| - tmp = tmp[item] --- -1.9.0 - diff --git a/rubygem-jgrep.spec b/rubygem-jgrep.spec index f4edc8e..f961f11 100644 --- a/rubygem-jgrep.spec +++ b/rubygem-jgrep.spec @@ -1,16 +1,14 @@ -%global commit 6a96698f42475975375b027b4d3bf5d8511b4a8f %global gem_name jgrep Name: rubygem-%{gem_name} -Version: 1.3.3 -Release: 7%{?dist} -Summary: Query JSON structure with a matching language +Version: 1.4.0 +Release: 1%{?dist} +Summary: Filter JSON documents with a simple logical language Group: Development/Tools License: ASL 2.0 URL: http://jgrep.org/ -Source0: https://github.com/ploubser/JSON-Grep/archive/%{commit}/JSON-Grep-%{commit}.tar.gz -Patch0: 0001-Fix-test-run.patch +Source0: https://rubygems.org/downloads/%{gem_name}-%{version}.gem BuildArch: noarch BuildRequires: rubygems-devel @@ -42,9 +40,10 @@ Documentation for %{name} %prep -%setup -qn JSON-Grep-%{commit} -%patch0 -p1 +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 @@ -70,16 +69,23 @@ rspec -Ilib spec %{gem_instdir}/bin %{gem_libdir} %exclude %{gem_cache} -%exclude %{gem_instdir}/*.gemspec +%exclude %{gem_instdir}/*.markdown +%exclude %{gem_instdir}/COPYING %{gem_spec} -%doc COPYING README.markdown +%doc CHANGELOG.markdown README.markdown +%license COPYING %files doc %{gem_docdir} +%{gem_instdir}/Rakefile +%{gem_instdir}/spec %changelog +* Tue Mar 01 2016 Dominic Cleal - 1.4.0-1 +- Update to 1.4.0 + * Thu Feb 04 2016 Fedora Release Engineering - 1.3.3-7 - Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild diff --git a/sources b/sources index f1bd12d..251b72d 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -274631d055712ba32799bab528310972 JSON-Grep-6a96698f42475975375b027b4d3bf5d8511b4a8f.tar.gz +d381ef608646f3c274e304a010aea908 jgrep-1.4.0.gem