rails-talks 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,9 @@
1
1
  # CHANGELOG
2
2
 
3
+ ## 0.0.3
4
+
5
+ * Added dummy support for rails rake tasks (if clear - all bundle exec rake tasks)
6
+
3
7
  ## 0.0.2
4
8
 
5
9
  Init version
data/README.md CHANGED
@@ -1,10 +1,11 @@
1
- # Rails-talks gem — now your rails repo and applications can talk with you :)
1
+ # Rails-talks gem — now your rails repo and applications can talk
2
2
 
3
3
  ### This is beta now
4
4
 
5
5
  This gem using base gem [talks](https://github.com/ruby-talks/talks). You can use it if you want to hear when your rails repo and applications
6
6
  tasks start and when they end.
7
7
 
8
+ Sponsored by Evil Martians <http://evilmartians.com>
8
9
  ## Why?
9
10
 
10
11
  This idea appears on reddotrubyconf just as is :) I just thought about slow specs in rails and decided that I want to hear when they end.
@@ -13,13 +14,26 @@ This idea appears on reddotrubyconf just as is :) I just thought about slow spec
13
14
 
14
15
  This gem using gem `talks` and overwrites some of rails methods when you call `rails-talks` instead of `rake` from your command line.
15
16
 
16
- ### Using spec-talks
17
+ ### Using rails-talks
18
+
19
+ Now only `rails-talks test` function available. It runs `bundle exec rake test` with before and after `talks` hooks.
17
20
 
18
21
  ```bash
19
22
  $ gem install rails-talks
20
23
  $ rails-talks test # instead of just `bundle exec rake test`
21
24
  ```
22
25
 
26
+ You can work with `rails-talks test` just the same as with original `bundle exec rake test` - with some options and customizations:
27
+
28
+ `You are in .../rails/activesupport folder`
29
+ ```bash
30
+ $ TEST_DIR=core_ext RUBYOPT=-W0 rails-talks test
31
+ # instead of
32
+ $ TEST_DIR=core_ext RUBYOPT=-W0 bundle exec rake test
33
+ ```
34
+
35
+ How to customize voices for `talks` you can find in [talks](https://github.com/ruby-talks/talks) repo.
36
+
23
37
  More info later
24
38
 
25
39
  ## Who?
@@ -9,5 +9,9 @@ module RailsTalks
9
9
  Runner.run_tests opts
10
10
  end
11
11
 
12
+ def run(opts)
13
+ Runner.run_rake opts
14
+ end
15
+
12
16
  end
13
17
  end
@@ -3,9 +3,15 @@ module RailsTalks
3
3
  class << self
4
4
 
5
5
  def run_tests(opts)
6
- Talks.info 'Rails tests started'
7
- system "bundle exec rake test #{opts[1..-1].join(' ')}"
8
- Talks.info 'Rails tests ended'
6
+ run_rake(opts, 'Rails tests started', 'Rails tests ended')
7
+ end
8
+
9
+ def run_rake(opts, before = nil, after = nil)
10
+ before ||= "Rake task '#{opts[0]}' started"
11
+ after ||= "Rake task '#{opts[0]}' ended"
12
+ Talks.info before
13
+ system "bundle exec rake #{opts[0..-1]}"
14
+ Talks.info after
9
15
  end
10
16
 
11
17
  end
@@ -1,3 +1,3 @@
1
1
  module RailsTalks
2
- VERSION = '0.0.2'
2
+ VERSION = '0.0.3'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rails-talks
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.2
4
+ version: 0.0.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: