shrine-url 1.0.0 → 1.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 279d319f5a6e2538dfca270f1b5d897f3f7c476c
4
- data.tar.gz: c7457ca67917a378acc4c3312b0096d2c6a379aa
3
+ metadata.gz: f4f3a92060828b60ded518a3b4b1413c3682851d
4
+ data.tar.gz: 756dcbadd24b79466452c81a3c226b0212505ed5
5
5
  SHA512:
6
- metadata.gz: 02c67d530326bd9525741d4c0366b59c3ce6071e9c53803730a599faed2a2bdb7bf3846d3479c08af47401de7f0ca1d2b8d3cdd6765d5ae53185e7b0d7fbdfac
7
- data.tar.gz: 5b784b1d8c35665d573fcb2b68454e5aa94360359b66d54240fa009876c8c5431d031f3b25ee912ca707e7c32961c2af34aeb8c2b9e46323af061380e7352bbb
6
+ metadata.gz: 6b80cf29c41b9072e6aae47d3845edf7910b1b6eba8ad71b1182318520eacc4c94c5007587bf056d7fd09cebe07b29bdf8312072315026420470e5ebbc2e5444
7
+ data.tar.gz: c06953325cc2c20bd4d4bed5e2641ab1b2d6739d07989fc8a925c0dc9cdbdfc5785ce54488f942a1b6142c6af61333c09f30982e42fc018470fa5f26fe81bb4b
data/README.md CHANGED
@@ -98,3 +98,4 @@ you'll need to have Docker installed and running.
98
98
  [shrine-cloudinary]: https://github.com/janko-m/shrine-cloudinary
99
99
  [shrine-uploadcare]: https://github.com/janko-m/shrine-uploadcare
100
100
  [Down]: https://github.com/janko-m/down
101
+ [kennethreitz/httpbin]: https://github.com/kennethreitz/httpbin
@@ -1,5 +1,5 @@
1
1
  require "shrine"
2
- require "net/http"
2
+ require "net/https"
3
3
 
4
4
  class Shrine
5
5
  module Storage
@@ -44,16 +44,14 @@ class Shrine
44
44
  private
45
45
 
46
46
  def request(method, url)
47
- response = nil
48
- uri = URI(url)
47
+ uri = URI.parse(url)
48
+ use_ssl = uri.is_a?(URI::HTTPS)
49
49
 
50
- Net::HTTP.start(uri.host, uri.port) do |http|
50
+ Net::HTTP.start(uri.host, uri.port, use_ssl: use_ssl) do |http|
51
51
  request = Net::HTTP.const_get(method.to_s.capitalize).new(uri.request_uri)
52
52
  yield request if block_given?
53
- response = http.request(request)
53
+ http.request(request)
54
54
  end
55
-
56
- response
57
55
  end
58
56
  end
59
57
  end
data/shrine-url.gemspec CHANGED
@@ -1,6 +1,6 @@
1
1
  Gem::Specification.new do |gem|
2
2
  gem.name = "shrine-url"
3
- gem.version = "1.0.0"
3
+ gem.version = "1.0.1"
4
4
 
5
5
  gem.required_ruby_version = ">= 2.1"
6
6
 
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: shrine-url
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Janko Marohnić
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-06-25 00:00:00.000000000 Z
11
+ date: 2017-10-18 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: shrine