capybara-webmock 0.2.0 → 0.2.1
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.
- checksums.yaml +4 -4
- data/README.md +11 -7
- data/capybara-webmock.gemspec +1 -0
- data/lib/capybara/webmock/proxy.rb +2 -1
- data/lib/capybara/webmock/version.rb +1 -1
- metadata +15 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: f71ae7d5c699978261d98b47c2ad685f2377f8ee
|
|
4
|
+
data.tar.gz: 5b7f9cbc37d9b32dddfa5c6e6d467918f41817ad
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 3f2b56b226f18621eff711f4cca2ff7c71fd4775ac2f5a8cdaa81bb4bb5abf50c7f530ad695284509dbb9d49006884edbc4eb051934ea8e408595be106993b25
|
|
7
|
+
data.tar.gz: e0e169fde214889d2dcd1a933ad87b3996eae1eb74cb320fb49a5b7b1d481ff535fa18ac06aa2b2b23aaa5287332f704f2e670369c9a32d568109fb22f3aa6ac
|
data/README.md
CHANGED
|
@@ -1,3 +1,5 @@
|
|
|
1
|
+
[](https://circleci.com/gh/hashrocket/capybara-webmock)
|
|
2
|
+
|
|
1
3
|
# Capybara::Webmock
|
|
2
4
|
|
|
3
5
|
> Mock external requests for Capybara Firefox & Chrome drivers
|
|
@@ -5,7 +7,7 @@
|
|
|
5
7
|
This gem currently supports Ruby on Rails applications with an RSpec test
|
|
6
8
|
suite.
|
|
7
9
|
|
|
8
|
-
|
|
10
|
+
### Installation
|
|
9
11
|
|
|
10
12
|
Add this line to your application's Gemfile:
|
|
11
13
|
|
|
@@ -25,7 +27,7 @@ Or install it yourself as:
|
|
|
25
27
|
$ gem install capybara-webmock
|
|
26
28
|
```
|
|
27
29
|
|
|
28
|
-
|
|
30
|
+
### Usage
|
|
29
31
|
|
|
30
32
|
In your `spec/rails_helper.rb`, add the following:
|
|
31
33
|
|
|
@@ -53,7 +55,7 @@ Then use the capybara-webmock JavaScript driver:
|
|
|
53
55
|
Capybara.javascript_driver = :capybara_webmock
|
|
54
56
|
```
|
|
55
57
|
|
|
56
|
-
|
|
58
|
+
### Development
|
|
57
59
|
|
|
58
60
|
After checking out the repo, run `bin/setup` to install dependencies. Then, run
|
|
59
61
|
`rake spec` to run the tests. You can also run `bin/console` for an interactive
|
|
@@ -65,20 +67,22 @@ release a new version, update the version number in `version.rb`, and then run
|
|
|
65
67
|
git commits and tags, and push the `.gem` file to
|
|
66
68
|
[rubygems.org](https://rubygems.org).
|
|
67
69
|
|
|
68
|
-
|
|
70
|
+
### Contributing
|
|
69
71
|
|
|
70
72
|
Bug reports and pull requests are welcome on GitHub at
|
|
71
|
-
https://github.com/
|
|
73
|
+
https://github.com/hashrocket/capybara-webmock. This project is intended to be
|
|
72
74
|
a safe, welcoming space for collaboration, and contributors are expected to
|
|
73
75
|
adhere to the [Contributor Covenant](http://contributor-covenant.org) code of
|
|
74
76
|
conduct.
|
|
75
77
|
|
|
76
|
-
|
|
78
|
+
### License
|
|
77
79
|
|
|
78
80
|
The gem is available as open source under the terms of the [MIT
|
|
79
81
|
License](http://opensource.org/licenses/MIT).
|
|
80
82
|
|
|
81
|
-
|
|
83
|
+
---
|
|
84
|
+
|
|
85
|
+
### About
|
|
82
86
|
|
|
83
87
|
[](https://hashrocket.com)
|
|
84
88
|
|
data/capybara-webmock.gemspec
CHANGED
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
require 'rack/proxy'
|
|
2
|
+
require 'capybara/webmock'
|
|
2
3
|
|
|
3
4
|
class Capybara::Webmock::Proxy < Rack::Proxy
|
|
4
5
|
PID_FILE = File.join('tmp', 'pids', 'capybara_webmock_proxy.pid')
|
|
@@ -12,7 +13,7 @@ class Capybara::Webmock::Proxy < Rack::Proxy
|
|
|
12
13
|
if request.host =~ %r{.*\.lvh.me}
|
|
13
14
|
super(env)
|
|
14
15
|
else
|
|
15
|
-
['200', {'Content-Type' => 'text/html'}, ['
|
|
16
|
+
['200', {'Content-Type' => 'text/html'}, ['']]
|
|
16
17
|
end
|
|
17
18
|
end
|
|
18
19
|
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: capybara-webmock
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Jake Worth
|
|
@@ -95,6 +95,20 @@ dependencies:
|
|
|
95
95
|
- - "~>"
|
|
96
96
|
- !ruby/object:Gem::Version
|
|
97
97
|
version: '3.0'
|
|
98
|
+
- !ruby/object:Gem::Dependency
|
|
99
|
+
name: pry
|
|
100
|
+
requirement: !ruby/object:Gem::Requirement
|
|
101
|
+
requirements:
|
|
102
|
+
- - ">="
|
|
103
|
+
- !ruby/object:Gem::Version
|
|
104
|
+
version: '0'
|
|
105
|
+
type: :development
|
|
106
|
+
prerelease: false
|
|
107
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
108
|
+
requirements:
|
|
109
|
+
- - ">="
|
|
110
|
+
- !ruby/object:Gem::Version
|
|
111
|
+
version: '0'
|
|
98
112
|
description: Mock external requests for Capybara Firefox & Chrome drivers
|
|
99
113
|
email:
|
|
100
114
|
- dev@hashrocket.com
|