badwordgem 0.1.1
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 +7 -0
- data/.gitignore +8 -0
- data/.rubocop.yml +13 -0
- data/Gemfile +10 -0
- data/LICENSE.txt +21 -0
- data/README.md +39 -0
- data/Rakefile +8 -0
- data/badwordgem.gemspec +34 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/badlist.yml +165 -0
- data/lib/badwordgem/version.rb +5 -0
- data/lib/badwordgem.rb +27 -0
- metadata +56 -0
checksums.yaml
ADDED
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
---
|
|
2
|
+
SHA256:
|
|
3
|
+
metadata.gz: 409116c2229534f1e0a53a1410aaa13831d473222b6d1a759798cc8e1fba4b45
|
|
4
|
+
data.tar.gz: c3eb83fb56286c5d1b0f8605a1310352e9d89b051f48a09531a4ac9f069951c8
|
|
5
|
+
SHA512:
|
|
6
|
+
metadata.gz: 54833ccc08db79aa42bd8166825c386e3cbb696f7ff60c3afc0bcbe588c71804d28ea70224bca21c986657a831a906d3a9ec1248ddc12110b315d4de5bc0f5ec
|
|
7
|
+
data.tar.gz: 6ca84f80cb2696d8c3af1667bac3c555397e05622c530637eaeb050da3be06795314c7bf7fb5997db261ec9b5e72561ae6baa797c55cce6233ff85ba7391f2de
|
data/.gitignore
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
The MIT License (MIT)
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2022 mrwahl
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
|
13
|
+
all copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
# Badwordgem
|
|
2
|
+
|
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/badwordgem`. To experiment with that code, run `bin/console` for an interactive prompt.
|
|
4
|
+
|
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
Add this line to your application's Gemfile:
|
|
10
|
+
|
|
11
|
+
```ruby
|
|
12
|
+
gem 'badwordgem'
|
|
13
|
+
```
|
|
14
|
+
|
|
15
|
+
And then execute:
|
|
16
|
+
|
|
17
|
+
$ bundle install
|
|
18
|
+
|
|
19
|
+
Or install it yourself as:
|
|
20
|
+
|
|
21
|
+
$ gem install badwordgem
|
|
22
|
+
|
|
23
|
+
## Usage
|
|
24
|
+
|
|
25
|
+
TODO: Write usage instructions here
|
|
26
|
+
|
|
27
|
+
## Development
|
|
28
|
+
|
|
29
|
+
After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
30
|
+
|
|
31
|
+
To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
|
|
32
|
+
|
|
33
|
+
## Contributing
|
|
34
|
+
|
|
35
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/badwordgem.
|
|
36
|
+
|
|
37
|
+
## License
|
|
38
|
+
|
|
39
|
+
The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
|
data/Rakefile
ADDED
data/badwordgem.gemspec
ADDED
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "lib/badwordgem/version"
|
|
4
|
+
|
|
5
|
+
Gem::Specification.new do |spec|
|
|
6
|
+
spec.name = "badwordgem"
|
|
7
|
+
spec.version = Badwordgem::VERSION
|
|
8
|
+
spec.authors = ["mrwahl"]
|
|
9
|
+
spec.email = ["filipmunteanu2@gmail.com"]
|
|
10
|
+
|
|
11
|
+
spec.summary = "bad word filter."
|
|
12
|
+
spec.description = "bad word filter."
|
|
13
|
+
spec.homepage = "https://github.com/mrwahl/Custom-Gem"
|
|
14
|
+
spec.license = "MIT"
|
|
15
|
+
spec.required_ruby_version = ">= 2.6.0"
|
|
16
|
+
spec.metadata["homepage_uri"] = spec.homepage
|
|
17
|
+
|
|
18
|
+
|
|
19
|
+
# Specify which files should be added to the gem when it is released.
|
|
20
|
+
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
|
22
|
+
`git ls-files -z`.split("\x0").reject { |f| f.match(%r{\A(?:test|spec|features)/}) }
|
|
23
|
+
end
|
|
24
|
+
|
|
25
|
+
spec.bindir = "exe"
|
|
26
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
|
27
|
+
spec.require_paths = ["lib"]
|
|
28
|
+
|
|
29
|
+
# Uncomment to register a new dependency of your gem
|
|
30
|
+
# spec.add_dependency "example-gem", "~> 1.0"
|
|
31
|
+
|
|
32
|
+
# For more information and examples about making a new gem, checkout our
|
|
33
|
+
# guide at: https://bundler.io/guides/creating_gem.html
|
|
34
|
+
end
|
data/bin/console
ADDED
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
#!/usr/bin/env ruby
|
|
2
|
+
# frozen_string_literal: true
|
|
3
|
+
|
|
4
|
+
require "bundler/setup"
|
|
5
|
+
require "badwordgem"
|
|
6
|
+
|
|
7
|
+
# You can add fixtures and/or initialization code here to make experimenting
|
|
8
|
+
# with your gem easier. You can also use a different console, if you like.
|
|
9
|
+
|
|
10
|
+
# (If you use this, don't forget to add pry to your Gemfile!)
|
|
11
|
+
# require "pry"
|
|
12
|
+
# Pry.start
|
|
13
|
+
|
|
14
|
+
require "irb"
|
|
15
|
+
IRB.start(__FILE__)
|
data/bin/setup
ADDED
data/lib/badlist.yml
ADDED
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
ass: "***"
|
|
2
|
+
asses: "*****"
|
|
3
|
+
asshole: "*******"
|
|
4
|
+
assholes: "********"
|
|
5
|
+
bastard: "*******"
|
|
6
|
+
bitch: "*****"
|
|
7
|
+
bitches: "*******"
|
|
8
|
+
bitchin: "*******"
|
|
9
|
+
bitching: "********"
|
|
10
|
+
blowjob: "*******"
|
|
11
|
+
blowjobs: "********"
|
|
12
|
+
bullshit: "********"
|
|
13
|
+
clit: "****"
|
|
14
|
+
cock: "****"
|
|
15
|
+
cocks: "*****"
|
|
16
|
+
cocksuck: "********"
|
|
17
|
+
cocksucked: "**********"
|
|
18
|
+
cocksucker: "**********"
|
|
19
|
+
cocksucking: "***********"
|
|
20
|
+
cocksucks: "*********"
|
|
21
|
+
cum: "***"
|
|
22
|
+
cummer: "******"
|
|
23
|
+
cumming: "*******"
|
|
24
|
+
cums: "****"
|
|
25
|
+
cumshot: "*******"
|
|
26
|
+
cunt: "****"
|
|
27
|
+
cuntlick: "********"
|
|
28
|
+
cuntlicker: "**********"
|
|
29
|
+
cuntlicking: "***********"
|
|
30
|
+
cunts: "*****"
|
|
31
|
+
dildo: "*****"
|
|
32
|
+
dildos: "******"
|
|
33
|
+
dick: "****"
|
|
34
|
+
ejaculate: "*********"
|
|
35
|
+
ejaculated: "**********"
|
|
36
|
+
ejaculates: "**********"
|
|
37
|
+
ejaculating: "***********"
|
|
38
|
+
ejaculatings: "************"
|
|
39
|
+
ejaculation: "***********"
|
|
40
|
+
fag: "***"
|
|
41
|
+
fagging: "*******"
|
|
42
|
+
faggot: "******"
|
|
43
|
+
faggs: "*****"
|
|
44
|
+
fagot: "*****"
|
|
45
|
+
fagots: "******"
|
|
46
|
+
fags: "****"
|
|
47
|
+
fingerfuck: "**********"
|
|
48
|
+
fingerfucked: "************"
|
|
49
|
+
fingerfucker: "************"
|
|
50
|
+
fingerfuckers: "*************"
|
|
51
|
+
fingerfucking: "*************"
|
|
52
|
+
fingerfucks: "***********"
|
|
53
|
+
fistfuck: "********"
|
|
54
|
+
fistfucked: "**********"
|
|
55
|
+
fistfucker: "**********"
|
|
56
|
+
fistfuckers: "***********"
|
|
57
|
+
fistfucking: "***********"
|
|
58
|
+
fistfuckings: "************"
|
|
59
|
+
fistfucks: "*********"
|
|
60
|
+
fuck: "****"
|
|
61
|
+
fucked: "******"
|
|
62
|
+
fucker: "******"
|
|
63
|
+
fuckers: "*******"
|
|
64
|
+
fuckin: "******"
|
|
65
|
+
fucking: "*******"
|
|
66
|
+
fuckings: "********"
|
|
67
|
+
fuckme: "******"
|
|
68
|
+
fucks: "*****"
|
|
69
|
+
fuk: "***"
|
|
70
|
+
fuks: "****"
|
|
71
|
+
gangbang: "********"
|
|
72
|
+
gangbanged: "**********"
|
|
73
|
+
gangbangs: "*********"
|
|
74
|
+
gaysex: "******"
|
|
75
|
+
hardcoresex: "***********"
|
|
76
|
+
horniest: "********"
|
|
77
|
+
horny: "*****"
|
|
78
|
+
hotsex: "******"
|
|
79
|
+
jism: "****"
|
|
80
|
+
jiz: "***"
|
|
81
|
+
jizm: "****"
|
|
82
|
+
kock: "****"
|
|
83
|
+
kondum: "******"
|
|
84
|
+
kondums: "*******"
|
|
85
|
+
kum: "***"
|
|
86
|
+
kumer: "*****"
|
|
87
|
+
kummer: "******"
|
|
88
|
+
kumming: "*******"
|
|
89
|
+
mothafuck: "*********"
|
|
90
|
+
mothafucka: "**********"
|
|
91
|
+
mothafuckas: "***********"
|
|
92
|
+
mothafuckaz: "***********"
|
|
93
|
+
mothafucked: "***********"
|
|
94
|
+
mothafucker: "***********"
|
|
95
|
+
mothafuckers: "************"
|
|
96
|
+
mothafuckin: "***********"
|
|
97
|
+
mothafucking: "************"
|
|
98
|
+
mothafuckings: "*************"
|
|
99
|
+
mothafucks: "**********"
|
|
100
|
+
motherfuck: "**********"
|
|
101
|
+
motherfucked: "************"
|
|
102
|
+
motherfucker: "************"
|
|
103
|
+
motherfuckers: "*************"
|
|
104
|
+
motherfuckin: "************"
|
|
105
|
+
motherfucking: "*************"
|
|
106
|
+
motherfuckings: "**************"
|
|
107
|
+
motherfucks: "***********"
|
|
108
|
+
niger: "*****"
|
|
109
|
+
nigger: "******"
|
|
110
|
+
niggers: "*******"
|
|
111
|
+
orgasim: "*******"
|
|
112
|
+
orgasims: "********"
|
|
113
|
+
orgasm: "******"
|
|
114
|
+
orgasms: "*******"
|
|
115
|
+
phonesex: "********"
|
|
116
|
+
phuk: "****"
|
|
117
|
+
phuked: "******"
|
|
118
|
+
phuking: "*******"
|
|
119
|
+
phukked: "*******"
|
|
120
|
+
phukking: "********"
|
|
121
|
+
phuks: "*****"
|
|
122
|
+
phuq: "****"
|
|
123
|
+
pis: "***"
|
|
124
|
+
piss: "****"
|
|
125
|
+
pisser: "******"
|
|
126
|
+
pissed: "******"
|
|
127
|
+
pisser: "******"
|
|
128
|
+
pissers: "*******"
|
|
129
|
+
pises: "*****"
|
|
130
|
+
pisses: "******"
|
|
131
|
+
pisin: "*****"
|
|
132
|
+
pissin: "******"
|
|
133
|
+
pising: "******"
|
|
134
|
+
pissing: "*******"
|
|
135
|
+
pisof: "*****"
|
|
136
|
+
pissoff: "*******"
|
|
137
|
+
porn: "****"
|
|
138
|
+
porno: "*****"
|
|
139
|
+
pornography: "***********"
|
|
140
|
+
pornos: "******"
|
|
141
|
+
prick: "*****"
|
|
142
|
+
pricks: "******"
|
|
143
|
+
pussies: "*******"
|
|
144
|
+
pusies: "******"
|
|
145
|
+
pussy: "*****"
|
|
146
|
+
pusy: "****"
|
|
147
|
+
pussys: "******"
|
|
148
|
+
pusys: "*****"
|
|
149
|
+
shit: "****"
|
|
150
|
+
shited: "******"
|
|
151
|
+
shitfull: "********"
|
|
152
|
+
shiting: "*******"
|
|
153
|
+
shitings: "********"
|
|
154
|
+
shits: "*****"
|
|
155
|
+
shitted: "*******"
|
|
156
|
+
shitter: "******"
|
|
157
|
+
shitters: "********"
|
|
158
|
+
shitting: "********"
|
|
159
|
+
shittings: "*********"
|
|
160
|
+
shitty: "******"
|
|
161
|
+
shity: "*****"
|
|
162
|
+
slut: "****"
|
|
163
|
+
sluts: "*****"
|
|
164
|
+
spunk: "*****"
|
|
165
|
+
twat: "****"
|
data/lib/badwordgem.rb
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
# frozen_string_literal: true
|
|
2
|
+
|
|
3
|
+
require_relative "badwordgem/version"
|
|
4
|
+
require 'yaml' #this will need to use the badlist.yml file
|
|
5
|
+
module Badwordgem
|
|
6
|
+
class Error < StandardError; end
|
|
7
|
+
|
|
8
|
+
class Base
|
|
9
|
+
class << self # assign class to itself so self does not need to be used for every method
|
|
10
|
+
|
|
11
|
+
def badlist
|
|
12
|
+
@badlist ||= YAML.load_file(File.expand_path("badlist.yml", __dir__)) # This will load in the bad words from our YML file and it will assign it to the badlist variable
|
|
13
|
+
end
|
|
14
|
+
|
|
15
|
+
def sanitize(input = "hello") # method to take in user input to check for profanity
|
|
16
|
+
word = input.downcase # It will change the user input and set it to lowercase to match our bad list of words
|
|
17
|
+
badlist.each do |key, value| # For every word in the badlist assign it a key(a bad word), and a value(then replace the bad work with * symbol)
|
|
18
|
+
word.gsub!(/\b#{key}\b/, value) # For each word the user has inputed replace the old word(key) with the new word(value)
|
|
19
|
+
end
|
|
20
|
+
word # return the word whether it contains profanity or not
|
|
21
|
+
end
|
|
22
|
+
|
|
23
|
+
end
|
|
24
|
+
end
|
|
25
|
+
|
|
26
|
+
|
|
27
|
+
end
|
metadata
ADDED
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
|
2
|
+
name: badwordgem
|
|
3
|
+
version: !ruby/object:Gem::Version
|
|
4
|
+
version: 0.1.1
|
|
5
|
+
platform: ruby
|
|
6
|
+
authors:
|
|
7
|
+
- mrwahl
|
|
8
|
+
autorequire:
|
|
9
|
+
bindir: exe
|
|
10
|
+
cert_chain: []
|
|
11
|
+
date: 2022-03-31 00:00:00.000000000 Z
|
|
12
|
+
dependencies: []
|
|
13
|
+
description: bad word filter.
|
|
14
|
+
email:
|
|
15
|
+
- filipmunteanu2@gmail.com
|
|
16
|
+
executables: []
|
|
17
|
+
extensions: []
|
|
18
|
+
extra_rdoc_files: []
|
|
19
|
+
files:
|
|
20
|
+
- ".gitignore"
|
|
21
|
+
- ".rubocop.yml"
|
|
22
|
+
- Gemfile
|
|
23
|
+
- LICENSE.txt
|
|
24
|
+
- README.md
|
|
25
|
+
- Rakefile
|
|
26
|
+
- badwordgem.gemspec
|
|
27
|
+
- bin/console
|
|
28
|
+
- bin/setup
|
|
29
|
+
- lib/badlist.yml
|
|
30
|
+
- lib/badwordgem.rb
|
|
31
|
+
- lib/badwordgem/version.rb
|
|
32
|
+
homepage: https://github.com/mrwahl/Custom-Gem
|
|
33
|
+
licenses:
|
|
34
|
+
- MIT
|
|
35
|
+
metadata:
|
|
36
|
+
homepage_uri: https://github.com/mrwahl/Custom-Gem
|
|
37
|
+
post_install_message:
|
|
38
|
+
rdoc_options: []
|
|
39
|
+
require_paths:
|
|
40
|
+
- lib
|
|
41
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
|
42
|
+
requirements:
|
|
43
|
+
- - ">="
|
|
44
|
+
- !ruby/object:Gem::Version
|
|
45
|
+
version: 2.6.0
|
|
46
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
|
+
requirements:
|
|
48
|
+
- - ">="
|
|
49
|
+
- !ruby/object:Gem::Version
|
|
50
|
+
version: '0'
|
|
51
|
+
requirements: []
|
|
52
|
+
rubygems_version: 3.2.32
|
|
53
|
+
signing_key:
|
|
54
|
+
specification_version: 4
|
|
55
|
+
summary: bad word filter.
|
|
56
|
+
test_files: []
|