koine-test_runner 0.2.1 → 0.4.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
  SHA256:
3
- metadata.gz: '095d037af80367cb82bcbc7fc7c9c03d82d58318d4ec7ea2aa2ef97d18a56ae5'
4
- data.tar.gz: '02159867dc39b6e1dae40ba707787ad6618110ff0176445041e8e01831c9a30c'
3
+ metadata.gz: 6184f013e773c64299e64d21e60a1b03a08ed4b59b8bc1175787f16008c4e2e5
4
+ data.tar.gz: c3a6841d04e74bb2d367ab3e3519659c3a4cd736c1d892573427044861214154
5
5
  SHA512:
6
- metadata.gz: 7e30644c28c2251ab9cb9e4499a3b3aa11834bd25f4188980df6c678631bf88bc4c138f629ef130fa1cb9fe6afb1b61e91ed1d983100978008ba9c9abcb84073
7
- data.tar.gz: 8ba5690e21e7e69e729fdb4e35d0158a27d5a6b818bc51d5484288f1fbcf92b3839d661254cf045dd38eadc7e2e2c85d337e341c6aecba8306e440f2cdd3381d
6
+ metadata.gz: 647a7ff215fb6df3949f26b3965a0667fdd60c5d4dda8f3ca8fcdfcf2699baf6d66e495cf4200afc6c61514a38d064028e1170385d09e1bd77d17bd63e269ee6
7
+ data.tar.gz: 4eab14efbb0467464b00d317113f83a36904809a8f98773c4f6e0572d8195f7503f34053330134337f9d9525934e78f7447b296dddda61ddc11f96e6648b557a
data/.rspec CHANGED
@@ -1,2 +1 @@
1
- --format documentation
2
1
  --color
data/.travis.yml CHANGED
@@ -7,9 +7,12 @@ rvm:
7
7
  - 2.4.0
8
8
  - 2.4.3
9
9
  - 2.5.0
10
+ - 2.6.0
11
+ - 2.7.0
12
+ - 3.0.0
10
13
  before_install: gem install bundler -v 1.14.6
11
14
 
12
15
  script:
13
16
  - bundle exec rspec
14
17
  - ./tests/integration_tests.sh
15
- - bundle exec rubocop
18
+ # - bundle exec rubocop
data/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Easy test runner customization
4
4
 
5
- [![Build Status](https://travis-ci.org/mjacobus/test_runner.svg?branch=master)](https://travis-ci.org/mjacobus/test_runner)
5
+ [![Build Status](https://travis-ci.com/mjacobus/test_runner.svg?branch=master)](https://travis-ci.com/mjacobus/test_runner)
6
6
  [![Coverage Status](https://coveralls.io/repos/github/mjacobus/test_runner/badge.svg?branch=master)](https://coveralls.io/github/mjacobus/test_runner?branch=master)
7
7
  [![Code Climate](https://codeclimate.com/github/mjacobus/test_runner/badges/gpa.svg)](https://codeclimate.com/github/mjacobus/test_runner)
8
8
  [![Issue Count](https://codeclimate.com/github/mjacobus/test_runner/badges/issue_count.svg)](https://codeclimate.com/github/mjacobus/test_runner)
@@ -106,6 +106,12 @@ Or
106
106
  bundle exec run_test --last
107
107
  ```
108
108
 
109
+ ## Checking the log
110
+
111
+ ```
112
+ cat /tmp/test_runner.log
113
+ ```
114
+
109
115
  ## Development
110
116
 
111
117
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
data/bin/console CHANGED
@@ -1,7 +1,7 @@
1
1
  #!/usr/bin/env ruby
2
2
 
3
3
  require 'bundler/setup'
4
- require 'test_runner'
4
+ require 'koine/test_runner'
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.
data/exe/run_test CHANGED
@@ -1,8 +1,8 @@
1
1
  #!/usr/bin/env ruby
2
- lib = File.expand_path('lib', __dir__)
2
+ lib = File.expand_path('../lib', __dir__)
3
3
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
4
 
5
- require 'bundler/setup'
5
+ require 'fileutils'
6
6
  require 'koine/test_runner'
7
7
  require 'yaml'
8
8
 
@@ -1,3 +1,6 @@
1
+ require 'fileutils'
2
+ require 'logger'
3
+
1
4
  require 'koine/test_runner/version'
2
5
  require 'koine/test_runner/command_executer'
3
6
  require 'koine/test_runner/configuration'
@@ -34,7 +34,7 @@ module Koine
34
34
  end
35
35
 
36
36
  klass = Object.const_get(adapter_class)
37
- klass.new(symbolize_keys(config))
37
+ klass.new(**symbolize_keys(config))
38
38
  end
39
39
 
40
40
  def classify(klass)
@@ -2,7 +2,12 @@ module Koine
2
2
  class TestRunner
3
3
  class CommandExecuter
4
4
  def execute(command)
5
+ start = Time.now
5
6
  system(command.to_s)
7
+ finish = Time.now
8
+ elapsed = finish - start
9
+ logger.info("#{command} => elapsed time: #{elapsed.round(2)}")
10
+ puts "\nTook #{elapsed.round(2)} seconds"
6
11
  $?.exitstatus
7
12
  end
8
13
 
@@ -15,6 +20,10 @@ module Koine
15
20
  puts command
16
21
  exit(execute(command))
17
22
  end
23
+
24
+ def logger
25
+ @logger ||= Logger.new('/tmp/test_runner.log')
26
+ end
18
27
  end
19
28
  end
20
29
  end
@@ -1,3 +1,3 @@
1
1
  class TestRunner
2
- VERSION = '0.2.1'.freeze
2
+ VERSION = '0.4.0'.freeze
3
3
  end
@@ -5,7 +5,8 @@ set -v
5
5
 
6
6
  export SKIP_COVERAGE='true'
7
7
 
8
- ./exe/run_test spec/fixtures/FixturePhpUnitTest.php --line=30
8
+ bundle exec rake install
9
+ # ./exe/run_test spec/fixtures/FixturePhpUnitTest.php --line=30
9
10
  ./exe/run_test spec/koine/test_runner_spec.rb
10
11
  ./exe/run_test spec/koine/test_runner_spec.rb --line=9
11
12
  ./exe/run_test spec/koine/test_runner_spec.rb --last
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: koine-test_runner
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.1
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marcelo Jacobus
8
- autorequire:
8
+ autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2019-06-20 00:00:00.000000000 Z
11
+ date: 2021-03-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: coveralls
@@ -115,7 +115,6 @@ files:
115
115
  - bin/setup
116
116
  - config/default.yml
117
117
  - exe/run_test
118
- - integration_test.sh
119
118
  - koine-test_runner.gemspec
120
119
  - lib/koine/test_runner.rb
121
120
  - lib/koine/test_runner/adapters.rb
@@ -137,7 +136,7 @@ licenses:
137
136
  - MIT
138
137
  metadata:
139
138
  allowed_push_host: https://rubygems.org
140
- post_install_message:
139
+ post_install_message:
141
140
  rdoc_options: []
142
141
  require_paths:
143
142
  - lib
@@ -152,8 +151,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
152
151
  - !ruby/object:Gem::Version
153
152
  version: '0'
154
153
  requirements: []
155
- rubygems_version: 3.0.3
156
- signing_key:
154
+ rubygems_version: 3.2.3
155
+ signing_key:
157
156
  specification_version: 4
158
157
  summary: Easy test runner
159
158
  test_files: []
data/integration_test.sh DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env bash
2
-
3
- set -e
4
- set -v
5
-
6
- ./exe/run_test spec/fixtures/FixturePhpUnitTest.php --line=30
7
- ./exe/run_test spec/koine/test_runner_spec.rb
8
- ./exe/run_test spec/koine/test_runner_spec.rb --line=9
9
- ./exe/run_test spec/koine/test_runner_spec.rb --all