coconductor 0.6.1 → 0.6.2
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d9b4cc3e36b81bf54501ef0faecde56bc6d9d56301bf329cb3d606145f5312b2
|
4
|
+
data.tar.gz: ff6ded1918af2d981cc367cae83aa41c9dbe403c087ded3d33572ece20e76d05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 85aab5538e5f66c2b25e6d9aa08112851334502e1888a6bbf8d7e1d9e6327345bd1b1f5646d68ecce8b066f842e456e4d037ff4954a13cf1e14c55abe1e7f691
|
7
|
+
data.tar.gz: 2275c2792b3e9c012ac34ebb34daa4068aba46921fa86e2ba70fbb970b93dec488063a3b771cd2ce997a844950c353df12b2995c6370eb09b29373288f9a3466
|
@@ -15,6 +15,7 @@ module Coconductor
|
|
15
15
|
# Returns the code of conduct specified by the key with version,
|
16
16
|
# or the latest in the family if only the family is specified
|
17
17
|
def find(key_or_family)
|
18
|
+
return new('other') if key_or_family == 'other'
|
18
19
|
match = all.find { |coc| coc.key == key_or_family }
|
19
20
|
match || latest_in_family(key_or_family)
|
20
21
|
end
|
@@ -146,6 +147,11 @@ module Coconductor
|
|
146
147
|
@fields ||= Field.from_code_of_conduct(self)
|
147
148
|
end
|
148
149
|
|
150
|
+
def ==(other)
|
151
|
+
other.is_a?(CodeOfConduct) && key == other.key
|
152
|
+
end
|
153
|
+
alias eql? ==
|
154
|
+
|
149
155
|
private
|
150
156
|
|
151
157
|
def filename
|
@@ -2,7 +2,11 @@ module Coconductor
|
|
2
2
|
module ProjectFiles
|
3
3
|
class ProjectFile < Licensee::ProjectFiles::ProjectFile
|
4
4
|
def code_of_conduct
|
5
|
-
|
5
|
+
if matcher
|
6
|
+
matcher.match
|
7
|
+
else
|
8
|
+
CodeOfConduct.find('other')
|
9
|
+
end
|
6
10
|
end
|
7
11
|
|
8
12
|
undef_method :license
|
data/lib/coconductor/version.rb
CHANGED