image_vise 0.0.27 → 0.0.28

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: f5f04e40e483c24a0b40a0b3d2d76ae28be7570e
4
- data.tar.gz: e79c48aa6995a8325d78a93870b79468e94eb4d5
3
+ metadata.gz: 71d0c2785fe1650fef5a5023dca5d3ead9bdab97
4
+ data.tar.gz: 4758619a643d835eb9622259bd6b09d362148496
5
5
  SHA512:
6
- metadata.gz: 6cd787cd19a6eeef389879077ae4ee511f5a8f0bbc388433c4e4cacdb53c8d6320542703bff5d91801b86fa1926b90acbcd95596b2ff12f1fdbc4bbfd32b06ba
7
- data.tar.gz: 6450c000ad114c2f0e37a1291a174e5cfead4692d8439df7d7c3583261aafbbdac6c9b36897d909a34d0cfbe936edbc5a41c1d89af11ea730f7240bf83c8d015
6
+ metadata.gz: 1e17b34585c22cc8bed8e3a6d0868b5970c2527fcec99af67469da8acf78e474e6c09b99db57fad64c0bb98439662cf90076382a2fb65bc1226c5019ed4c6594
7
+ data.tar.gz: 409c7e9d30630df9784389a807da35d38296e614821399dd64c0d4bc138b53eb93c6ea3160ddf0674e7580078eac0f778b2cb943a47a5f8f25c94b7d14297c4c
data/image_vise.gemspec CHANGED
@@ -2,11 +2,11 @@
2
2
  # DO NOT EDIT THIS FILE DIRECTLY
3
3
  # Instead, edit Jeweler::Tasks in Rakefile, and run 'rake gemspec'
4
4
  # -*- encoding: utf-8 -*-
5
- # stub: image_vise 0.0.27 ruby lib
5
+ # stub: image_vise 0.0.28 ruby lib
6
6
 
7
7
  Gem::Specification.new do |s|
8
8
  s.name = "image_vise"
9
- s.version = "0.0.27"
9
+ s.version = "0.0.28"
10
10
 
11
11
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
12
12
  s.require_paths = ["lib"]
@@ -22,7 +22,7 @@ class ImageVise::FetcherHTTP
22
22
  response = s.get_file(uri.to_s, tf.path)
23
23
 
24
24
  if response.status != 200
25
- raise UpstreamError.new(response.status, "Unfortunate upstream response #{response.status}")
25
+ raise UpstreamError.new(response.status, "Unfortunate upstream response #{response.status} on #{uri}")
26
26
  end
27
27
 
28
28
  tf
data/lib/image_vise.rb CHANGED
@@ -8,7 +8,7 @@ require 'base64'
8
8
  require 'rack'
9
9
 
10
10
  class ImageVise
11
- VERSION = '0.0.27'
11
+ VERSION = '0.0.28'
12
12
  S_MUTEX = Mutex.new
13
13
  private_constant :S_MUTEX
14
14
 
@@ -76,7 +76,7 @@ describe ImageVise::RenderEngine do
76
76
  expect(last_response.body).to include('filesystem access is disabled')
77
77
  end
78
78
 
79
- it 'responds with 403 when upstream returns it' do
79
+ it 'responds with 403 when upstream returns it, and includes the URL in the error message' do
80
80
  uri = Addressable::URI.parse(public_url)
81
81
  ImageVise.add_allowed_host!(uri.host)
82
82
  ImageVise.add_secret_key!('l33tness')
@@ -91,6 +91,7 @@ describe ImageVise::RenderEngine do
91
91
  expect(last_response.headers['Content-Type']).to eq('application/json')
92
92
  parsed = JSON.load(last_response.body)
93
93
  expect(parsed['errors'].to_s).to include("Unfortunate upstream response")
94
+ expect(parsed['errors'].to_s).to include(uri.to_s)
94
95
  end
95
96
 
96
97
  it 'replays upstream error response codes that are selected to be replayed to the requester' do
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: image_vise
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.27
4
+ version: 0.0.28
5
5
  platform: ruby
6
6
  authors:
7
7
  - Julik Tarkhanov