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 +4 -4
- data/Gemfile.lock +3 -3
- data/bridge_blueprint.gemspec +1 -1
- data/lib/bridge_blueprint/data_dump.rb +6 -2
- data/lib/bridge_blueprint/remote_data.rb +2 -5
- data/lib/bridge_blueprint/version.rb +1 -1
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4b3531c1f756dded08ddb5d7ae1170681d4b05a
|
4
|
+
data.tar.gz: f66cd888960fdbf035884f9c76e990c46e0b56b6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
5
|
-
bridge_api (~> 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.
|
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)
|
data/bridge_blueprint.gemspec
CHANGED
@@ -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.
|
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
|
-
|
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(
|
53
|
-
|
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
|
|
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.
|
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-
|
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.
|
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.
|
26
|
+
version: 0.0.12
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: open_uri_redirections
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|