capybara-webmock 0.2.1 → 0.2.2

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: f71ae7d5c699978261d98b47c2ad685f2377f8ee
4
- data.tar.gz: 5b7f9cbc37d9b32dddfa5c6e6d467918f41817ad
3
+ metadata.gz: f307a699eb166e3af9de147e1c3f41f84432d716
4
+ data.tar.gz: 07be870d00b3cf1f23059ad1d83b10cf69b7c4a3
5
5
  SHA512:
6
- metadata.gz: 3f2b56b226f18621eff711f4cca2ff7c71fd4775ac2f5a8cdaa81bb4bb5abf50c7f530ad695284509dbb9d49006884edbc4eb051934ea8e408595be106993b25
7
- data.tar.gz: e0e169fde214889d2dcd1a933ad87b3996eae1eb74cb320fb49a5b7b1d481ff535fa18ac06aa2b2b23aaa5287332f704f2e670369c9a32d568109fb22f3aa6ac
6
+ metadata.gz: 01c5c747cabdcfd4a466f62fa5cc6a55fe6400f5d8080be159605c77fa94e938483cb21470b2908a92ff00168a8dc56712cd7d5104f4102b687df19068931184
7
+ data.tar.gz: 67fd10ece7d4bd9f864676d199c111fea988a8c33502232ecd63585d03fc4584ac1fc320d6e5e912450e0bdcb1f8183d99ee851c0f3ee77b9a117a4e6d6d88d2
data/README.md CHANGED
@@ -1,11 +1,25 @@
1
1
  [![CircleCI](https://circleci.com/gh/hashrocket/capybara-webmock.svg?style=svg)](https://circleci.com/gh/hashrocket/capybara-webmock)
2
+ [![Version](https://img.shields.io/gem/v/capybara-webmock.svg?style=flat)](https://rubygems.org/gems/capybara-webmock)
2
3
 
3
4
  # Capybara::Webmock
4
5
 
5
- > Mock external requests for Capybara Firefox & Chrome drivers
6
+ Browser integration tests are expensive. We can mock external requests in our
7
+ tests, but once a browser is involved, we lose control.
8
+
9
+ External JavaScript libraries, CDN's, images, analytics, and more can slow an
10
+ integration test suite to a crawl.
11
+
12
+ `Capybara::Webmock` is a Rack proxy server that sits between your Ruby on Rails
13
+ Selenium Firefox test suite and the Internet, blocking external requests.
14
+
15
+ Adding this gem to your project can significantly speed up the test suite. No
16
+ more waiting on irrelevant external requests.
17
+
18
+ `localhost` and `lvh.me` are the only whitelisted domains. Custom domain
19
+ support is a planned feature.
6
20
 
7
21
  This gem currently supports Ruby on Rails applications with an RSpec test
8
- suite.
22
+ suite, using the Selenium Firefox driver. ChromeDriver support is in the works.
9
23
 
10
24
  ### Installation
11
25
 
@@ -86,7 +100,7 @@ License](http://opensource.org/licenses/MIT).
86
100
 
87
101
  [![Hashrocket logo](https://hashrocket.com/hashrocket_logo.svg)](https://hashrocket.com)
88
102
 
89
- Capybara::Webmock is supported by the team at [Hashrocket, a multidisciplinary
103
+ `Capybara::Webmock` is supported by the team at [Hashrocket, a multidisciplinary
90
104
  design and development consultancy](https://hashrocket.com). If you'd like to
91
105
  [work with us](https://hashrocket.com/contact-us/hire-us) or [join our
92
106
  team](https://hashrocket.com/contact-us/jobs), don't hesitate to get in touch.
@@ -24,6 +24,10 @@ class Capybara::Webmock::Proxy < Rack::Proxy
24
24
  private
25
25
 
26
26
  def write_pid(pid)
27
+ tmp_dir = 'tmp'
28
+ pid_dir = File.join(tmp_dir, 'pids')
29
+ Dir.mkdir(tmp_dir) unless Dir.exist?(tmp_dir)
30
+ Dir.mkdir(pid_dir) unless Dir.exist?(pid_dir)
27
31
  File.write(PID_FILE, pid)
28
32
  end
29
33
  end
@@ -1,5 +1,5 @@
1
1
  module Capybara
2
2
  module Webmock
3
- VERSION = "0.2.1"
3
+ VERSION = "0.2.2"
4
4
  end
5
5
  end
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.1
4
+ version: 0.2.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jake Worth