cf-swearjar 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
data/cf-swearjar.gemspec CHANGED
@@ -6,8 +6,8 @@ Gem::Specification.new do |s|
6
6
  s.name = 'cf-swearjar'
7
7
  s.version = Swearjar::VERSION
8
8
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
9
- s.authors = ["Joshua Hull"]
10
- s.summary = "Put another nickel in the swearjar. Simple profanity detection with content analysis"
9
+ s.authors = ["Joshua Hull, Matthew Gordon"]
10
+ s.summary = "Put another nickel in the swearjar. Simple profanity detection with content analysis. Fork of Joshua Hull's swearjar with some additional functionality."
11
11
  s.description = "#{s.summary}."
12
12
  s.email = %q{joshbuddy@gmail.com}
13
13
  s.extra_rdoc_files = ['README.rdoc']
@@ -1,3 +1,3 @@
1
1
  class Swearjar
2
- VERSION = '1.0.1'
2
+ VERSION = '1.0.2'
3
3
  end
data/lib/swearjar.rb CHANGED
@@ -47,6 +47,13 @@ class Swearjar
47
47
  return false
48
48
  end
49
49
 
50
+ def list_profanities(string)
51
+ profanities = []
52
+ string = string.to_s
53
+ scan(string) {|word, test| profanities << word if test }
54
+ profanities
55
+ end
56
+
50
57
  def scorecard(string)
51
58
  string = string.to_s
52
59
  scorecard = {}
@@ -60,4 +67,4 @@ class Swearjar
60
67
  censored_string
61
68
  end
62
69
 
63
- end
70
+ end
metadata CHANGED
@@ -1,11 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: cf-swearjar
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.1
4
+ version: 1.0.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
8
- - Joshua Hull
8
+ - Joshua Hull, Matthew Gordon
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
@@ -60,7 +60,7 @@ dependencies:
60
60
  - !ruby/object:Gem::Version
61
61
  version: 1.3.0
62
62
  description: Put another nickel in the swearjar. Simple profanity detection with content
63
- analysis.
63
+ analysis. Fork of Joshua Hull's swearjar with some additional functionality..
64
64
  email: joshbuddy@gmail.com
65
65
  executables: []
66
66
  extensions: []
@@ -105,7 +105,7 @@ rubygems_version: 1.8.24
105
105
  signing_key:
106
106
  specification_version: 3
107
107
  summary: Put another nickel in the swearjar. Simple profanity detection with content
108
- analysis
108
+ analysis. Fork of Joshua Hull's swearjar with some additional functionality.
109
109
  test_files:
110
110
  - spec/data/swear.yml
111
111
  - spec/spec.opts