obscenity2 0.0.1 → 0.0.2

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
  SHA1:
3
- metadata.gz: dd43f7bf4b821f134b90ea3b4c41672695b4396d
4
- data.tar.gz: 7429ed434dd2ddb4eed940f95ffd116294cfc6c2
3
+ metadata.gz: c837c06c1a6840ed00d612ed2f42319a17796375
4
+ data.tar.gz: c7cb419fd2983acec215ffd34b4a6700d7215d1c
5
5
  SHA512:
6
- metadata.gz: 7934faf72083fd329ec38980106270a2070b9c8c73da6f5e7ff10fe06b3ec398c94f3a3a27f35301b873b1cbfd52cb2f9f1055895c2539a3f1d1ec6556d51663
7
- data.tar.gz: 4c7a8f8d574e837aa426861dde233ebc79ca2a55739c40dabda856a64a36c623e4b8c90754ef46cd41ee4cb73a03d97c1e3119055852f36401307a52d8966d65
6
+ metadata.gz: d2ce12acd7a6ddda1fe69481b5856561b23988be5dcf4bc0e134b2b6c27d2617d21703014285c45a83997afa419d99dce89e999b2a0bbc16536f96f0c5cb490a
7
+ data.tar.gz: b4d599092e3ff767f31121712d2b1e559a0b97db156faa7075095a1e2eab178f270d29b13612917dde990fd2740ecd5322bd9739dbbdb88bc51a7c9c97bd17c4
data/.travis.yml CHANGED
@@ -1,6 +1,7 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 1.9.2
4
3
  - 1.9.3
5
4
  - 2.0.0
6
- - rbx-19mode
5
+ - 2.1.0
6
+ - 2.2.0
7
+ - 2.3.0
data/README.md CHANGED
@@ -1,4 +1,6 @@
1
- # Obscenity [![Build Status](https://secure.travis-ci.org/tjackiw/obscenity.png)](http://travis-ci.org/tjackiw/obscenity)
1
+ # Obscenity
2
+
3
+ Due to the unmaintaince from the [obscenity][obscenity] gem, i fork and update to make it work with
2
4
 
3
5
  Obscenity is a profanity filter gem for Ruby/Rubinius, Rails (through ActiveModel), and Rack middleware.
4
6
 
@@ -7,7 +9,7 @@ Obscenity is a profanity filter gem for Ruby/Rubinius, Rails (through ActiveMode
7
9
  Add this line to your application's Gemfile:
8
10
 
9
11
  ```ruby
10
- gem 'obscenity'
12
+ gem 'obscenity2', require: 'obscenity'
11
13
  ```
12
14
 
13
15
  And then execute:
@@ -19,12 +21,12 @@ bundle install
19
21
  Or install it yourself as:
20
22
 
21
23
  ```ruby
22
- gem install obscenity
24
+ gem install obscenity2
23
25
  ```
24
26
 
25
27
  ## Compatibility
26
28
 
27
- Obscenity is compatible with Ruby 1.9.X, Ruby 2.0.X, Rubinius 1.9, Rails 3.X, and Rack as a middleware. Starting with Rails 3, the profanity validation works with any ORM supported by ActiveModel, e.g: ActiveRecord, MongoMapper, Mongoid, etc.
29
+ Obscenity is compatible with Ruby 1.9.X, Ruby 2.0.X, Rubinius 1.9, Rails 3.X, Rails 4.X and Rack as a middleware. Starting with Rails 3 and 4, the profanity validation works with any ORM supported by ActiveModel, e.g: ActiveRecord, MongoMapper, Mongoid, etc.
28
30
 
29
31
  ## Using Obscenity
30
32
 
@@ -86,7 +88,7 @@ Obscenity.sanitize("simple text")
86
88
  Obscenity.sanitize("text with shit")
87
89
  => "text with $@!#%"
88
90
  ```
89
-
91
+
90
92
  `Obscenity.replacement(style).sanitize(text)` allows you to pass the replacement method to be used when sanitizing the given content. Available replacement values are `:default`, `:garbled`, `:stars`, `:vowels`, and a custom string.
91
93
 
92
94
  ```ruby
@@ -123,7 +125,7 @@ Obscenity.offensive("text with shit and another biatch")
123
125
 
124
126
  The ActiveModel component provides easy profanity validation for your models.
125
127
 
126
- First, you need to explicitly require the ActiveModel component:
128
+ First, you need to explicitly require the ActiveModel component:
127
129
 
128
130
  ```ruby
129
131
  require 'obscenity/active_model'
@@ -134,7 +136,7 @@ Then you can use it in your models as such:
134
136
  ```ruby
135
137
  # ActiveRecord example
136
138
  class Post < ActiveRecord::Base
137
-
139
+
138
140
  validates :title, obscenity: true
139
141
  validates :body, obscenity: { sanitize: true, replacement: "[censored]" }
140
142
  end
@@ -276,7 +278,7 @@ user.username.should_not be_profane
276
278
  ```
277
279
 
278
280
  ## Contributing to obscenity
279
-
281
+
280
282
  * Check out the latest master to make sure the feature hasn't been implemented or the bug hasn't been fixed yet.
281
283
  * Check out the issue tracker to make sure someone already hasn't requested it and/or contributed it.
282
284
  * Fork the project.
@@ -288,8 +290,10 @@ user.username.should_not be_profane
288
290
  ## Authors
289
291
 
290
292
  * Thiago Jackiw: [@tjackiw](http://twitter.com/tjackiw)
293
+ * Minh Quy: [@MQuy90][MQuy90]
291
294
 
292
295
  ## Copyright
293
296
 
294
297
  Copyright (c) 2012 Thiago Jackiw. See LICENSE.txt for further details.
295
-
298
+ [obscenity]: https://github.com/tjackiw/obscenity
299
+ [MQuy90]: https://twitter.com/MQuy90
@@ -1,5 +1,5 @@
1
1
  module Obscenity
2
2
 
3
- VERSION = '0.0.1'
3
+ VERSION = '0.0.2'
4
4
 
5
5
  end
data/obscenity.gemspec CHANGED
@@ -7,11 +7,11 @@ Gem::Specification.new do |s|
7
7
  s.name = "obscenity2"
8
8
  s.version = Obscenity::VERSION
9
9
 
10
- s.authors = ["Thiago Jackiw"]
10
+ s.authors = ["Thiago Jackiw", 'Minh Quy']
11
11
  s.description = " Obscenity is a profanity filter gem for Ruby/Rubinius, Rails (through ActiveModel), and Rack middleware "
12
- s.email = "tjackiw@gmail.com"
12
+ s.email = "sugiacupit@gmail.com"
13
13
  s.files = `git ls-files`.split($/)
14
- s.homepage = "http://github.com/tjackiw/obscenity"
14
+ s.homepage = "http://github.com/MQuy/obscenity"
15
15
  s.licenses = ["MIT"]
16
16
  s.require_paths = ["lib"]
17
17
  s.summary = "Obscenity is a profanity filter gem for Ruby/Rubinius, Rails (through ActiveModel), and Rack middleware"
metadata CHANGED
@@ -1,10 +1,11 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: obscenity2
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thiago Jackiw
8
+ - Minh Quy
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
@@ -12,7 +13,7 @@ date: 2016-03-04 00:00:00.000000000 Z
12
13
  dependencies: []
13
14
  description: " Obscenity is a profanity filter gem for Ruby/Rubinius, Rails (through
14
15
  ActiveModel), and Rack middleware "
15
- email: tjackiw@gmail.com
16
+ email: sugiacupit@gmail.com
16
17
  executables: []
17
18
  extensions: []
18
19
  extra_rdoc_files: []
@@ -43,7 +44,7 @@ files:
43
44
  - test/test_obscenity.rb
44
45
  - test/test_rack.rb
45
46
  - test/test_version.rb
46
- homepage: http://github.com/tjackiw/obscenity
47
+ homepage: http://github.com/MQuy/obscenity
47
48
  licenses:
48
49
  - MIT
49
50
  metadata: {}