dap 0.0.16 → 0.0.17

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9aa8ed86eb3fe80846ce7eb6640afa656cb22fea
4
- data.tar.gz: 0dbd79d7cd7cb8cadd3a5c01726f22a368c39892
3
+ metadata.gz: f621aeedb79e0aa9f3a2ab2a67d3061295bbfa1b
4
+ data.tar.gz: 2c3ba0ed1445d669709674b4c9b78f73f904196c
5
5
  SHA512:
6
- metadata.gz: f4cb1061d7576a340575f2381dd21f2e6b923b01cca20cef6755210e5eab55eee80546f62d8783194b3a8628bbd0d1eac0fe1020e7aaeca02d9050042613e8ce
7
- data.tar.gz: 3698dbe8d69304448d723988e4a15a658cbdfb2f6b9a0786e560d17a856d0ca5cab0f173c3036ed0a3a4abfe9860001eede9d8b631295c87a503c8920527cbff
6
+ metadata.gz: c55401a98d0616065b8a3618f215eade109d7a4f5c6638d79ce75ae039a05e498d1a910350f7d19b1e0abdeda5b460dd538f1f7d8bb46ffdcc173138647d5156
7
+ data.tar.gz: cf4b783d2db8868e155201ffd8227452f470f5be0f7b2fc9a56c6343c0a8575444c8f5ff9290d00ed6d52b8cf34680f062b22f6118e94a02aecfdabcc5be7f04
@@ -154,6 +154,8 @@ class FilterTransform
154
154
  self.opts.each_pair do |k,v|
155
155
  if doc.has_key?(k)
156
156
  case v
157
+ when 'reverse'
158
+ doc[k] = doc[k].to_s.reverse
157
159
  when 'downcase'
158
160
  doc[k] = doc[k].to_s.downcase
159
161
  when 'upcase'
data/lib/dap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dap
2
- VERSION = "0.0.16"
2
+ VERSION = "0.0.17"
3
3
  end
@@ -18,3 +18,24 @@ describe Dap::Filter::FilterFlatten do
18
18
  end
19
19
  end
20
20
  end
21
+
22
+ describe Dap::Filter::FilterTransform do
23
+ describe '.process' do
24
+
25
+ let(:filter) { described_class.new(['foo=reverse']) }
26
+
27
+ context 'ASCII' do
28
+ let(:process) { filter.process({'foo' => 'abc123'}) }
29
+ it 'is reversed' do
30
+ expect(process).to eq(['foo' => '321cba'])
31
+ end
32
+ end
33
+
34
+ context 'UTF-8' do
35
+ let(:process) { filter.process({'foo' => '☹☠'}) }
36
+ it 'is reversed' do
37
+ expect(process).to eq(['foo' => '☠☹'])
38
+ end
39
+ end
40
+ end
41
+ 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.16
4
+ version: 0.0.17
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-30 00:00:00.000000000 Z
11
+ date: 2017-02-27 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec
@@ -252,7 +252,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
252
252
  version: '0'
253
253
  requirements: []
254
254
  rubyforge_project:
255
- rubygems_version: 2.6.6
255
+ rubygems_version: 2.5.2
256
256
  signing_key:
257
257
  specification_version: 4
258
258
  summary: 'DAP: The Data Analysis Pipeline'