ciuchcia 0.0.3 → 0.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/README.txt +4 -7
- data/Rakefile +1 -3
- data/lib/ciuchcia/profanity.rb +8 -3
- data/lib/ciuchcia.rb +1 -1
- data/tasks/rubyforge.rake +1 -0
- metadata +5 -14
data/README.txt
CHANGED
@@ -6,14 +6,11 @@ ciuchcia
|
|
6
6
|
|
7
7
|
Library for rails apps polonization.
|
8
8
|
|
9
|
-
==
|
10
|
-
|
11
|
-
|
12
|
-
http://ciuchcia.rubyforge.org/
|
13
|
-
== REQUIREMENTS:
|
14
|
-
http://ciuchcia.rubyforge.org/
|
9
|
+
== WHAT IS IT ALL ABOUT
|
10
|
+
http://community.programuj.com/p/comboy/Ciuchcia
|
11
|
+
|
15
12
|
== INSTALL:
|
16
|
-
|
13
|
+
gem intall ciuchcia
|
17
14
|
|
18
15
|
== LICENSE:
|
19
16
|
|
data/Rakefile
CHANGED
@@ -13,11 +13,9 @@ PROJ.name = 'ciuchcia'
|
|
13
13
|
PROJ.version = Ciuchcia::VERSION
|
14
14
|
PROJ.authors = 'Kacper Cieśla'
|
15
15
|
PROJ.email = 'kacper.ciesla@gmail.com'
|
16
|
-
PROJ.url = '
|
16
|
+
PROJ.url = 'http://community.programuj.com/p/comboy/Ciuchcia'
|
17
17
|
PROJ.rubyforge.name = 'ciuchcia'
|
18
18
|
|
19
19
|
PROJ.spec.opts << '--color'
|
20
20
|
|
21
|
-
depend_on 'rails'
|
22
|
-
|
23
21
|
# EOF
|
data/lib/ciuchcia/profanity.rb
CHANGED
@@ -17,8 +17,12 @@ module Ciuchcia
|
|
17
17
|
vulgar_words.include? word
|
18
18
|
end
|
19
19
|
|
20
|
-
def self.check(text)
|
21
|
-
|
20
|
+
def self.check(text)
|
21
|
+
# (c) f
|
22
|
+
co_za_sraka = $KCODE
|
23
|
+
|
24
|
+
$KCODE="NONE"
|
25
|
+
|
22
26
|
nw = '[^A-Za-z0-9]'
|
23
27
|
utf_letters = "\352\363\261\266\263\277\274\346\361".split('')
|
24
28
|
ascii_letters = "eoaslzzcn".split('')
|
@@ -37,8 +41,9 @@ module Ciuchcia
|
|
37
41
|
regexp_string = "(#{nw}|^)"+word.split('').map {|l| "#{utf_or_ascii.call l}+"}.join("#{nw}*")+"(#{nw}|$)"
|
38
42
|
regexp = Regexp.new regexp_string,'i'
|
39
43
|
m = text.match regexp
|
40
|
-
return m[0].strip if m
|
44
|
+
$KCODE = co_za_sraka and return m[0].strip if m
|
41
45
|
end
|
46
|
+
$KCODE = co_za_sraka
|
42
47
|
false
|
43
48
|
end
|
44
49
|
|
data/lib/ciuchcia.rb
CHANGED
data/tasks/rubyforge.rake
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ciuchcia
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- "Kacper Cie\xC5\x9Bla"
|
@@ -9,19 +9,10 @@ autorequire:
|
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
|
12
|
-
date: 2008-09-
|
12
|
+
date: 2008-09-15 00:00:00 +02:00
|
13
13
|
default_executable:
|
14
|
-
dependencies:
|
15
|
-
|
16
|
-
name: rails
|
17
|
-
type: :runtime
|
18
|
-
version_requirement:
|
19
|
-
version_requirements: !ruby/object:Gem::Requirement
|
20
|
-
requirements:
|
21
|
-
- - ">="
|
22
|
-
- !ruby/object:Gem::Version
|
23
|
-
version: 2.1.0
|
24
|
-
version:
|
14
|
+
dependencies: []
|
15
|
+
|
25
16
|
description: Library for rails apps polonization.
|
26
17
|
email: kacper.ciesla@gmail.com
|
27
18
|
executables: []
|
@@ -61,7 +52,7 @@ files:
|
|
61
52
|
- tasks/test.rake
|
62
53
|
- test/test_ciuchcia.rb
|
63
54
|
has_rdoc: true
|
64
|
-
homepage:
|
55
|
+
homepage: http://community.programuj.com/p/comboy/Ciuchcia
|
65
56
|
post_install_message:
|
66
57
|
rdoc_options:
|
67
58
|
- --main
|