corundum 0.1.4 → 0.2

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 CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- OGUyMmFlMmM0M2EyMGI4NTc4MzM0MWNhMTdkZjkwNzc2ZTRmODc4ZA==
4
+ MDcxY2UyZjI1ZWJlMzNiYmQwNTBlODk1NzJiZWMzNDA2ODRmNWE3OA==
5
5
  data.tar.gz: !binary |-
6
- YjEwYzMzMzc5YjQ2MzZhODBiODMxMzlhNjBlNmY5NTQyYzRhOTE3Yg==
6
+ N2VjMDYyMGQ3YWE5YzU3ZDUxNDRmNjRjY2UzNDBkNTk2OWQ2ZGUxNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ODJiNGMwMzYwNzYyMTQ4MzU2OWRiODI3NjllMzE0OGQxMGU3MDViMDE5OTky
10
- ZWUzZmNkNTQzNzdjOWQzNjY0YjRkZjE1Mzc1N2MzNjlmMDk5N2UwMDAzYWU5
11
- NmFjMDIwMWY2M2ZmYzc4NGM0MTE2ZWE2ZDA5YjM4Nzc5MWJmMTg=
9
+ ZTFlNGNlOTE5M2I1NmM2YzQzN2E3ODk5MjgzNDZiNWJiZDc0ZmZmNzdmNmUx
10
+ Yjc4ZWVkMjg1ZTgyMGRkOGM0Mjg4NGI1NzA5YzA5OGFmYWRjZTlkNzE5ZDZl
11
+ NWU3M2IyZmE2NDNmMWEwMWE2MDk4YWQxNzhlOGQwZWQwNjMxOWY=
12
12
  data.tar.gz: !binary |-
13
- ZThmZWIwMmI2ZjFhZWI0MGZjZGMzNjljNTc4ODkwNmY1Njc3MDE2Mjk3ODAz
14
- NDgxYjZmYjI5MzRmMjJmNTE4ZmZiYWI5Y2ZhODBlOWYxN2Q2NTMxNzE2Yjg5
15
- NGQ3ZDVhNGFiNmUwZGUyOTUxNDZhYWQ4NDA3ZDM0MzY1MjA1NmY=
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
- sanity = GemspecSanity.new(core)
11
- QuestionableContent.new(core) do |dbg|
12
- dbg.words = %w{p debugger}
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|
@@ -1,8 +1,8 @@
1
1
  require 'mattock/tasklib'
2
2
 
3
3
  module Corundum
4
- class GemspecSanity < Mattock::TaskLib
5
- default_namespace :gemspec_sanity
4
+ class GemspecFiles < Mattock::TaskLib
5
+ default_namespace :gemspec_files
6
6
 
7
7
  setting(:gemspec)
8
8
 
@@ -4,7 +4,8 @@ module Corundum
4
4
  class QuestionableContent < Mattock::Tasklib
5
5
  default_namespace :content
6
6
  setting :type, :debugging
7
- settings :words => ["p", "debugger"], :limit => 0 #ok
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{#{words.map{|word| "\\b#{word}\\b"}.join("|")}}
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}}
@@ -1,7 +1,7 @@
1
1
  require 'corundum'
2
2
  require 'corundum/rspec'
3
3
  require 'corundum/simplecov'
4
- require 'corundum/gemspec_sanity'
4
+ require 'corundum/gemspec_files'
5
5
  require 'corundum/gem_building'
6
6
  require 'corundum/gemcutter'
7
7
  require 'corundum/email'
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.1.4
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/gemspec_sanity.rb
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.1.4 RDoc
336
+ - corundum-0.2 RDoc
337
337
  require_paths:
338
338
  - lib/
339
339
  required_ruby_version: !ruby/object:Gem::Requirement