jeffkreeftmeijer-cucumber_rails_debug 0.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ *.sw?
2
+ .DS_Store
3
+ coverage
4
+ rdoc
5
+ pkg
data/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2009 Jeff Kreeftmeijer
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.rdoc ADDED
@@ -0,0 +1,16 @@
1
+ = cucumber_rails_debug
2
+
3
+ Just add this to config/environments/cucumber.rb:
4
+
5
+ config.gem "jeffkreeftmeijer-cucumber_rails_debug", :lib => "cucumber_rails_debug", :source => "http://gems.github.com"
6
+
7
+
8
+ After that, you can use these steps in your cucumber features files:
9
+
10
+ Then debug # opens the debugger
11
+ Then what # prints out params, url and html
12
+
13
+
14
+ == Copyright
15
+
16
+ Copyright (c) 2009 Jeff Kreeftmeijer. See LICENSE for details.
data/Rakefile ADDED
@@ -0,0 +1,56 @@
1
+ require 'rubygems'
2
+ require 'rake'
3
+
4
+ begin
5
+ require 'jeweler'
6
+ Jeweler::Tasks.new do |gem|
7
+ gem.name = "cucumber_rails_debug"
8
+ gem.summary = "A set of debug steps for cucumber"
9
+ gem.email = "jeff@kreeftmeijer.nl"
10
+ gem.homepage = "http://github.com/jeffkreeftmeijer/cucumber_rails_debug"
11
+ gem.authors = ["Pelle Braendgaard","Mischa Fierer","Jeff Kreeftmeijer"]
12
+ # gem is a Gem::Specification... see http://www.rubygems.org/read/chapter/20 for additional settings
13
+ end
14
+
15
+ rescue LoadError
16
+ puts "Jeweler (or a dependency) not available. Install it with: sudo gem install jeweler"
17
+ end
18
+
19
+ require 'rake/testtask'
20
+ Rake::TestTask.new(:test) do |test|
21
+ test.libs << 'lib' << 'test'
22
+ test.pattern = 'test/**/*_test.rb'
23
+ test.verbose = true
24
+ end
25
+
26
+ begin
27
+ require 'rcov/rcovtask'
28
+ Rcov::RcovTask.new do |test|
29
+ test.libs << 'test'
30
+ test.pattern = 'test/**/*_test.rb'
31
+ test.verbose = true
32
+ end
33
+ rescue LoadError
34
+ task :rcov do
35
+ abort "RCov is not available. In order to run rcov, you must: sudo gem install spicycode-rcov"
36
+ end
37
+ end
38
+
39
+
40
+ task :default => :test
41
+
42
+ require 'rake/rdoctask'
43
+ Rake::RDocTask.new do |rdoc|
44
+ if File.exist?('VERSION.yml')
45
+ config = YAML.load(File.read('VERSION.yml'))
46
+ version = "#{config[:major]}.#{config[:minor]}.#{config[:patch]}"
47
+ else
48
+ version = ""
49
+ end
50
+
51
+ rdoc.rdoc_dir = 'rdoc'
52
+ rdoc.title = "cucumber_rails_debug #{version}"
53
+ rdoc.rdoc_files.include('README*')
54
+ rdoc.rdoc_files.include('lib/**/*.rb')
55
+ end
56
+
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.1.0
@@ -0,0 +1,41 @@
1
+ require 'ruby-debug'
2
+
3
+ module CucumberRailsDebug
4
+ def where
5
+ puts "#{@request.env["SERVER_NAME"]}#{@request.env["REQUEST_URI"]}"
6
+ end
7
+
8
+ def how
9
+ puts @request.parameters.inspect
10
+ end
11
+
12
+ def html
13
+ puts @response.body.gsub("\n", "\n ")
14
+ end
15
+
16
+ def display(decoration="\n#{'*' * 80}\n\n")
17
+ puts decoration
18
+ yield
19
+ puts decoration
20
+ end
21
+ end
22
+
23
+ World(CucumberRailsDebug)
24
+
25
+ Then "debug" do
26
+ debugger
27
+ stop_here = 1
28
+ end
29
+
30
+ Then "what" do
31
+ display do
32
+ where
33
+ html
34
+ how
35
+ where
36
+ end
37
+ end
38
+
39
+ Then "pending" do
40
+ pending @__executor.instance_variable_get("@feature_file")
41
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jeffkreeftmeijer-cucumber_rails_debug
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Pelle Braendgaard
8
+ - Mischa Fierer
9
+ - Jeff Kreeftmeijer
10
+ autorequire:
11
+ bindir: bin
12
+ cert_chain: []
13
+
14
+ date: 2009-09-16 00:00:00 -07:00
15
+ default_executable:
16
+ dependencies: []
17
+
18
+ description:
19
+ email: jeff@kreeftmeijer.nl
20
+ executables: []
21
+
22
+ extensions: []
23
+
24
+ extra_rdoc_files:
25
+ - LICENSE
26
+ - README.rdoc
27
+ files:
28
+ - .gitignore
29
+ - LICENSE
30
+ - README.rdoc
31
+ - Rakefile
32
+ - VERSION
33
+ - lib/cucumber_rails_debug.rb
34
+ has_rdoc: false
35
+ homepage: http://github.com/jeffkreeftmeijer/cucumber_rails_debug
36
+ licenses:
37
+ post_install_message:
38
+ rdoc_options:
39
+ - --charset=UTF-8
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: "0"
47
+ version:
48
+ required_rubygems_version: !ruby/object:Gem::Requirement
49
+ requirements:
50
+ - - ">="
51
+ - !ruby/object:Gem::Version
52
+ version: "0"
53
+ version:
54
+ requirements: []
55
+
56
+ rubyforge_project:
57
+ rubygems_version: 1.3.5
58
+ signing_key:
59
+ specification_version: 3
60
+ summary: A set of debug steps for cucumber
61
+ test_files: []
62
+