deep-cover 0.1.14 → 0.1.15
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.rubocop.yml +227 -0
- data/Gemfile +5 -2
- data/Rakefile +9 -6
- data/bin/console +3 -3
- data/bin/cov +8 -8
- data/bin/gemcov +2 -2
- data/bin/selfcov +5 -5
- data/bin/test_gems +11 -10
- data/bin/testall +6 -6
- data/deep_cover.gemspec +26 -21
- data/exe/deep-cover +1 -0
- data/lib/deep-cover.rb +2 -0
- data/lib/deep_cover.rb +3 -0
- data/lib/deep_cover/analyser.rb +2 -0
- data/lib/deep_cover/analyser/base.rb +2 -0
- data/lib/deep_cover/analyser/branch.rb +4 -2
- data/lib/deep_cover/analyser/covered_code_source.rb +3 -1
- data/lib/deep_cover/analyser/function.rb +3 -1
- data/lib/deep_cover/analyser/ignore_uncovered.rb +6 -4
- data/lib/deep_cover/analyser/node.rb +3 -0
- data/lib/deep_cover/analyser/optionally_covered.rb +12 -7
- data/lib/deep_cover/analyser/per_char.rb +7 -6
- data/lib/deep_cover/analyser/per_line.rb +9 -8
- data/lib/deep_cover/analyser/statement.rb +2 -0
- data/lib/deep_cover/analyser/subset.rb +4 -1
- data/lib/deep_cover/auto_run.rb +3 -0
- data/lib/deep_cover/autoload_tracker.rb +6 -3
- data/lib/deep_cover/backports.rb +2 -0
- data/lib/deep_cover/base.rb +11 -2
- data/lib/deep_cover/builtin_takeover.rb +2 -0
- data/lib/deep_cover/cli/debugger.rb +55 -30
- data/lib/deep_cover/cli/deep_cover.rb +17 -11
- data/lib/deep_cover/cli/instrumented_clone_reporter.rb +16 -14
- data/lib/deep_cover/config.rb +29 -16
- data/lib/deep_cover/core_ext/autoload_overrides.rb +2 -0
- data/lib/deep_cover/core_ext/coverage_replacement.rb +2 -0
- data/lib/deep_cover/core_ext/load_overrides.rb +5 -6
- data/lib/deep_cover/core_ext/require_overrides.rb +6 -7
- data/lib/deep_cover/coverage.rb +21 -18
- data/lib/deep_cover/covered_code.rb +22 -12
- data/lib/deep_cover/custom_requirer.rb +82 -35
- data/lib/deep_cover/memoize.rb +48 -0
- data/lib/deep_cover/module_override.rb +2 -0
- data/lib/deep_cover/node.rb +14 -1
- data/lib/deep_cover/node/arguments.rb +2 -0
- data/lib/deep_cover/node/assignments.rb +32 -30
- data/lib/deep_cover/node/base.rb +30 -29
- data/lib/deep_cover/node/begin.rb +3 -1
- data/lib/deep_cover/node/block.rb +5 -2
- data/lib/deep_cover/node/branch.rb +2 -1
- data/lib/deep_cover/node/case.rb +15 -13
- data/lib/deep_cover/node/collections.rb +2 -0
- data/lib/deep_cover/node/const.rb +2 -0
- data/lib/deep_cover/node/def.rb +10 -8
- data/lib/deep_cover/node/empty_body.rb +2 -0
- data/lib/deep_cover/node/exceptions.rb +3 -1
- data/lib/deep_cover/node/if.rb +3 -1
- data/lib/deep_cover/node/keywords.rb +4 -2
- data/lib/deep_cover/node/literals.rb +2 -0
- data/lib/deep_cover/node/loops.rb +5 -3
- data/lib/deep_cover/node/mixin/can_augment_children.rb +8 -7
- data/lib/deep_cover/node/mixin/check_completion.rb +3 -1
- data/lib/deep_cover/node/mixin/child_can_be_empty.rb +4 -2
- data/lib/deep_cover/node/mixin/executed_after_children.rb +2 -0
- data/lib/deep_cover/node/mixin/execution_location.rb +4 -2
- data/lib/deep_cover/node/mixin/flow_accounting.rb +2 -0
- data/lib/deep_cover/node/mixin/has_child.rb +22 -18
- data/lib/deep_cover/node/mixin/has_child_handler.rb +10 -8
- data/lib/deep_cover/node/mixin/has_tracker.rb +4 -2
- data/lib/deep_cover/node/mixin/is_statement.rb +3 -1
- data/lib/deep_cover/node/mixin/rewriting.rb +5 -3
- data/lib/deep_cover/node/mixin/wrapper.rb +2 -0
- data/lib/deep_cover/node/module.rb +11 -9
- data/lib/deep_cover/node/root.rb +2 -0
- data/lib/deep_cover/node/send.rb +4 -2
- data/lib/deep_cover/node/short_circuit.rb +4 -2
- data/lib/deep_cover/node/splat.rb +2 -0
- data/lib/deep_cover/node/variables.rb +2 -0
- data/lib/deep_cover/parser_ext/range.rb +3 -1
- data/lib/deep_cover/problem_with_diagnostic.rb +11 -9
- data/lib/deep_cover/reporter.rb +2 -0
- data/lib/deep_cover/reporter/istanbul.rb +28 -24
- data/lib/deep_cover/tools.rb +2 -0
- data/lib/deep_cover/tools/builtin_coverage.rb +6 -4
- data/lib/deep_cover/tools/camelize.rb +3 -1
- data/lib/deep_cover/tools/dasherize.rb +3 -1
- data/lib/deep_cover/tools/dump_covered_code.rb +7 -6
- data/lib/deep_cover/tools/execute_sample.rb +13 -13
- data/lib/deep_cover/tools/format.rb +3 -1
- data/lib/deep_cover/tools/format_char_cover.rb +4 -2
- data/lib/deep_cover/tools/format_generated_code.rb +3 -1
- data/lib/deep_cover/tools/number_lines.rb +2 -0
- data/lib/deep_cover/tools/our_coverage.rb +5 -3
- data/lib/deep_cover/tools/profiling.rb +66 -0
- data/lib/deep_cover/tools/require_relative_dir.rb +3 -1
- data/lib/deep_cover/tools/silence_warnings.rb +4 -1
- data/lib/deep_cover/tools/slice.rb +3 -1
- data/lib/deep_cover/tools/truncate_backtrace.rb +2 -0
- data/lib/deep_cover/version.rb +3 -1
- metadata +47 -30
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e42b3434b8b6263b660025dc15bb7247aff9d874
|
4
|
+
data.tar.gz: 070d3144cbaad64ffa807b17722a62fd810e7455
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 77d1fd07c736c0045b554998b8448ea5c193af69e8cfe3c067b024d28afed61de22ebe5f5036df03664bb0ad2cbfe18a4c73b66d8fbc9b88dad52a52191d50d7
|
7
|
+
data.tar.gz: e16eeb31a67a181fda812a07332831ec58c4d3232147864315e33d0542137bccd1dd51e35a4a8f8db84063da8f68ca49082bfb75f6a69ed93f37270e06093bb0
|
data/.rubocop.yml
ADDED
@@ -0,0 +1,227 @@
|
|
1
|
+
AllCops:
|
2
|
+
DisplayCopNames: true
|
3
|
+
Exclude:
|
4
|
+
- 'spec/char_cover/**/*'
|
5
|
+
- 'spec/cli_fixtures/**/*'
|
6
|
+
- 'spec/samples/**/*'
|
7
|
+
- 'spec/full_usage/**/*'
|
8
|
+
- 'spec/specs_tools.rb'
|
9
|
+
- 'bin/**/*'
|
10
|
+
TargetRubyVersion: 2.1
|
11
|
+
|
12
|
+
|
13
|
+
Layout/EmptyLines:
|
14
|
+
Enabled: false
|
15
|
+
|
16
|
+
Layout/EmptyLineBetweenDefs:
|
17
|
+
NumberOfEmptyLines: [1, 2]
|
18
|
+
|
19
|
+
Layout/FirstParameterIndentation:
|
20
|
+
IndentationWidth: 4
|
21
|
+
|
22
|
+
Layout/IndentArray:
|
23
|
+
EnforcedStyle: align_brackets
|
24
|
+
|
25
|
+
Layout/IndentHash:
|
26
|
+
EnforcedStyle: align_braces
|
27
|
+
|
28
|
+
Layout/MultilineArrayBraceLayout:
|
29
|
+
EnforcedStyle: new_line
|
30
|
+
|
31
|
+
Layout/MultilineHashBraceLayout:
|
32
|
+
EnforcedStyle: new_line
|
33
|
+
|
34
|
+
# Annoying when used with some api that have blocks with sometimes useful parameters
|
35
|
+
Lint/UnusedBlockArgument:
|
36
|
+
Enabled: false
|
37
|
+
|
38
|
+
# Annoying because it wines for &block parameters, which helps make signature more explicit
|
39
|
+
Lint/UnusedMethodArgument:
|
40
|
+
Enabled: false
|
41
|
+
|
42
|
+
Metrics/AbcSize:
|
43
|
+
Enabled: false
|
44
|
+
|
45
|
+
Metrics/BlockNesting:
|
46
|
+
Enabled: false
|
47
|
+
|
48
|
+
Metrics/BlockLength:
|
49
|
+
Enabled: false
|
50
|
+
|
51
|
+
Metrics/ClassLength:
|
52
|
+
Enabled: false
|
53
|
+
|
54
|
+
Metrics/CyclomaticComplexity:
|
55
|
+
Enabled: false
|
56
|
+
|
57
|
+
# Really, you aim for less than that, but we won't bug you unless you reach 150
|
58
|
+
Metrics/LineLength:
|
59
|
+
IgnoreCopDirectives: true
|
60
|
+
Max: 150
|
61
|
+
|
62
|
+
Metrics/MethodLength:
|
63
|
+
Enabled: false
|
64
|
+
|
65
|
+
Metrics/ModuleLength:
|
66
|
+
Enabled: false
|
67
|
+
|
68
|
+
Metrics/ParameterLists:
|
69
|
+
Enabled: false
|
70
|
+
|
71
|
+
Metrics/PerceivedComplexity:
|
72
|
+
Enabled: false
|
73
|
+
|
74
|
+
Performance/RedundantBlockCall:
|
75
|
+
Enabled: false
|
76
|
+
|
77
|
+
Rails/FilePath:
|
78
|
+
Enabled: false
|
79
|
+
|
80
|
+
Style/AsciiComments:
|
81
|
+
Enabled: false
|
82
|
+
|
83
|
+
Style/ClassAndModuleChildren:
|
84
|
+
Enabled: false
|
85
|
+
|
86
|
+
Style/ConditionalAssignment:
|
87
|
+
Enabled: false
|
88
|
+
|
89
|
+
Style/Documentation:
|
90
|
+
Enabled: false
|
91
|
+
|
92
|
+
# Can use a single nil in the else clause to remove the warning
|
93
|
+
Style/EmptyElse:
|
94
|
+
EnforcedStyle: empty
|
95
|
+
|
96
|
+
Style/EmptyMethod:
|
97
|
+
Enabled: false
|
98
|
+
|
99
|
+
Naming/FileName:
|
100
|
+
Enabled: false
|
101
|
+
|
102
|
+
# We target 2.2 to avoid cops that are not backward compatible, but we want this cop!
|
103
|
+
Style/FrozenStringLiteralComment:
|
104
|
+
EnforcedStyle: always
|
105
|
+
|
106
|
+
Style/InverseMethods:
|
107
|
+
InverseMethods:
|
108
|
+
:present?: :blank?,
|
109
|
+
:include?: :exclude?
|
110
|
+
Exclude:
|
111
|
+
- bin/*
|
112
|
+
- gemfiles/*
|
113
|
+
|
114
|
+
Style/NegatedIf:
|
115
|
+
Enabled: false
|
116
|
+
|
117
|
+
Style/NumericPredicate:
|
118
|
+
Enabled: false
|
119
|
+
|
120
|
+
Style/PercentLiteralDelimiters:
|
121
|
+
Enabled: false
|
122
|
+
|
123
|
+
# We tend to prefer the explicit aspect of sometimes using self.
|
124
|
+
Style/RedundantSelf:
|
125
|
+
Enabled: false
|
126
|
+
|
127
|
+
Style/StringLiterals:
|
128
|
+
EnforcedStyle: single_quotes
|
129
|
+
|
130
|
+
# Doesn't look right to force it in this case:
|
131
|
+
# where(belongs_to_reflection.foreign_type => value_class.base_class.name,
|
132
|
+
# belongs_to_reflection.foreign_key => values.first.id)
|
133
|
+
# But look better in some other cases. So disable
|
134
|
+
Style/TrailingCommaInArguments:
|
135
|
+
Enabled: false
|
136
|
+
|
137
|
+
Style/TrailingCommaInLiteral:
|
138
|
+
EnforcedStyleForMultiline: consistent_comma
|
139
|
+
|
140
|
+
Naming/VariableNumber:
|
141
|
+
Enabled: false
|
142
|
+
|
143
|
+
Style/WordArray:
|
144
|
+
Enabled: false
|
145
|
+
|
146
|
+
Layout/SpaceInsideHashLiteralBraces:
|
147
|
+
EnforcedStyle: no_space
|
148
|
+
|
149
|
+
Style/GlobalVars:
|
150
|
+
Enabled: false
|
151
|
+
|
152
|
+
Style/FormatStringToken:
|
153
|
+
EnforcedStyle: template
|
154
|
+
|
155
|
+
Style/MutableConstant:
|
156
|
+
Enabled: false # TODO: - Remove me one asap
|
157
|
+
|
158
|
+
Style/Alias:
|
159
|
+
EnforcedStyle: prefer_alias_method
|
160
|
+
|
161
|
+
Naming/PredicateName:
|
162
|
+
NamePrefix:
|
163
|
+
- is_
|
164
|
+
- have_
|
165
|
+
NamePrefixBlacklist:
|
166
|
+
- have_
|
167
|
+
NameWhitelist:
|
168
|
+
- is_statement
|
169
|
+
- is_child_statement
|
170
|
+
|
171
|
+
Style/GuardClause:
|
172
|
+
Enabled: false
|
173
|
+
|
174
|
+
Lint/Debugger:
|
175
|
+
Enabled: false # TODO: - Remove me one day
|
176
|
+
|
177
|
+
Style/EmptyCaseCondition:
|
178
|
+
Enabled: false
|
179
|
+
|
180
|
+
Lint/RescueException:
|
181
|
+
Enabled: false # TODO: - Remove me one asap
|
182
|
+
|
183
|
+
Style/DoubleNegation:
|
184
|
+
Enabled: false
|
185
|
+
|
186
|
+
Style/SymbolArray:
|
187
|
+
Enabled: false
|
188
|
+
|
189
|
+
Lint/Void:
|
190
|
+
Enabled: true
|
191
|
+
Exclude:
|
192
|
+
- spec/**/*
|
193
|
+
|
194
|
+
Style/ClassVars:
|
195
|
+
Enabled: false
|
196
|
+
|
197
|
+
Style/MultilineIfModifier:
|
198
|
+
Enabled: false
|
199
|
+
|
200
|
+
Style/NilComparison:
|
201
|
+
Enabled: false
|
202
|
+
|
203
|
+
Lint/EmptyWhen:
|
204
|
+
Enabled: false
|
205
|
+
|
206
|
+
Style/IfUnlessModifier:
|
207
|
+
Enabled: false
|
208
|
+
|
209
|
+
Naming/ConstantName:
|
210
|
+
Enabled: true
|
211
|
+
Exclude:
|
212
|
+
- lib/deep_cover/node/**/*
|
213
|
+
|
214
|
+
Style/RescueModifier:
|
215
|
+
Enabled: false
|
216
|
+
|
217
|
+
Style/PreferredHashMethods:
|
218
|
+
EnforcedStyle: verbose
|
219
|
+
|
220
|
+
Style/ModuleFunction:
|
221
|
+
Enabled: false
|
222
|
+
|
223
|
+
Style/Lambda:
|
224
|
+
EnforcedStyle: literal
|
225
|
+
|
226
|
+
Style/StructInheritance:
|
227
|
+
Enabled: false
|
data/Gemfile
CHANGED
@@ -1,8 +1,11 @@
|
|
1
|
-
|
1
|
+
# frozen_string_literal: true
|
2
2
|
|
3
|
-
|
3
|
+
source 'https://rubygems.org'
|
4
|
+
|
5
|
+
git_source(:github) { |repo_name| "https://github.com/#{repo_name}" }
|
4
6
|
|
5
7
|
# Specify your gem's dependencies in deep_cover.gemspec
|
6
8
|
gemspec
|
7
9
|
|
8
10
|
gem 'pry-byebug', platforms: :mri
|
11
|
+
gem 'ruby-prof', platforms: :mri
|
data/Rakefile
CHANGED
@@ -1,13 +1,17 @@
|
|
1
|
-
|
2
|
-
require "rspec/core/rake_task"
|
1
|
+
# frozen_string_literal: true
|
3
2
|
|
4
|
-
|
3
|
+
require 'bundler/gem_tasks'
|
4
|
+
require 'rspec/core/rake_task'
|
5
|
+
require 'rubocop/rake_task'
|
5
6
|
|
6
|
-
|
7
|
+
RuboCop::RakeTask.new
|
7
8
|
|
9
|
+
RSpec::Core::RakeTask.new(:spec).tap { |task| task.pattern = 'spec/*_spec.rb, spec/*/*_spec.rb' }
|
10
|
+
|
11
|
+
multitask default: RUBY_VERSION > '2.1' ? [:rubocop, :spec] : :spec
|
8
12
|
|
9
13
|
namespace :dev do
|
10
|
-
desc
|
14
|
+
desc 'Setup extra things required to run the spec suite'
|
11
15
|
task :install do
|
12
16
|
commands = []
|
13
17
|
|
@@ -24,6 +28,5 @@ namespace :dev do
|
|
24
28
|
end
|
25
29
|
puts "Command succeeded: #{command}"
|
26
30
|
end
|
27
|
-
|
28
31
|
end
|
29
32
|
end
|
data/bin/console
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
|
3
|
-
require
|
4
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
|
+
require 'deep_cover'
|
5
5
|
|
6
6
|
# You can add fixtures and/or initialization code here to make experimenting
|
7
7
|
# with your gem easier. You can also use a different console, if you like.
|
8
8
|
|
9
9
|
# (If you use this, don't forget to add pry to your Gemfile!)
|
10
|
-
require
|
10
|
+
require 'pry'
|
11
11
|
Pry.start
|
12
12
|
|
13
13
|
# require "irb"
|
data/bin/cov
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
module DeepCover
|
3
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
4
|
|
5
|
-
$LOAD_PATH.unshift('../covered_deep_cover') if ENV[
|
6
|
-
require
|
7
|
-
require_relative
|
5
|
+
$LOAD_PATH.unshift('../covered_deep_cover') if ENV['CC']
|
6
|
+
require 'deep_cover'
|
7
|
+
require_relative '../spec/specs_tools'
|
8
8
|
require 'deep_cover/cli/debugger'
|
9
9
|
|
10
10
|
example = ARGV[0] || 'simple_if'
|
@@ -14,7 +14,7 @@ module DeepCover
|
|
14
14
|
fn = File.absolute_path(fn)
|
15
15
|
source = File.read(fn)
|
16
16
|
else
|
17
|
-
fn =
|
17
|
+
fn = '<passed_from_command_line>'
|
18
18
|
source = ARGV[0].gsub(';;', "\n")
|
19
19
|
end
|
20
20
|
|
@@ -26,7 +26,7 @@ module DeepCover
|
|
26
26
|
item = -1
|
27
27
|
examples = groups.flat_map do |title, examples|
|
28
28
|
menu << Term::ANSIColor.green(title) if title
|
29
|
-
menu.concat(examples.keys.map {|ex| " #{item+=1}: #{ex || '(General)'}"})
|
29
|
+
menu.concat(examples.keys.map { |ex| " #{item += 1}: #{ex || '(General)'}" })
|
30
30
|
examples.values
|
31
31
|
end
|
32
32
|
if ARGV[1]
|
@@ -34,10 +34,10 @@ module DeepCover
|
|
34
34
|
else
|
35
35
|
require 'highline'
|
36
36
|
puts menu
|
37
|
-
answer = HighLine.new.ask(Term::ANSIColor.blue(
|
37
|
+
answer = HighLine.new.ask(Term::ANSIColor.blue('Which? '), Integer) { |q| q.in = 0...examples.size }
|
38
38
|
end
|
39
39
|
lines, lineno = examples[answer]
|
40
40
|
end
|
41
41
|
|
42
|
-
CLI::Debugger.new(lines.join, filename: fn, lineno: lineno, debug: true).show
|
42
|
+
CLI::Debugger.new(lines.join, filename: fn, lineno: lineno, debug: true, profile: ENV['PROF']).show
|
43
43
|
end
|
data/bin/gemcov
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
module DeepCover
|
3
|
-
require
|
3
|
+
require 'bundler/setup'
|
4
4
|
require 'deep_cover'
|
5
5
|
require 'deep_cover/cli/instrumented_clone_reporter'
|
6
6
|
|
7
|
-
CLI::InstrumentedCloneReporter.new(ARGV[0] ||
|
7
|
+
CLI::InstrumentedCloneReporter.new(ARGV[0] || '~/inky-rb').run
|
8
8
|
end
|
data/bin/selfcov
CHANGED
@@ -1,21 +1,21 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
|
-
require
|
3
|
-
require
|
2
|
+
require 'bundler/setup'
|
3
|
+
require 'pry'
|
4
4
|
|
5
5
|
covered_path = ARGV[0]
|
6
6
|
if covered_path
|
7
7
|
$LOAD_PATH.unshift(covered_path)
|
8
8
|
end
|
9
|
-
require
|
9
|
+
require 'deep_cover'
|
10
10
|
|
11
11
|
if covered_path.nil?
|
12
12
|
covered_path = DeepCover::Tools.dump_covered_code_and_save('./lib', dest_path: '../covered_deep_cover')
|
13
|
-
puts
|
13
|
+
puts 'Covered code generation done. Output in', covered_path
|
14
14
|
exec 'bin/selfcov', covered_path
|
15
15
|
else
|
16
16
|
coverage = DeepCover::Coverage.load(covered_path)
|
17
17
|
require 'rspec'
|
18
18
|
error = RSpec::Core::Runner::run(Dir.glob('./spec/*_spec.rb'))
|
19
|
-
puts
|
19
|
+
puts 'Lines not covered:', coverage.report
|
20
20
|
binding.pry
|
21
21
|
end
|
data/bin/test_gems
CHANGED
@@ -1,21 +1,22 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
$LOAD_PATH.unshift(File.expand_path('../lib', __dir__))
|
3
|
-
require
|
3
|
+
require 'deep_cover'
|
4
4
|
|
5
5
|
def gem_list
|
6
6
|
return %w[erubis thor i18n builder tzinfo diff-lcs rack-test tilt multipart-post diff-lcs
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
rubygems-bundler method_source daemons hike multi_json rails-deprecated_sanitizer slop
|
8
|
+
rspec-support thread_safe rspec-core rspec-expectations rspec-mocks rspec mini_portile
|
9
|
+
multi_json rspec-support rspec-expectations rspec-mocks mail nokogiri rack rspec unf
|
10
|
+
json thread_safe rspec-core json rack-protection sdoc docile faraday multi_xml coderay
|
11
|
+
mime-types net-scp multi_json turbolinks formatador coffee-script rack-test
|
12
|
+
] +
|
13
|
+
%w[devise]
|
13
14
|
# How I got those:
|
14
15
|
require 'gems'
|
15
16
|
Gems.most_downloaded
|
16
|
-
|
17
|
-
|
18
|
-
|
17
|
+
.map(&:first) # discard nb downloads
|
18
|
+
.map { |h| h['full_name'] } # get name-0.1.2
|
19
|
+
.map { |n| n.rpartition('-').first } # => name
|
19
20
|
end
|
20
21
|
|
21
22
|
def install_gems
|
data/bin/testall
CHANGED
@@ -39,18 +39,18 @@ rubies = {}
|
|
39
39
|
results = []
|
40
40
|
|
41
41
|
if (`which rvm`; $?.success?)
|
42
|
-
ruby_exec =
|
42
|
+
ruby_exec = 'rvm-exec %{ruby_version} '
|
43
43
|
elsif (`which chruby-exec`; $?.success?)
|
44
|
-
ruby_exec =
|
44
|
+
ruby_exec = 'chruby-exec %{version} -- '
|
45
45
|
end
|
46
46
|
|
47
47
|
configs.each do |ruby_version, gemfile|
|
48
|
-
next if ruby_version ==
|
48
|
+
next if ruby_version == 'ruby-head'
|
49
49
|
|
50
|
-
current_ruby_exec = ruby_exec
|
50
|
+
current_ruby_exec = format(ruby_exec, ruby_version: ruby_version)
|
51
51
|
|
52
|
-
env_vars = {
|
53
|
-
gemfile_text = gemfile ||
|
52
|
+
env_vars = {'BUNDLE_GEMFILE' => gemfile, 'WITHOUT_PENDING' => ENV['WITHOUT_PENDING'] || '1'}
|
53
|
+
gemfile_text = gemfile || 'Default gemfile'
|
54
54
|
success = true
|
55
55
|
|
56
56
|
if !rubies.include?(ruby_version)
|
data/deep_cover.gemspec
CHANGED
@@ -1,46 +1,51 @@
|
|
1
|
-
#
|
2
|
-
|
1
|
+
# frozen_string_literal: true
|
2
|
+
|
3
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
4
|
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
-
require
|
5
|
+
require 'deep_cover/version'
|
5
6
|
|
6
7
|
Gem::Specification.new do |spec|
|
7
|
-
spec.name =
|
8
|
+
spec.name = 'deep-cover'
|
8
9
|
spec.version = DeepCover::VERSION
|
9
|
-
spec.authors = [
|
10
|
-
spec.email = [
|
10
|
+
spec.authors = ['Marc-André Lafortune', 'Maxime Lapointe']
|
11
|
+
spec.email = ['github@marc-andre.ca', 'hunter_spawn@hotmail.com']
|
11
12
|
|
12
|
-
spec.summary =
|
13
|
-
spec.description =
|
14
|
-
spec.homepage =
|
15
|
-
spec.license =
|
13
|
+
spec.summary = 'In depth coverage of your Ruby code.'
|
14
|
+
spec.description = 'expression and branch coverage for Ruby.'
|
15
|
+
spec.homepage = 'http://github.com'
|
16
|
+
spec.license = 'MIT'
|
16
17
|
|
17
18
|
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
19
|
f.match(%r{^(test|spec|features)/})
|
19
20
|
end
|
20
|
-
spec.bindir =
|
21
|
+
spec.bindir = 'exe'
|
21
22
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
-
spec.require_paths = [
|
23
|
+
spec.require_paths = ['lib']
|
23
24
|
|
24
25
|
### Runtime dependencies
|
25
|
-
spec.required_ruby_version =
|
26
|
+
spec.required_ruby_version = '>= 2.0.0'
|
26
27
|
|
28
|
+
# Main dependency
|
27
29
|
spec.add_runtime_dependency 'parser'
|
30
|
+
|
31
|
+
# Support
|
28
32
|
spec.add_runtime_dependency 'backports', '>= 3.10.1'
|
29
33
|
spec.add_runtime_dependency 'binding_of_caller'
|
30
34
|
|
31
35
|
# CLI
|
32
|
-
spec.add_runtime_dependency
|
33
|
-
spec.add_runtime_dependency "highline"
|
34
|
-
spec.add_runtime_dependency 'with_progress'
|
36
|
+
spec.add_runtime_dependency 'highline'
|
35
37
|
spec.add_runtime_dependency 'slop', '~> 4.0'
|
38
|
+
spec.add_runtime_dependency 'term-ansicolor'
|
39
|
+
spec.add_runtime_dependency 'with_progress'
|
36
40
|
|
37
41
|
# While in 0.x
|
38
42
|
spec.add_runtime_dependency 'pry'
|
39
43
|
|
40
44
|
### Dev dependencies
|
41
|
-
spec.add_development_dependency
|
42
|
-
spec.add_development_dependency
|
43
|
-
spec.add_development_dependency
|
44
|
-
spec.add_development_dependency '
|
45
|
-
spec.add_development_dependency
|
45
|
+
spec.add_development_dependency 'activesupport', '~> 4.0'
|
46
|
+
spec.add_development_dependency 'bundler', '~> 1.15'
|
47
|
+
spec.add_development_dependency 'psych', '>= 2.0'
|
48
|
+
spec.add_development_dependency 'rake', '~> 10.0'
|
49
|
+
spec.add_development_dependency 'rspec', '~> 3.0'
|
50
|
+
spec.add_development_dependency 'rubocop'
|
46
51
|
end
|