test_launcher 1.3.0 → 1.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
  SHA1:
3
- metadata.gz: cba086681bd0243f3192c2e8ab7f7c64ecf6c4df
4
- data.tar.gz: 2242f9e79779c288404c3928d151ffdbc556af39
3
+ metadata.gz: ab1010406bbd20148694b51995b73b183d05c6e0
4
+ data.tar.gz: d46b2f16b1ca1c0a73acafb7a20293569e807788
5
5
  SHA512:
6
- metadata.gz: 461511ae00c5a6494f0539d55eff8583db0f33eed0728f761f2fd423a343d8458716b53479d1a41d70f4171cd27d93a29952f7cd65dc237b17dcc5b0e883202c
7
- data.tar.gz: 4dd2e3d23b03f727d6060a7a6d4e0823bfb0d31d3f8ff1dcf51223fcc5482cfb1a9f1e7bb2f3519ecc0d0f4af1575e9b24d47adbf0ccb5dbd9f4a50059df8185
6
+ metadata.gz: 747cf2f747cff578ada42e051d174a2f59a1dfe330fa274ec00d286bbb3c786106381336ccbaa99e79f4fe619e40b0115030d995de8429eec8f76cb49037de7a
7
+ data.tar.gz: bfe7e480ac1839ad59ac4b0035831dc7a0503220e0b221eed670b5a80992f9d92c37f80f987f242d25139f0a77e7a1de11c1f8676947d9af11e4fe4f60c23ed3
data/README.md CHANGED
@@ -57,7 +57,6 @@ But can it run two files for you?
57
57
  ```
58
58
  test_launcher blog_post_test.rb comment_test.rb
59
59
 
60
- #=> ruby -I test test/models/blog_post_test.rb --name=test_blog_name_thing
61
60
  #=> ruby -I test -e 'ARGV.each {|f| require(f)}' test/models/blog_post_test.rb test/models/comment_test.rb
62
61
  ```
63
62
 
@@ -85,6 +84,14 @@ test_launcher springified_test
85
84
 
86
85
  Test Launcher will not use spring if the `DISABLE_SPRING=1` environment variable is set.
87
86
 
87
+ ### Running all tests you've changed:
88
+
89
+ This will find all `*_test.rb` files in your status and pass them to test_launcher to be run. Use this before you commit so you don't accidentally commit a test you've broken.
90
+
91
+ ```
92
+ git status | grep -Eo "([A-z\/]+_test.rb)" | xargs test_launcher
93
+ ```
94
+
88
95
  #Installation
89
96
 
90
97
  To install:
@@ -24,6 +24,19 @@ module TestLauncher
24
24
  end
25
25
 
26
26
  def app_root
27
+ # TODO: untested - If we have more than one /test/ folder in the path, we search for a Gemfile or gemspec
28
+ if exploded_path.select { test_root_folder_name }.size > 1
29
+ exploded_path.each_with_index do |folder_name, i|
30
+ next unless folder_name == test_root_folder_name
31
+
32
+ root_path = File.join("/", exploded_path[0...i])
33
+ if Dir.entries(root_path).any? {|e| e.match /Gemfile|gemspec/}
34
+ return root_path
35
+ end
36
+ end
37
+ end
38
+
39
+ # default to our best guess
27
40
  path = exploded_path[0...exploded_path.rindex(test_root_folder_name)]
28
41
  File.join("/", path)
29
42
  end
@@ -1,3 +1,3 @@
1
1
  module TestLauncher
2
- VERSION = "1.3.0"
2
+ VERSION = "1.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: test_launcher
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.3.0
4
+ version: 1.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Pete Kinnecom
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2016-10-18 00:00:00.000000000 Z
11
+ date: 2016-10-20 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler