capybara-console 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +40 -0
- data/lib/capybara-console/version.rb +1 -1
- data/lib/tasks/capybara-console_tasks.rake +4 -2
- metadata +5 -5
- data/README.rdoc +0 -3
data/README.md
ADDED
@@ -0,0 +1,40 @@
|
|
1
|
+
CapybaraConsole
|
2
|
+
===============
|
3
|
+
|
4
|
+
This tiny gem provides you with a [Capybara](https://github.com/jnicklas/capybara) console for your Rails project.
|
5
|
+
Simply include it in your Gemfile:
|
6
|
+
|
7
|
+
gem 'capybara-console'
|
8
|
+
|
9
|
+
, then run
|
10
|
+
|
11
|
+
rake capybara:console
|
12
|
+
|
13
|
+
and you're completely set to go REPLing with Capybara, like
|
14
|
+
|
15
|
+
> visit 'http://github.com'
|
16
|
+
|
17
|
+
or
|
18
|
+
|
19
|
+
> visit '/'
|
20
|
+
|
21
|
+
If you need something included in your console by default, create an `capybara:prepare_console` task:
|
22
|
+
|
23
|
+
namespace :capybara do
|
24
|
+
|
25
|
+
task :prepare_console do
|
26
|
+
|
27
|
+
def test_path opts
|
28
|
+
path = opts[:path] || "/"
|
29
|
+
subdomain = opts[:subdomain] || 'test'
|
30
|
+
port = Capybara.current_session.server.port
|
31
|
+
url = "http://#{subdomain}.mytestdomain.home:#{port}#{path}"
|
32
|
+
end
|
33
|
+
|
34
|
+
end
|
35
|
+
|
36
|
+
end
|
37
|
+
|
38
|
+
Enjoy!
|
39
|
+
|
40
|
+
Licensed under MIT-LICENSE.
|
@@ -12,8 +12,10 @@ namespace :capybara do
|
|
12
12
|
require 'irb'
|
13
13
|
ARGV.clear
|
14
14
|
|
15
|
-
|
16
|
-
|
15
|
+
prepare_task = 'capybara:prepare_console'
|
16
|
+
if Rake::Task.task_defined?(prepare_task)
|
17
|
+
Rake::Task[prepare_task].invoke
|
18
|
+
end
|
17
19
|
|
18
20
|
IRB.start
|
19
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capybara-console
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
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: 2013-
|
12
|
+
date: 2013-06-29 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: rails
|
@@ -55,7 +55,7 @@ files:
|
|
55
55
|
- lib/tasks/capybara-console_tasks.rake
|
56
56
|
- MIT-LICENSE
|
57
57
|
- Rakefile
|
58
|
-
- README.
|
58
|
+
- README.md
|
59
59
|
homepage: https://github.com/vspy/capybara-console
|
60
60
|
licenses: []
|
61
61
|
post_install_message:
|
@@ -70,7 +70,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
70
70
|
version: '0'
|
71
71
|
segments:
|
72
72
|
- 0
|
73
|
-
hash: -
|
73
|
+
hash: -3442407088202655502
|
74
74
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
75
75
|
none: false
|
76
76
|
requirements:
|
@@ -79,7 +79,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
79
79
|
version: '0'
|
80
80
|
segments:
|
81
81
|
- 0
|
82
|
-
hash: -
|
82
|
+
hash: -3442407088202655502
|
83
83
|
requirements: []
|
84
84
|
rubyforge_project:
|
85
85
|
rubygems_version: 1.8.25
|
data/README.rdoc
DELETED