danger-xcov 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/danger_plugin.rb +10 -1
  3. data/lib/version.rb +1 -1
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: ddd40824a45ba96c8e64e1f5cd6ea4945f03e48b
4
- data.tar.gz: f951e7a1f3da1fecb7dffd18e8617ad4ac4b3d6c
3
+ metadata.gz: 7c10e2b19a8783ac4d26b2e548caf40344e50bde
4
+ data.tar.gz: e8d992f49dd2f4530d2e4438d9f531eae3308e17
5
5
  SHA512:
6
- metadata.gz: c3a3bfc848a80e12decca0b0f7e655d888f462353f8d371755db3613b32175dccff5392d64c39bf7d350c5de9bb0d2a9fcacd9b5ed8c76bcd6664be2e2573261
7
- data.tar.gz: 62d134a622cff65bfb15f559e23a98121bf6bef10f90595644e61657a3096e44b41e3520196f4c1ebe55d5c507b12f4dc1bfaa90bb43aba0eeef3561fc5faa10
6
+ metadata.gz: a68b21c96a728a2250f1010ad3d94ec8d9908c2dd96029cabe65e8c73b78f15196776973921d29c94b5151a7a1cdad68f3366caf0dd5f357b5fc00142d8974b1
7
+ data.tar.gz: af140872677ba406c07b6e09f09b1be91e44cf2c1d743e0a6b13d6cb54601c14ca9a9b1036dbb415dcbda8d0460c5cb270f4601cc73c23c83b9be124766b6ae8
data/lib/danger_plugin.rb CHANGED
@@ -40,9 +40,10 @@ module Danger
40
40
  end
41
41
 
42
42
  require "xcov"
43
+ require "fastlane_core"
43
44
 
44
45
  # Init Xcov
45
- config = args.first
46
+ config = FastlaneCore::Configuration.create(Xcov::Options.available_options, convert_options(args.first))
46
47
  Xcov.config = config
47
48
  Xcov.ignore_handler = Xcov::IgnoreHandler.new
48
49
 
@@ -78,6 +79,7 @@ module Danger
78
79
  # Filters the files that haven't been modified in the current PR
79
80
  def process_report(report)
80
81
  file_names = @dangerfile.git.modified_files.map { |file| File.basename(file) }
82
+ file_names += @dangerfile.git.added_files.map { |file| File.basename(file) }
81
83
  report.targets.each do |target|
82
84
  target.files = target.files.select { |file| file_names.include?(file.name) }
83
85
  end
@@ -85,6 +87,13 @@ module Danger
85
87
  report
86
88
  end
87
89
 
90
+ # Processes the parameters passed to the plugin
91
+ def convert_options(options)
92
+ converted_options = options.__hash__.dup
93
+ converted_options.delete(:verbose)
94
+ converted_options
95
+ end
96
+
88
97
  private :xcov_available?, :process_report
89
98
 
90
99
  end
data/lib/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module DangerXcov
2
- VERSION = "0.3.1"
2
+ VERSION = "0.3.2"
3
3
  DESCRIPTION = "Danger plugin to validate the code coverage of the files changed"
4
4
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: danger-xcov
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Carlos Vidal
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-17 00:00:00.000000000 Z
11
+ date: 2017-07-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: danger
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
103
103
  version: '0'
104
104
  requirements: []
105
105
  rubyforge_project:
106
- rubygems_version: 2.4.8
106
+ rubygems_version: 2.6.12
107
107
  signing_key:
108
108
  specification_version: 4
109
109
  summary: Danger plugin to validate the code coverage of the files changed