[rubygem-logstasher] Update to 0.6.5. Patches for tests addressed by upstream.
František Dvořák
valtri at fedoraproject.org
Sun Mar 15 14:56:03 UTC 2015
commit 8ede2d61ad582580d4c34fa1ace8279b37391a1f
Author: František Dvořák <valtri at civ.zcu.cz>
Date: Sun Mar 15 15:44:42 2015 +0100
Update to 0.6.5. Patches for tests addressed by upstream.
.gitignore | 2 ++
logstasher-tests-time-ruby20.diff | 50 ---------------------------------------
logstasher-tests-time-ruby21.diff | 50 ---------------------------------------
logstasher-tests-time.diff | 30 +++++++++++++++++++++++
rubygem-logstasher.spec | 26 +++++++-------------
sources | 4 ++--
6 files changed, 43 insertions(+), 119 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index 5683b94..996351b 100644
--- a/.gitignore
+++ b/.gitignore
@@ -2,3 +2,5 @@
/rubygem-logstasher-0.6.1-repo.tgz
/logstasher-0.6.2.gem
/rubygem-logstasher-0.6.2-repo.tgz
+/logstasher-0.6.5.gem
+/rubygem-logstasher-0.6.5-repo.tgz
diff --git a/logstasher-tests-time.diff b/logstasher-tests-time.diff
new file mode 100644
index 0000000..b711f44
--- /dev/null
+++ b/logstasher-tests-time.diff
@@ -0,0 +1,30 @@
+commit 422dc5781126f91f6dacffdc0642dbf8c903426e
+Author: Shadab Ahmed <shadab.ansari at gmail.com>
+Date: Sun Mar 15 17:31:58 2015 +0530
+
+ Using test time stamp variable
+
+ Makes up for differences in time representation of Rails 3 vs Rails 4 and fixes the specs
+
+diff --git a/spec/lib/logstasher_spec.rb b/spec/lib/logstasher_spec.rb
+index 81d8b03..7dd9d01 100644
+--- a/spec/lib/logstasher_spec.rb
++++ b/spec/lib/logstasher_spec.rb
+@@ -200,7 +200,7 @@ describe LogStasher do
+ end
+ it 'adds to log with specified level' do
+ expect(logger).to receive(:send).with('warn?').and_return(true)
+- expect(logger).to receive(:<<).with("{\"@source\":\"unknown\",\"@fields\":{\"message\":\"WARNING\",\"level\":\"warn\"},\"@tags\":[\"log\"],\"@timestamp\":\"1970-01-01T00:00:00Z\",\"@version\":\"1\"}\n")
++ expect(logger).to receive(:<<).with("{\"@source\":\"unknown\",\"@fields\":{\"message\":\"WARNING\",\"level\":\"warn\"},\"@tags\":[\"log\"],\"@timestamp\":\"#{$test_timestamp}\",\"@version\":\"1\"}\n")
+ LogStasher.log('warn', 'WARNING')
+ end
+ context 'with a source specified' do
+@@ -209,7 +209,7 @@ describe LogStasher do
+ end
+ it 'sets the correct source' do
+ expect(logger).to receive(:send).with('warn?').and_return(true)
+- expect(logger).to receive(:<<).with("{\"@source\":\"foo\",\"@fields\":{\"message\":\"WARNING\",\"level\":\"warn\"},\"@tags\":[\"log\"],\"@timestamp\":\"1970-01-01T00:00:00Z\",\"@version\":\"1\"}\n")
++ expect(logger).to receive(:<<).with("{\"@source\":\"foo\",\"@fields\":{\"message\":\"WARNING\",\"level\":\"warn\"},\"@tags\":[\"log\"],\"@timestamp\":\"#{$test_timestamp}\",\"@version\":\"1\"}\n")
+ LogStasher.log('warn', 'WARNING')
+ end
+ end
diff --git a/rubygem-logstasher.spec b/rubygem-logstasher.spec
index 225461a..58858b2 100644
--- a/rubygem-logstasher.spec
+++ b/rubygem-logstasher.spec
@@ -8,7 +8,7 @@
%endif
Name: rubygem-%{gem_name}
-Version: 0.6.2
+Version: 0.6.5
Release: 1%{?dist}
Summary: Awesome rails logs
@@ -17,18 +17,14 @@ License: MIT
URL: https://github.com/shadabahmed/logstasher
Source0: https://rubygems.org/gems/%{gem_name}-%{version}.gem
# git clone https://github.com/shadabahmed/logstasher.git && cd logstasher
-# git checkout v0.6.2
-# tar -czf rubygem-logstasher-0.6.2-repo.tgz sample_logstash_configurations spec/ LICENSE README.md
+# git checkout v0.6.5
+# tar -czf rubygem-logstasher-0.6.5-repo.tgz sample_logstash_configurations/ spec/ LICENSE README.md
Source1: %{name}-%{version}-repo.tgz
# bundler killer patch
# (not intended for upstream)
Patch0: logstasher-tests-unbundle.diff
-# compatibility with logstash-event >= 1.2, ruby 2.0
-# (not intended for upstream)
-Patch1: logstasher-tests-time-ruby20.diff
-# compatibility with logstash-event >= 1.2, ruby 2.1
-# (not intended for upstream)
-Patch2: logstasher-tests-time-ruby21.diff
+# https://github.com/shadabahmed/logstasher/commit/422dc5781126f91f6dacffdc0642dbf8c903426e
+Patch1: logstasher-tests-time.diff
BuildArch: noarch
BuildRequires: rubygems-devel
@@ -71,18 +67,10 @@ gem unpack %{SOURCE0}
%setup -q -D -T -n %{gem_name}-%{version}
tar xzf %{SOURCE1}
%patch0 -p1
-%if 0%{?fedora} && 0%{?fedora} <= 20 || 0%{?rhel} && 0%{?rhel} <= 7
%patch1 -p1
-%else
-%patch2 -p1
-%endif
gem spec %{SOURCE0} -l --ruby > %{gem_name}.gemspec
-# Remove < 1.2 restriction for logstash-event
-# (requires the compatibility patch in tests)
-sed -i -e 's|\(%q<logstash-event>,\) \[.*\]|\1 [">= 1.1.0"]|' %{gem_name}.gemspec
-
%build
gem build %{gem_name}.gemspec
@@ -123,6 +111,10 @@ rm -rf spec/
%changelog
+* Sun Mar 15 2015 František Dvořák <valtri at civ.zcu.cz> - 0.6.5-1
+- Update to 0.6.5
+- Patches for tests addressed by upstream
+
* Fri Jan 09 2015 František Dvořák <valtri at civ.zcu.cz> - 0.6.2-1
- Update to 0.6.2
- Enable tests for Rawhide (Fedora >= 22)
diff --git a/sources b/sources
index 4309fe7..cd1767c 100644
--- a/sources
+++ b/sources
@@ -1,2 +1,2 @@
-5aa819336323ccb7053787919f0ff3c8 logstasher-0.6.2.gem
-57c16d8e8a86f5d237a5324c3356ad93 rubygem-logstasher-0.6.2-repo.tgz
+d65b3c9ea963b4dd270c1b29163f6ec6 logstasher-0.6.5.gem
+14062b8bd4c58fd159064742f58a9fbf rubygem-logstasher-0.6.5-repo.tgz
More information about the scm-commits
mailing list