plymouth 0.3.0 → 0.3.1
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +4 -4
- data/Rakefile +105 -105
- data/lib/plymouth.rb +6 -0
- data/lib/plymouth/version.rb +3 -3
- data/plymouth.gemspec +6 -6
- metadata +48 -41
data/README.md
CHANGED
@@ -3,9 +3,9 @@ plymouth
|
|
3
3
|
|
4
4
|
(C) John Mair (banisterfiend) 2012
|
5
5
|
|
6
|
-
_Start
|
6
|
+
_Start Pry in the context of a failed test_
|
7
7
|
|
8
|
-
**Warning BETA software: Please file an [issue](https://github.com/banister/plymouth) if you have any problems**
|
8
|
+
**Warning BETA software: Please file an [issue](https://github.com/banister/plymouth/issues) if you have any problems**
|
9
9
|
|
10
10
|
`plymouth` is a gem to automatically start a [Pry](http://pry.github.com) session when a test fails, putting you in the context of the failure.
|
11
11
|
It currently supports [Bacon](https://github.com/chneukirchen/bacon), [Minitest](https://github.com/seattlerb/minitest), and [RSpec](https://github.com/rspec/rspec).
|
@@ -20,7 +20,7 @@ plymouth currently only runs on **MRI 1.9.2+ (including 1.9.3)**
|
|
20
20
|
|
21
21
|
**How to use:**
|
22
22
|
|
23
|
-
|
23
|
+
After installing the gem, simply add the following line to your test suite:
|
24
24
|
|
25
25
|
`require 'plymouth'`
|
26
26
|
|
@@ -97,7 +97,7 @@ If `USE_PLYMOUTH` is not defined at all, plymouth will be used by default.
|
|
97
97
|
Limitations
|
98
98
|
-------------------------
|
99
99
|
|
100
|
-
* Occasional segfault on 1.9.3 (seems to work fine on 1.9.2). Please [report](https://github.com/banister/plymouth) all segfaults with a full backtrace!
|
100
|
+
* Occasional (very rare) segfault on 1.9.3 (seems to work fine on 1.9.2). Please [report](https://github.com/banister/plymouth/issues) all segfaults with a full backtrace!
|
101
101
|
* Only supports MRI.
|
102
102
|
* Currently limited to just Bacon, RSpec and Minitest. Support for more testing libraries will be added in the future.
|
103
103
|
|
data/Rakefile
CHANGED
@@ -1,105 +1,105 @@
|
|
1
|
-
$:.unshift 'lib'
|
2
|
-
|
3
|
-
dlext = Config::CONFIG['DLEXT']
|
4
|
-
direc = File.dirname(__FILE__)
|
5
|
-
|
6
|
-
PROJECT_NAME = "plymouth"
|
7
|
-
|
8
|
-
require "#{PROJECT_NAME}/version"
|
9
|
-
|
10
|
-
CLASS_NAME = Plymouth
|
11
|
-
|
12
|
-
require 'rake/clean'
|
13
|
-
require 'rake/gempackagetask'
|
14
|
-
|
15
|
-
CLOBBER.include("**/*~", "**/*#*", "**/*.log", "**/*.o")
|
16
|
-
CLEAN.include("ext/**/*.log", "ext/**/*.o",
|
17
|
-
"ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
|
18
|
-
"ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake")
|
19
|
-
|
20
|
-
def apply_spec_defaults(s)
|
21
|
-
s.name = PROJECT_NAME
|
22
|
-
s.summary = "Start an interactive session when a test fails"
|
23
|
-
s.version = CLASS_NAME::VERSION
|
24
|
-
s.date = Time.now.strftime '%Y-%m-%d'
|
25
|
-
s.author = "John Mair (banisterfiend)"
|
26
|
-
s.email = 'jrmair@gmail.com'
|
27
|
-
s.description = s.summary
|
28
|
-
s.require_path = 'lib'
|
29
|
-
s.homepage = "http://github.com/banister/#{PROJECT_NAME}"
|
30
|
-
s.has_rdoc = 'yard'
|
31
|
-
s.add_dependency('pry-exception_explorer')
|
32
|
-
s.add_development_dependency("bacon","~>1.1.0")
|
33
|
-
s.add_development_dependency('rspec')
|
34
|
-
s.required_ruby_version = '>= 1.9.2'
|
35
|
-
s.files = `git ls-files`.split("\n")
|
36
|
-
s.test_files = `git ls-files -- test/*`.split("\n")
|
37
|
-
end
|
38
|
-
|
39
|
-
desc "Run tests"
|
40
|
-
task :test do
|
41
|
-
sh "bacon -Itest -rubygems test.rb -q"
|
42
|
-
end
|
43
|
-
|
44
|
-
desc "Run bacon example"
|
45
|
-
task :example_bacon do
|
46
|
-
sh "bacon -I#{direc}/lib/ #{direc}/examples/example_bacon.rb "
|
47
|
-
end
|
48
|
-
|
49
|
-
desc "Run rspec example"
|
50
|
-
task :example_rspec do
|
51
|
-
sh "rspec -I#{direc}/lib/ #{direc}/examples/example_rspec.rb "
|
52
|
-
end
|
53
|
-
|
54
|
-
desc "Run minitest example"
|
55
|
-
task :example_minitest do
|
56
|
-
sh "ruby -I#{direc}/lib/ #{direc}/examples/example_minitest.rb "
|
57
|
-
end
|
58
|
-
|
59
|
-
desc "generate gemspec"
|
60
|
-
task :gemspec => "ruby:gemspec"
|
61
|
-
|
62
|
-
namespace :ruby do
|
63
|
-
spec = Gem::Specification.new do |s|
|
64
|
-
apply_spec_defaults(s)
|
65
|
-
s.platform = Gem::Platform::RUBY
|
66
|
-
end
|
67
|
-
|
68
|
-
Rake::GemPackageTask.new(spec) do |pkg|
|
69
|
-
pkg.need_zip = false
|
70
|
-
pkg.need_tar = false
|
71
|
-
end
|
72
|
-
|
73
|
-
desc "Generate gemspec file"
|
74
|
-
task :gemspec do
|
75
|
-
File.open("#{spec.name}.gemspec", "w") do |f|
|
76
|
-
f << spec.to_ruby
|
77
|
-
end
|
78
|
-
end
|
79
|
-
end
|
80
|
-
|
81
|
-
desc "Show version"
|
82
|
-
task :version do
|
83
|
-
puts "Plymouth version: #{Plymouth::VERSION}"
|
84
|
-
end
|
85
|
-
|
86
|
-
desc "Generate gemspec file"
|
87
|
-
task :gemspec => "ruby:gemspec"
|
88
|
-
|
89
|
-
desc "build all platform gems at once"
|
90
|
-
task :gems => [:clean, :rmgems, "ruby:gem"]
|
91
|
-
|
92
|
-
task :gem => [:gems]
|
93
|
-
|
94
|
-
desc "remove all platform gems"
|
95
|
-
task :rmgems => ["ruby:clobber_package"]
|
96
|
-
|
97
|
-
desc "build and push latest gems"
|
98
|
-
task :pushgems => :gems do
|
99
|
-
chdir("./pkg") do
|
100
|
-
Dir["*.gem"].each do |gemfile|
|
101
|
-
sh "gem push #{gemfile}"
|
102
|
-
end
|
103
|
-
end
|
104
|
-
end
|
105
|
-
|
1
|
+
$:.unshift 'lib'
|
2
|
+
|
3
|
+
dlext = Config::CONFIG['DLEXT']
|
4
|
+
direc = File.dirname(__FILE__)
|
5
|
+
|
6
|
+
PROJECT_NAME = "plymouth"
|
7
|
+
|
8
|
+
require "#{PROJECT_NAME}/version"
|
9
|
+
|
10
|
+
CLASS_NAME = Plymouth
|
11
|
+
|
12
|
+
require 'rake/clean'
|
13
|
+
require 'rake/gempackagetask'
|
14
|
+
|
15
|
+
CLOBBER.include("**/*~", "**/*#*", "**/*.log", "**/*.o")
|
16
|
+
CLEAN.include("ext/**/*.log", "ext/**/*.o",
|
17
|
+
"ext/**/*~", "ext/**/*#*", "ext/**/*.obj", "**/*#*", "**/*#*.*",
|
18
|
+
"ext/**/*.def", "ext/**/*.pdb", "**/*_flymake*.*", "**/*_flymake")
|
19
|
+
|
20
|
+
def apply_spec_defaults(s)
|
21
|
+
s.name = PROJECT_NAME
|
22
|
+
s.summary = "Start an interactive session when a test fails"
|
23
|
+
s.version = CLASS_NAME::VERSION
|
24
|
+
s.date = Time.now.strftime '%Y-%m-%d'
|
25
|
+
s.author = "John Mair (banisterfiend)"
|
26
|
+
s.email = 'jrmair@gmail.com'
|
27
|
+
s.description = s.summary
|
28
|
+
s.require_path = 'lib'
|
29
|
+
s.homepage = "http://github.com/banister/#{PROJECT_NAME}"
|
30
|
+
s.has_rdoc = 'yard'
|
31
|
+
s.add_dependency('pry-exception_explorer', '>=0.1.6')
|
32
|
+
s.add_development_dependency("bacon","~>1.1.0")
|
33
|
+
s.add_development_dependency('rspec')
|
34
|
+
s.required_ruby_version = '>= 1.9.2'
|
35
|
+
s.files = `git ls-files`.split("\n")
|
36
|
+
s.test_files = `git ls-files -- test/*`.split("\n")
|
37
|
+
end
|
38
|
+
|
39
|
+
desc "Run tests"
|
40
|
+
task :test do
|
41
|
+
sh "bacon -Itest -rubygems test.rb -q"
|
42
|
+
end
|
43
|
+
|
44
|
+
desc "Run bacon example"
|
45
|
+
task :example_bacon do
|
46
|
+
sh "bacon -I#{direc}/lib/ #{direc}/examples/example_bacon.rb "
|
47
|
+
end
|
48
|
+
|
49
|
+
desc "Run rspec example"
|
50
|
+
task :example_rspec do
|
51
|
+
sh "rspec -I#{direc}/lib/ #{direc}/examples/example_rspec.rb "
|
52
|
+
end
|
53
|
+
|
54
|
+
desc "Run minitest example"
|
55
|
+
task :example_minitest do
|
56
|
+
sh "ruby -I#{direc}/lib/ #{direc}/examples/example_minitest.rb "
|
57
|
+
end
|
58
|
+
|
59
|
+
desc "generate gemspec"
|
60
|
+
task :gemspec => "ruby:gemspec"
|
61
|
+
|
62
|
+
namespace :ruby do
|
63
|
+
spec = Gem::Specification.new do |s|
|
64
|
+
apply_spec_defaults(s)
|
65
|
+
s.platform = Gem::Platform::RUBY
|
66
|
+
end
|
67
|
+
|
68
|
+
Rake::GemPackageTask.new(spec) do |pkg|
|
69
|
+
pkg.need_zip = false
|
70
|
+
pkg.need_tar = false
|
71
|
+
end
|
72
|
+
|
73
|
+
desc "Generate gemspec file"
|
74
|
+
task :gemspec do
|
75
|
+
File.open("#{spec.name}.gemspec", "w") do |f|
|
76
|
+
f << spec.to_ruby
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
80
|
+
|
81
|
+
desc "Show version"
|
82
|
+
task :version do
|
83
|
+
puts "Plymouth version: #{Plymouth::VERSION}"
|
84
|
+
end
|
85
|
+
|
86
|
+
desc "Generate gemspec file"
|
87
|
+
task :gemspec => "ruby:gemspec"
|
88
|
+
|
89
|
+
desc "build all platform gems at once"
|
90
|
+
task :gems => [:clean, :rmgems, "ruby:gem"]
|
91
|
+
|
92
|
+
task :gem => [:gems]
|
93
|
+
|
94
|
+
desc "remove all platform gems"
|
95
|
+
task :rmgems => ["ruby:clobber_package"]
|
96
|
+
|
97
|
+
desc "build and push latest gems"
|
98
|
+
task :pushgems => :gems do
|
99
|
+
chdir("./pkg") do
|
100
|
+
Dir["*.gem"].each do |gemfile|
|
101
|
+
sh "gem push #{gemfile}"
|
102
|
+
end
|
103
|
+
end
|
104
|
+
end
|
105
|
+
|
data/lib/plymouth.rb
CHANGED
@@ -12,8 +12,14 @@ else
|
|
12
12
|
EE.enabled = true
|
13
13
|
end
|
14
14
|
|
15
|
+
|
15
16
|
message = nil
|
16
17
|
|
18
|
+
# Ensure auto-reloading is off, so that `edit --current` does not try
|
19
|
+
# to reload the test file
|
20
|
+
Pry.config.disable_auto_reload
|
21
|
+
|
22
|
+
# Decorate `whereami` command to include test failure information
|
17
23
|
Pry.config.commands.before_command("whereami") do
|
18
24
|
output.puts
|
19
25
|
output.puts "#{Pry::Helpers::Text.bold("Test failure:")} #{message}"
|
data/lib/plymouth/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Plymouth
|
2
|
-
VERSION = "0.3.
|
3
|
-
end
|
1
|
+
module Plymouth
|
2
|
+
VERSION = "0.3.1"
|
3
|
+
end
|
data/plymouth.gemspec
CHANGED
@@ -2,18 +2,18 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = "plymouth"
|
5
|
-
s.version = "0.3.
|
5
|
+
s.version = "0.3.1"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
8
8
|
s.authors = ["John Mair (banisterfiend)"]
|
9
|
-
s.date = "2012-02-
|
9
|
+
s.date = "2012-02-09"
|
10
10
|
s.description = "Start an interactive session when a test fails"
|
11
11
|
s.email = "jrmair@gmail.com"
|
12
12
|
s.files = [".gemtest", ".gitignore", ".yardopts", "CHANGELOG", "Gemfile", "LICENSE", "README.md", "Rakefile", "examples/example_bacon.rb", "examples/example_minitest.rb", "examples/example_rspec.rb", "lib/plymouth.rb", "lib/plymouth/version.rb", "plymouth.gemspec", "test/test.rb"]
|
13
13
|
s.homepage = "http://github.com/banister/plymouth"
|
14
14
|
s.require_paths = ["lib"]
|
15
15
|
s.required_ruby_version = Gem::Requirement.new(">= 1.9.2")
|
16
|
-
s.rubygems_version = "1.8.
|
16
|
+
s.rubygems_version = "1.8.11"
|
17
17
|
s.summary = "Start an interactive session when a test fails"
|
18
18
|
s.test_files = ["test/test.rb"]
|
19
19
|
|
@@ -21,16 +21,16 @@ Gem::Specification.new do |s|
|
|
21
21
|
s.specification_version = 3
|
22
22
|
|
23
23
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
24
|
-
s.add_runtime_dependency(%q<pry-exception_explorer>, [">= 0"])
|
24
|
+
s.add_runtime_dependency(%q<pry-exception_explorer>, [">= 0.1.6"])
|
25
25
|
s.add_development_dependency(%q<bacon>, ["~> 1.1.0"])
|
26
26
|
s.add_development_dependency(%q<rspec>, [">= 0"])
|
27
27
|
else
|
28
|
-
s.add_dependency(%q<pry-exception_explorer>, [">= 0"])
|
28
|
+
s.add_dependency(%q<pry-exception_explorer>, [">= 0.1.6"])
|
29
29
|
s.add_dependency(%q<bacon>, ["~> 1.1.0"])
|
30
30
|
s.add_dependency(%q<rspec>, [">= 0"])
|
31
31
|
end
|
32
32
|
else
|
33
|
-
s.add_dependency(%q<pry-exception_explorer>, [">= 0"])
|
33
|
+
s.add_dependency(%q<pry-exception_explorer>, [">= 0.1.6"])
|
34
34
|
s.add_dependency(%q<bacon>, ["~> 1.1.0"])
|
35
35
|
s.add_dependency(%q<rspec>, [">= 0"])
|
36
36
|
end
|
metadata
CHANGED
@@ -1,55 +1,59 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: plymouth
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.0
|
3
|
+
version: !ruby/object:Gem::Version
|
5
4
|
prerelease:
|
5
|
+
version: 0.3.1
|
6
6
|
platform: ruby
|
7
|
-
authors:
|
7
|
+
authors:
|
8
8
|
- John Mair (banisterfiend)
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
|
13
|
-
|
14
|
-
|
12
|
+
|
13
|
+
date: 2012-02-09 00:00:00 Z
|
14
|
+
dependencies:
|
15
|
+
- !ruby/object:Gem::Dependency
|
15
16
|
name: pry-exception_explorer
|
16
|
-
|
17
|
+
prerelease: false
|
18
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
17
19
|
none: false
|
18
|
-
requirements:
|
19
|
-
- -
|
20
|
-
- !ruby/object:Gem::Version
|
21
|
-
version:
|
20
|
+
requirements:
|
21
|
+
- - ">="
|
22
|
+
- !ruby/object:Gem::Version
|
23
|
+
version: 0.1.6
|
22
24
|
type: :runtime
|
23
|
-
|
24
|
-
|
25
|
-
- !ruby/object:Gem::Dependency
|
25
|
+
version_requirements: *id001
|
26
|
+
- !ruby/object:Gem::Dependency
|
26
27
|
name: bacon
|
27
|
-
|
28
|
+
prerelease: false
|
29
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
28
30
|
none: false
|
29
|
-
requirements:
|
31
|
+
requirements:
|
30
32
|
- - ~>
|
31
|
-
- !ruby/object:Gem::Version
|
33
|
+
- !ruby/object:Gem::Version
|
32
34
|
version: 1.1.0
|
33
35
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
- !ruby/object:Gem::Dependency
|
36
|
+
version_requirements: *id002
|
37
|
+
- !ruby/object:Gem::Dependency
|
37
38
|
name: rspec
|
38
|
-
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
39
41
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
version:
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
version: "0"
|
44
46
|
type: :development
|
45
|
-
|
46
|
-
version_requirements: *70204289733740
|
47
|
+
version_requirements: *id003
|
47
48
|
description: Start an interactive session when a test fails
|
48
49
|
email: jrmair@gmail.com
|
49
50
|
executables: []
|
51
|
+
|
50
52
|
extensions: []
|
53
|
+
|
51
54
|
extra_rdoc_files: []
|
52
|
-
|
55
|
+
|
56
|
+
files:
|
53
57
|
- .gemtest
|
54
58
|
- .gitignore
|
55
59
|
- .yardopts
|
@@ -67,27 +71,30 @@ files:
|
|
67
71
|
- test/test.rb
|
68
72
|
homepage: http://github.com/banister/plymouth
|
69
73
|
licenses: []
|
74
|
+
|
70
75
|
post_install_message:
|
71
76
|
rdoc_options: []
|
72
|
-
|
77
|
+
|
78
|
+
require_paths:
|
73
79
|
- lib
|
74
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
80
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
75
81
|
none: false
|
76
|
-
requirements:
|
77
|
-
- -
|
78
|
-
- !ruby/object:Gem::Version
|
82
|
+
requirements:
|
83
|
+
- - ">="
|
84
|
+
- !ruby/object:Gem::Version
|
79
85
|
version: 1.9.2
|
80
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
86
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
81
87
|
none: false
|
82
|
-
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
version:
|
88
|
+
requirements:
|
89
|
+
- - ">="
|
90
|
+
- !ruby/object:Gem::Version
|
91
|
+
version: "0"
|
86
92
|
requirements: []
|
93
|
+
|
87
94
|
rubyforge_project:
|
88
|
-
rubygems_version: 1.8.
|
95
|
+
rubygems_version: 1.8.11
|
89
96
|
signing_key:
|
90
97
|
specification_version: 3
|
91
98
|
summary: Start an interactive session when a test fails
|
92
|
-
test_files:
|
99
|
+
test_files:
|
93
100
|
- test/test.rb
|