profanity-filter 0.1.2 → 0.1.3

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
  SHA256:
3
- metadata.gz: 1c78c899f8f1da711b4cca3613a07adba89df1d7c65344ccbb6fe8f870e08ee2
4
- data.tar.gz: 054ce0c2c328f6168aec1d67f87b18e2b06188a27848caf4fb2e555a1ddc3e72
3
+ metadata.gz: 2577d7d8d090b82467c6d2f002067d3d41d2e779f7e31b5813ce3709ff13b09a
4
+ data.tar.gz: a9644450904f18d2261b8d86a4be3696dd4e675d9a4fb87fefa7d6ee98ec47c2
5
5
  SHA512:
6
- metadata.gz: cb09a69cf5cbecca79893b1f0143b722b039069cca945f678a1d92fff6a01f0c7a7b1c2760a480eba62a6c1c7f470f59636d5b063587d70bdbfb56096a44e729
7
- data.tar.gz: 7c816d8f0efd42d33fb36aa9195f8a4b4948eb545a78d824d8d17cee592687c180a73c1a026a3c6053630915c556d179c4b9d7b54ffe1e079cde734d2226de89
6
+ metadata.gz: 189dab97e9065eed4da6ff0013dad4d63234ef271ac5cb31f16dd4a1631558e76a21b4bd4614b15191156ee643007948f3422ff88eb108827d7ac63e453b5e81
7
+ data.tar.gz: 2ece6bd1a9910ef30c969c85e266ccec7ec128395b649e0386feb18db10d52926be7a94ce4fd911995981088f37c34e1e91f9acb866e2769fbbf906e21c3f4ff
data/Gemfile CHANGED
@@ -1,4 +1,3 @@
1
1
  source "https://rubygems.org"
2
2
 
3
- # Specify your gem's dependencies in profanity_filter.gemspec
4
3
  gemspec
@@ -1,14 +1,14 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- profanity-filter (0.1.1)
4
+ profanity-filter (0.1.2)
5
5
  webpurify
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  coderay (1.1.2)
11
- json (2.2.0)
11
+ json (2.1.0)
12
12
  method_source (0.9.2)
13
13
  minitest (5.11.3)
14
14
  pry (0.12.2)
data/README.md CHANGED
@@ -1,9 +1,3 @@
1
- # ProfanityFilter
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/profanity-filter`. 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
1
  ## Installation
8
2
 
9
3
  Add this line to your application's Gemfile:
@@ -26,7 +20,7 @@ Or install it yourself as:
26
20
  # without WebPurify
27
21
  pf = ProfanityFilter.new
28
22
  # with WebPurify
29
- pf = ProfanityFilter.new(webpurify_api_key: [YOUR-API-KEY])
23
+ pf = ProfanityFilter.new(web_purifier_api_key: [YOUR-API-KEY])
30
24
 
31
25
  pf.profane? ('ssssshit')
32
26
  # => true
@@ -51,4 +45,4 @@ The gem is available as open source under the terms of the [MIT License](https:/
51
45
 
52
46
  ## Code of Conduct
53
47
 
54
- Everyone interacting in the ProfanityFilter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/[USERNAME]/profanity_filter/blob/master/CODE_OF_CONDUCT.md).
48
+ Everyone interacting in the ProfanityFilter project’s codebases, issue trackers, chat rooms and mailing lists is expected to follow the [code of conduct](https://github.com/cardinalblue/profanity-filter/blob/master/CODE_OF_CONDUCT.md).
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require "bundler/setup"
4
- require "profanity_filter"
4
+ require "profanity-filter"
5
5
 
6
6
  require "pry"
7
7
  Pry.start
@@ -1,11 +1,11 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require 'profanity_filter/version'
4
- require 'profanity_filter/engines/composite'
5
- require 'profanity_filter/engines/partial_match_strategy'
6
- require 'profanity_filter/engines/allow_duplicate_characters_strategy'
7
- require 'profanity_filter/engines/allow_symbols_in_words_strategy'
8
- require 'profanity_filter/engines/leet_exact_match_strategy'
3
+ require 'profanity-filter/version'
4
+ require 'profanity-filter/engines/composite'
5
+ require 'profanity-filter/engines/partial_match_strategy'
6
+ require 'profanity-filter/engines/allow_duplicate_characters_strategy'
7
+ require 'profanity-filter/engines/allow_symbols_in_words_strategy'
8
+ require 'profanity-filter/engines/leet_exact_match_strategy'
9
9
  require 'web_purify'
10
10
 
11
11
  class ProfanityFilter
@@ -140,7 +140,7 @@ class ProfanityFilter
140
140
 
141
141
  def load_dictionary(file_path)
142
142
  dir = File.dirname(__FILE__)
143
- YAML.load(File.read("#{dir}/profanity_dictionaries/#{file_path}.yaml"))
143
+ YAML.load(File.read("#{dir}/profanity-dictionaries/#{file_path}.yaml"))
144
144
  end
145
145
 
146
146
  def load_exact_match_dictionary
@@ -23,7 +23,7 @@ module ProfanityFilterEngine
23
23
 
24
24
  def build_leet_dictionary
25
25
  lib_dir = File.expand_path('../../../', __FILE__)
26
- file = File.read("#{lib_dir}/profanity_dictionaries/leet_strategy_dictionary.yaml")
26
+ file = File.read("#{lib_dir}/profanity-dictionaries/leet_strategy_dictionary.yaml")
27
27
  raw_data = YAML.safe_load(file)
28
28
  dict = transform_data_to_regex(raw_data)
29
29
  ::ProfanityFilterEngine::LeetExactMatchStrategy.const_set('LEET_DICTIONARY', dict)
@@ -1,3 +1,3 @@
1
1
  class ProfanityFilter
2
- VERSION = "0.1.2"
2
+ VERSION = "0.1.3"
3
3
  end
@@ -1,6 +1,6 @@
1
1
  lib = File.expand_path('lib', __dir__)
2
2
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'profanity_filter/version'
3
+ require 'profanity-filter/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
6
  spec.name = 'profanity-filter'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: profanity-filter
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Maso Lin
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-07-09 00:00:00.000000000 Z
12
+ date: 2019-07-10 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: webpurify
@@ -116,22 +116,22 @@ files:
116
116
  - Rakefile
117
117
  - bin/console
118
118
  - bin/setup
119
- - lib/profanity_dictionaries/en.yaml
120
- - lib/profanity_dictionaries/es.yaml
121
- - lib/profanity_dictionaries/leet_strategy_dictionary.yaml
122
- - lib/profanity_dictionaries/partial_match.yaml
123
- - lib/profanity_dictionaries/pt.yaml
124
- - lib/profanity_filter.rb
125
- - lib/profanity_filter/engines/allow_duplicate_characters_strategy.rb
126
- - lib/profanity_filter/engines/allow_symbols_in_words_strategy.rb
127
- - lib/profanity_filter/engines/component.rb
128
- - lib/profanity_filter/engines/composite.rb
129
- - lib/profanity_filter/engines/exact_match_strategy.rb
130
- - lib/profanity_filter/engines/leet_exact_match_strategy.rb
131
- - lib/profanity_filter/engines/partial_match_strategy.rb
132
- - lib/profanity_filter/engines/regexp_strategy.rb
133
- - lib/profanity_filter/version.rb
134
- - profanity_filter.gemspec
119
+ - lib/profanity-dictionaries/en.yaml
120
+ - lib/profanity-dictionaries/es.yaml
121
+ - lib/profanity-dictionaries/leet_strategy_dictionary.yaml
122
+ - lib/profanity-dictionaries/partial_match.yaml
123
+ - lib/profanity-dictionaries/pt.yaml
124
+ - lib/profanity-filter.rb
125
+ - lib/profanity-filter/engines/allow_duplicate_characters_strategy.rb
126
+ - lib/profanity-filter/engines/allow_symbols_in_words_strategy.rb
127
+ - lib/profanity-filter/engines/component.rb
128
+ - lib/profanity-filter/engines/composite.rb
129
+ - lib/profanity-filter/engines/exact_match_strategy.rb
130
+ - lib/profanity-filter/engines/leet_exact_match_strategy.rb
131
+ - lib/profanity-filter/engines/partial_match_strategy.rb
132
+ - lib/profanity-filter/engines/regexp_strategy.rb
133
+ - lib/profanity-filter/version.rb
134
+ - profanity-filter.gemspec
135
135
  homepage: https://github.com/cardinalblue/profanity-filter
136
136
  licenses:
137
137
  - MIT