coconductor 0.7.0 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +1 -1
- data/README.md +2 -0
- data/lib/coconductor/code_of_conduct.rb +12 -15
- data/lib/coconductor/version.rb +1 -1
- data/script/vendor-codes-of-conduct +22 -4
- data/vendor/citizen-code-of-conduct/version/2/0/citizen_code_of_conduct.md +1 -1
- data/vendor/citizen-code-of-conduct/version/2/1/citizen_code_of_conduct.md +1 -1
- data/vendor/citizen-code-of-conduct/version/2/2/citizen_code_of_conduct.md +1 -1
- data/vendor/citizen-code-of-conduct/version/2/3/citizen_code_of_conduct.md +1 -1
- data/vendor/geek-feminism/version/longer/CODE_OF_CONDUCT.md +52 -0
- data/vendor/geek-feminism/version/shorter/CODE_OF_CONDUCT.md +9 -0
- data/vendor/no-code-of-conduct/version/1/0/CODE_OF_CONDUCT.md +1 -1
- metadata +4 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3eafd4cc42d0ae8f243b537cfdaf5f6f90490c5396cbe9cdcb5fc7881b1861ca
|
4
|
+
data.tar.gz: f6b2aa5e53f4b244482bfe35c650b8b85e8dd0b5d4d5723cbbf81ee2554c0570
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f9041f1eea351ee08165d2b301c01bd59debe05eea9162a3f1fba024c85c136bf3b777882628f356986dc95ff80cfa67544d998d32533aa468cb1ecb1d6a1ce
|
7
|
+
data.tar.gz: 115db7930af3f7b311129d0ead425d006187c3c77e2052cf4fb8f82da030f33d3b4ded99820d88e89b2ec054b5e73531302ed40fba88910b4d3a58369d6e7f6a
|
data/.rubocop.yml
CHANGED
@@ -9,6 +9,7 @@ Metrics/LineLength:
|
|
9
9
|
Exclude:
|
10
10
|
- lib/coconductor/project_files.rb
|
11
11
|
- lib/coconductor/commands/*
|
12
|
+
- script/vendor-codes-of-conduct
|
12
13
|
|
13
14
|
Metrics/ClassLength:
|
14
15
|
Exclude:
|
@@ -29,4 +30,3 @@ Metrics/AbcSize:
|
|
29
30
|
Metrics/MethodLength:
|
30
31
|
Exclude:
|
31
32
|
- lib/coconductor/commands/*
|
32
|
-
|
data/README.md
CHANGED
@@ -72,6 +72,8 @@ Content hash: 627827ddda36b5c42b3a00418d3d7d5b16e5088a
|
|
72
72
|
|
73
73
|
* Contributor Covenant (all official languages and versions)
|
74
74
|
* Citizen Code of Conduct (all versions)
|
75
|
+
* The No Code of Conduct (latest version)
|
76
|
+
* Geek Feminism Code of Conduct (latest long and short form versions)
|
75
77
|
|
76
78
|
### Matching strategy
|
77
79
|
|
@@ -31,7 +31,10 @@ module Coconductor
|
|
31
31
|
path = Pathname.new(path)
|
32
32
|
key = path.relative_path_from(vendor_dir)
|
33
33
|
matches = KEY_REGEX.match(key.to_path)
|
34
|
-
|
34
|
+
next unless matches
|
35
|
+
[
|
36
|
+
matches['family'], 'version', matches['version'], matches['lang']
|
37
|
+
].compact.join('/')
|
35
38
|
end.compact
|
36
39
|
end
|
37
40
|
|
@@ -39,7 +42,7 @@ module Coconductor
|
|
39
42
|
cocs = all.select do |coc|
|
40
43
|
coc.language == language && coc.family == family
|
41
44
|
end
|
42
|
-
cocs.max_by
|
45
|
+
cocs.max_by { |c| c.geek_feminism? ? !c.version : c.version }
|
43
46
|
end
|
44
47
|
|
45
48
|
def families
|
@@ -62,7 +65,7 @@ module Coconductor
|
|
62
65
|
KEY_REGEX = %r{
|
63
66
|
(?<family>#{Regexp.union(CodeOfConduct.families)})
|
64
67
|
/version
|
65
|
-
/(?<major>\d)/(?<minor>\d)(/(?<patch>\d))
|
68
|
+
/(?<version>(?<major>\d)/(?<minor>\d)(/(?<patch>\d))?|(longer|shorter))
|
66
69
|
/#{Coconductor::ProjectFiles::CodeOfConductFile::FILENAME_REGEX}
|
67
70
|
}ix
|
68
71
|
DEFAULT_LANGUAGE = 'en'.freeze
|
@@ -71,6 +74,12 @@ module Coconductor
|
|
71
74
|
attr_writer :content
|
72
75
|
include Licensee::ContentHelper
|
73
76
|
|
77
|
+
# Define dynamic predicate helpers to determine if a code of conduct is a
|
78
|
+
# member of a given family, e.g., code_of_conduct.contributor_covenant?
|
79
|
+
CodeOfConduct.families.each do |f|
|
80
|
+
define_method(f.tr('-', '_') + '?') { family == f }
|
81
|
+
end
|
82
|
+
|
74
83
|
def initialize(key)
|
75
84
|
@key = key
|
76
85
|
end
|
@@ -127,18 +136,6 @@ module Coconductor
|
|
127
136
|
@family ||= key.split('/').first unless none?
|
128
137
|
end
|
129
138
|
|
130
|
-
def contributor_covenant?
|
131
|
-
family == 'contributor-covenant'
|
132
|
-
end
|
133
|
-
|
134
|
-
def citizen_code_of_conduct?
|
135
|
-
family == 'citizen-code-of-conduct'
|
136
|
-
end
|
137
|
-
|
138
|
-
def no_code_of_conduct?
|
139
|
-
family == 'no-code-of-conduct'
|
140
|
-
end
|
141
|
-
|
142
139
|
# The "other" code of conduct represents an unidentifiable code of conduct
|
143
140
|
def other?
|
144
141
|
key == 'other'
|
data/lib/coconductor/version.rb
CHANGED
@@ -9,16 +9,20 @@ def mkdir(dir)
|
|
9
9
|
FileUtils.mkdir_p(dir)
|
10
10
|
end
|
11
11
|
|
12
|
-
def
|
13
|
-
content = URI.open(url).read
|
12
|
+
def write_with_meta(content, version: '1.0', dir: '', file: 'CODE_OF_CONDUCT.md')
|
14
13
|
meta = { 'version' => version }
|
15
|
-
toml = TOML::Generator.new(meta).body
|
16
|
-
content = ['+++', toml, '+++', content].join("\n")
|
14
|
+
toml = TOML::Generator.new(meta).body.strip
|
15
|
+
content = ['+++', toml, '+++', '', content].join("\n")
|
17
16
|
path = File.join(dir, 'version', *version.split('.'), file)
|
18
17
|
FileUtils.mkdir_p File.dirname(path)
|
19
18
|
File.write(path, content)
|
20
19
|
end
|
21
20
|
|
21
|
+
def download_and_write(url, version: '1.0', dir: '', file: 'CODE_OF_CONDUCT.md')
|
22
|
+
content = URI.open(url).read
|
23
|
+
write_with_meta(content, version: version, dir: dir, file: file)
|
24
|
+
end
|
25
|
+
|
22
26
|
repo = 'ContributorCovenant/contributor_covenant'
|
23
27
|
dir = File.expand_path '../vendor/contributor-covenant', __dir__
|
24
28
|
include_path = '*/content/version'
|
@@ -53,3 +57,17 @@ mkdir(dir)
|
|
53
57
|
|
54
58
|
url = "https://github.com/#{repo}/raw/master/#{file}"
|
55
59
|
download_and_write(url, dir: dir, file: file)
|
60
|
+
|
61
|
+
dir = 'vendor/geek-feminism'
|
62
|
+
file = 'CODE_OF_CONDUCT.md'
|
63
|
+
url = 'http://geekfeminism.wikia.com/wiki/Community_anti-harassment/Policy?action=edit'
|
64
|
+
|
65
|
+
content = URI.open(url).read
|
66
|
+
content = content.split('==Anti-harassment policy text==')[1]
|
67
|
+
content = content.split('</textarea').first
|
68
|
+
content = content.gsub(/(?:[A-Z]{3,}+ ?)+[A-Z]+/) { |m| "[#{m.tr(' ', '_')}]" }
|
69
|
+
versions = content.split('===Longer version===')
|
70
|
+
versions = versions.map { |v| v.gsub('===Shorter version===', '').strip }
|
71
|
+
|
72
|
+
write_with_meta(versions.first, version: 'shorter', dir: dir, file: file)
|
73
|
+
write_with_meta(versions.last, version: 'longer', dir: dir, file: file)
|
@@ -0,0 +1,52 @@
|
|
1
|
+
+++
|
2
|
+
version = "longer"
|
3
|
+
+++
|
4
|
+
|
5
|
+
[COMMUNITY_NAME] is dedicated to providing a harassment-free experience for everyone. We do not tolerate harassment of participants in any form.
|
6
|
+
|
7
|
+
This code of conduct applies to all [COMMUNITY_NAME] spaces, including [give a list of your spaces, eg "our mailing lists and IRC channel"], both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the [RESPONSE_TEAM].
|
8
|
+
|
9
|
+
Some [COMMUNITY_NAME] spaces may have additional rules in place, which will be made clearly available to participants. Participants are responsible for knowing and abiding by these rules.
|
10
|
+
|
11
|
+
Harassment includes:
|
12
|
+
*Offensive comments related to gender, gender identity and expression, sexual orientation, disability, mental illness, neuro(a)typicality, physical appearance, body size, age, race, or religion.
|
13
|
+
*Unwelcome comments regarding a person’s lifestyle choices and practices, including those related to food, health, parenting, drugs, and employment.
|
14
|
+
*Deliberate misgendering or use of ‘dead’ or rejected names.
|
15
|
+
*Gratuitous or off-topic sexual images or behaviour in spaces where they’re not appropriate.
|
16
|
+
*Physical contact and simulated physical contact (eg, textual descriptions like “*hug*” or “*backrub*”) without consent or after a request to stop.
|
17
|
+
*Threats of violence.
|
18
|
+
*Incitement of violence towards any individual, including encouraging a person to commit suicide or to engage in self-harm.
|
19
|
+
*Deliberate intimidation.
|
20
|
+
*Stalking or following.
|
21
|
+
*Harassing photography or recording, including logging online activity for harassment purposes.
|
22
|
+
*Sustained disruption of discussion.
|
23
|
+
*Unwelcome sexual attention.
|
24
|
+
*Pattern of inappropriate social contact, such as requesting/assuming inappropriate levels of intimacy with others
|
25
|
+
*Continued one-on-one communication after requests to cease.
|
26
|
+
*Deliberate “outing” of any aspect of a person’s identity without their consent except as necessary to protect vulnerable people from intentional abuse.
|
27
|
+
*Publication of non-harassing private communication.
|
28
|
+
[COMMUNITY_NAME] prioritizes marginalized people’s safety over privileged people’s comfort. [RESPONSE_TEAM] reserves the right not to act on complaints regarding:
|
29
|
+
*‘Reverse’ -isms, including ‘reverse racism,’ ‘reverse sexism,’ and ‘cisphobia’
|
30
|
+
*Reasonable communication of boundaries, such as “leave me alone,” “go away,” or “I’m not discussing this with you.”
|
31
|
+
*Communicating in a ‘tone’ you don’t find congenial
|
32
|
+
*Criticizing racist, sexist, cissexist, or otherwise oppressive behavior or assumptions
|
33
|
+
====Reporting====
|
34
|
+
If you are being harassed by a member of [COMMUNITY_NAME], notice that someone else is being harassed, or have any other concerns, please contact the [RESPONSE_TEAM] at [email address or other contact point]. If the person who is harassing you is on the team, they will recuse themselves from handling your incident. We will respond as promptly as we can.
|
35
|
+
|
36
|
+
This code of conduct applies to [COMMUNITY_NAME] spaces, but if you are being harassed by a member of [COMMUNITY_NAME] outside our spaces, we still want to know about it. We will take all good-faith reports of harassment by [COMMUNITY_NAME] members, especially [LEADERSHIP_TEAM], seriously. This includes harassment outside our spaces and harassment that took place at any point in time. The abuse team reserves the right to exclude people from [COMMUNITY_NAME] based on their past behavior, including behavior outside [COMMUNITY_NAME] spaces and behavior towards people who are not in [COMMUNITY_NAME].
|
37
|
+
|
38
|
+
In order to protect volunteers from abuse and burnout, we reserve the right to reject any report we believe to have been made in bad faith. Reports intended to silence legitimate criticism may be deleted without response.
|
39
|
+
|
40
|
+
We will respect confidentiality requests for the purpose of protecting victims of abuse. At our discretion, we may publicly name a person about whom we’ve received harassment complaints, or privately warn third parties about them, if we believe that doing so will increase the safety of [COMMUNITY_NAME] members or the general public. We will not name harassment victims without their affirmative consent.
|
41
|
+
====Consequences====
|
42
|
+
Participants asked to stop any harassing behavior are expected to comply immediately.
|
43
|
+
|
44
|
+
If a participant engages in harassing behavior, [RESPONSE_TEAM] may take any action they deem appropriate, up to and including expulsion from all [COMMUNITY_NAME] spaces and identification of the participant as a harasser to other [COMMUNITY_NAME] members or the general public.
|
45
|
+
|
46
|
+
==License and attribution==
|
47
|
+
This policy is licensed under the [http://creativecommons.org/publicdomain/zero/1.0/ Creative Commons Zero license] . It is '''public domain''''', ''no credit and no open licencing of your version is required.
|
48
|
+
|
49
|
+
If you would like to optionally attribute it, you could use the below text and link to http://geekfeminism.wikia.com/wiki/Community_anti-harassment:
|
50
|
+
:This anti-harassment policy is based on the example policy from the Geek Feminism wiki, created by the Geek Feminism community.
|
51
|
+
|
52
|
+
The policy is based on the [[Conference anti-harassment/Policy|conference anti-harassment policy]], and is the work of Annalee Flower Horne with assistance from Valerie Aurora, Alex Skud Bayley, Tim Chevalier, and Mary Gardiner.
|
@@ -0,0 +1,9 @@
|
|
1
|
+
+++
|
2
|
+
version = "shorter"
|
3
|
+
+++
|
4
|
+
|
5
|
+
[COMMUNITY_NAME] is dedicated to providing a harassment-free experience for everyone, regardless of gender, gender identity and expression, sexual orientation, disability, physical appearance, body size, age, race, or religion. We do not tolerate harassment of participants in any form.
|
6
|
+
|
7
|
+
This code of conduct applies to all [COMMUNITY_NAME] spaces, including [list, eg "our mailing lists and IRC channel"], both online and off. Anyone who violates this code of conduct may be sanctioned or expelled from these spaces at the discretion of the [RESPONSE_TEAM].
|
8
|
+
|
9
|
+
Some [COMMUNITY_NAME] spaces may have additional rules in place, which will be made clearly available to participants. Participants are responsible for knowing and abiding by these rules.
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: coconductor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.8.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ben Balter
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-09-
|
11
|
+
date: 2018-09-17 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|
@@ -227,6 +227,8 @@ files:
|
|
227
227
|
- vendor/contributor-covenant/version/1/4/code-of-conduct.uk.md
|
228
228
|
- vendor/contributor-covenant/version/1/4/code-of-conduct.zh-cn.md
|
229
229
|
- vendor/contributor-covenant/version/1/4/code-of-conduct.zh-tw.md
|
230
|
+
- vendor/geek-feminism/version/longer/CODE_OF_CONDUCT.md
|
231
|
+
- vendor/geek-feminism/version/shorter/CODE_OF_CONDUCT.md
|
230
232
|
- vendor/no-code-of-conduct/version/1/0/CODE_OF_CONDUCT.md
|
231
233
|
homepage: https://github.com/benbalter/coconductor
|
232
234
|
licenses:
|