hexx-suit 1.0.0 → 1.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/hexx-suit.gemspec +1 -1
- data/lib/hexx/suit/install.rb +6 -1
- data/lib/hexx/suit/install/Rakefile +17 -0
- data/lib/hexx/suit/version.rb +1 -1
- data/lib/tasks/check.rake +3 -3
- data/spec/tests/lib/install_spec.rb +4 -0
- data/spec/tests/suit_spec.rb +3 -3
- data/spec/tests/tasks/check/display_spec.rb +2 -2
- data/spec/tests/tasks/check/run_spec.rb +2 -2
- data/spec/tests/tasks/check_spec.rb +2 -2
- metadata +5 -12
- data/lib/tasks/check/coverage.rake +0 -27
- data/lib/tasks/test.rake +0 -6
- data/spec/tests/tasks/check/coverage_spec.rb +0 -26
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d8bd6bef54a5d6c6248eee1066f3187176ee5638
|
4
|
+
data.tar.gz: 5a38748dfd697effc380aec871f82a900f02d060
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 92e5d3a72ba2ef9d9be4f6a1042f73dd9f1a7f10df740db697eb738d8770dca1ee4b6be42185d7a622a11e373dce866e56cb73a15ec7fb5f8418e64c3828df34
|
7
|
+
data.tar.gz: ffac45876089a466d658ead720ae462f25ae27cb047fcc69aa1edc458afdee65ecc165130118ea7d50a159dd91528b99ec7021aa491711e34986c8010026eb83
|
data/hexx-suit.gemspec
CHANGED
@@ -20,7 +20,7 @@ Gem::Specification.new do |s|
|
|
20
20
|
s.required_ruby_version = ">= 1.9.3"
|
21
21
|
|
22
22
|
s.add_runtime_dependency "guard-rspec", "~> 4.3"
|
23
|
-
s.add_runtime_dependency "hexx-rspec", "~> 0.
|
23
|
+
s.add_runtime_dependency "hexx-rspec", "~> 0.1"
|
24
24
|
s.add_runtime_dependency "inch", "~> 0.5"
|
25
25
|
s.add_runtime_dependency "metric_fu", "~> 4.11"
|
26
26
|
s.add_runtime_dependency "mutant-rspec", "~> 0.7"
|
data/lib/hexx/suit/install.rb
CHANGED
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
begin
|
3
|
+
require "bundler/setup"
|
4
|
+
rescue LoadError
|
5
|
+
puts "You must `gem install bundler` and `bundle install` to run rake tasks"
|
6
|
+
exit
|
7
|
+
end
|
8
|
+
|
9
|
+
# Loads bundler tasks
|
10
|
+
Bundler::GemHelper.install_tasks
|
11
|
+
|
12
|
+
# Loads the Hexx::RSpec and its tasks
|
13
|
+
require "hexx-suit"
|
14
|
+
Hexx::Suit.install_tasks
|
15
|
+
|
16
|
+
# Sets the Hexx::RSpec :test task to default
|
17
|
+
task default: :test
|
data/lib/hexx/suit/version.rb
CHANGED
data/lib/tasks/check.rake
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
namespace :check do
|
2
2
|
|
3
3
|
desc "Runs all tests and code metrics"
|
4
|
-
task run: %w(coverage:run rubocop:run fu:run yardstick:run)
|
4
|
+
task run: %w(test:coverage:run rubocop:run fu:run yardstick:run)
|
5
5
|
|
6
6
|
desc "Displays results of last run for any metric"
|
7
7
|
task display: %w(
|
8
|
-
coverage:display
|
8
|
+
test:coverage:display
|
9
9
|
rubocop:display
|
10
10
|
fu:display
|
11
11
|
inch
|
@@ -14,4 +14,4 @@ namespace :check do
|
|
14
14
|
end
|
15
15
|
|
16
16
|
desc "Runs all tests and code metrics and displays their results"
|
17
|
-
task check: %w(
|
17
|
+
task check: %w(test:coverage check:rubocop check:fu check:inch check:yardstick)
|
@@ -27,5 +27,9 @@ describe Hexx::Suit::Install, :sandbox do
|
|
27
27
|
).each { |file| expect(file).to be_present_in_sandbox }
|
28
28
|
end
|
29
29
|
|
30
|
+
it "adds Hexx::Suit tasks loader to Rakefile" do
|
31
|
+
expect(read_in_sandbox "Rakefile").to include "Hexx::Suit.install_tasks"
|
32
|
+
end
|
33
|
+
|
30
34
|
end
|
31
35
|
end
|
data/spec/tests/suit_spec.rb
CHANGED
@@ -20,9 +20,6 @@ describe Hexx::Suit do
|
|
20
20
|
it "installs described_class tasks" do
|
21
21
|
expect(rake_tasks).to include(*%w(
|
22
22
|
check
|
23
|
-
check:coverage
|
24
|
-
check:coverage:display
|
25
|
-
check:coverage:run
|
26
23
|
check:display
|
27
24
|
check:fu
|
28
25
|
check:fu:display
|
@@ -37,6 +34,9 @@ describe Hexx::Suit do
|
|
37
34
|
check:yardstick:run
|
38
35
|
debug
|
39
36
|
test
|
37
|
+
test:coverage
|
38
|
+
test:coverage:display
|
39
|
+
test:coverage:run
|
40
40
|
))
|
41
41
|
end
|
42
42
|
|
@@ -29,9 +29,9 @@ describe "Rake::Task['check:display']", :tasks do
|
|
29
29
|
.to(true)
|
30
30
|
end
|
31
31
|
|
32
|
-
it "invokes
|
32
|
+
it "invokes test:coverage:display" do
|
33
33
|
expect { subject }
|
34
|
-
.to change { task_invoked? "
|
34
|
+
.to change { task_invoked? "test:coverage:display" }
|
35
35
|
.to(true)
|
36
36
|
end
|
37
37
|
|
@@ -11,9 +11,9 @@ describe "Rake::Task['check:run']", :tasks do
|
|
11
11
|
|
12
12
|
subject { try_in_sandbox { task.invoke } }
|
13
13
|
|
14
|
-
it "invokes
|
14
|
+
it "invokes test:coverage:run" do
|
15
15
|
expect { subject }
|
16
|
-
.to change { task_invoked? "
|
16
|
+
.to change { task_invoked? "test:coverage:run" }
|
17
17
|
.to(true)
|
18
18
|
end
|
19
19
|
|
@@ -11,9 +11,9 @@ describe "Rake::Task[:check]", :tasks do
|
|
11
11
|
|
12
12
|
subject { try_in_sandbox { task.invoke } }
|
13
13
|
|
14
|
-
it "invokes
|
14
|
+
it "invokes test:coverage" do
|
15
15
|
expect { subject }
|
16
|
-
.to change { task_invoked? "
|
16
|
+
.to change { task_invoked? "test:coverage" }
|
17
17
|
.to(true)
|
18
18
|
end
|
19
19
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hexx-suit
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Andrew Kozin
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-03-
|
11
|
+
date: 2015-03-11 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: guard-rspec
|
@@ -30,14 +30,14 @@ dependencies:
|
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '0.
|
33
|
+
version: '0.1'
|
34
34
|
type: :runtime
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '0.
|
40
|
+
version: '0.1'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: inch
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
@@ -136,6 +136,7 @@ files:
|
|
136
136
|
- lib/hexx/suit.rb
|
137
137
|
- lib/hexx/suit/install.rb
|
138
138
|
- lib/hexx/suit/install/Guardfile
|
139
|
+
- lib/hexx/suit/install/Rakefile
|
139
140
|
- lib/hexx/suit/install/_metrics
|
140
141
|
- lib/hexx/suit/install/_rubocop.yml
|
141
142
|
- lib/hexx/suit/install/_yardopts
|
@@ -162,13 +163,11 @@ files:
|
|
162
163
|
- lib/hexx/suit/metrics/yardstick.rb
|
163
164
|
- lib/hexx/suit/version.rb
|
164
165
|
- lib/tasks/check.rake
|
165
|
-
- lib/tasks/check/coverage.rake
|
166
166
|
- lib/tasks/check/fu.rake
|
167
167
|
- lib/tasks/check/inch.rake
|
168
168
|
- lib/tasks/check/rubocop.rake
|
169
169
|
- lib/tasks/check/yardstick.rake
|
170
170
|
- lib/tasks/debug.rake
|
171
|
-
- lib/tasks/test.rake
|
172
171
|
- spec/spec_helper.rb
|
173
172
|
- spec/support/config/sandbox.rb
|
174
173
|
- spec/support/config/tasks.rb
|
@@ -186,9 +185,6 @@ files:
|
|
186
185
|
- spec/tests/lib/metrics/rubocop_spec.rb
|
187
186
|
- spec/tests/lib/metrics/yardstick_spec.rb
|
188
187
|
- spec/tests/suit_spec.rb
|
189
|
-
- spec/tests/tasks/check/coverage/display_spec.rb
|
190
|
-
- spec/tests/tasks/check/coverage/run_spec.rb
|
191
|
-
- spec/tests/tasks/check/coverage_spec.rb
|
192
188
|
- spec/tests/tasks/check/display_spec.rb
|
193
189
|
- spec/tests/tasks/check/fu/display_spec.rb
|
194
190
|
- spec/tests/tasks/check/fu/run_spec.rb
|
@@ -248,12 +244,9 @@ test_files:
|
|
248
244
|
- spec/tests/tasks/check/display_spec.rb
|
249
245
|
- spec/tests/tasks/check/yardstick/run_spec.rb
|
250
246
|
- spec/tests/tasks/check/yardstick/display_spec.rb
|
251
|
-
- spec/tests/tasks/check/coverage/run_spec.rb
|
252
|
-
- spec/tests/tasks/check/coverage/display_spec.rb
|
253
247
|
- spec/tests/tasks/check/yardstick_spec.rb
|
254
248
|
- spec/tests/tasks/check/fu/run_spec.rb
|
255
249
|
- spec/tests/tasks/check/fu/display_spec.rb
|
256
|
-
- spec/tests/tasks/check/coverage_spec.rb
|
257
250
|
- spec/tests/tasks/check/rubocop_spec.rb
|
258
251
|
- spec/tests/tasks/check/inch_spec.rb
|
259
252
|
- spec/tests/suit_spec.rb
|
@@ -1,27 +0,0 @@
|
|
1
|
-
namespace :check do
|
2
|
-
namespace :coverage do
|
3
|
-
|
4
|
-
metric = Hexx::RSpec::Metrics::SimpleCov
|
5
|
-
caller = Hexx::RSpec::System
|
6
|
-
output = -> { ENV.fetch("SIMPLECOV_OUTPUT") { "coveralls/index.html" } }
|
7
|
-
|
8
|
-
# Loads settings for simplecov from the '.hexx-suit.yml'
|
9
|
-
task :configure do
|
10
|
-
metric.load
|
11
|
-
end
|
12
|
-
|
13
|
-
desc "Runs tests under the coveralls"
|
14
|
-
task run: :configure do
|
15
|
-
caller.call "rake test"
|
16
|
-
puts "see results in #{ output.call }"
|
17
|
-
end
|
18
|
-
|
19
|
-
desc "Displays results of the coveralls last run"
|
20
|
-
task display: :configure do
|
21
|
-
caller.call "launchy #{ output.call }"
|
22
|
-
end
|
23
|
-
end
|
24
|
-
|
25
|
-
desc "Runs tests under the coveralls and displays the results"
|
26
|
-
task coverage: %w(coverage:run coverage:display)
|
27
|
-
end
|
data/lib/tasks/test.rake
DELETED
@@ -1,26 +0,0 @@
|
|
1
|
-
# encoding: utf-8
|
2
|
-
|
3
|
-
describe "Rake::Task['check:coverage']", :tasks do
|
4
|
-
|
5
|
-
# The {#task_invoked?} helper is defined in the spec/support/config/tasks.rb
|
6
|
-
# It checks if a task has been invoked.
|
7
|
-
|
8
|
-
let(:task) { Rake::Task["check:coverage"] }
|
9
|
-
|
10
|
-
describe ".invoke", :sandbox do
|
11
|
-
|
12
|
-
subject { try_in_sandbox { task.invoke } }
|
13
|
-
|
14
|
-
it "invokes check:coverage:run" do
|
15
|
-
expect { subject }
|
16
|
-
.to change { task_invoked? "check:coverage:run" }
|
17
|
-
.to(true)
|
18
|
-
end
|
19
|
-
|
20
|
-
it "invokes check:coverage:display" do
|
21
|
-
expect { subject }
|
22
|
-
.to change { task_invoked? "check:coverage:display" }
|
23
|
-
.to(true)
|
24
|
-
end
|
25
|
-
end
|
26
|
-
end
|