coconductor 0.5.1 → 0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/coconductor/code_of_conduct.rb +6 -1
- data/lib/coconductor/field.rb +2 -2
- data/lib/coconductor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bc33614c4cf488f210ba9d708de92c06bb63df664d7b428319f8243262f6c99a
|
4
|
+
data.tar.gz: 40e02ee3e59104b5dd930d770ca16f98cd1ec464e758f5a2e74cd87bbffb13fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 35525eb6802487b38dead731554bb261cb2de293741801399760d432667163c875b1428c075b8d96ed2ae3ad812883418e9f5acdc91234c1901316d6141561cf
|
7
|
+
data.tar.gz: c06174866d417735359136e007289dbc9d2ca684ed7684ad68ad1c0bcb3bd1e6f621006ae4927f01207767e4edc77d6c2de055976f1e6dfb1636559aa0d50646
|
@@ -99,7 +99,12 @@ module Coconductor
|
|
99
99
|
end
|
100
100
|
|
101
101
|
def content
|
102
|
-
|
102
|
+
# See https://github.com/stumpsyn/policies/pull/21
|
103
|
+
@content ||= if citizen_code_of_conduct?
|
104
|
+
parts.last.gsub(' COMMUNITY_NAME ', ' [COMMUNITY_NAME] ')
|
105
|
+
else
|
106
|
+
parts.last
|
107
|
+
end
|
103
108
|
end
|
104
109
|
alias body content
|
105
110
|
|
data/lib/coconductor/field.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
module Coconductor
|
2
2
|
# Represents a fillable field in a code of conduct
|
3
3
|
class Field
|
4
|
-
REGEX = /\[(?<name>[A-Z_ ]{2,})
|
4
|
+
REGEX = /\[(?<name>[A-Z_ ]{2,})[\s:-]*(?<description>.*)\]/
|
5
5
|
|
6
6
|
# the matchable raw text within the code of conduct including brackets
|
7
7
|
attr_reader :raw_text
|
@@ -79,7 +79,7 @@ module Coconductor
|
|
79
79
|
|
80
80
|
def normalized_name
|
81
81
|
@normalized_name ||= begin
|
82
|
-
normalized_name = name.tr(' ', '_')
|
82
|
+
normalized_name = name.strip.tr(' ', '_')
|
83
83
|
normalized_name = normalized_name.gsub(/\A(YOUR|INSERT)_/i, '')
|
84
84
|
normalized_name = normalized_name.gsub(/_?HERE\z/i, '')
|
85
85
|
normalized_name.strip
|
data/lib/coconductor/version.rb
CHANGED
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.5.
|
4
|
+
version: 0.5.2
|
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-
|
11
|
+
date: 2018-09-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: licensee
|