hexx-suit 1.0.0 → 1.2.0

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
  SHA1:
3
- metadata.gz: 4e924682d1675f4e8884330b4aeabab278fbea26
4
- data.tar.gz: e3d471c9998711c7056dc4fc4b7af0f250ab440a
3
+ metadata.gz: d8bd6bef54a5d6c6248eee1066f3187176ee5638
4
+ data.tar.gz: 5a38748dfd697effc380aec871f82a900f02d060
5
5
  SHA512:
6
- metadata.gz: 9cfcd2f272e615b57ba4e97870c3d7eb3bf399985bba9789ebfed029e09a5562fcd17b74be9f84e01290b099a5a3b9aedbdf7b61ef78712c51ca909cb7a58fe4
7
- data.tar.gz: b3b22710eec9e5e59c7d52de1706b53b5d01a568d44c7f49a514291d8e3962fc4c5f09227217e6a6e5fc8a5ecfa251d1782a5da5fb2c6c0f86eaf2839a9be6b2
6
+ metadata.gz: 92e5d3a72ba2ef9d9be4f6a1042f73dd9f1a7f10df740db697eb738d8770dca1ee4b6be42185d7a622a11e373dce866e56cb73a15ec7fb5f8418e64c3828df34
7
+ data.tar.gz: ffac45876089a466d658ead720ae462f25ae27cb047fcc69aa1edc458afdee65ecc165130118ea7d50a159dd91528b99ec7021aa491711e34986c8010026eb83
@@ -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.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"
@@ -28,7 +28,12 @@ module Hexx
28
28
 
29
29
  # @private
30
30
  def install_rspec
31
- Hexx::RSpec::Install.start
31
+ Hexx::RSpec::Install.start %w(--no-rakefile)
32
+ end
33
+
34
+ # @private
35
+ def create_rakefile
36
+ copy_file "Rakefile"
32
37
  end
33
38
 
34
39
  # @private
@@ -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
@@ -6,7 +6,7 @@ module Hexx
6
6
 
7
7
  # The semantic version of the module.
8
8
  # @see http://semver.org/ Semantic versioning 2.0
9
- VERSION = "1.0.0".freeze
9
+ VERSION = "1.2.0".freeze
10
10
 
11
11
  end # module Suit
12
12
 
@@ -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(check:coverage check:rubocop check:fu check:inch check:yardstick)
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
@@ -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 check:coverage:display" do
32
+ it "invokes test:coverage:display" do
33
33
  expect { subject }
34
- .to change { task_invoked? "check:coverage:display" }
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 check:coverage:run" do
14
+ it "invokes test:coverage:run" do
15
15
  expect { subject }
16
- .to change { task_invoked? "check:coverage:run" }
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 check:coverage" do
14
+ it "invokes test:coverage" do
15
15
  expect { subject }
16
- .to change { task_invoked? "check:coverage" }
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.0.0
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-10 00:00:00.000000000 Z
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.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.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
@@ -1,6 +0,0 @@
1
- caller = Hexx::RSpec::System
2
-
3
- desc "Runs a test suit in a bundle environment, without monitoring coverage."
4
- task :test do
5
- caller.call "bundle exec rspec spec"
6
- end
@@ -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