deep-cover 0.7.7 → 0.7.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: a77f8ac9467336a8a0c2e8677917d2b73729d58c40f6dc137120e45f693b5796
4
- data.tar.gz: d6cd0e02f07b36ba3a2ccecdb4dbc9c7e78ff1b19ad86096e62889b23c40ef19
3
+ metadata.gz: 026a2a8870f332d242fcbed175eb1a87a54ff0f552d834138da50e57069762f5
4
+ data.tar.gz: 1c817d02a7ded04408f83551bcbc66e3fee66b93727d31cc05c2e2f88e116ee7
5
5
  SHA512:
6
- metadata.gz: 5e53008bd98dfd0538e8665792987d520d68331feb2cc8ad176b5fa1b963eb727d8ea16799f0208a7a2c909af2a4e08e29cfbcaa3b44b15476580cb5aa104b5b
7
- data.tar.gz: faa18540c3fe4b67610ddb48d19bc807e3b7a0e41035deaa9cf2f222aae122de16e78a07334d4a48236abc19e497c5475699f91248fc37887c3b9e30a998a127
6
+ metadata.gz: 37e78938aecf7f54503a978376a4eaa54e379d284896a50ac360699af4e7aae476eec9112c3ba59bf6ad7def7f19f51493dd87ef820e233dcda6b3e0d98e2dcb
7
+ data.tar.gz: 15bc27c6cca6d908af2a58a50ee177c1d6b6a20a8f5221d5055ce556c835082bc829289c6187dfeab5386e227ee8e0b5318df1314d71542b73c6dcd3d63200a2
@@ -21,6 +21,7 @@ matrix:
21
21
 
22
22
  install:
23
23
  - ruby -v
24
+ - gem -v
24
25
  - ./bin/setup_bundler_1_17_3_if_needed
25
26
  - bundle install
26
27
  - rake dev:install
@@ -48,7 +48,7 @@
48
48
  ## 0.4
49
49
 
50
50
  * Added `deep-cover exec`
51
- * Automatic loading of `.deep-cover.rb`
51
+ * Automatic loading of `.deep_cover.rb`
52
52
  * Support for `# nocov`
53
53
 
54
54
  ## 0.3
@@ -11,6 +11,13 @@ module DeepCover
11
11
  bootstrap
12
12
 
13
13
  class CLI < Thor
14
+ # Consider defaults only for display
15
+ def self.build_option(arg, options, scope)
16
+ default = options.delete(:default)
17
+ options[:desc] = "#{options[:desc]} (default: #{default})" if default
18
+ super(arg, options, scope)
19
+ end
20
+
14
21
  require_relative 'cli/tools'
15
22
 
16
23
  # Just fail when you get an unknown option
@@ -25,11 +32,9 @@ module DeepCover
25
32
  default_command :short_help
26
33
 
27
34
  # Adding all of the ignore-something class options
28
- OPTIONALLY_COVERED_MAP = OPTIONALLY_COVERED.map do |optional|
29
- [:"ignore_#{optional}", optional]
30
- end.to_h.freeze
31
- OPTIONALLY_COVERED_MAP.each do |cli_option, short_name|
32
- default = DeepCover.config.ignore_uncovered.include?(short_name)
35
+ OPTIONALLY_COVERED.each do |filter|
36
+ cli_option = FILTER_NAME[filter]
37
+ default = DeepCover.config[cli_option]
33
38
  class_option cli_option, type: :boolean, default: default
34
39
  end
35
40
 
@@ -50,19 +55,13 @@ module DeepCover
50
55
  new_options = options.dup
51
56
  new_options[:output] = false if ['false', 'f', ''].include?(new_options[:output])
52
57
 
53
- # Turn all the ignore-x into entries in :ignore_uncovered
54
- ignored = new_options[:ignore_uncovered] = []
55
- OPTIONALLY_COVERED_MAP.each do |cli_option, option|
56
- ignored << option if new_options.delete(cli_option)
57
- end
58
-
59
58
  @processed_options = new_options.transform_keys(&:to_sym)
60
59
  end
61
60
 
62
61
  # Before we actually execute any of the commands, we want to change directory if that option was given.
63
62
  # And then we want to setup the configuration
64
63
  def invoke_command(*args)
65
- if options[:change_directory] != '.'
64
+ if options[:change_directory]
66
65
  root_path = File.expand_path(options[:change_directory])
67
66
  unless File.exist?(root_path)
68
67
  warn set_color(DeepCover::Tools.strip_heredoc(<<-MSG), :red)
@@ -29,7 +29,7 @@ module DeepCover
29
29
  DeepCover.delete_trackers
30
30
  exit_code = Tools.run_command_or_exit(shell, env_var, *command_parts)
31
31
  coverage = Coverage.load
32
- puts coverage.report(**processed_options)
32
+ puts coverage.report(**DeepCover.config)
33
33
  exit(exit_code)
34
34
  end
35
35
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deep-cover
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.7
4
+ version: 0.7.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marc-André Lafortune
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2020-01-15 00:00:00.000000000 Z
12
+ date: 2020-02-16 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: deep-cover-core
@@ -17,14 +17,14 @@ dependencies:
17
17
  requirements:
18
18
  - - '='
19
19
  - !ruby/object:Gem::Version
20
- version: 0.7.7
20
+ version: 0.7.8
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
25
  - - '='
26
26
  - !ruby/object:Gem::Version
27
- version: 0.7.7
27
+ version: 0.7.8
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: highline
30
30
  requirement: !ruby/object:Gem::Requirement