last_hit 0.1.0 → 0.1.1

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: 07ba59c386d41319e0087e3e28c788a744dae693
4
- data.tar.gz: 6f7cd5e832a4b814d7a16e3ffcc2f4840b4718ba
3
+ metadata.gz: 6b0ca1d31cda677a5479be222069951ba8cd2ada
4
+ data.tar.gz: 7d62a8adb2686ca5c272ca2ea7dcf2432e05c70b
5
5
  SHA512:
6
- metadata.gz: d6c11b245f9daee575d43c9cd0f8ed842138e463b35897d8e3cfcefb253cb68bfb6e7621856a44bc9ad2629af24266cf7ee27311fca4a3063f4495cab1fd2fc5
7
- data.tar.gz: 399b0323100a284fdd0b260c3706430da011d65199bda40a85b6931ffe35e3b20ab4160ee68361ddabb54bb55728fec7f1fbf4f118828c2d36a8150c06cb9466
6
+ metadata.gz: 50e4d9449ae408e67a6d30d73b4498108179fe2e5bbed180b388ea803fb00b8d7e3b37e21b21fa9151778caa6029a21c1506650420fa3ac70e67e700e7e350c5
7
+ data.tar.gz: 39fe5575d6568ab0216dcaa66333fb830f2a8d401f8a42094bff83e2cba1a34cd34907f8aa4b5c5ef901d278c369485ea3e1af507a06438875a85fe913b5bb19
data/README.md CHANGED
@@ -1,13 +1,13 @@
1
1
  # LastHit
2
2
 
3
- You push code to test server and they fails after centuries wating.
3
+ You finish your features, push code to test servers and they fails after centuries wating? This gem will reduce your waiting time by running relevant tests in your current branch.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
9
  ```ruby
10
- gem 'last_hit'
10
+ gem 'last_hit', group: :development
11
11
  ```
12
12
 
13
13
  And then execute:
@@ -18,27 +18,34 @@ Or install it yourself as:
18
18
 
19
19
  $ gem install last_hit
20
20
 
21
- ## Usage
21
+ ## Config
22
22
 
23
- - Run current modified tests (before commiting)
23
+ Create the file `config/initializers/last_hit.rb` and put below code to config the gem:
24
24
 
25
25
  ```ruby
26
- bundle exec rake last_hit:current_modified
26
+ require 'last_hit'
27
+
28
+ LastHit.configure do |config|
29
+ # The command that run the tests
30
+ config.test_command = 'spring rspec'
31
+
32
+ # The base branch to which your current branch will be compared
33
+ config.default_base_branch = 'develop'
34
+ end
27
35
  ```
28
36
 
29
- - Run all changed tests of a branch from its fork with another branch
37
+ ## Usage
38
+
39
+ #### Run the current modified tests (before commiting)
30
40
 
31
41
  ```ruby
32
- bundle exec rake last_hit:current_branch
42
+ last_hit modified_tests
33
43
  ```
34
44
 
35
- - How to config LastHit: put these lines into /config/initializers/last_hit.rb
45
+ #### Run all modified tests of your current branch compared to the base branch
36
46
 
37
47
  ```ruby
38
- LastHit::Configure.config do |config|
39
- config.test_command = "bundle exec rspec"
40
- config.default_base_branch = "development"
41
- end
48
+ last_hit all_tests
42
49
  ```
43
50
 
44
51
  ## Contributing
@@ -1,5 +1,5 @@
1
1
  class LastHit
2
- def self.config
2
+ def self.configure
3
3
  yield(Configure) if block_given?
4
4
  end
5
5
 
@@ -1,3 +1,3 @@
1
1
  class LastHit
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: last_hit
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Duc Le