atlas 1.4.0 → 1.5.0
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 +4 -4
- data/CHANGELOG.md +7 -0
- data/atlas.gemspec +1 -0
- data/lib/atlas/box_provider.rb +5 -13
- data/lib/atlas/version.rb +1 -1
- metadata +16 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b273350740199745dcac200d7b164e1fa5e28af1
|
4
|
+
data.tar.gz: 280422093e1d265f99590ad502b3f4f3934b7d75
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83c82e8e0133a916105e6c6c76362d7f050ae9de11edd380f1deddc4233dc8a91bbe8ee98ae81b47800ee482080ccd9829cc9d009c368a6d940a9117e000136e
|
7
|
+
data.tar.gz: bcca07aa5d23f3c14cb1a189ed19886ddf2f8c59e9b958721a9e99d5606e90392acbca71d8bdb14a17e947251bd484e2a85fbaf22a0a8fde1d9d670e0c99dcd8
|
data/CHANGELOG.md
CHANGED
@@ -1,5 +1,12 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
+
## 1.5.0 (05/01/2016)
|
4
|
+
|
5
|
+
* Revert the callback functionality from 1.4.0.
|
6
|
+
- This would never have worked as the binstore doesn't support chunked
|
7
|
+
encoding.
|
8
|
+
* Add `pry` as a development dependency.
|
9
|
+
|
3
10
|
## 1.4.0 (16/10/2016)
|
4
11
|
|
5
12
|
* Allows providing a callback for file uploads so that it's possible to monitor
|
data/atlas.gemspec
CHANGED
data/lib/atlas/box_provider.rb
CHANGED
@@ -67,21 +67,13 @@ module Atlas
|
|
67
67
|
# Upload a .box file for this provider.
|
68
68
|
#
|
69
69
|
# @param [File] file a File object for the file.
|
70
|
-
def upload(file
|
70
|
+
def upload(file)
|
71
|
+
# get the path for upload
|
71
72
|
response = Atlas.client.get("#{url_builder.box_provider_url}/upload")
|
72
73
|
|
73
|
-
|
74
|
-
|
75
|
-
|
76
|
-
chunker = lambda do
|
77
|
-
progress += chunk_size
|
78
|
-
yield(progress, file.size) if block_given?
|
79
|
-
|
80
|
-
file.read(chunk_size).to_s
|
81
|
-
end
|
82
|
-
|
83
|
-
upload_url = response["upload_path"]
|
84
|
-
Excon.put(upload_url, request_block: chunker)
|
74
|
+
# upload the file
|
75
|
+
upload_url = response['upload_path']
|
76
|
+
Excon.put(upload_url, body: file)
|
85
77
|
end
|
86
78
|
|
87
79
|
# Delete the provider.
|
data/lib/atlas/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: atlas
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.5.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Nick Charlton
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: excon
|
@@ -66,6 +66,20 @@ dependencies:
|
|
66
66
|
- - ">="
|
67
67
|
- !ruby/object:Gem::Version
|
68
68
|
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: pry
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
69
83
|
description: A client for Hashicorp's Atlas.
|
70
84
|
email:
|
71
85
|
- nick@nickcharlton.net
|