ProfanityWordsFilter 0.1.0
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/.rspec +3 -0
- data/.rubocop.yml +13 -0
- data/Gemfile +12 -0
- data/Gemfile.lock +55 -0
- data/ProfanityWordsFilter.gemspec +30 -0
- data/README.md +19 -0
- data/Rakefile +12 -0
- data/bin/console +15 -0
- data/bin/setup +8 -0
- data/lib/ProfanityWordsFilter/version.rb +5 -0
- data/lib/ProfanityWordsFilter.rb +22 -0
- metadata +54 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 50d75860f693e6b591b135cd527c5db87778a6258094e459eff8fc6c1b19fc57
|
4
|
+
data.tar.gz: d371a5c11b75bdf98ba4d8c165fca2851d3a73827d6f6ee9da7e169edcf2354f
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: f6f077717f0fd3a8ecd2e0cb185a5902a588e86332484f22edfd7b04acb5b11280c5f58212b9872d0d5b347a468f16682933062d75710602ee4c36c562e4a67f
|
7
|
+
data.tar.gz: b54d14ba15a844214103a7caf82343f480917683421fc1a12d9cf27868c7dc08819202e73f5b7d23c0131b4028330d7b2594c1fec3c8e01d5e39211bdddcc476
|
data/.rspec
ADDED
data/.rubocop.yml
ADDED
data/Gemfile
ADDED
data/Gemfile.lock
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
ProfanityWordsFilter (0.1.0)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
diff-lcs (1.4.4)
|
11
|
+
parallel (1.20.1)
|
12
|
+
parser (3.0.2.0)
|
13
|
+
ast (~> 2.4.1)
|
14
|
+
rainbow (3.0.0)
|
15
|
+
rake (13.0.6)
|
16
|
+
regexp_parser (2.1.1)
|
17
|
+
rexml (3.2.5)
|
18
|
+
rspec (3.10.0)
|
19
|
+
rspec-core (~> 3.10.0)
|
20
|
+
rspec-expectations (~> 3.10.0)
|
21
|
+
rspec-mocks (~> 3.10.0)
|
22
|
+
rspec-core (3.10.1)
|
23
|
+
rspec-support (~> 3.10.0)
|
24
|
+
rspec-expectations (3.10.1)
|
25
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
26
|
+
rspec-support (~> 3.10.0)
|
27
|
+
rspec-mocks (3.10.2)
|
28
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
29
|
+
rspec-support (~> 3.10.0)
|
30
|
+
rspec-support (3.10.2)
|
31
|
+
rubocop (1.20.0)
|
32
|
+
parallel (~> 1.10)
|
33
|
+
parser (>= 3.0.0.0)
|
34
|
+
rainbow (>= 2.2.2, < 4.0)
|
35
|
+
regexp_parser (>= 1.8, < 3.0)
|
36
|
+
rexml
|
37
|
+
rubocop-ast (>= 1.9.1, < 2.0)
|
38
|
+
ruby-progressbar (~> 1.7)
|
39
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
40
|
+
rubocop-ast (1.11.0)
|
41
|
+
parser (>= 3.0.1.1)
|
42
|
+
ruby-progressbar (1.11.0)
|
43
|
+
unicode-display_width (2.0.0)
|
44
|
+
|
45
|
+
PLATFORMS
|
46
|
+
x64-mingw32
|
47
|
+
|
48
|
+
DEPENDENCIES
|
49
|
+
ProfanityWordsFilter!
|
50
|
+
rake (~> 13.0)
|
51
|
+
rspec (~> 3.0)
|
52
|
+
rubocop (~> 1.7)
|
53
|
+
|
54
|
+
BUNDLED WITH
|
55
|
+
2.2.27
|
@@ -0,0 +1,30 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "lib/ProfanityWordsFilter/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |spec|
|
6
|
+
spec.name = "ProfanityWordsFilter"
|
7
|
+
spec.version = ProfanityWordsFilter::VERSION
|
8
|
+
spec.authors = ["grigordanut"]
|
9
|
+
spec.email = ["danut.grigor@gmail.com"]
|
10
|
+
spec.date = '2021-09-05'
|
11
|
+
spec.summary = "Replacing letters from profanity words with hashed letters.."
|
12
|
+
spec.description = "Profanity Words Filter."
|
13
|
+
spec.homepage = "https://github.com/grigordanut/Profanity-Words-Filter-Gem"
|
14
|
+
spec.files = ["lib/ProfanityWordsFilter.rb"]
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
# spec.metadata["allowed_push_host"] = "https://github.com/grigordanut/Profanity-Words-Filter-Gem"
|
18
|
+
|
19
|
+
# spec.metadata["homepage_uri"] = spec.homepage
|
20
|
+
|
21
|
+
spec.files = Dir.chdir(File.expand_path(__dir__)) do
|
22
|
+
`git ls-files -z`.split("\x0").reject do |f|
|
23
|
+
(f == __FILE__) || f.match(%r{\A(?:(?:test|spec|features)/|\.(?:git|travis|circleci)|appveyor)})
|
24
|
+
end
|
25
|
+
end
|
26
|
+
spec.bindir = "exe"
|
27
|
+
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
28
|
+
spec.require_paths = ["lib"]
|
29
|
+
|
30
|
+
end
|
data/README.md
ADDED
@@ -0,0 +1,19 @@
|
|
1
|
+
# ProfanityWordsFilter
|
2
|
+
|
3
|
+
Welcome to ProfanityWordsFilter 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/ProfanityWordsFilter`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
## Installation
|
6
|
+
|
7
|
+
Add this line to your application's Gemfile:
|
8
|
+
|
9
|
+
```ruby
|
10
|
+
gem 'ProfanityWordsFilter'
|
11
|
+
```
|
12
|
+
|
13
|
+
And then execute:
|
14
|
+
|
15
|
+
$ bundle install
|
16
|
+
|
17
|
+
Or install it yourself as:
|
18
|
+
|
19
|
+
$ gem install ProfanityWordsFilter
|
data/Rakefile
ADDED
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 "ProfanityWordsFilter"
|
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
@@ -0,0 +1,22 @@
|
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
require_relative "ProfanityWordsFilter/version"
|
4
|
+
|
5
|
+
module ProfanityWordsFilter
|
6
|
+
class Error < StandardError; end
|
7
|
+
def self.check(input)
|
8
|
+
|
9
|
+
downcase = input.downcase
|
10
|
+
|
11
|
+
swear_words = {'fuck' => 'f**k', 'feck' => 'f**k', 'bitch' => 'b**ch',
|
12
|
+
'dick' => 'd**k', 'shit' => 's**t'}
|
13
|
+
|
14
|
+
swear_words.each do |word, clean|
|
15
|
+
downcase.gsub!(word,clean)
|
16
|
+
end
|
17
|
+
|
18
|
+
puts downcase
|
19
|
+
return downcase
|
20
|
+
|
21
|
+
end
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ProfanityWordsFilter
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- grigordanut
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2021-09-05 00:00:00.000000000 Z
|
12
|
+
dependencies: []
|
13
|
+
description: Profanity Words Filter.
|
14
|
+
email:
|
15
|
+
- danut.grigor@gmail.com
|
16
|
+
executables: []
|
17
|
+
extensions: []
|
18
|
+
extra_rdoc_files: []
|
19
|
+
files:
|
20
|
+
- ".rspec"
|
21
|
+
- ".rubocop.yml"
|
22
|
+
- Gemfile
|
23
|
+
- Gemfile.lock
|
24
|
+
- ProfanityWordsFilter.gemspec
|
25
|
+
- README.md
|
26
|
+
- Rakefile
|
27
|
+
- bin/console
|
28
|
+
- bin/setup
|
29
|
+
- lib/ProfanityWordsFilter.rb
|
30
|
+
- lib/ProfanityWordsFilter/version.rb
|
31
|
+
homepage: https://github.com/grigordanut/Profanity-Words-Filter-Gem
|
32
|
+
licenses:
|
33
|
+
- MIT
|
34
|
+
metadata: {}
|
35
|
+
post_install_message:
|
36
|
+
rdoc_options: []
|
37
|
+
require_paths:
|
38
|
+
- lib
|
39
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
40
|
+
requirements:
|
41
|
+
- - ">="
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
44
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
45
|
+
requirements:
|
46
|
+
- - ">="
|
47
|
+
- !ruby/object:Gem::Version
|
48
|
+
version: '0'
|
49
|
+
requirements: []
|
50
|
+
rubygems_version: 3.1.4
|
51
|
+
signing_key:
|
52
|
+
specification_version: 4
|
53
|
+
summary: Replacing letters from profanity words with hashed letters..
|
54
|
+
test_files: []
|