danger 4.0.3 → 4.0.4
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
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a944b517b8e33c5204a68e0380be5f0066b8df5
|
4
|
+
data.tar.gz: aeb83608871b332acba8321c43157893ade21a1d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1ca07fc21a6fc3168a8ab9db590017b90dc2872a49f536046646269e209acb19ff56df18f7103dee270c94f169ce283b1ea49be7808e64aedc7c075e9cc2d6c4
|
7
|
+
data.tar.gz: bc1ac336880de4d918c3da36351c49506c692fe12c17b3632a7fc496109395c7066e687da3c8791ec626dd02860354eac06da59cd756719fe96f28e1ca5d2300
|
@@ -205,19 +205,22 @@ module Danger
|
|
205
205
|
# @return [void]
|
206
206
|
def import_local(path)
|
207
207
|
Dir[path].each do |file|
|
208
|
-
validate_file_contains_plugin!(file)
|
208
|
+
validate_file_contains_plugin!(file) do
|
209
|
+
# Without the expand_path it would fail if the path doesn't start with ./
|
210
|
+
require File.expand_path(file)
|
211
|
+
end
|
209
212
|
|
210
|
-
# Without the expand_path it would fail if the path doesn't start with ./
|
211
|
-
require File.expand_path(file)
|
212
213
|
refresh_plugins
|
213
214
|
end
|
214
215
|
end
|
215
216
|
|
217
|
+
# Raises an error when the given block does not register a plugin.
|
216
218
|
def validate_file_contains_plugin!(file)
|
217
|
-
|
219
|
+
plugin_count_was = Danger::Plugin.all_plugins.length
|
220
|
+
yield
|
218
221
|
|
219
|
-
if
|
220
|
-
raise("#{file} doesn't contain any valid danger
|
222
|
+
if Danger::Plugin.all_plugins.length == plugin_count_was
|
223
|
+
raise("#{file} doesn't contain any valid danger plugins.")
|
221
224
|
end
|
222
225
|
end
|
223
226
|
end
|
@@ -9,20 +9,27 @@ module Danger
|
|
9
9
|
|
10
10
|
# Returns an Array of paths (plugin lib file paths) and gems (of metadata)
|
11
11
|
def call
|
12
|
+
path_gems = []
|
13
|
+
|
12
14
|
Bundler.with_clean_env do
|
13
15
|
Dir.chdir(dir) do
|
14
16
|
create_gemfile_from_gem_names
|
15
17
|
`bundle install --path vendor/gems`
|
18
|
+
path_gems = all_gems_metadata
|
16
19
|
end
|
17
20
|
end
|
18
21
|
|
19
|
-
return
|
22
|
+
return path_gems
|
20
23
|
end
|
21
24
|
|
22
25
|
private
|
23
26
|
|
24
27
|
attr_reader :gem_names, :dir
|
25
28
|
|
29
|
+
def all_gems_metadata
|
30
|
+
return paths, gems
|
31
|
+
end
|
32
|
+
|
26
33
|
def create_gemfile_from_gem_names
|
27
34
|
gemfile = File.new("Gemfile", "w")
|
28
35
|
gemfile.write "source 'https://rubygems.org'"
|
data/lib/danger/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: danger
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.0.
|
4
|
+
version: 4.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Orta Therox
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2016-12-
|
12
|
+
date: 2016-12-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: claide
|
@@ -442,9 +442,7 @@ homepage: https://github.com/danger/danger
|
|
442
442
|
licenses:
|
443
443
|
- MIT
|
444
444
|
metadata: {}
|
445
|
-
post_install_message:
|
446
|
-
Thanks for installing Danger!
|
447
|
-
If you are updating from 3.0, we recommend reading the CHANGELOG: https://github.com/danger/danger/blob/master/CHANGELOG.md
|
445
|
+
post_install_message:
|
448
446
|
rdoc_options: []
|
449
447
|
require_paths:
|
450
448
|
- lib
|
@@ -460,7 +458,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
460
458
|
version: '0'
|
461
459
|
requirements: []
|
462
460
|
rubyforge_project:
|
463
|
-
rubygems_version: 2.
|
461
|
+
rubygems_version: 2.2.2
|
464
462
|
signing_key:
|
465
463
|
specification_version: 4
|
466
464
|
summary: Like Unit Tests, but for your Team Culture.
|