hexx-suit 0.2.2 → 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.coveralls.yml +1 -0
- data/.travis.yml +4 -9
- data/Gemfile +5 -6
- data/README.md +35 -26
- data/Rakefile +5 -6
- data/{lib/hexx/suit/install → config}/metrics/simplecov.yml +0 -0
- data/hexx-suit.gemspec +1 -6
- data/lib/hexx/suit/install/Guardfile +14 -5
- data/lib/hexx/suit/install/_rubocop.yml +1 -0
- data/lib/hexx/suit/install/_yardopts +1 -0
- data/lib/hexx/suit/install.rb +15 -46
- data/lib/hexx/suit/metrics/metric_fu/base.rb +15 -7
- data/lib/hexx/suit/metrics/metric_fu/cane.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu/churn.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu/flay.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu/reek.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu/roodi.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu/saikuro.rb +1 -1
- data/lib/hexx/suit/metrics/metric_fu.rb +1 -1
- data/lib/hexx/suit/metrics/rubocop.rb +1 -1
- data/lib/hexx/suit/metrics/yardstick.rb +1 -1
- data/lib/hexx/suit/metrics.rb +0 -3
- data/lib/hexx/suit/version.rb +7 -1
- data/lib/hexx/suit.rb +14 -67
- data/lib/hexx-suit.rb +10 -14
- data/lib/tasks/check/coverage.rake +2 -2
- data/lib/tasks/check/fu.rake +1 -1
- data/lib/tasks/check/inch.rake +1 -1
- data/lib/tasks/check/rubocop.rake +1 -1
- data/lib/tasks/check/yardstick.rake +1 -1
- data/lib/tasks/check.rake +9 -11
- data/lib/tasks/debug.rake +1 -1
- data/lib/tasks/test.rake +1 -1
- data/spec/spec_helper.rb +8 -6
- data/spec/support/config/tasks.rb +1 -1
- data/spec/tests/bin/install_spec.rb +22 -25
- data/spec/tests/lib/install_spec.rb +0 -4
- data/spec/tests/suit_spec.rb +7 -55
- data/spec/tests/tasks/check/coverage/display_spec.rb +2 -2
- data/spec/tests/tasks/check/coverage/run_spec.rb +2 -2
- data/spec/tests/tasks/check/display_spec.rb +0 -6
- data/spec/tests/tasks/check/fu/display_spec.rb +1 -1
- data/spec/tests/tasks/check/fu/run_spec.rb +1 -1
- data/spec/tests/tasks/check/inch_spec.rb +1 -1
- data/spec/tests/tasks/check/rubocop/display_spec.rb +1 -1
- data/spec/tests/tasks/check/rubocop/run_spec.rb +1 -1
- data/spec/tests/tasks/check/run_spec.rb +0 -6
- data/spec/tests/tasks/check/yardstick/display_spec.rb +1 -1
- data/spec/tests/tasks/check_spec.rb +0 -12
- data/spec/tests/tasks/debug_spec.rb +1 -1
- metadata +6 -103
- data/config/initializers/focus.rb +0 -5
- data/config/initializers/garbage_collection.rb +0 -11
- data/config/initializers/i18n.rb +0 -3
- data/config/initializers/random_order.rb +0 -4
- data/config/initializers/rspec.rb +0 -11
- data/lib/hexx/suit/install/Rakefile +0 -17
- data/lib/hexx/suit/install/_rspec +0 -2
- data/lib/hexx/suit/install/metrics/pippi.yml +0 -3
- data/lib/hexx/suit/metrics/base.rb +0 -88
- data/lib/hexx/suit/metrics/pippi.rb +0 -89
- data/lib/hexx/suit/metrics/simplecov.rb +0 -119
- data/lib/hexx/suit/utils/system.rb +0 -66
- data/lib/tasks/check/pippi.rake +0 -33
- data/spec/tests/lib/metrics/pippi_spec.rb +0 -104
- data/spec/tests/lib/metrics/simplecov_spec.rb +0 -102
- data/spec/tests/lib/utils/system_spec.rb +0 -85
- data/spec/tests/tasks/check/pippi/display_spec.rb +0 -48
- data/spec/tests/tasks/check/pippi/run_spec.rb +0 -26
- data/spec/tests/tasks/check/pippi_spec.rb +0 -27
- data/spec/tests/tasks/test_spec.rb +0 -21
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e924682d1675f4e8884330b4aeabab278fbea26
|
4
|
+
data.tar.gz: e3d471c9998711c7056dc4fc4b7af0f250ab440a
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9cfcd2f272e615b57ba4e97870c3d7eb3bf399985bba9789ebfed029e09a5562fcd17b74be9f84e01290b099a5a3b9aedbdf7b61ef78712c51ca909cb7a58fe4
|
7
|
+
data.tar.gz: b3b22710eec9e5e59c7d52de1706b53b5d01a568d44c7f49a514291d8e3962fc4c5f09227217e6a6e5fc8a5ecfa251d1782a5da5fb2c6c0f86eaf2839a9be6b2
|
data/.coveralls.yml
CHANGED
data/.travis.yml
CHANGED
@@ -3,13 +3,8 @@ language: ruby
|
|
3
3
|
script: bundle exec rspec spec
|
4
4
|
rvm:
|
5
5
|
- '1.9.3'
|
6
|
-
- '2.0'
|
7
|
-
- '2.1'
|
8
|
-
- '2.2'
|
9
|
-
- rbx-2
|
10
|
-
- jruby-1.7
|
11
6
|
- ruby-head
|
12
|
-
-
|
13
|
-
|
14
|
-
-
|
15
|
-
-
|
7
|
+
- rbx-2 --1.9
|
8
|
+
- rbx-2 --2.0
|
9
|
+
- jruby-1.7-mode19
|
10
|
+
- jruby-head-mode21
|
data/Gemfile
CHANGED
@@ -3,15 +3,14 @@ source "https://rubygems.org"
|
|
3
3
|
gemspec
|
4
4
|
|
5
5
|
platforms :ruby do
|
6
|
-
gem "pry-rescue", "~> 1.4"
|
7
|
-
gem "pry-stack_explorer", "~> 0.4"
|
6
|
+
gem "pry-rescue", "~> 1.4", require: true
|
7
|
+
gem "pry-stack_explorer", "~> 0.4", require: true
|
8
8
|
end
|
9
9
|
|
10
10
|
platforms :mri_19 do
|
11
|
-
gem "pry-debugger", "~> 0.2"
|
11
|
+
gem "pry-debugger", "~> 0.2", require: true
|
12
12
|
end
|
13
13
|
|
14
|
-
platforms :mri_20, :mri_21
|
15
|
-
gem "pry-byebug", "~> 3.0"
|
16
|
-
gem "pippi", "~> 0.0"
|
14
|
+
platforms :mri_20, :mri_21 do
|
15
|
+
gem "pry-byebug", "~> 3.0", require: true
|
17
16
|
end
|
data/README.md
CHANGED
@@ -21,35 +21,34 @@ It also defines a set of Rake tasks.
|
|
21
21
|
Add this line to your application's Gemfile:
|
22
22
|
|
23
23
|
```ruby
|
24
|
-
|
25
|
-
|
26
|
-
|
24
|
+
group :test, :development do
|
25
|
+
gem "hexx-rspec"
|
26
|
+
gem "hexx-suit", require: false
|
27
|
+
end
|
27
28
|
```
|
28
29
|
|
29
30
|
Then execute:
|
30
31
|
|
31
32
|
```
|
32
|
-
|
33
|
+
bundle
|
33
34
|
```
|
34
35
|
|
35
36
|
And run the task from the application root:
|
36
37
|
|
37
38
|
```
|
38
|
-
|
39
|
+
hexx-suit install
|
39
40
|
```
|
40
41
|
|
41
|
-
Require the gem in the `spec_helper.rb` **before** loading application:
|
42
|
+
Require the `hexx-rspec` part of the gem in the `spec_helper.rb` **before** loading application:
|
42
43
|
|
43
44
|
```ruby
|
44
|
-
|
45
|
-
|
45
|
+
# spec/spec_helper.rb
|
46
|
+
require "hexx-rspec"
|
46
47
|
|
47
|
-
|
48
|
-
|
49
|
-
Hexx::Suit.load_metrics_for(self)
|
48
|
+
# Loads coveralls runtime metrics
|
49
|
+
Hexx::RSpec.load_metrics_for(self)
|
50
50
|
|
51
|
-
|
52
|
-
require "my_app"
|
51
|
+
require "my_app"
|
53
52
|
```
|
54
53
|
|
55
54
|
You can configure all metrics separately in a corresponding yml files, that are created at `config/metrics` directory. The directory also contains default STYLEGUIDE. Feel free to adapt it to your needs.
|
@@ -63,13 +62,13 @@ The gem adds three tasks for a development process authomation:
|
|
63
62
|
The task runs rspec (runs no coverage controls) **in a bundle environment**.
|
64
63
|
|
65
64
|
```
|
66
|
-
|
65
|
+
rake test
|
67
66
|
```
|
68
67
|
|
69
68
|
This is a simple shortcut for longer syntaxes:
|
70
69
|
|
71
70
|
```
|
72
|
-
|
71
|
+
bundle exec rspec spec
|
73
72
|
```
|
74
73
|
|
75
74
|
### Debug
|
@@ -77,13 +76,13 @@ This is a simple shortcut for longer syntaxes:
|
|
77
76
|
The tasks runs specs wrapped to pry `rescue` command.
|
78
77
|
|
79
78
|
```
|
80
|
-
|
79
|
+
rake debug
|
81
80
|
```
|
82
81
|
|
83
82
|
This is the same as:
|
84
83
|
|
85
84
|
```
|
86
|
-
|
85
|
+
bundle exec rescue rspec spec
|
87
86
|
```
|
88
87
|
|
89
88
|
### Check
|
@@ -91,19 +90,19 @@ This is the same as:
|
|
91
90
|
The task runs rspec under the test coverage control, and then calls all the code metrics, except for mutation testing.
|
92
91
|
|
93
92
|
```
|
94
|
-
|
93
|
+
rake check
|
95
94
|
```
|
96
95
|
|
97
96
|
You can use single metrics as well:
|
98
97
|
|
99
98
|
```
|
100
|
-
|
99
|
+
rake check:yardstick
|
101
100
|
```
|
102
101
|
|
103
102
|
See all tasks at:
|
104
103
|
|
105
104
|
```
|
106
|
-
|
105
|
+
rake -T check
|
107
106
|
```
|
108
107
|
|
109
108
|
All the tasks will use settings from `config/metrics` folder.
|
@@ -134,9 +133,8 @@ The gem loads dependencies from the projects below.
|
|
134
133
|
|
135
134
|
* [rubocop](https://github.com/bbatsov/rubocop) - a Ruby static code analyzer
|
136
135
|
* [metric_fu](https://github.com/metricfu/metric_fu/) - a collection of Ruby code analyzers.
|
137
|
-
* [pippi](https://github.com/tcopeland/pippi) - a utility for finding suboptimal Ruby class API usage. Available for MRI ruby 2.0+ only.
|
138
136
|
|
139
|
-
### Tools
|
137
|
+
### Documentation Tools
|
140
138
|
|
141
139
|
* [yard](https://yardoc.org/) - a Ruby documentation tool.
|
142
140
|
* [inch](https://trivelop.de/inch/) - a documentation measurement tool.
|
@@ -144,13 +142,24 @@ The gem loads dependencies from the projects below.
|
|
144
142
|
|
145
143
|
## Compatibility
|
146
144
|
|
147
|
-
Tested under rubies
|
145
|
+
Tested under rubies API 1.9.3+:
|
148
146
|
|
149
147
|
* MRI 1.9.3+
|
150
|
-
* Rubinius 2+
|
151
|
-
* JRuby 1.7+ (
|
148
|
+
* Rubinius 2+ (1.9 and 2.0 modes)
|
149
|
+
* JRuby 1.7+ (1.9 and 2.0+ modes)
|
152
150
|
|
153
|
-
RSpec 3.0+ used for testing
|
151
|
+
RSpec 3.0+ used for testing via [hexx-rspec] suit.
|
152
|
+
|
153
|
+
[hexx-rspec]: https://github.com/nepalez/hexx-rspec
|
154
|
+
|
155
|
+
## Latest Changes
|
156
|
+
|
157
|
+
### v1.0.0
|
158
|
+
|
159
|
+
* Pippi metric removed as incompatible to rubies 1.9.3
|
160
|
+
* 'hexx-rspec' module extracted to separate gem.
|
161
|
+
|
162
|
+
It is now possible using 'hexx-suit' with the `require: false` key.
|
154
163
|
|
155
164
|
## Contributing
|
156
165
|
|
data/Rakefile
CHANGED
@@ -9,10 +9,9 @@ end
|
|
9
9
|
# Loads bundler tasks
|
10
10
|
Bundler::GemHelper.install_tasks
|
11
11
|
|
12
|
-
# Loads the Hexx::
|
13
|
-
require "hexx-
|
12
|
+
# Loads the Hexx::RSpec and its tasks
|
13
|
+
require "hexx-rspec"
|
14
|
+
Hexx::RSpec.install_tasks
|
14
15
|
|
15
|
-
# Sets the :
|
16
|
-
task :
|
17
|
-
system "bundle exec rspec spec"
|
18
|
-
end
|
16
|
+
# Sets the Hexx::RSpec :test task to default
|
17
|
+
task default: :test
|
File without changes
|
data/hexx-suit.gemspec
CHANGED
@@ -19,17 +19,12 @@ Gem::Specification.new do |s|
|
|
19
19
|
|
20
20
|
s.required_ruby_version = ">= 1.9.3"
|
21
21
|
|
22
|
-
s.add_runtime_dependency "coveralls", "~> 0.7"
|
23
22
|
s.add_runtime_dependency "guard-rspec", "~> 4.3"
|
24
|
-
s.add_runtime_dependency "
|
23
|
+
s.add_runtime_dependency "hexx-rspec", "~> 0.0"
|
25
24
|
s.add_runtime_dependency "inch", "~> 0.5"
|
26
25
|
s.add_runtime_dependency "metric_fu", "~> 4.11"
|
27
26
|
s.add_runtime_dependency "mutant-rspec", "~> 0.7"
|
28
|
-
s.add_runtime_dependency "pry", "~> 0.10"
|
29
|
-
s.add_runtime_dependency "rake", "~> 10.3"
|
30
|
-
s.add_runtime_dependency "rspec", "~> 3.0"
|
31
27
|
s.add_runtime_dependency "rubocop", "~> 0.23"
|
32
|
-
s.add_runtime_dependency "thor", "~> 0.19"
|
33
28
|
s.add_runtime_dependency "yardstick", "~> 0.9"
|
34
29
|
|
35
30
|
end
|
@@ -1,6 +1,15 @@
|
|
1
1
|
# encoding: utf-8
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
watch(/^
|
6
|
-
|
2
|
+
|
3
|
+
guard :rspec, cmd: "bundle exec rspec" do
|
4
|
+
|
5
|
+
watch(/^lib(.+)\.rb$/) do |m|
|
6
|
+
"spec/tests#{ m[1] }_spec.rb"
|
7
|
+
end
|
8
|
+
|
9
|
+
watch("spec/tests/*_spec.rb")
|
10
|
+
|
11
|
+
watch("lib/*.rb") { "spec" }
|
12
|
+
watch("spec/spec_helper.rb") { "spec" }
|
13
|
+
watch("spec/support/**/*.rb") { "spec" }
|
14
|
+
|
15
|
+
end # guard :rspec
|
data/lib/hexx/suit/install.rb
CHANGED
@@ -1,4 +1,7 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
1
3
|
module Hexx
|
4
|
+
|
2
5
|
module Suit
|
3
6
|
|
4
7
|
# The generator creates a Rakefile in a destination root
|
@@ -15,11 +18,7 @@ module Hexx
|
|
15
18
|
#
|
16
19
|
# @api public
|
17
20
|
|
18
|
-
#
|
19
|
-
#
|
20
|
-
# @return [String]
|
21
|
-
#
|
22
|
-
# @api private
|
21
|
+
# @private
|
23
22
|
def self.source_root
|
24
23
|
@source_root ||= File.expand_path "../install", __FILE__
|
25
24
|
end
|
@@ -27,68 +26,38 @@ module Hexx
|
|
27
26
|
namespace :install
|
28
27
|
desc "Installs the 'hexx-suit' gem."
|
29
28
|
|
30
|
-
#
|
31
|
-
|
32
|
-
|
33
|
-
#
|
34
|
-
# @api private
|
35
|
-
def create_rakefile
|
36
|
-
copy_file "Rakefile"
|
29
|
+
# @private
|
30
|
+
def install_rspec
|
31
|
+
Hexx::RSpec::Install.start
|
37
32
|
end
|
38
33
|
|
39
|
-
#
|
40
|
-
#
|
41
|
-
# @return [undefined]
|
42
|
-
#
|
43
|
-
# @api private
|
34
|
+
# @private
|
44
35
|
def create_guardfile
|
45
36
|
copy_file "Guardfile"
|
46
37
|
end
|
47
38
|
|
48
|
-
#
|
49
|
-
#
|
50
|
-
# @return [undefined]
|
51
|
-
#
|
52
|
-
# @api private
|
53
|
-
def create_rspec
|
54
|
-
copy_file "_rspec", ".rspec"
|
55
|
-
end
|
56
|
-
|
57
|
-
# Creates the .yardopts settings
|
58
|
-
#
|
59
|
-
# @return [undefined]
|
60
|
-
#
|
61
|
-
# @api private
|
39
|
+
# @private
|
62
40
|
def create_yardopts
|
63
41
|
copy_file "_yardopts", ".yardopts"
|
64
42
|
end
|
65
43
|
|
66
|
-
#
|
67
|
-
#
|
68
|
-
# @return [undefined]
|
69
|
-
#
|
70
|
-
# @api private
|
44
|
+
# @private
|
71
45
|
def create_metrics
|
72
46
|
directory "metrics", "config/metrics"
|
73
47
|
end
|
74
48
|
|
75
|
-
#
|
76
|
-
#
|
77
|
-
# @return [undefined]
|
78
|
-
#
|
79
|
-
# @api private
|
49
|
+
# @private
|
80
50
|
def create_metrics_loader
|
81
51
|
copy_file "_metrics", ".metrics"
|
82
52
|
end
|
83
53
|
|
84
|
-
#
|
85
|
-
#
|
86
|
-
# @return [undefined]
|
87
|
-
#
|
88
|
-
# @api private
|
54
|
+
# @private
|
89
55
|
def create_rubocop_loader
|
90
56
|
copy_file "_rubocop.yml", ".rubocop.yml"
|
91
57
|
end
|
58
|
+
|
92
59
|
end # class Install
|
60
|
+
|
93
61
|
end # module Suit
|
62
|
+
|
94
63
|
end # module Hexx
|
@@ -1,12 +1,15 @@
|
|
1
1
|
# encoding: utf-8
|
2
2
|
|
3
3
|
module Hexx
|
4
|
+
|
4
5
|
module Suit
|
6
|
+
|
5
7
|
module Metrics
|
6
|
-
|
8
|
+
|
9
|
+
class MetricFu < RSpec::Metrics::Base
|
7
10
|
|
8
11
|
# Base class for metrics configured via metric_fu
|
9
|
-
class Base < Metrics::Base
|
12
|
+
class Base < RSpec::Metrics::Base
|
10
13
|
|
11
14
|
# Constructs the object and loads 'metric_fu' dependency
|
12
15
|
#
|
@@ -52,8 +55,13 @@ module Hexx
|
|
52
55
|
yield(metric)
|
53
56
|
end
|
54
57
|
end
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
58
|
+
|
59
|
+
end # class Base
|
60
|
+
|
61
|
+
end # class MetricFu
|
62
|
+
|
63
|
+
end # module Metrics
|
64
|
+
|
65
|
+
end # module Suit
|
66
|
+
|
67
|
+
end # module Hexx
|
data/lib/hexx/suit/metrics.rb
CHANGED
@@ -13,12 +13,9 @@ module Hexx
|
|
13
13
|
# Configurators loads their own dependencies in a corresponding constructor.
|
14
14
|
module Metrics
|
15
15
|
|
16
|
-
require_relative "metrics/base"
|
17
16
|
require_relative "metrics/metric_fu"
|
18
17
|
require_relative "metrics/rubocop.rb"
|
19
|
-
require_relative "metrics/simplecov.rb"
|
20
18
|
require_relative "metrics/yardstick.rb"
|
21
|
-
require_relative "metrics/pippi.rb" if USE_PIPPI_METRIC
|
22
19
|
|
23
20
|
end
|
24
21
|
|
data/lib/hexx/suit/version.rb
CHANGED
data/lib/hexx/suit.rb
CHANGED
@@ -1,10 +1,13 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
|
+
|
2
3
|
module Hexx
|
3
4
|
|
4
5
|
# Namespace for the module.
|
5
|
-
#
|
6
|
-
# @api public
|
7
6
|
module Suit
|
7
|
+
|
8
|
+
require_relative "suit/metrics"
|
9
|
+
require_relative "suit/install"
|
10
|
+
|
8
11
|
class << self
|
9
12
|
|
10
13
|
# Loads all the necessary rake tasks
|
@@ -12,90 +15,34 @@ module Hexx
|
|
12
15
|
# @example
|
13
16
|
# Hexx::Suit.install_tasks
|
14
17
|
#
|
15
|
-
# @return [
|
18
|
+
# @return [undefined]
|
16
19
|
def install_tasks
|
17
|
-
load_gem_tasks
|
18
20
|
load_rspec_tasks
|
19
21
|
load_custom_tasks
|
20
|
-
|
21
|
-
self
|
22
22
|
end
|
23
23
|
|
24
|
-
# Loads runtime metrics
|
25
|
-
#
|
26
|
-
# Checks if a corresponding environment is set
|
24
|
+
# Loads runtime metrics for the host gem
|
27
25
|
#
|
28
26
|
# @example
|
29
27
|
# # spec/spec_helper.rb
|
30
28
|
# Hexx::Suit.load_metrics_for(self)
|
31
|
-
#
|
32
|
-
# @param [Object] scope
|
33
|
-
#
|
34
|
-
# @return [self]
|
35
29
|
def load_metrics_for(scope)
|
36
|
-
|
37
|
-
load_coverage_for(scope)
|
38
|
-
|
39
|
-
self
|
30
|
+
RSpec.load_metrics_for(scope)
|
40
31
|
end
|
41
32
|
|
42
33
|
private
|
43
34
|
|
44
|
-
# Loads runtime coverage metric in a given scope
|
45
|
-
#
|
46
|
-
# @param [Object] scope
|
47
|
-
#
|
48
|
-
# @return self
|
49
|
-
def load_coverage_for(scope)
|
50
|
-
return unless ENV["USE_SIMPLECOV"]
|
51
|
-
scope.instance_eval { Hexx::Suit::Metrics::SimpleCov.run }
|
52
|
-
end
|
53
|
-
|
54
|
-
# Loads runtime pippi metric in a given scope
|
55
|
-
#
|
56
|
-
# @param [Object] scope
|
57
|
-
#
|
58
|
-
# @return [self]
|
59
|
-
def load_pippi_for(scope)
|
60
|
-
return unless ENV["USE_PIPPI"]
|
61
|
-
scope.instance_eval { Hexx::Suit::Metrics::Pippi.run }
|
62
|
-
end
|
63
|
-
|
64
|
-
# Loads bundler rake tasks
|
65
|
-
#
|
66
|
-
# @return [self]
|
67
|
-
#
|
68
|
-
# @api private
|
69
|
-
def load_gem_tasks
|
70
|
-
require "bundler/gem_tasks"
|
71
|
-
::Bundler::GemHelper.install_tasks
|
72
|
-
|
73
|
-
self
|
74
|
-
end
|
75
|
-
|
76
|
-
# Loads rspec +spec+ rake task
|
77
|
-
#
|
78
|
-
# @return [self]
|
79
|
-
#
|
80
|
-
# @api private
|
81
35
|
def load_rspec_tasks
|
82
|
-
|
83
|
-
::RSpec::Core::RakeTask.new(:spec)
|
84
|
-
|
85
|
-
self
|
36
|
+
Hexx::RSpec.install_tasks
|
86
37
|
end
|
87
38
|
|
88
|
-
# Loads rake tasks, defined in the gem
|
89
|
-
#
|
90
|
-
# @return [self]
|
91
|
-
#
|
92
|
-
# @api private
|
93
39
|
def load_custom_tasks
|
94
40
|
tasks = ::File.expand_path "../../tasks/**/*.rake", __FILE__
|
95
41
|
::Dir[tasks].each { |task| load task }
|
96
|
-
|
97
|
-
self
|
98
42
|
end
|
99
|
-
|
43
|
+
|
44
|
+
end # singleton class Suit
|
45
|
+
|
100
46
|
end # module Suit
|
47
|
+
|
101
48
|
end # module Hexx
|
data/lib/hexx-suit.rb
CHANGED
@@ -1,16 +1,12 @@
|
|
1
|
-
#
|
2
|
-
%w(i18n pry rake rspec thor yaml).each { |gem| require gem }
|
1
|
+
# encoding: utf-8
|
3
2
|
|
4
|
-
|
5
|
-
|
3
|
+
require "hexx-rspec"
|
4
|
+
require "pry"
|
6
5
|
|
7
|
-
#
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
"./lib/hexx/suit.rb"
|
15
|
-
].each { |file| require file }
|
16
|
-
end
|
6
|
+
# Shared namespace for the Hexx-based gems
|
7
|
+
module Hexx
|
8
|
+
|
9
|
+
require_relative "hexx/suit/version"
|
10
|
+
require_relative "hexx/suit"
|
11
|
+
|
12
|
+
end # module Hexx
|