faraday-hot_mock 0.4.0 → 0.4.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 56228dde369003b5c2b7a68b7af56e2533c13d07ffc9dc997c8fe3a937c48f55
4
- data.tar.gz: bc60f461818b035f6e3d14a28d6b6f9943d47bac85ce398013a91569fba6268f
3
+ metadata.gz: 0bb26f02c836add4b2e94acfb00997c4d4b5df893240d05b664c357a361b2bc7
4
+ data.tar.gz: e302adfe01517cc6cafa86bc569652e5890a163776510b665502506a45a79eb4
5
5
  SHA512:
6
- metadata.gz: 6398844d597bda4844ef3967f104dd6300ff9d9226128b34df2ef2ae096e740f0037b9708f53f70acf5151405a581d507a15ff4e3e9db3fc0d590bfabcdd8694
7
- data.tar.gz: 3ee86b689589bb1cf24d012a47feddefe1e2d8074497953acf7ee85d1936a02387ec3124b07b2cd366345005a5e5dc73a67507e7b63452f209e05ed226905afa
6
+ metadata.gz: 5dd69fdff2fa19a114557e6c307a7be3d45ae3acc36778c2aefe0fa84966441479336b9286743511424e85ae62a3a50b8937234311e30dd2f97786f396a2cdaa
7
+ data.tar.gz: 7e75041ce558508cfd07317e6c537b5b14a520c76f32abade2c39360d7136a053cf0b859013a104ea10528866bcbf62fd444fcfb6a7fdab4a3b9c31a046f6f75
data/README.md CHANGED
@@ -8,15 +8,15 @@ _**This adapter is meant for Faraday usage in Rails, not for Faraday that's used
8
8
 
9
9
  ## Why Use Faraday::HotMock instead of VCR?
10
10
 
11
- VCR focuses on keeping HTTP requests out of tests - Faraday::HotMock focuses on simulating API responses during development.
11
+ [VCR](https://github.com/vcr/vcr) focuses on keeping HTTP requests out of tests - Faraday::HotMock focuses on simulating API responses during development.
12
12
 
13
- To use VCR in development would require wrapping code in VCR blocks, which must then be undone before deployment. Simple, but tedious and error-prone.
13
+ To use [VCR](https://github.com/vcr/vcr) in development would require wrapping code in [VCR](https://github.com/vcr/vcr) blocks, which must then be undone before deployment. Simple, but tedious and error-prone.
14
14
 
15
15
  Faraday::HotMock requires no code changes to the application - it doesn't mock anything in production, even if you try. So while the HotMock adapter is "used", it just passes requests to the default or adapter or specified fallback.
16
16
 
17
- VCR works with any HTTP library, Faraday::HotMock only works with Faraday. This is a critical limitation unless you use only or primarily Faraday.
17
+ [VCR](https://github.com/vcr/vcr) works with any HTTP library, Faraday::HotMock only works with Faraday. This is a critical limitation unless you use only or primarily Faraday.
18
18
 
19
- You could, ostensibly, replace VCR with Faraday::HotMock in tests. VCR is battle-tested, well-written and widely used, so it's likely a better choice for testing. But the goal is to make Faraday::HotMock just as useful in all non-production environments.
19
+ You could, ostensibly, replace VCR with Faraday::HotMock in tests. [VCR](https://github.com/vcr/vcr) is battle-tested, well-written and widely used, so it's likely a better choice for testing. But the goal is to make Faraday::HotMock just as useful in all non-production environments.
20
20
 
21
21
  ## How It Works
22
22
 
@@ -1,5 +1,5 @@
1
1
  module Faraday
2
2
  module HotMock
3
- VERSION = "0.4.0"
3
+ VERSION = "0.4.1"
4
4
  end
5
5
  end
@@ -42,6 +42,7 @@ module Faraday
42
42
  end
43
43
 
44
44
  def mock!(method:, url:, status:, headers: {}, body: nil)
45
+ FileUtils.mkdir_p(hot_mock_dir)
45
46
  FileUtils.touch(hot_mock_file)
46
47
 
47
48
  mocks = YAML.load_file(hot_mock_file) || []
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: faraday-hot_mock
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.0
4
+ version: 0.4.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sean Hogge