corundum 0.1.4 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
MDcxY2UyZjI1ZWJlMzNiYmQwNTBlODk1NzJiZWMzNDA2ODRmNWE3OA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
N2VjMDYyMGQ3YWE5YzU3ZDUxNDRmNjRjY2UzNDBkNTk2OWQ2ZGUxNw==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZTFlNGNlOTE5M2I1NmM2YzQzN2E3ODk5MjgzNDZiNWJiZDc0ZmZmNzdmNmUx
|
10
|
+
Yjc4ZWVkMjg1ZTgyMGRkOGM0Mjg4NGI1NzA5YzA5OGFmYWRjZTlkNzE5ZDZl
|
11
|
+
NWU3M2IyZmE2NDNmMWEwMWE2MDk4YWQxNzhlOGQwZWQwNjMxOWY=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
MzJiMjE5ZTJjMDBjYzJjODQ2M2E1YWJkYWI5MzViZGJlMzUxNzg3M2FiOTk3
|
14
|
+
ZjEyZWQ1Njc3ODYxNGRiNjQ1OWYyYWM1NzdkN2ZhOWY2OGM5YmRjOTgxYzFm
|
15
|
+
MWZjMDcxMzFiNjA2ZDBiMWJiZWEzNTU5OWY5Njk3MjdiZGQ0ZjI=
|
@@ -7,9 +7,13 @@ module Corundum
|
|
7
7
|
core = Core.new
|
8
8
|
|
9
9
|
core.in_namespace do
|
10
|
-
|
11
|
-
|
12
|
-
|
10
|
+
GemspecFiles.new(core)
|
11
|
+
|
12
|
+
#Also available: 'unfinished': TODO and XXX
|
13
|
+
["debug", "profanity", "ableism", "racism"].each do |type|
|
14
|
+
QuestionableContent.new(tk) do |content|
|
15
|
+
content.type = type
|
16
|
+
end
|
13
17
|
end
|
14
18
|
rspec = RSpec.new(core)
|
15
19
|
cov = SimpleCov.new(core, rspec) do |cov|
|
@@ -4,7 +4,8 @@ module Corundum
|
|
4
4
|
class QuestionableContent < Mattock::Tasklib
|
5
5
|
default_namespace :content
|
6
6
|
setting :type, :debugging
|
7
|
-
|
7
|
+
setting :words
|
8
|
+
setting :limit, 0
|
8
9
|
setting :comments, false
|
9
10
|
setting :accept_token, /#ok/
|
10
11
|
setting :files
|
@@ -16,12 +17,43 @@ module Corundum
|
|
16
17
|
self.files = core.file_lists.code
|
17
18
|
end
|
18
19
|
|
20
|
+
#I hate putting these lists together. I have to keep reminding myself that
|
21
|
+
#it's akin to discussing the use of the word.
|
22
|
+
#Also, this is a place I'm especially open to contributions.
|
23
|
+
WORD_SETS = {
|
24
|
+
"debug" => ["p", "debugger"], #ok
|
25
|
+
"profanity" => ['fuck\w*', 'shit\w*'], #ok
|
26
|
+
"ableism" => ["crazy", '\w*sanity', "dumb", 'idiot\w*', "lame", 'moron\w*', "retarded"], #ok
|
27
|
+
"racism" => ["chink", "coon", "dago", "gook", 'gyp\w*', "k[yi]ke", 'nig\w*', "spic"], #ok
|
28
|
+
"gender" => ["bitch", "cocksucker", "cunt", "dyke", "faggot", "tranny"], #ok
|
29
|
+
"issues" => ["XXX", "TODO"], #ok
|
30
|
+
}
|
31
|
+
[
|
32
|
+
["debug", "debugging"],
|
33
|
+
["profanity", "swearing"],
|
34
|
+
["profanity", "swears"],
|
35
|
+
["ableism", "ablism"],
|
36
|
+
["racism", "ethnic"],
|
37
|
+
["gender", "sexism"]
|
38
|
+
].each do |name, other|
|
39
|
+
WORD_SETS[other] = WORD_SETS[name]
|
40
|
+
end
|
41
|
+
|
42
|
+
def resolve_configuration
|
43
|
+
if field_unset?(:words)
|
44
|
+
self.words = WORD_SETS.fetch(type.to_s) do
|
45
|
+
raise "Word set #{type.inspect} unknown. Choose from: #{WORD_SETS.keys.inspect}"
|
46
|
+
end
|
47
|
+
end
|
48
|
+
super
|
49
|
+
end
|
50
|
+
|
19
51
|
def define
|
20
52
|
in_namespace do
|
21
53
|
task type do |task|
|
22
54
|
require 'corundum/qa-report'
|
23
55
|
|
24
|
-
word_regexp = %r{
|
56
|
+
word_regexp = %r{(?i:#{words.map{|word| "\\b#{word}\\b"}.join("|")})}
|
25
57
|
line_regexp = case comments
|
26
58
|
when true, :only
|
27
59
|
%r{\A\s*#.*#{word_regexp}}
|
data/lib/corundum/tasklibs.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: corundum
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Judson Lester
|
@@ -244,7 +244,7 @@ files:
|
|
244
244
|
- lib/corundum/rspec.rb
|
245
245
|
- lib/corundum/rspec-task.rb
|
246
246
|
- lib/corundum/email.rb
|
247
|
-
- lib/corundum/
|
247
|
+
- lib/corundum/gemspec_files.rb
|
248
248
|
- lib/corundum/gemcutter.rb
|
249
249
|
- lib/corundum/documentation.rb
|
250
250
|
- lib/corundum/documentation-task.rb
|
@@ -333,7 +333,7 @@ metadata: {}
|
|
333
333
|
post_install_message:
|
334
334
|
rdoc_options:
|
335
335
|
- --title
|
336
|
-
- corundum-0.
|
336
|
+
- corundum-0.2 RDoc
|
337
337
|
require_paths:
|
338
338
|
- lib/
|
339
339
|
required_ruby_version: !ruby/object:Gem::Requirement
|