hexx-suit 2.2.3 → 2.3.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 81b0b0bb5c01bd257a6f4aa589aea7381c458098
4
- data.tar.gz: ecafd894a7a87cbadd567e2280fb8014e9ae420d
3
+ metadata.gz: 26bd22c52c1d4071d622550878d8ec3fe63bcb5b
4
+ data.tar.gz: 847c7ec8966a4d6daf3b633c644bfbee09e235af
5
5
  SHA512:
6
- metadata.gz: be1ad6dfd7e23e97a795e245288f09bb748dcf413973d82260a68b43518e8089cb25b350162705fd0884efa6bc7da68169e8374d0cf9190ec8d2e09af0f959bf
7
- data.tar.gz: b145d23953faec0ceb364bf1675af6c812f837a7a887d0c1ffd3f63230240fe06ba3d365de88d7799ccc4d1d5666594b941f8e84ad7000791168111aab03a83b
6
+ metadata.gz: 34ea233ec121d0ecbf8a78f73369b8c3e45a6e97da8c6cb30c49edded01e3715d54884241d62a8f65a64c79b17c2435d054e7bbaec80fe73c753d03ec1014f94
7
+ data.tar.gz: addc12136b744dc321bb73008ad2e82e54de480dcf33ef36bc8bc4914fd8e42835824f0857f82c2a1231efe62cfdcf69db962c869b49ae64c685dc7ee2ea473c
data/.travis.yml CHANGED
@@ -2,8 +2,6 @@
2
2
  language: ruby
3
3
  script: rake test:coverage:run
4
4
  rvm:
5
- - '1.9.3'
6
- - '2.0'
7
5
  - '2.1'
8
6
  - '2.2'
9
7
  - ruby-head
data/Guardfile CHANGED
@@ -4,17 +4,17 @@ guard :rspec, cmd: "bundle exec rspec" do
4
4
 
5
5
  watch(%r{^lib/tasks/(.+)\.rb$}) do |m|
6
6
  [
7
- "spec/tests/tasks/#{ m[1] }_spec.rb",
8
- "spec/tests/tasks/#{ m[1] }/**/*_spec.rb"
7
+ "spec/tests/tasks/#{m[1]}_spec.rb",
8
+ "spec/tests/tasks/#{m[1]}/**/*_spec.rb"
9
9
  ]
10
10
  end
11
11
 
12
12
  watch(%r{^lib/hexx/suit/(.+)\.rb$}) do |m|
13
- "spec/tests/lib/#{ m[1] }_spec.rb"
13
+ "spec/tests/lib/#{m[1]}_spec.rb"
14
14
  end
15
15
 
16
16
  watch(%r{^lib/hexx/suit/(.+)/base\.rb$}) do |m|
17
- "spec/tests/lib/#{ m[1] }/*_spec.rb"
17
+ "spec/tests/lib/#{m[1]}/*_spec.rb"
18
18
  end
19
19
 
20
20
  watch("lib/hexx/suit.rb") { "spec" }
data/README.md CHANGED
@@ -1,16 +1,19 @@
1
- # Hexx::Suit
1
+ # Hexx::Suit [![Documentation Status](https://readthedocs.org/projects/hexx-suit/badge/?version=latest)][readthedocs]
2
2
 
3
3
  [![Gem Version](https://img.shields.io/gem/v/hexx-suit.svg?style=flat)][gem]
4
- [![Build Status](https://img.shields.io/travis/nepalez/hexx-suit/master.svg?style=flat)][travis]
5
- [![Dependency Status](https://img.shields.io/gemnasium/nepalez/hexx-suit.svg?style=flat)][gemnasium]
6
- [![Coverage](https://img.shields.io/coveralls/nepalez/hexx-suit.svg?style=flat)][coveralls]
7
- [![License](https://img.shields.io/badge/license-MIT-blue.svg?style=flat)](file:LICENSE)
4
+ [![Build Status](https://travis-ci.org/hexx-rb/hexx-suit.svg?branch=master)][travis]
5
+ [![Dependency Status](https://img.shields.io/gemnasium/hexx-rb/hexx-suit.svg?style=flat)][gemnasium]
6
+ [![Code Climate](https://img.shields.io/codeclimate/github/hexx-rb/hexx-suit.svg?style=flat)][codeclimate]
7
+ [![Coverage](https://img.shields.io/coveralls/hexx-rb/hexx-suit.svg?style=flat)][coveralls]
8
+ [![Inline docs](http://inch-ci.org/github/hexx-rb/hexx-suit.svg)][inch]
8
9
 
10
+ [readthedocs]: http://hexx-suit.readthedocs.org
9
11
  [gem]: https://rubygems.org/gems/hexx-suit
10
- [travis]: https://travis-ci.org/nepalez/hexx-suit
11
- [gemnasium]: https://gemnasium.com/nepalez/hexx-suit
12
- [codeclimate]: https://codeclimate.com/github/nepalez/hexx-suit
13
- [coveralls]: https://coveralls.io/r/nepalez/hexx-suit
12
+ [travis]: https://travis-ci.org/hexx-rb/hexx-suit
13
+ [gemnasium]: https://gemnasium.com/hexx-rb/hexx-suit
14
+ [codeclimate]: https://codeclimate.com/github/hexx-rb/hexx-suit
15
+ [coveralls]: https://coveralls.io/r/hexx-rb/hexx-suit
16
+ [inch]: https://inch-ci.org/github/hexx-rb/hexx-suit
14
17
 
15
18
  The module collects the test/development suit to be shared among projects, along with base settings for included packages.
16
19
 
@@ -39,13 +42,13 @@ hexx-suit install
39
42
 
40
43
  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.
41
44
 
42
- In a [`.travis.yml`][Travis] it is recommended to exclude metrics from the build with option:
45
+ In a [`.travis.yml`][Travis settings] it is recommended to exclude metrics from the build with option:
43
46
 
44
47
  ```yaml
45
48
  bundler_args: --without metrics
46
49
  ```
47
50
 
48
- [Travis]: http://docs.travis-ci.com/user/languages/ruby/#Dependency-Management
51
+ [Travis settings]: http://docs.travis-ci.com/user/languages/ruby/#Dependency-Management
49
52
 
50
53
  ## Usage
51
54
 
@@ -144,22 +147,22 @@ The gem loads dependencies from the projects below.
144
147
 
145
148
  ## Compatibility
146
149
 
147
- Tested under MRI 1.9.3+:
150
+ Tested under [MRI rubies 2.1+](.travis.yml).
148
151
 
149
- RSpec 3.0+ used for testing via [hexx-rspec] suit.
152
+ Uses [RSpec] 3.0+ for testing via [hexx-rspec] suit.
150
153
 
151
- [hexx-rspec]: https://github.com/nepalez/hexx-rspec
154
+ [RSpec]: http://rspec.info
155
+ [hexx-rspec]: https://github.com/hexx-rb/hexx-rspec
152
156
 
153
157
  ## Contributing
154
158
 
155
- * Fork the project.
156
- * Make your feature addition or bug fix.
157
- * Add tests for it. This is important so I don't break it in a
158
- future version unintentionally.
159
- * Commit, do not mess with Rakefile or version
160
- (if you want to have your own version, that is fine but bump version
161
- in a commit by itself I can ignore when I pull)
162
- * Send me a pull request. Bonus points for topic branches.
159
+ * Read the [STYLEGUIDE](config/metrics/STYLEGUIDE)
160
+ * [Fork the project](https://github.com/hexx-rb/hexx-suit)
161
+ * Create your feature branch (`git checkout -b my-new-feature`)
162
+ * Add tests for it
163
+ * Commit your changes (`git commit -am '[UPDATE] Add some feature'`)
164
+ * Push to the branch (`git push origin my-new-feature`)
165
+ * Create a new Pull Request
163
166
 
164
167
  ## License
165
168
 
data/Rakefile CHANGED
@@ -11,7 +11,7 @@ Bundler::GemHelper.install_tasks
11
11
 
12
12
  # Loads the Hexx::RSpec and its tasks
13
13
  require "hexx-rspec"
14
- Hexx::RSpec.install_tasks
14
+ Hexx::RSpec::Tasks.install
15
15
 
16
16
  # Sets the Hexx::RSpec :test task to default
17
17
  task default: :test
data/hexx-suit.gemspec CHANGED
@@ -7,7 +7,7 @@ Gem::Specification.new do |gem|
7
7
  gem.version = Hexx::Suit::VERSION.dup
8
8
  gem.author = "Andrew Kozin"
9
9
  gem.email = "andrew.kozin@gmail.com"
10
- gem.homepage = "https://github.com/nepalez/hexx-suit"
10
+ gem.homepage = "https://github.com/hexx-rb/hexx-suit"
11
11
  gem.summary = "Test/development suit."
12
12
  gem.description = "The module collects gems used for development and testing."
13
13
  gem.license = "MIT"
@@ -18,10 +18,11 @@ Gem::Specification.new do |gem|
18
18
  gem.extra_rdoc_files = Dir["LICENSE", "README.md", ".yardopts"]
19
19
  gem.extensions = "ext/mkrf_conf.rb"
20
20
 
21
- gem.required_ruby_version = ">= 1.9.3"
21
+ gem.required_ruby_version = ">= 2.1"
22
+
22
23
  gem.add_runtime_dependency "fasterer", "~> 0.1"
23
24
  gem.add_runtime_dependency "guard-rspec", "~> 4.3"
24
- gem.add_runtime_dependency "hexx-rspec", "~> 0.1"
25
+ gem.add_runtime_dependency "hexx-rspec", "~> 0.5"
25
26
  gem.add_runtime_dependency "inch", "~> 0.5"
26
27
  gem.add_runtime_dependency "metric_fu", "~> 4.11"
27
28
  gem.add_runtime_dependency "mutant-rspec", "~> 0.7"
@@ -32,4 +33,6 @@ Gem::Specification.new do |gem|
32
33
  gem.add_runtime_dependency "rubocop", "~> 0.23"
33
34
  gem.add_runtime_dependency "yardstick", "~> 0.9"
34
35
 
36
+ gem.add_development_dependency "bundler", "~> 1.7"
37
+
35
38
  end
@@ -72,7 +72,7 @@ module Hexx
72
72
  append_to_file(
73
73
  "Gemfile", %(
74
74
  |group :metrics do
75
- | gem "hexx-suit", "~> #{ version }" if RUBY_ENGINE == "ruby"
75
+ | gem "hexx-suit", "~> #{version}" if RUBY_ENGINE == "ruby"
76
76
  |end
77
77
  |).gsub(/ *\|/, ""),
78
78
  skip: true
@@ -5,7 +5,7 @@ guard :rspec, cmd: "bundle exec rspec" do
5
5
  watch(%r{^spec/.+_spec\.rb$})
6
6
 
7
7
  watch(%r{^lib/<%= gemname %>/(.+)\.rb}) do |m|
8
- "spec/unit/#{ m[1] }_spec.rb"
8
+ "spec/unit/#{m[1]}_spec.rb"
9
9
  end
10
10
 
11
11
  watch("lib/<%= gemname %>.rb") { "spec" }
@@ -77,7 +77,7 @@ module Hexx
77
77
  end
78
78
 
79
79
  def configure_packages
80
- packages.map { |item| "configure_#{ item }" }.each(&method(:send))
80
+ packages.map { |item| "configure_#{item}" }.each(&method(:send))
81
81
  end
82
82
 
83
83
  def configure_cane
@@ -56,10 +56,8 @@ module Hexx
56
56
  # operations
57
57
 
58
58
  def prepare_output
59
- SYSTEM.call %(
60
- mkdir #{ ::File.dirname(output) } -p
61
- touch #{ output }
62
- )
59
+ Hexx::RSpec["mkdir #{::File.dirname(output)} -p"]
60
+ Hexx::RSpec["touch #{output}"]
63
61
  end
64
62
 
65
63
  def set_environment
@@ -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 = "2.2.3".freeze
9
+ VERSION = "2.3.0".freeze
10
10
 
11
11
  end # module Suit
12
12
 
@@ -2,7 +2,6 @@ namespace :check do
2
2
  namespace :fu do
3
3
 
4
4
  metric = Hexx::Suit::Metrics::MetricFu
5
- caller = Hexx::RSpec::System
6
5
  output = -> { ENV.fetch("METRIC_FU_OUTPUT") { "tmp/metric_fu/output" } }
7
6
 
8
7
  # configures the metrics
@@ -12,13 +11,13 @@ namespace :check do
12
11
 
13
12
  desc "Runs metric_fu"
14
13
  task run: :configure do
15
- caller.call "metric_fu --no-open --out #{ output.call }"
16
- puts "see results in #{ output.call }"
14
+ Hexx::RSpec["metric_fu --no-open --out #{output.call}"]
15
+ puts "see results in #{output.call}"
17
16
  end
18
17
 
19
18
  desc "Displays results of metric_fu last run"
20
19
  task display: :configure do
21
- caller.call "metric_fu --open --out #{ output.call }"
20
+ Hexx::RSpec["metric_fu --open --out #{output.call}"]
22
21
  end
23
22
  end
24
23
 
@@ -1,11 +1,9 @@
1
1
  namespace :check do
2
2
 
3
- caller = Hexx::RSpec::System
4
-
5
3
  desc "Runs inch to check quality of API docs"
6
4
  task :inch do
7
5
  puts "******* STARTING METRIC inch"
8
- caller.call "inch --pedantic"
6
+ Hexx::RSpec["inch --pedantic"]
9
7
  puts "******* ENDING METRIC inch"
10
8
  end
11
9
  end
@@ -2,11 +2,10 @@ namespace :check do
2
2
  namespace :rubocop do
3
3
 
4
4
  metric = Hexx::Suit::Metrics::Rubocop
5
- caller = Hexx::RSpec::System
6
5
  format = -> { ENV.fetch("RUBOCOP_FORMAT") { "html" } }
7
6
  output = -> { ENV.fetch("RUBOCOP_OUTPUT") { "tmp/rubocop/index.html" } }
8
7
  options = lambda do
9
- "-f #{ format.call } -o #{ output.call } -c config/metrics/rubocop.yml"
8
+ "-f #{format.call} -o #{output.call} -c config/metrics/rubocop.yml"
10
9
  end
11
10
 
12
11
  # Loads settings for rubocop metric from the '.hexx-suit.yml'
@@ -17,18 +16,18 @@ namespace :check do
17
16
  desc "Runs rubocop metric"
18
17
  task run: :configure do
19
18
  puts "******* STARTING METRIC rubocop"
20
- caller.call "rubocop #{ options.call }"
21
- puts "see results in #{ output.call }"
19
+ Hexx::RSpec["rubocop #{options.call}"]
20
+ puts "see results in #{output.call}"
22
21
  puts "******* ENDING METRIC rubocop"
23
22
  end
24
23
 
25
24
  desc "Displays the results of rubocop last run"
26
25
  task display: :configure do
27
26
  if format.call == "html"
28
- caller.call "launchy #{ output.call }"
27
+ Hexx::RSpec["launchy #{output.call}"]
29
28
  else
30
29
  puts "******* DISPLAYING METRIC rubocop"
31
- caller.call "cat #{ output.call }"
30
+ Hexx::RSpec["cat #{output.call}"]
32
31
  puts "******* ENDING METRIC rubocop"
33
32
  end
34
33
  end
@@ -2,7 +2,6 @@ namespace :check do
2
2
  namespace :yardstick do
3
3
 
4
4
  metric = Hexx::Suit::Metrics::Yardstick
5
- caller = Hexx::RSpec::System
6
5
  output = lambda do
7
6
  ENV.fetch("YARDSTICK_OUTPUT") { "tmp/yardstick/results.log" }
8
7
  end
@@ -11,7 +10,7 @@ namespace :check do
11
10
  task :run do
12
11
  puts "******* STARTING METRIC yardstick"
13
12
  metric.run
14
- puts "see results in #{ output.call }"
13
+ puts "see results in #{output.call}"
15
14
  puts "******* ENDING METRIC yardstick"
16
15
  end
17
16
 
@@ -19,7 +18,7 @@ namespace :check do
19
18
  task :display do
20
19
  puts "******* DISPLAYING METRIC yardstick"
21
20
  metric.load
22
- caller.call "cat #{ output.call }"
21
+ Hexx::RSpec["cat #{output.call}"]
23
22
  puts "******* ENDING METRIC yardstick"
24
23
  end
25
24
  end
data/lib/tasks/debug.rake CHANGED
@@ -1,6 +1,4 @@
1
- caller = Hexx::RSpec::System
2
-
3
1
  desc "Runs a test suit in a bundle environment inside pry 'rescue' wrapper."
4
2
  task :debug do
5
- caller.call "bundle exec rescue rspec spec"
3
+ Hexx::RSpec["bundle exec rescue rspec spec"]
6
4
  end
@@ -26,7 +26,6 @@ RSpec.configure do |config|
26
26
 
27
27
  # Captures commands that System utility sends to system
28
28
  # and stores them in {#commands} array.
29
- allow_any_instance_of(Hexx::RSpec::System)
30
- .to receive(:system) { |command| commands << command }
29
+ allow(Hexx::RSpec).to receive(:[]) { |command| commands << command }
31
30
  end
32
31
  end
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:fu:display']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:metric) { Hexx::Suit::Metrics::MetricFu }
10
6
  let(:task) { Rake::Task["check:fu:display"] }
11
7
 
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:fu:run']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:metric) { Hexx::Suit::Metrics::MetricFu }
10
6
  let(:task) { Rake::Task["check:fu:run"] }
11
7
 
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:inch']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:task) { Rake::Task["check:inch"] }
10
6
 
11
7
  describe ".invoke", :sandbox, :capture do
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:rubocop:display']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:task) { Rake::Task["check:rubocop:display"] }
10
6
 
11
7
  shared_context "without rubocop.yml" do
@@ -34,7 +30,7 @@ describe "Rake::Task['check:rubocop:display']", :tasks do
34
30
  it "displays rubocop results" do
35
31
  expect { subject }
36
32
  .to change { commands }
37
- .to ["launchy #{ options['output'] }"]
33
+ .to ["launchy #{options['output']}"]
38
34
  end
39
35
  end
40
36
 
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:rubocop:run']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:task) { Rake::Task["check:rubocop:run"] }
10
6
 
11
7
  shared_context "without rubocop.yml" do
@@ -44,8 +40,8 @@ describe "Rake::Task['check:rubocop:run']", :tasks do
44
40
  let(:command) do
45
41
  %W(
46
42
  rubocop
47
- -f #{ options['format'] }
48
- -o #{ options['output'] }
43
+ -f #{options['format']}
44
+ -o #{options['output']}
49
45
  -c config/metrics/rubocop.yml
50
46
  ).join(" ")
51
47
  end
@@ -2,10 +2,6 @@
2
2
 
3
3
  describe "Rake::Task['check:yardstick:display']", :tasks do
4
4
 
5
- # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
- # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
8
-
9
5
  let(:metric) { Hexx::Suit::Metrics::Yardstick }
10
6
  let(:task) { Rake::Task["check:yardstick:display"] }
11
7
 
@@ -4,7 +4,7 @@ describe "Rake::Task[:debug]", :tasks do
4
4
 
5
5
  # The {#commands} variable is defined in the spec/support/config/tasks.rb
6
6
  # It collects the list of commands, that has been sent to system by
7
- # any instance of Hexx::RSpec::System utility.
7
+ # Hexx::RSpec.[]
8
8
 
9
9
  let(:task) { Rake::Task[:debug] }
10
10
 
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: 2.2.3
4
+ version: 2.3.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-05-18 00:00:00.000000000 Z
11
+ date: 2015-07-10 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: fasterer
@@ -44,14 +44,14 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.1'
47
+ version: '0.5'
48
48
  type: :runtime
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
52
  - - "~>"
53
53
  - !ruby/object:Gem::Version
54
- version: '0.1'
54
+ version: '0.5'
55
55
  - !ruby/object:Gem::Dependency
56
56
  name: inch
57
57
  requirement: !ruby/object:Gem::Requirement
@@ -164,6 +164,20 @@ dependencies:
164
164
  - - "~>"
165
165
  - !ruby/object:Gem::Version
166
166
  version: '0.9'
167
+ - !ruby/object:Gem::Dependency
168
+ name: bundler
169
+ requirement: !ruby/object:Gem::Requirement
170
+ requirements:
171
+ - - "~>"
172
+ - !ruby/object:Gem::Version
173
+ version: '1.7'
174
+ type: :development
175
+ prerelease: false
176
+ version_requirements: !ruby/object:Gem::Requirement
177
+ requirements:
178
+ - - "~>"
179
+ - !ruby/object:Gem::Version
180
+ version: '1.7'
167
181
  description: The module collects gems used for development and testing.
168
182
  email: andrew.kozin@gmail.com
169
183
  executables:
@@ -258,7 +272,7 @@ files:
258
272
  - spec/tests/tasks/check/yardstick_spec.rb
259
273
  - spec/tests/tasks/check_spec.rb
260
274
  - spec/tests/tasks/debug_spec.rb
261
- homepage: https://github.com/nepalez/hexx-suit
275
+ homepage: https://github.com/hexx-rb/hexx-suit
262
276
  licenses:
263
277
  - MIT
264
278
  metadata: {}
@@ -270,7 +284,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
270
284
  requirements:
271
285
  - - ">="
272
286
  - !ruby/object:Gem::Version
273
- version: 1.9.3
287
+ version: '2.1'
274
288
  required_rubygems_version: !ruby/object:Gem::Requirement
275
289
  requirements:
276
290
  - - ">="