spec-talks 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ # CHANGELOG
2
+
3
+ ## 0.0.2
4
+
5
+ Init version
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in gon.gemspec
4
+ gemspec
data/README.md ADDED
@@ -0,0 +1,67 @@
1
+ # Spec-talks gem — now your specs on your mac can talk with you :)
2
+
3
+ ### This is beta now
4
+
5
+ ## It was checked only on MacOS X. I don't know what present on linux or windows
6
+
7
+ This gem using base gem [talks](https://github.com/ruby-talks/talks). You can use it if you want to hear when your specs (with rspec)
8
+ start and when they end. Maybe I'll add here something more later :)
9
+
10
+ ## Why?
11
+
12
+ 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
+ This gem not really for rails, for rails I will do another gem with another hacks. This gem for your reeeeeeally slow specs.
14
+
15
+ ## How?
16
+
17
+ This gem using gem `talks` and overwrites some of rspec methods when you call `spec-talks` instead of `rspec` from your command line.
18
+
19
+ ### Using spec-talks
20
+
21
+ ```bash
22
+ $ gem install spec-talks
23
+ $ spec-talks folder_with_rspec_specs # instead of just `rspec folder_with_rspec_specs`
24
+ ```
25
+
26
+ Of course you can use it with bundler:
27
+
28
+ `Gemfile`
29
+ ```ruby
30
+ group :test do
31
+ gem 'rspec'
32
+ gem 'spec-talks'
33
+ end
34
+ ```
35
+
36
+ `bash`
37
+ ```bash
38
+ $ bundle install
39
+ $ bundle exec spec-talks folder_with_your_specs
40
+ ```
41
+
42
+ And of course it's not overwrites rspec methods when you use original `rspec` command line tool.
43
+
44
+ ## Who?
45
+
46
+ I did it myself
47
+
48
+ ### Contributors
49
+
50
+ * @gazay
51
+
52
+ ### A lot of thanks
53
+
54
+ You can help me with this fun gem and I'll gladly add you here, or above
55
+
56
+ ## License
57
+
58
+ The MIT License
59
+
60
+ Copyright (c) 2012 gazay
61
+
62
+ Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
63
+
64
+ The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
65
+
66
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
67
+
data/Rakefile ADDED
@@ -0,0 +1,9 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+ require 'bundler'
4
+ Bundler::GemHelper.install_tasks
5
+
6
+ desc 'Run all tests by default'
7
+ task :default do
8
+ system("rspec spec")
9
+ end
data/bin/spec-talks ADDED
@@ -0,0 +1,6 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ rspec_talks_dir = File.expand_path(File.join(File.dirname(__FILE__), '..', 'lib'))
4
+ $LOAD_PATH.unshift(rspec_talks_dir) unless $LOAD_PATH.include?(rspec_talks_dir)
5
+ require 'spec-talks'
6
+ require 'spec-talks/runner'
@@ -0,0 +1,33 @@
1
+ module RSpec
2
+ module Core
3
+ class Runner
4
+
5
+ # Register an at_exit hook that runs the suite.
6
+ def self.autorun
7
+ ::Talks.say 'Tests start'
8
+ return if autorun_disabled? || installed_at_exit? || running_in_drb?
9
+ at_exit { exit run(ARGV, $stderr, $stdout).to_i unless $! }
10
+ @installed_at_exit = true
11
+ end
12
+
13
+ end
14
+ end
15
+ end
16
+
17
+ module RSpec::Core
18
+ class Reporter
19
+ def report(expected_example_count, seed=nil)
20
+ start(expected_example_count)
21
+ begin
22
+ yield self
23
+ ensure
24
+ finish(seed)
25
+ if @failure_count.zero?
26
+ ::Talks.success 'Tests passed'
27
+ else
28
+ ::Talks.error "Tests failed, there #{@failure_count} errors"
29
+ end
30
+ end
31
+ end
32
+ end
33
+ end
@@ -0,0 +1,2 @@
1
+ require 'rspec/core'
2
+ RSpec::Core::Runner.autorun
@@ -0,0 +1,3 @@
1
+ module SpecTalks
2
+ VERSION = '0.0.3'
3
+ end
data/lib/spec-talks.rb ADDED
@@ -0,0 +1,6 @@
1
+ require 'talks'
2
+ require 'rspec'
3
+ require 'spec-talks/patches'
4
+
5
+ module SpecTalks
6
+ end
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "spec-talks/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "spec-talks"
7
+ s.version = SpecTalks::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ['gazay']
10
+ s.email = ['alex.gaziev@gmail.com']
11
+ s.homepage = "https://github.com/gazay/rspec-talks"
12
+ s.summary = %q{Simple gem for say function of mac os x in rspec flow}
13
+ s.description = %q{Simple gem for say function of mac os x in rspec flow}
14
+
15
+ s.rubyforge_project = "spec-talks"
16
+
17
+ s.files = `git ls-files`.split("\n")
18
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
19
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
20
+ s.require_paths = ["lib"]
21
+
22
+ s.add_dependency 'talks'
23
+ s.add_dependency 'rspec'
24
+ end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: spec-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:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-21 00:00:00.000000000 Z
12
+ date: 2012-05-22 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: talks
@@ -28,7 +28,7 @@ dependencies:
28
28
  - !ruby/object:Gem::Version
29
29
  version: '0'
30
30
  - !ruby/object:Gem::Dependency
31
- name: spec
31
+ name: rspec
32
32
  requirement: !ruby/object:Gem::Requirement
33
33
  none: false
34
34
  requirements:
@@ -43,13 +43,24 @@ dependencies:
43
43
  - - ! '>='
44
44
  - !ruby/object:Gem::Version
45
45
  version: '0'
46
- description: Simple gem for `say` function of mac os x in rspec flow
46
+ description: Simple gem for say function of mac os x in rspec flow
47
47
  email:
48
48
  - alex.gaziev@gmail.com
49
- executables: []
49
+ executables:
50
+ - spec-talks
50
51
  extensions: []
51
52
  extra_rdoc_files: []
52
- files: []
53
+ files:
54
+ - CHANGELOG.md
55
+ - Gemfile
56
+ - README.md
57
+ - Rakefile
58
+ - bin/spec-talks
59
+ - lib/spec-talks.rb
60
+ - lib/spec-talks/patches.rb
61
+ - lib/spec-talks/runner.rb
62
+ - lib/spec-talks/version.rb
63
+ - spec-talks.gemspec
53
64
  homepage: https://github.com/gazay/rspec-talks
54
65
  licenses: []
55
66
  post_install_message:
@@ -73,5 +84,5 @@ rubyforge_project: spec-talks
73
84
  rubygems_version: 1.8.24
74
85
  signing_key:
75
86
  specification_version: 3
76
- summary: Simple gem for `say` function of mac os x in rspec flow
87
+ summary: Simple gem for say function of mac os x in rspec flow
77
88
  test_files: []