shuttlerock_shared_config 0.2.19 → 0.2.20
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/shuttlerock_shared_config/version.rb +1 -1
- data/lib/templates/Dangerfile +7 -3
- 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: c329c0b4eb784a434b6121fe9d4117b6e2ecbc68af7c6a05cd047530a4c6089b
|
4
|
+
data.tar.gz: 386b1283c25924b9f77345a32652a303cc77d8e7256c77333c165d16f848ae6a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f626b2615f5460da91e824316a187ba57b817f76206780b726347424f305d801c7462a82f88711d7feb21f1f005fb06cfbdb34aff81a9a44afa7c85a8db399f
|
7
|
+
data.tar.gz: 47bb659658069b8f45bf9fb0977129edd3c9a0a28c5331a573d26db1421605575e2cddc43b1dd238baecaf098472a1fe402a38d94c33d044b05b21ee47473170
|
data/lib/templates/Dangerfile
CHANGED
@@ -2,15 +2,15 @@
|
|
2
2
|
warn('Big PR') if git.lines_of_code > 500
|
3
3
|
|
4
4
|
# Make sure that and new ENV files are recorded in /doc/env_list.yml
|
5
|
-
documented_env =
|
5
|
+
documented_env = File.read('.env.example').split("\n").select { |line| line =~ /^[A-Z]/ }.map { |line| line.sub(/^([^=]+)=.*$/, '\1') }
|
6
6
|
|
7
7
|
git.diff.each do |chunk|
|
8
8
|
chunk.patch.lines.grep(/^+/).each do |added_line|
|
9
|
-
env_variable = (added_line.match(/ENV\[(\S+)\]/) || added_line.match(/ENV.fetch\((\S+)\)/))&.captures&.first.to_s.
|
9
|
+
env_variable = (added_line.match(/ENV\[(\S+)\]/) || added_line.match(/ENV.fetch\((\S+)\)/))&.captures&.first.to_s.gsub(/["']/, '')
|
10
10
|
|
11
11
|
next if env_variable.nil? || env_variable.empty?
|
12
12
|
|
13
|
-
failure("Please add a record of #{env_variable} to
|
13
|
+
failure("Please add a record of #{env_variable} to .env.example") unless documented_env.include?(env_variable)
|
14
14
|
end
|
15
15
|
end
|
16
16
|
|
@@ -21,3 +21,7 @@ end
|
|
21
21
|
if github.pr_body.include?('Do this') && github.pr_body.include?('Do that')
|
22
22
|
warn('Template `How to test PR` appears to be unmodified. Please update with relevant information or remove if testing is not required.')
|
23
23
|
end
|
24
|
+
|
25
|
+
failure('Please add labels to this PR.') if github.pr_labels.empty?
|
26
|
+
|
27
|
+
failure('Please assign this PR to its owner.') if github.pr_json['assignee'].nil? && !github.pr_labels.include?('dependencies')
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: shuttlerock_shared_config
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.20
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ElseThen
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-06-
|
11
|
+
date: 2019-06-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|