capybara_discoball 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +5 -0
- data/.rspec +2 -0
- data/.travis.yml +4 -0
- data/CONTRIBUTING.md +26 -0
- data/Gemfile +4 -0
- data/LICENSE +21 -0
- data/README.md +156 -0
- data/Rakefile +12 -0
- data/capybara_discoball.gemspec +43 -0
- data/lib/capybara_discoball.rb +11 -0
- data/lib/capybara_discoball/runner.rb +35 -0
- data/lib/capybara_discoball/server.rb +11 -0
- data/lib/capybara_discoball/version.rb +5 -0
- data/spec/acceptance/rails.feature +57 -0
- data/spec/spec_helper.rb +21 -0
- data/spec/step_definitions/rails_steps.rb +72 -0
- data/spec/support/rails_support.rb +14 -0
- metadata +264 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 83223daf431e597fdc4b235f3e94d7d556d38036
|
4
|
+
data.tar.gz: 47e04d5dd7fa2ba3f0aef19ddf910f081f2f8fed
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 719b5d23ad0c191157d7931375d4ff81a17c2ae8b5a8db4722c426ebb6d28676e09e45e36bbdae45e36db8a08c3c66aa71041a9590f383839194980db9b912a2
|
7
|
+
data.tar.gz: a3100cc04a683f8ec93cf9663fe891a41d400c13eb1863b6e2732bf4959771712cb74e612ca6990098b494df4de45590b03aec01984e674dbf121987fbdf1a00
|
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CONTRIBUTING.md
ADDED
@@ -0,0 +1,26 @@
|
|
1
|
+
We love pull requests from everyone. Follow the thoughtbot [code of conduct]
|
2
|
+
while contributing.
|
3
|
+
|
4
|
+
[code of conduct]: https://thoughtbot.com/open-source-code-of-conduct
|
5
|
+
|
6
|
+
## Contributing
|
7
|
+
|
8
|
+
1. Fork the repo.
|
9
|
+
2. Run the tests. We only take pull requests with passing tests, and it's
|
10
|
+
great to know that you have a clean slate.
|
11
|
+
3. Add a test for your change. Only refactoring and documentation changes
|
12
|
+
require no new tests. If you are adding functionality or fixing a bug, we
|
13
|
+
need a test!
|
14
|
+
4. Make the test pass.
|
15
|
+
5. Push to your fork and submit a pull request.
|
16
|
+
|
17
|
+
At this point you're waiting on us. We like to at least comment on, if not
|
18
|
+
accept, pull requests within three business days (and, typically, one business
|
19
|
+
day). We may suggest some changes or improvements or alternatives.
|
20
|
+
|
21
|
+
Some things that will increase the chance that your pull request is accepted,
|
22
|
+
|
23
|
+
* Include tests that fail without your code, and pass with it
|
24
|
+
* Update the documentation, the surrounding one, examples elsewhere, guides,
|
25
|
+
whatever is affected by your contribution
|
26
|
+
* Follow the existing style of the project
|
data/Gemfile
ADDED
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2012-2015 thoughtbot, inc.
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,156 @@
|
|
1
|
+
capybara_discoball
|
2
|
+
==================
|
3
|
+
|
4
|
+
[![Build Status](https://travis-ci.org/thoughtbot/capybara_discoball.svg?branch=master)](https://travis-ci.org/thoughtbot/capybara_discoball)
|
5
|
+
[![Code Climate](https://codeclimate.com/github/thoughtbot/capybara_discoball/badges/gpa.svg)](https://codeclimate.com/github/thoughtbot/capybara_discoball)
|
6
|
+
|
7
|
+
Spin up a rack app just for Capybara.
|
8
|
+
|
9
|
+
This is useful for when ShamRack won't cut it: when your JavaScript hits
|
10
|
+
an external service, or you need to load an image or iframe from
|
11
|
+
elsewhere, or in general something outside of your Ruby code needs to
|
12
|
+
talk with an API.
|
13
|
+
|
14
|
+
Synopsis
|
15
|
+
--------
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
# Use Sinatra, for example
|
19
|
+
require 'sinatra/base'
|
20
|
+
require 'capybara_discoball'
|
21
|
+
|
22
|
+
# Define a quick Rack app
|
23
|
+
class FakeMusicDB < Sinatra::Base
|
24
|
+
cattr_reader :albums
|
25
|
+
|
26
|
+
get '/musicians/:musician/albums' do |musician|
|
27
|
+
<<-XML
|
28
|
+
<albums for="#{musician}">
|
29
|
+
#{@albums.map { |album| "<album>#{album}</album>" }.join}
|
30
|
+
</albums>
|
31
|
+
XML
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
# Spin up the Rack app, then update the imaginary library we're
|
36
|
+
# using to point to the new URL.
|
37
|
+
Capybara::Discoball.spin(FakeMusicDB) do |server|
|
38
|
+
MusicDB.endpoint_url = server.url('/')
|
39
|
+
end
|
40
|
+
```
|
41
|
+
|
42
|
+
More details
|
43
|
+
------------
|
44
|
+
|
45
|
+
You can instantiate a `Capybara::Discoball::Runner`, passing in a
|
46
|
+
factory which will create a Rack app:
|
47
|
+
|
48
|
+
```ruby
|
49
|
+
FakeMusicDBRunner = Capybara::Discoball::Runner.new(FakeMusicDB) do
|
50
|
+
# tests to perform after server boot
|
51
|
+
end
|
52
|
+
```
|
53
|
+
|
54
|
+
This gives you back a runner, which you can boot from your features,
|
55
|
+
specs, tests, console, whatever:
|
56
|
+
|
57
|
+
```ruby
|
58
|
+
FakeMusicDBRunner.boot
|
59
|
+
```
|
60
|
+
|
61
|
+
These two steps can be merged with the `spin` class method:
|
62
|
+
|
63
|
+
```ruby
|
64
|
+
Capybara::Discoball.spin(FakeMusicDB) do
|
65
|
+
# tests to perform while server is spinning
|
66
|
+
end
|
67
|
+
```
|
68
|
+
|
69
|
+
It is always the case that you need to know the URL for the external
|
70
|
+
API. We provide a way to access that URL; in fact, we offer the whole
|
71
|
+
`Capybara::Server` for you to play with. In this example, we are using
|
72
|
+
some `MusicDB` library in the code that knows to hit the
|
73
|
+
`.endpoint_url`:
|
74
|
+
|
75
|
+
```ruby
|
76
|
+
FakeMusicDBRunner = Capybara::Discoball::Runner.new(FakeMusicDB) do |server|
|
77
|
+
MusicDB.endpoint_url = server.url
|
78
|
+
end
|
79
|
+
```
|
80
|
+
|
81
|
+
If no block is provided, the URL is also returned by `#spin`:
|
82
|
+
|
83
|
+
```ruby
|
84
|
+
MusicDB.endpoint_url = Capybara::Discoball.spin(FakeMusicDB)
|
85
|
+
```
|
86
|
+
|
87
|
+
Integrating into your app
|
88
|
+
-------------------------
|
89
|
+
|
90
|
+
All of this means that you must be able to set the endpoint URL. There
|
91
|
+
are two tricky cases:
|
92
|
+
|
93
|
+
*When the third-party library does not have hooks to set the endpoint
|
94
|
+
URL*.
|
95
|
+
|
96
|
+
Open the class and add the hooks yourself. This requires understanding
|
97
|
+
the source of the library. Here's an example where the library uses
|
98
|
+
`@@endpoint_url` everywhere to refer to the endpoint URL:
|
99
|
+
|
100
|
+
```ruby
|
101
|
+
class MusicDB
|
102
|
+
def self.endpoint_url=(endpoint_url)
|
103
|
+
@@endpoint_url = endpoint_url
|
104
|
+
end
|
105
|
+
end
|
106
|
+
```
|
107
|
+
|
108
|
+
*When your JavaScript needs to talk to the endpoint URL*.
|
109
|
+
|
110
|
+
For this you must thread the URL through your app so that the JavaScript
|
111
|
+
can find it:
|
112
|
+
|
113
|
+
```ruby
|
114
|
+
<% content_for :javascript do %>
|
115
|
+
<% javascript_tag do %>
|
116
|
+
albumShower = new AlbumShower(<%= MusicDB.endpoint_url.to_json %>);
|
117
|
+
albumShower.show();
|
118
|
+
<% end %>
|
119
|
+
<% end %>
|
120
|
+
|
121
|
+
class @AlbumShower
|
122
|
+
constructor: (@endpointUrl) ->
|
123
|
+
show: ->
|
124
|
+
$.get(@endpointUrl, (data) -> $('#albums').html(data))
|
125
|
+
```
|
126
|
+
|
127
|
+
Contributing
|
128
|
+
------------
|
129
|
+
|
130
|
+
See the [CONTRIBUTING] document. Thank you, [contributors]!
|
131
|
+
|
132
|
+
[CONTRIBUTING]: /CONTRIBUTING.md
|
133
|
+
[contributors]: https://github.com/thoughtbot/capybara_discoball/graphs/contributors
|
134
|
+
|
135
|
+
License
|
136
|
+
-------
|
137
|
+
|
138
|
+
capybara_discoball is Copyright (c) 2012-2015 thoughtbot, inc. It is free software,
|
139
|
+
and may be redistributed under the terms specified in the [LICENSE] file.
|
140
|
+
|
141
|
+
[LICENSE]: /LICENSE
|
142
|
+
|
143
|
+
About
|
144
|
+
-----
|
145
|
+
|
146
|
+
![thoughtbot](https://thoughtbot.com/logo.png)
|
147
|
+
|
148
|
+
capybara_discoball is maintained and funded by thoughtbot, inc.
|
149
|
+
The names and logos for thoughtbot are trademarks of thoughtbot, inc.
|
150
|
+
|
151
|
+
We love open source software!
|
152
|
+
See [our other projects][community]
|
153
|
+
or [hire us][hire] to help build your product.
|
154
|
+
|
155
|
+
[community]: https://thoughtbot.com/community?utm_source=github
|
156
|
+
[hire]: https://thoughtbot.com/hire-us?utm_source=github
|
data/Rakefile
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
require 'bundler/gem_tasks'
|
2
|
+
require 'rspec/core/rake_task'
|
3
|
+
|
4
|
+
namespace :spec do
|
5
|
+
RSpec::Core::RakeTask.new(:acceptance) do |t|
|
6
|
+
t.pattern = 'spec/acceptance/**/{*_spec.rb,*.feature}'
|
7
|
+
end
|
8
|
+
end
|
9
|
+
|
10
|
+
task :spec => 'spec:acceptance'
|
11
|
+
|
12
|
+
task :default => [:spec]
|
@@ -0,0 +1,43 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "capybara_discoball/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "capybara_discoball"
|
7
|
+
s.version = Capybara::Discoball::VERSION
|
8
|
+
s.authors = ["Mike Burns"]
|
9
|
+
s.email = ["mburns@thoughtbot.com"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Spin up an external server just for Capybara}
|
12
|
+
s.description = <<-DESC
|
13
|
+
When ShamRack doesn't quite cut it; when your JavaScript and non-Ruby
|
14
|
+
code needs to hit an external API for your tests; when you're excited
|
15
|
+
about spinning up a full server instead of faking out Net::HTTP: we
|
16
|
+
present the Discoball.
|
17
|
+
DESC
|
18
|
+
|
19
|
+
s.rubyforge_project = "capybara_discoball"
|
20
|
+
|
21
|
+
s.files = `git ls-files`.split("\n")
|
22
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
23
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
24
|
+
s.require_paths = ["lib"]
|
25
|
+
|
26
|
+
s.add_dependency 'capybara'
|
27
|
+
|
28
|
+
s.add_development_dependency 'rspec'
|
29
|
+
s.add_development_dependency 'turnip'
|
30
|
+
s.add_development_dependency 'aruba'
|
31
|
+
s.add_development_dependency 'sinatra'
|
32
|
+
|
33
|
+
# Rails dependencies
|
34
|
+
s.add_development_dependency 'rails'
|
35
|
+
s.add_development_dependency 'thin'
|
36
|
+
s.add_development_dependency 'uglifier'
|
37
|
+
s.add_development_dependency 'sass-rails'
|
38
|
+
s.add_development_dependency 'coffee-rails'
|
39
|
+
s.add_development_dependency 'jquery-rails'
|
40
|
+
s.add_development_dependency 'rspec-rails'
|
41
|
+
s.add_development_dependency 'sqlite3'
|
42
|
+
s.add_development_dependency 'therubyracer'
|
43
|
+
end
|
@@ -0,0 +1,35 @@
|
|
1
|
+
require "capybara"
|
2
|
+
|
3
|
+
module Capybara
|
4
|
+
module Discoball
|
5
|
+
class Runner
|
6
|
+
def initialize(server_factory, &block)
|
7
|
+
@server_factory = server_factory
|
8
|
+
@after_server = block || Proc.new {}
|
9
|
+
end
|
10
|
+
|
11
|
+
def boot
|
12
|
+
with_webrick_runner do
|
13
|
+
@server = Server.new(@server_factory.new)
|
14
|
+
@server.boot
|
15
|
+
end
|
16
|
+
|
17
|
+
@after_server.call(@server)
|
18
|
+
@server.url
|
19
|
+
end
|
20
|
+
|
21
|
+
private
|
22
|
+
|
23
|
+
def with_webrick_runner
|
24
|
+
default_server_process = Capybara.server
|
25
|
+
Capybara.server do |app, port|
|
26
|
+
require "rack/handler/webrick"
|
27
|
+
Rack::Handler::WEBrick.run(app, Port: port, AccessLog: [], Logger: WEBrick::Log::new(nil, 0))
|
28
|
+
end
|
29
|
+
yield
|
30
|
+
ensure
|
31
|
+
Capybara.server(&default_server_process)
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,57 @@
|
|
1
|
+
Feature: Rails
|
2
|
+
|
3
|
+
@disable-bundler
|
4
|
+
Scenario: Using Discoball in a Rails app with a block
|
5
|
+
Given I have a Rails application with Discoball installed
|
6
|
+
And the SuccessAPI is installed
|
7
|
+
And the following integration spec:
|
8
|
+
"""
|
9
|
+
visit '/successes'
|
10
|
+
expect(page).to have_content('success')
|
11
|
+
"""
|
12
|
+
And the following controller action:
|
13
|
+
"""
|
14
|
+
render :text => SuccessAPI.get
|
15
|
+
"""
|
16
|
+
And the following spec supporter:
|
17
|
+
"""
|
18
|
+
require 'sinatra/base'
|
19
|
+
require 'capybara_discoball'
|
20
|
+
require 'success_api'
|
21
|
+
|
22
|
+
class FakeSuccess < Sinatra::Base
|
23
|
+
get('/') { 'success' }
|
24
|
+
end
|
25
|
+
|
26
|
+
Capybara::Discoball.spin(FakeSuccess) do |server|
|
27
|
+
SuccessAPI.endpoint_url = server.url
|
28
|
+
end
|
29
|
+
"""
|
30
|
+
Then the integration spec should pass
|
31
|
+
|
32
|
+
@disable-bundler
|
33
|
+
Scenario: Using Discoball in a Rails app without a block
|
34
|
+
Given I have a Rails application with Discoball installed
|
35
|
+
And the SuccessAPI is installed
|
36
|
+
And the following integration spec:
|
37
|
+
"""
|
38
|
+
visit '/successes'
|
39
|
+
expect(page).to have_content('success')
|
40
|
+
"""
|
41
|
+
And the following controller action:
|
42
|
+
"""
|
43
|
+
render :text => SuccessAPI.get
|
44
|
+
"""
|
45
|
+
And the following spec supporter:
|
46
|
+
"""
|
47
|
+
require 'sinatra/base'
|
48
|
+
require 'capybara_discoball'
|
49
|
+
require 'success_api'
|
50
|
+
|
51
|
+
class FakeSuccess < Sinatra::Base
|
52
|
+
get('/') { 'success' }
|
53
|
+
end
|
54
|
+
|
55
|
+
SuccessAPI.endpoint_url = Capybara::Discoball.spin(FakeSuccess)
|
56
|
+
"""
|
57
|
+
Then the integration spec should pass
|
data/spec/spec_helper.rb
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
require 'rspec'
|
2
|
+
require 'turnip'
|
3
|
+
require 'aruba/api'
|
4
|
+
Dir["spec/{support,step_definitions}/**/*.rb"].each { |f| require File.expand_path(f) }
|
5
|
+
|
6
|
+
RSpec.configure do |config|
|
7
|
+
config.include Aruba::Api
|
8
|
+
config.include RailsSupport
|
9
|
+
|
10
|
+
config.before(:all) do
|
11
|
+
@aruba_timeout_seconds = 140
|
12
|
+
if ENV['DEBUG']
|
13
|
+
@puts = true
|
14
|
+
@announce_stdout = true
|
15
|
+
@announce_stderr = true
|
16
|
+
@announce_cmd = true
|
17
|
+
@announce_dir = true
|
18
|
+
@announce_env = true
|
19
|
+
end
|
20
|
+
end
|
21
|
+
end
|
@@ -0,0 +1,72 @@
|
|
1
|
+
step %{I have a Rails application with Discoball installed} do
|
2
|
+
create_rails_app
|
3
|
+
append_to_file("Gemfile", <<-GEMS)
|
4
|
+
gem 'rspec-rails'
|
5
|
+
gem 'capybara'
|
6
|
+
GEMS
|
7
|
+
run_simple "bundle exec rails generate rspec:install"
|
8
|
+
end
|
9
|
+
|
10
|
+
step %{the following controller action:} do |action_content|
|
11
|
+
write_file("app/controllers/whatever_controller.rb", <<-CONTROLLER)
|
12
|
+
class WhateverController < ApplicationController
|
13
|
+
def the_action
|
14
|
+
#{action_content}
|
15
|
+
end
|
16
|
+
end
|
17
|
+
CONTROLLER
|
18
|
+
write_file("config/routes.rb", <<-ROUTES)
|
19
|
+
Testapp::Application.routes.draw do
|
20
|
+
get '/successes', :to => 'whatever#the_action'
|
21
|
+
end
|
22
|
+
ROUTES
|
23
|
+
end
|
24
|
+
|
25
|
+
step %{the following integration spec:} do |spec_content|
|
26
|
+
write_file("spec/integration/whatever_spec.rb", <<-SPEC)
|
27
|
+
require 'rails_helper'
|
28
|
+
require 'capybara/rspec'
|
29
|
+
require 'support/whatever'
|
30
|
+
|
31
|
+
RSpec.describe "whatever", :type => :feature do
|
32
|
+
it "does the thing" do
|
33
|
+
#{spec_content}
|
34
|
+
end
|
35
|
+
end
|
36
|
+
SPEC
|
37
|
+
end
|
38
|
+
|
39
|
+
step %{the following spec supporter:} do |support_content|
|
40
|
+
write_file("spec/support/whatever.rb", support_content)
|
41
|
+
end
|
42
|
+
|
43
|
+
step %{the integration spec should pass} do
|
44
|
+
run_simple("bundle exec rspec spec/integration", false)
|
45
|
+
expect(last_command_started).to have_output(/1 example, 0 failures/)
|
46
|
+
expect(last_command_started).to have_exit_status(0)
|
47
|
+
end
|
48
|
+
|
49
|
+
step %{the SuccessAPI is installed} do
|
50
|
+
write_file('app/models/success_api.rb', <<-SUCCESS_API)
|
51
|
+
require 'net/http'
|
52
|
+
require 'uri'
|
53
|
+
|
54
|
+
class SuccessAPI
|
55
|
+
@@endpoint_url = 'http://yahoo.com/'
|
56
|
+
|
57
|
+
def self.endpoint_url=(endpoint_url)
|
58
|
+
@@endpoint_url = endpoint_url
|
59
|
+
end
|
60
|
+
|
61
|
+
def self.get
|
62
|
+
Net::HTTP.get(uri)
|
63
|
+
end
|
64
|
+
|
65
|
+
private
|
66
|
+
|
67
|
+
def self.uri
|
68
|
+
URI.parse(@@endpoint_url)
|
69
|
+
end
|
70
|
+
end
|
71
|
+
SUCCESS_API
|
72
|
+
end
|
@@ -0,0 +1,14 @@
|
|
1
|
+
module RailsSupport
|
2
|
+
def create_rails_app
|
3
|
+
setup_aruba
|
4
|
+
cd(".") { FileUtils.rm_rf "testapp" }
|
5
|
+
run_simple "bundle exec rails new testapp --skip-bundle --skip-test-unit"
|
6
|
+
cd "testapp"
|
7
|
+
append_to_file("Gemfile", <<-GEMS)
|
8
|
+
gem "capybara_discoball", :path => "../../.."
|
9
|
+
gem "thin"
|
10
|
+
gem "therubyracer"
|
11
|
+
gem "sinatra"
|
12
|
+
GEMS
|
13
|
+
end
|
14
|
+
end
|
metadata
ADDED
@@ -0,0 +1,264 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: capybara_discoball
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Mike Burns
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-09-04 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: capybara
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: rspec
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - ">="
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ">="
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: turnip
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: aruba
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: sinatra
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rails
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: thin
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :development
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
- !ruby/object:Gem::Dependency
|
112
|
+
name: uglifier
|
113
|
+
requirement: !ruby/object:Gem::Requirement
|
114
|
+
requirements:
|
115
|
+
- - ">="
|
116
|
+
- !ruby/object:Gem::Version
|
117
|
+
version: '0'
|
118
|
+
type: :development
|
119
|
+
prerelease: false
|
120
|
+
version_requirements: !ruby/object:Gem::Requirement
|
121
|
+
requirements:
|
122
|
+
- - ">="
|
123
|
+
- !ruby/object:Gem::Version
|
124
|
+
version: '0'
|
125
|
+
- !ruby/object:Gem::Dependency
|
126
|
+
name: sass-rails
|
127
|
+
requirement: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
type: :development
|
133
|
+
prerelease: false
|
134
|
+
version_requirements: !ruby/object:Gem::Requirement
|
135
|
+
requirements:
|
136
|
+
- - ">="
|
137
|
+
- !ruby/object:Gem::Version
|
138
|
+
version: '0'
|
139
|
+
- !ruby/object:Gem::Dependency
|
140
|
+
name: coffee-rails
|
141
|
+
requirement: !ruby/object:Gem::Requirement
|
142
|
+
requirements:
|
143
|
+
- - ">="
|
144
|
+
- !ruby/object:Gem::Version
|
145
|
+
version: '0'
|
146
|
+
type: :development
|
147
|
+
prerelease: false
|
148
|
+
version_requirements: !ruby/object:Gem::Requirement
|
149
|
+
requirements:
|
150
|
+
- - ">="
|
151
|
+
- !ruby/object:Gem::Version
|
152
|
+
version: '0'
|
153
|
+
- !ruby/object:Gem::Dependency
|
154
|
+
name: jquery-rails
|
155
|
+
requirement: !ruby/object:Gem::Requirement
|
156
|
+
requirements:
|
157
|
+
- - ">="
|
158
|
+
- !ruby/object:Gem::Version
|
159
|
+
version: '0'
|
160
|
+
type: :development
|
161
|
+
prerelease: false
|
162
|
+
version_requirements: !ruby/object:Gem::Requirement
|
163
|
+
requirements:
|
164
|
+
- - ">="
|
165
|
+
- !ruby/object:Gem::Version
|
166
|
+
version: '0'
|
167
|
+
- !ruby/object:Gem::Dependency
|
168
|
+
name: rspec-rails
|
169
|
+
requirement: !ruby/object:Gem::Requirement
|
170
|
+
requirements:
|
171
|
+
- - ">="
|
172
|
+
- !ruby/object:Gem::Version
|
173
|
+
version: '0'
|
174
|
+
type: :development
|
175
|
+
prerelease: false
|
176
|
+
version_requirements: !ruby/object:Gem::Requirement
|
177
|
+
requirements:
|
178
|
+
- - ">="
|
179
|
+
- !ruby/object:Gem::Version
|
180
|
+
version: '0'
|
181
|
+
- !ruby/object:Gem::Dependency
|
182
|
+
name: sqlite3
|
183
|
+
requirement: !ruby/object:Gem::Requirement
|
184
|
+
requirements:
|
185
|
+
- - ">="
|
186
|
+
- !ruby/object:Gem::Version
|
187
|
+
version: '0'
|
188
|
+
type: :development
|
189
|
+
prerelease: false
|
190
|
+
version_requirements: !ruby/object:Gem::Requirement
|
191
|
+
requirements:
|
192
|
+
- - ">="
|
193
|
+
- !ruby/object:Gem::Version
|
194
|
+
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: therubyracer
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
209
|
+
description: |
|
210
|
+
When ShamRack doesn't quite cut it; when your JavaScript and non-Ruby
|
211
|
+
code needs to hit an external API for your tests; when you're excited
|
212
|
+
about spinning up a full server instead of faking out Net::HTTP: we
|
213
|
+
present the Discoball.
|
214
|
+
email:
|
215
|
+
- mburns@thoughtbot.com
|
216
|
+
executables: []
|
217
|
+
extensions: []
|
218
|
+
extra_rdoc_files: []
|
219
|
+
files:
|
220
|
+
- ".gitignore"
|
221
|
+
- ".rspec"
|
222
|
+
- ".travis.yml"
|
223
|
+
- CONTRIBUTING.md
|
224
|
+
- Gemfile
|
225
|
+
- LICENSE
|
226
|
+
- README.md
|
227
|
+
- Rakefile
|
228
|
+
- capybara_discoball.gemspec
|
229
|
+
- lib/capybara_discoball.rb
|
230
|
+
- lib/capybara_discoball/runner.rb
|
231
|
+
- lib/capybara_discoball/server.rb
|
232
|
+
- lib/capybara_discoball/version.rb
|
233
|
+
- spec/acceptance/rails.feature
|
234
|
+
- spec/spec_helper.rb
|
235
|
+
- spec/step_definitions/rails_steps.rb
|
236
|
+
- spec/support/rails_support.rb
|
237
|
+
homepage: ''
|
238
|
+
licenses: []
|
239
|
+
metadata: {}
|
240
|
+
post_install_message:
|
241
|
+
rdoc_options: []
|
242
|
+
require_paths:
|
243
|
+
- lib
|
244
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
245
|
+
requirements:
|
246
|
+
- - ">="
|
247
|
+
- !ruby/object:Gem::Version
|
248
|
+
version: '0'
|
249
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
250
|
+
requirements:
|
251
|
+
- - ">="
|
252
|
+
- !ruby/object:Gem::Version
|
253
|
+
version: '0'
|
254
|
+
requirements: []
|
255
|
+
rubyforge_project: capybara_discoball
|
256
|
+
rubygems_version: 2.2.2
|
257
|
+
signing_key:
|
258
|
+
specification_version: 4
|
259
|
+
summary: Spin up an external server just for Capybara
|
260
|
+
test_files:
|
261
|
+
- spec/acceptance/rails.feature
|
262
|
+
- spec/spec_helper.rb
|
263
|
+
- spec/step_definitions/rails_steps.rb
|
264
|
+
- spec/support/rails_support.rb
|