bridge_blueprint 0.0.03 → 0.0.04

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: 314da5f541b119ccdb38da750580e3f26fb3e6d1
4
- data.tar.gz: f0b3a8c9094c8fee3246f10c76851f6930817faa
3
+ metadata.gz: e4b3531c1f756dded08ddb5d7ae1170681d4b05a
4
+ data.tar.gz: f66cd888960fdbf035884f9c76e990c46e0b56b6
5
5
  SHA512:
6
- metadata.gz: 6a6c91eea14345a3a32c6092080b6b31cd5b01d71de83c71c23d961ab70e9d9fa469a16add295f122130408dc793c1a2e9d9cf9654169c6c549f6003ee60efe4
7
- data.tar.gz: 481dce12ae4952ee9f7dd79f3d40738027ba738fc7f12c75fd5f1b9d2d8a0c080c5ab261e1651119be86206851fef8b2b095d823df2705bab198cd150167546d
6
+ metadata.gz: f7552c0d441d3abd56849a3e5ae25eb32abef92ea4a61864043ba4e2143702e190b82eed68bd10eadf77cf33bdc774b95c4fcb32af775b5c1b898a78eee3a978
7
+ data.tar.gz: 4b46134293b9b490c1a910b51e20180e8de6bedccd573bb6c3a924d9fd8d125285e6b1b9ebceba21c2cf8fded0ea201115bb69fc9e6d3b390a3d44924f7bc72d
data/Gemfile.lock CHANGED
@@ -1,8 +1,8 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- bridge_blueprint (0.0.02)
5
- bridge_api (~> 0.1.0)
4
+ bridge_blueprint (0.0.04)
5
+ bridge_api (~> 0.0.12)
6
6
  open_uri_redirections (~> 0.2.1)
7
7
  rubyzip (~> 1.2.1)
8
8
 
@@ -16,7 +16,7 @@ GEM
16
16
  tzinfo (~> 1.1)
17
17
  addressable (2.5.1)
18
18
  public_suffix (~> 2.0, >= 2.0.2)
19
- bridge_api (0.1.14)
19
+ bridge_api (0.0.13)
20
20
  faraday (~> 0.9.0)
21
21
  faraday_middleware (~> 0.9.0)
22
22
  footrest (>= 0.5.1)
@@ -18,7 +18,7 @@ Gem::Specification.new do |gem|
18
18
  gem.require_paths = ["lib"]
19
19
  gem.version = BridgeBlueprint::VERSION
20
20
 
21
- gem.add_runtime_dependency 'bridge_api', '~> 0.1.0'
21
+ gem.add_runtime_dependency 'bridge_api', '~> 0.0.12'
22
22
  gem.add_runtime_dependency 'open_uri_redirections', '~> 0.2.1'
23
23
  gem.add_runtime_dependency 'rubyzip', '~> 1.2.1'
24
24
 
@@ -26,15 +26,19 @@ module BridgeBlueprint
26
26
  def extract_from_zip(name)
27
27
  Dir.mktmpdir do |dir|
28
28
  path = nil
29
+ file = nil
29
30
  Zip::File.open(@path) do |zip_file|
30
31
  zip_file.each do |entry|
31
32
  if "#{name.to_s}" == entry.name
32
33
  path = "#{dir}/#{entry.name}"
33
34
  file = entry.extract(path)
34
- yield "#{dir}/#{name}" if block_given?
35
- return
35
+ break
36
36
  end
37
37
  end
38
+ end
39
+ if file
40
+ yield "#{dir}/#{name}" if block_given?
41
+ else
38
42
  raise "File #{name} not found in zip archive #{@path}"
39
43
  end
40
44
  end
@@ -49,11 +49,8 @@ module BridgeBlueprint
49
49
  req.add_field("Authorization", @auth_header)
50
50
  res = http.request(req)
51
51
  redirect_url = res['location']
52
- open(redirect_url,
53
- ) do |remote_file|
54
- File.open(@file_path, 'wb') do |file|
55
- file.write(remote_file.read)
56
- end
52
+ File.open(@file_path, 'w') do |file|
53
+ IO.copy_stream(open(redirect_url), @file_path)
57
54
  end
58
55
  end
59
56
 
@@ -1,3 +1,3 @@
1
1
  module BridgeBlueprint
2
- VERSION = '0.0.03' unless defined?(BridgeBlueprint::VERSION)
2
+ VERSION = '0.0.04' unless defined?(BridgeBlueprint::VERSION)
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bridge_blueprint
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.03
4
+ version: 0.0.04
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jay Shaffer
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-07-25 00:00:00.000000000 Z
11
+ date: 2017-10-31 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bridge_api
@@ -16,14 +16,14 @@ dependencies:
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: 0.1.0
19
+ version: 0.0.12
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
24
  - - "~>"
25
25
  - !ruby/object:Gem::Version
26
- version: 0.1.0
26
+ version: 0.0.12
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: open_uri_redirections
29
29
  requirement: !ruby/object:Gem::Requirement