splot 0.5.1 → 0.5.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +41 -3
  3. data/lib/splot/version.rb +1 -1
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e7239341b56f137cc8eb9e3ee90ad87f963c7be2
4
- data.tar.gz: 1374d68cb52b2b77279b08e349a3ceae0de2402d
3
+ metadata.gz: 9a4dbbd8b1e8bf5f568d828642ee7f0481dfbad4
4
+ data.tar.gz: 6f351772ddfb8fedbd4467c73487da2b1d7e3b43
5
5
  SHA512:
6
- metadata.gz: 34b95e19ee56c4350fb7817d3f584076700a6f0d19b6f69807a70f15e9d5682ed6009366d9f29ba42e753f55eac4e9309bc46008fa397f22c8c65fbf9dddc2f7
7
- data.tar.gz: b15e8603ce6d104a9084523831bfad7adcd51826b344a04558aa22f195185b9189d63b961f07783a91ad465c3492e9970d42da97ec45503dcd5fea668434cbc6
6
+ metadata.gz: 57d5624e70eb25809a87cabdc7c10982e01e79b600839c1aa22f90c68ef94bf166a1145ef6f866d4bce48298a82e694d9b63c6f119c22f21291795ceadcfd9d7
7
+ data.tar.gz: be6812a2c2853dd81f6f7fa7f35bc56fb3dd47f10b566eb5193e60f392fdb09e77d5a246a252279761accf98ff596eebd0e3abcbf92c326ed25fbee1fcbe44cc
data/README.md CHANGED
@@ -1,12 +1,12 @@
1
1
  # Splot
2
2
 
3
- TODO: Write a gem description
3
+ Tired of having to reconfigure how you run tests for each project? Annoyed that Minitest::Unit doesn't let you supply a line number? Want to press a single button in your text editor of choice, and run the test most relevant to the file you're editing? If you answered yes to any of these, then `splot` is for you.
4
4
 
5
5
  ## Installation
6
6
 
7
7
  Add this line to your application's Gemfile:
8
8
 
9
- gem 'splot'
9
+ gem 'splot', require: false
10
10
 
11
11
  And then execute:
12
12
 
@@ -18,7 +18,45 @@ Or install it yourself as:
18
18
 
19
19
  ## Usage
20
20
 
21
- TODO: Write usage instructions here
21
+ First, play with `splot` on the command line. Jump into a project root directory. Want to run a test? Try this:
22
+
23
+ # splot -f test/models/foo_test.rb
24
+
25
+ Do you use rspec? Nothing changes, except for the path to the file.
26
+
27
+ # splot -f spec/models/foo_spec.rb
28
+
29
+ Want to run a test on a specific line? No problem:
30
+
31
+ # splot -f test/models/foo_test.rb -l 44
32
+ # splot -f spec/models/foo_spec.rb -l 44
33
+
34
+ When using `Test::Unit`, `splot` will automatically figure out the name of the test corresponding to the line number you give.
35
+
36
+ Now, you need a faster feedback loop, so you decide you want a preloader:
37
+
38
+ # splot -f test/models/foo_test.rb -p zeus
39
+
40
+ That's about all there is to the command line!
41
+
42
+ ## Running relevant tests
43
+
44
+ Editing `app/models/foo.rb`? `splot` can figure out which test to run:
45
+
46
+ # splot -f app/models/foo.rb
47
+
48
+ In this case, it'll look for a test at `test/models/foo_test.rb` or `spec/models/foo_spec.rb`.
49
+
50
+ ## vim-dispatch integration
51
+
52
+ I'm a huge fan of vim dispatch. Here's my `.vimrc` entries that bind `<F5>` to "run the test at the current cursor position" and `<F6>` to "run the whole test file," respectively:
53
+
54
+ map <f5> :w <cr> :execute "Dispatch splot -p spring -f % -l " . ( line(".") + 1 )<cr>
55
+ map <f6> :w <cr> :Dispatch splot -p spring -f %<cr>
56
+
57
+ ## Notes
58
+
59
+ 1. When invoking a `Test::Unit` test, `splot` defaults to using the `rake test`. This is to be compatible with preloaders like `spring` or `zeus`.
22
60
 
23
61
  ## Contributing
24
62
 
data/lib/splot/version.rb CHANGED
@@ -1,3 +1,3 @@
1
1
  module Splot
2
- VERSION = "0.5.1"
2
+ VERSION = "0.5.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: splot
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.1
4
+ version: 0.5.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - ntl
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-24 00:00:00.000000000 Z
11
+ date: 2013-12-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler