fakes3 0.2.2 → 0.2.3

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: 241deda826d3d91b172ce08830a500ee014d452a
4
- data.tar.gz: 0fff1ebd2cd5e02f5f7ec9d5228927eef3802e2a
3
+ metadata.gz: 5b7ef68df251e0f1437c6e34a2cfab6518fab70a
4
+ data.tar.gz: 63ca64285fb73b16f7812f52553375501b78703a
5
5
  SHA512:
6
- metadata.gz: 11825967dc25673fe37a311a7fc52e631c7c695186c9b0721b4468f6cb560ad7a22d1efbf06880759c8ae6d8cb27c900a5771820ae122a92fbc6e754c7fe5572
7
- data.tar.gz: 9a5c1824a3fad9d4c59e71335e9231d7526acd7d2ce1a8415fbbf5ce6e27605ff9bdc4c4304b63e9136f3b2b88b3436d44a49d8ed06f32dfc179921cc53b92da
6
+ metadata.gz: 7084cf417f9a40af3e3b7dcb42e5f093e6f4670bf7135eedda8b1a6f0c99b0a48a64f6f3a6049c78651efa80d23c0318cf705b0df6dc1212dae2d0f73f1cea8a
7
+ data.tar.gz: a7c368cef2505509e629ba8350376d7301dd55659b1c4b062d9178d3a9a2cd6acb900434f4f939df2be2986a3f1977ffc47e4a9ea9c6df26857b5e1cc8a7ec41
@@ -9,6 +9,7 @@ require 'fakes3/xml_adapter'
9
9
  require 'fakes3/bucket_query'
10
10
  require 'fakes3/unsupported_operation'
11
11
  require 'fakes3/errors'
12
+ require 'ipaddr'
12
13
 
13
14
  module FakeS3
14
15
  class Request
@@ -452,7 +453,7 @@ module FakeS3
452
453
  s_req.path = webrick_req.path
453
454
  s_req.is_path_style = true
454
455
 
455
- if !@root_hostnames.include?(host)
456
+ if !@root_hostnames.include?(host) && !(IPAddr.new(host) rescue nil)
456
457
  s_req.bucket = host.split(".")[0]
457
458
  s_req.is_path_style = false
458
459
  end
@@ -1,3 +1,3 @@
1
1
  module FakeS3
2
- VERSION = "0.2.2"
2
+ VERSION = "0.2.3"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fakes3
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.2
4
+ version: 0.2.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Curtis Spencer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-11-18 00:00:00.000000000 Z
11
+ date: 2016-01-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler