capybara-puma 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. data/README.md +64 -0
  2. data/lib/capybara-puma.rb +13 -0
  3. metadata +95 -0
@@ -0,0 +1,64 @@
1
+ # Capybara::Puma
2
+
3
+ The sweet loving marriage of Capybara and Puma. Use a lightweight threaded
4
+ server for your Capybara request specs. Reduce select() spam from having
5
+ EventMachine running, but still get better performance than Webrick.
6
+
7
+ There are several advantages to this:
8
+ * A minor performance enhancement in some environments
9
+ * No more CTRL+C fail
10
+ * No depending on really old gems
11
+ * Readable backtraces
12
+
13
+ ## Installation & Usage
14
+
15
+ Add this line to your application's Gemfile:
16
+
17
+ group :test do
18
+ gem 'capybara-puma'
19
+ end
20
+
21
+ You should no longer need (or indeed want) to specify Capybara in your Gemfile.
22
+ If you do, you could end up with out-of-order requires, that will make you a sad
23
+ panda running on Thin. If you do specify Capybara in your Gemfile (for example
24
+ to use the git repo), do that /after/ capybara-puma.
25
+
26
+ Or install it yourself as:
27
+
28
+ $ gem install capybara-puma
29
+
30
+ If you break the hook (it runs at startup), you can re-apply it by calling
31
+ CapybaraPuma.activate.
32
+
33
+ ## Contributing
34
+
35
+ 1. Fork it
36
+ 2. Create your feature branch (`git checkout -b my-new-feature`)
37
+ 3. Commit your changes (`git commit -am 'Added some feature'`)
38
+ 4. Push to the branch (`git push origin my-new-feature`)
39
+ 5. Create new Pull Request
40
+
41
+ ## License
42
+
43
+ Copyright (c) 2012 James Tucker
44
+
45
+ MIT License
46
+
47
+ Permission is hereby granted, free of charge, to any person obtaining
48
+ a copy of this software and associated documentation files (the
49
+ "Software"), to deal in the Software without restriction, including
50
+ without limitation the rights to use, copy, modify, merge, publish,
51
+ distribute, sublicense, and/or sell copies of the Software, and to
52
+ permit persons to whom the Software is furnished to do so, subject to
53
+ the following conditions:
54
+
55
+ The above copyright notice and this permission notice shall be
56
+ included in all copies or substantial portions of the Software.
57
+
58
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
59
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
60
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
61
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
62
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
63
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
64
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,13 @@
1
+ require 'capybara'
2
+ require 'puma'
3
+
4
+ module CapybaraPuma
5
+ def self.activate
6
+ Capybara.server do |app, port|
7
+ Puma::Server.new(app).tap do |s|
8
+ s.add_tcp_listener '127.0.0.1', port
9
+ end.run.join
10
+ end
11
+ end
12
+ end
13
+ CapybaraPuma.activate
metadata ADDED
@@ -0,0 +1,95 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: capybara-puma
3
+ version: !ruby/object:Gem::Version
4
+ hash: 23
5
+ prerelease:
6
+ segments:
7
+ - 1
8
+ - 0
9
+ - 0
10
+ version: 1.0.0
11
+ platform: ruby
12
+ authors:
13
+ - James Tucker
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2012-03-03 00:00:00 Z
19
+ dependencies:
20
+ - !ruby/object:Gem::Dependency
21
+ name: capybara
22
+ prerelease: false
23
+ requirement: &id001 !ruby/object:Gem::Requirement
24
+ none: false
25
+ requirements:
26
+ - - ">="
27
+ - !ruby/object:Gem::Version
28
+ hash: 3
29
+ segments:
30
+ - 0
31
+ version: "0"
32
+ type: :runtime
33
+ version_requirements: *id001
34
+ - !ruby/object:Gem::Dependency
35
+ name: puma
36
+ prerelease: false
37
+ requirement: &id002 !ruby/object:Gem::Requirement
38
+ none: false
39
+ requirements:
40
+ - - ">="
41
+ - !ruby/object:Gem::Version
42
+ hash: 3
43
+ segments:
44
+ - 0
45
+ version: "0"
46
+ type: :runtime
47
+ version_requirements: *id002
48
+ description: A Capybara server replacement using the Puma webserver
49
+ email:
50
+ - jftucker@gmail.com
51
+ executables: []
52
+
53
+ extensions: []
54
+
55
+ extra_rdoc_files: []
56
+
57
+ files:
58
+ - README.md
59
+ - lib/capybara-puma.rb
60
+ homepage: https://github.com/raggi/capybara-puma
61
+ licenses: []
62
+
63
+ post_install_message:
64
+ rdoc_options: []
65
+
66
+ require_paths:
67
+ - lib
68
+ required_ruby_version: !ruby/object:Gem::Requirement
69
+ none: false
70
+ requirements:
71
+ - - ">="
72
+ - !ruby/object:Gem::Version
73
+ hash: 3
74
+ segments:
75
+ - 0
76
+ version: "0"
77
+ required_rubygems_version: !ruby/object:Gem::Requirement
78
+ none: false
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ hash: 3
83
+ segments:
84
+ - 0
85
+ version: "0"
86
+ requirements: []
87
+
88
+ rubyforge_project:
89
+ rubygems_version: 1.8.15
90
+ signing_key:
91
+ specification_version: 3
92
+ summary: Capybara.server =~ Puma::Server
93
+ test_files: []
94
+
95
+ has_rdoc: