danger-periphery 0.3.1 → 0.4.0

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: 12b5d90e78c9ce9ffe21444e0f89723c36287b74f6cec8047185e6c6266f179e
4
- data.tar.gz: 533cd4b72da33e99be395e41a9c81e764f99ec6f149b6695df90b59ef25cbe77
3
+ metadata.gz: 8d2f612902b0953cad3166423f6ec628619d1de19fe9727b0c55164067283de6
4
+ data.tar.gz: 9ed570bd16dfea55ade3e05ea1043e29c8f0924edec9c2851501a92c6a3989dd
5
5
  SHA512:
6
- metadata.gz: 545d4b1bf8b95ed580a7267f937548efa47ca8b3835bb646aa55270f4016796be8de5e9309631c51cf42c6804e2f1356758efb2d063a05542edc2a16d38d997a
7
- data.tar.gz: a0aca8766ed747d3a0dde0c2fb919dde6bf4c79048a95805063d7df35d535447cd5f7e1a569b66a28ee867918cd1c340c4432b656c72c421ecfa45aec22b4ebe
6
+ metadata.gz: b805c2969118ac69ac822c01f155138798d005cda0f14264cf71cde95cbbab5143f6dd2eba4439accd980d53b54b37baf0778803ca7a95526919ca5fed8a923b
7
+ data.tar.gz: 96c7baebde3044b5d7c70014b3a42fb408e24775c8c5587363b496cb53e1d31ad5a86af3665a2ee17c0610df6e00929dc9c1df1b7755fd55aa518f98fca4d9b9
@@ -46,7 +46,7 @@ module Danger
46
46
  }.freeze
47
47
 
48
48
  def initialize(dangerfile)
49
- super(dangerfile)
49
+ super
50
50
  @format = :checkstyle
51
51
  @warning_as_error = false
52
52
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DangerPeriphery
4
- VERSION = '0.3.1'
4
+ VERSION = '0.4.0'
5
5
  end
@@ -13,6 +13,7 @@ module Periphery
13
13
 
14
14
  def scan(options)
15
15
  arguments = [binary_path, 'scan'] + scan_arguments(options)
16
+
16
17
  stdout, stderr, status = Open3.capture3(*arguments)
17
18
  raise "error: #{arguments} exited with status code #{status.exitstatus}. #{stderr}" unless status.success?
18
19
 
@@ -20,22 +21,26 @@ module Periphery
20
21
  end
21
22
 
22
23
  def scan_arguments(options)
23
- options.each_with_object([]) do |(key, value), new_options|
24
+ args = []
25
+ options.each do |key, value|
24
26
  next unless value
25
27
 
28
+ next if key == :build_args
29
+
26
30
  value = nil if value.is_a?(TrueClass)
31
+ args << "--#{key.to_s.tr('_', '-')}"
27
32
  if value.is_a?(Array)
28
33
  if Gem::Version.new(version) >= Gem::Version.new('2.18.0')
29
- new_options << "--#{key.to_s.tr('_', '-')}"
30
- new_options.push(*value.map(&:to_s))
31
- next
34
+ args.push(*value.map(&:to_s))
32
35
  else
33
- value = value.join(',')
36
+ args << value.join(',')
34
37
  end
38
+ elsif value
39
+ args << value&.to_s
35
40
  end
36
- new_options << "--#{key.to_s.tr('_', '-')}"
37
- new_options << value&.to_s if value
38
41
  end
42
+ args += ['--', options[:build_args]] if options[:build_args]
43
+ args
39
44
  end
40
45
 
41
46
  def version
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-periphery
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryosuke Ito
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-02-26 00:00:00.000000000 Z
11
+ date: 2024-08-28 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger-plugin-api
@@ -74,7 +74,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
74
74
  - !ruby/object:Gem::Version
75
75
  version: '0'
76
76
  requirements: []
77
- rubygems_version: 3.4.6
77
+ rubygems_version: 3.5.14
78
78
  signing_key:
79
79
  specification_version: 4
80
80
  summary: A Danger plugin to detect unused codes.