dap 0.0.15 → 0.0.16
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.
- checksums.yaml +4 -4
- data/lib/dap/input.rb +1 -1
- data/lib/dap/output.rb +1 -1
- data/lib/dap/version.rb +1 -1
- data/spec/dap/input/json_spec.rb +14 -0
- metadata +5 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9aa8ed86eb3fe80846ce7eb6640afa656cb22fea
|
4
|
+
data.tar.gz: 0dbd79d7cd7cb8cadd3a5c01726f22a368c39892
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f4cb1061d7576a340575f2381dd21f2e6b923b01cca20cef6755210e5eab55eee80546f62d8783194b3a8628bbd0d1eac0fe1020e7aaeca02d9050042613e8ce
|
7
|
+
data.tar.gz: 3698dbe8d69304448d723988e4a15a658cbdfb2f6b9a0786e560d17a856d0ca5cab0f173c3036ed0a3a4abfe9860001eede9d8b631295c87a503c8920527cbff
|
data/lib/dap/input.rb
CHANGED
@@ -62,7 +62,7 @@ module Input
|
|
62
62
|
line = self.fd.readline rescue nil
|
63
63
|
return Error::EOF unless line
|
64
64
|
begin
|
65
|
-
json = Oj.load(line.strip)
|
65
|
+
json = Oj.load(line.strip, mode: :strict)
|
66
66
|
rescue
|
67
67
|
$stderr.puts "\nRecord is not valid JSON and will be skipped."
|
68
68
|
$stderr.puts line
|
data/lib/dap/output.rb
CHANGED
data/lib/dap/version.rb
CHANGED
@@ -0,0 +1,14 @@
|
|
1
|
+
describe Dap::Input::InputJSON do
|
2
|
+
describe '.read_record' do
|
3
|
+
context 'decoding input json' do
|
4
|
+
let(:file_object) { double("fake file") }
|
5
|
+
let(:input) { described_class.new(['data']) }
|
6
|
+
let(:record) { input.read_record }
|
7
|
+
it 'parses values starting with a colon (:) as a string' do
|
8
|
+
allow(File).to receive(:open).with('data', 'rb').and_return(file_object)
|
9
|
+
allow(file_object).to receive(:readline).and_return('{"a": ":b"}')
|
10
|
+
expect(record['a']).to eq(":b")
|
11
|
+
end
|
12
|
+
end
|
13
|
+
end
|
14
|
+
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.16
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Rapid7 Research
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-11-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rspec
|
@@ -223,6 +223,7 @@ files:
|
|
223
223
|
- spec/dap/filter/http_filter_spec.rb
|
224
224
|
- spec/dap/filter/ldap_filter_spec.rb
|
225
225
|
- spec/dap/filter/simple_filter_spec.rb
|
226
|
+
- spec/dap/input/json_spec.rb
|
226
227
|
- spec/dap/proto/ipmi_spec.rb
|
227
228
|
- spec/dap/proto/ldap_proto_spec.rb
|
228
229
|
- spec/spec_helper.rb
|
@@ -251,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
251
252
|
version: '0'
|
252
253
|
requirements: []
|
253
254
|
rubyforge_project:
|
254
|
-
rubygems_version: 2.
|
255
|
+
rubygems_version: 2.6.6
|
255
256
|
signing_key:
|
256
257
|
specification_version: 4
|
257
258
|
summary: 'DAP: The Data Analysis Pipeline'
|
@@ -259,6 +260,7 @@ test_files:
|
|
259
260
|
- spec/dap/filter/http_filter_spec.rb
|
260
261
|
- spec/dap/filter/ldap_filter_spec.rb
|
261
262
|
- spec/dap/filter/simple_filter_spec.rb
|
263
|
+
- spec/dap/input/json_spec.rb
|
262
264
|
- spec/dap/proto/ipmi_spec.rb
|
263
265
|
- spec/dap/proto/ldap_proto_spec.rb
|
264
266
|
- spec/spec_helper.rb
|