obfu_report 0.0.5.alpha → 0.0.6.alpha

Sign up to get free protection for your applications and to get access to all the features.
@@ -38,10 +38,12 @@ module ObfuReport
38
38
  # ==> {"big" => 2, "words" => 1}
39
39
  def report(string,list)
40
40
  if (string.is_a? String)&&(list.is_a? Array)
41
- line = {}
41
+ line = Hash.new(0)
42
42
  list.each do |word|
43
- test = string.split.count(word)
44
- line[word] = test.to_s
43
+ # test = string.split.count(word)
44
+ test = string.downcase.scan(/\b#{word}\b/).map{|word| line[word] = string.downcase.scan(/\b#{word}\b/).size}
45
+
46
+ # line[word] = test.to_s
45
47
  end
46
48
  # string = ("Word count: " + line)
47
49
  return line
@@ -1,3 +1,3 @@
1
1
  module ObfuReport
2
- VERSION = "0.0.5.alpha"
2
+ VERSION = "0.0.6.alpha"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obfu_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.alpha
4
+ version: 0.0.6.alpha
5
5
  prerelease: 6
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-06-20 00:00:00.000000000 Z
12
+ date: 2012-08-02 00:00:00.000000000 Z
13
13
  dependencies: []
14
14
  description: gem receives a string and an array then obfuscates the string based on
15
15
  the array values and counts the frequency of array words in string