dap 0.0.17 → 0.0.18

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: f621aeedb79e0aa9f3a2ab2a67d3061295bbfa1b
4
- data.tar.gz: 2c3ba0ed1445d669709674b4c9b78f73f904196c
3
+ metadata.gz: 867e514a4d19ea3b3b9b70125fcd2f901fc9f006
4
+ data.tar.gz: e26bee2e6c949d7cd844c66944f637b557ac5ae1
5
5
  SHA512:
6
- metadata.gz: c55401a98d0616065b8a3618f215eade109d7a4f5c6638d79ce75ae039a05e498d1a910350f7d19b1e0abdeda5b460dd538f1f7d8bb46ffdcc173138647d5156
7
- data.tar.gz: cf4b783d2db8868e155201ffd8227452f470f5be0f7b2fc9a56c6343c0a8575444c8f5ff9290d00ed6d52b8cf34680f062b22f6118e94a02aecfdabcc5be7f04
6
+ metadata.gz: 258052902d6c6d25e37657f29a9b1a235ea138e59ed11577c0ffdb11f5f0b74bf33e3a9d74908cf0514802f6495143e9ab058c5311e650b1eda7e1ff13cdb7fd
7
+ data.tar.gz: f92c2afc884c726d2100bced1ecc63e8a749d5def35a4727012ecba147be13ce31fdababe597e1bd746285475e71df9376f77b0403130ab808b6c078e41619cb
@@ -38,7 +38,7 @@ module HTMLGhetto
38
38
  Shellwords.shellwords(astr).each do |attr_str|
39
39
  aname, avalue = attr_str.split('=', 2).map{|x| x.to_s.strip }
40
40
  avalue = avalue.to_s.gsub(/^\"|"$/, '')
41
- o[aname] = @coder.decode(avalue)
41
+ o[aname.downcase] = @coder.decode(avalue)
42
42
  end
43
43
  rescue ::Interrupt
44
44
  raise $!
@@ -47,7 +47,7 @@ module HTMLGhetto
47
47
  astr.to_s.split(/\s+/).each do |attr_str|
48
48
  aname, avalue = attr_str.split('=', 2).map{|x| x.to_s.strip }
49
49
  avalue = avalue.to_s.gsub(/^\"|"$/, '')
50
- o[aname] = @coder.decode(avalue)
50
+ o[aname.downcase] = @coder.decode(avalue)
51
51
  end
52
52
  end
53
53
  res << o
data/lib/dap/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Dap
2
- VERSION = "0.0.17"
2
+ VERSION = "0.0.18"
3
3
  end
@@ -51,3 +51,31 @@ describe Dap::Filter::FilterDecodeHTTPReply do
51
51
 
52
52
  end
53
53
  end
54
+
55
+ describe Dap::Filter::FilterHTMLLinks do
56
+ describe '.process' do
57
+
58
+ let(:filter) { described_class.new(['data']) }
59
+
60
+ context 'lowercase' do
61
+ let(:processed) { filter.process({'data' => '<a href="a"/><a href="b"/>'}) }
62
+ it 'extracted the correct links' do
63
+ expect(processed.map { |p| p['link'] }).to eq(%w(a b))
64
+ end
65
+ end
66
+
67
+ context 'uppercase' do
68
+ let(:processed) { filter.process({'data' => '<A HREF="a"/><A HREF="b"/>'}) }
69
+ it 'extracted the correct links' do
70
+ expect(processed.map { |p| p['link'] }).to eq(%w(a b))
71
+ end
72
+ end
73
+
74
+ context 'scattercase' do
75
+ let(:processed) { filter.process({'data' => '<A HrEf="a"/><A HrEf="b"/>'}) }
76
+ it 'extracted the correct links' do
77
+ expect(processed.map { |p| p['link'] }).to eq(%w(a b))
78
+ end
79
+ end
80
+ end
81
+ 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.17
4
+ version: 0.0.18
5
5
  platform: ruby
6
6
  authors:
7
7
  - Rapid7 Research
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-02-27 00:00:00.000000000 Z
11
+ date: 2017-03-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rspec