logstash-core 1.5.2.snapshot2-java → 1.5.2.1-java

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of logstash-core might be problematic. Click here for more details.

checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d83898e27d473c66eb33ddde95e5e42dc4ffe633
4
- data.tar.gz: 9d39b6663f50db31cb1f2510f55273f83f99da7b
3
+ metadata.gz: 7b34434635069ad778b4927cf12449482f9690da
4
+ data.tar.gz: ba23ada0808d798175a8dab65237675f885d0335
5
5
  SHA512:
6
- metadata.gz: ffd3c8d5f41b6ed700bfa35045839cb26ec3632700dd80cc298eeab593cd7e74738f18cbeb07acf5e32f80305777cb46b4d0d327426bf36efab6623d909815c7
7
- data.tar.gz: 874ac02b24570507cb0e05bf49b57c8ab5a755cfa5457d2d9e379231a62a41868519761964140d7f5aaeeb2aa6e709845a16c95dd71a122d564962fba101ddb5
6
+ metadata.gz: 63828830322134b96403c3068fa3904d7808b8d954b940a2df9368070c9b36c70410d1b6fdb7cb28aec4f35a9ebfd3d0b22c00fa4386bc87db1d281eb8af2ea1
7
+ data.tar.gz: 900c34d119092d3c2732586af2f28c50606d24faa391eaa4bafc5c6e2636153c0daf2ad894defdd80030aefcea4753e7832cf35c05b7af4b07f3b0cfec760737
@@ -92,4 +92,8 @@ module java::util::Collection
92
92
  duped.addAll(other)
93
93
  duped
94
94
  end
95
- end
95
+
96
+ def inspect
97
+ "<#{self.class.name}:#{self.hashCode} #{self.to_a(&:inspect)}>"
98
+ end
99
+ end
@@ -112,7 +112,7 @@ module LogStash
112
112
  when Array
113
113
  value.join(",")
114
114
  when Hash
115
- Logstash::Json.dump(value)
115
+ LogStash::Json.dump(value)
116
116
  else
117
117
  value
118
118
  end
@@ -1,6 +1,6 @@
1
1
  # encoding: utf-8
2
2
  # The version of logstash.
3
- LOGSTASH_VERSION = "1.5.2.snapshot2"
3
+ LOGSTASH_VERSION = "1.5.2.1"
4
4
 
5
5
  # Note to authors: this should not include dashes because 'gem' barfs if
6
6
  # you include a dash in the version string.
@@ -95,6 +95,10 @@ describe LogStash::Event do
95
95
  it "should allow to use nested hash from the metadata field" do
96
96
  expect(subject.sprintf("%{[@metadata][have-to-go][deeper]}")).to eq("inception")
97
97
  end
98
+
99
+ it "should return a json string if the key is a hash" do
100
+ expect(subject.sprintf("%{[j][k3]}")).to eq("{\"4\":\"m\"}")
101
+ end
98
102
  end
99
103
 
100
104
  context "#[]" do
@@ -82,6 +82,23 @@ describe "Java integration" do
82
82
  context "Java::JavaUtil::Collection" do
83
83
  subject{Java::JavaUtil::ArrayList.new(initial_array)}
84
84
 
85
+ context "when inspecting" do
86
+ let(:items) { [:a, {:b => :c}] }
87
+ subject { java.util.ArrayList.new(items) }
88
+
89
+ it "should include the contents of the Collection" do
90
+ expect(subject.inspect).to include(items.inspect)
91
+ end
92
+
93
+ it "should include the class name" do
94
+ expect(subject.inspect).to include("ArrayList")
95
+ end
96
+
97
+ it "should include the hash code of the collection" do
98
+ expect(subject.inspect).to include(subject.hashCode.to_s)
99
+ end
100
+ end
101
+
85
102
  context "when deleting a unique instance" do
86
103
  let(:initial_array) {["foo", "bar"]}
87
104
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: logstash-core
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.5.2.snapshot2
4
+ version: 1.5.2.1
5
5
  platform: java
6
6
  authors:
7
7
  - Jordan Sissel
@@ -267,9 +267,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
267
267
  version: '0'
268
268
  required_rubygems_version: !ruby/object:Gem::Requirement
269
269
  requirements:
270
- - - '>'
270
+ - - '>='
271
271
  - !ruby/object:Gem::Version
272
- version: 1.3.1
272
+ version: '0'
273
273
  requirements: []
274
274
  rubyforge_project:
275
275
  rubygems_version: 2.2.2