atlas 1.4.0 → 1.5.0

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: 546b060a3609f4b83b4948d7b688873e4d0a318a
4
- data.tar.gz: b06feea0a34e6e6dbcc82a9cad2538661641a40e
3
+ metadata.gz: b273350740199745dcac200d7b164e1fa5e28af1
4
+ data.tar.gz: 280422093e1d265f99590ad502b3f4f3934b7d75
5
5
  SHA512:
6
- metadata.gz: 7067a265025989f0039ba21a1560cea2fa5588e92fb077578842dede55cec8151ead1639f5cdc8d54285ac763dd64a6f870bd4e27f184b63b80142ddbd22ec59
7
- data.tar.gz: 554207c239b7721a080cd9cc15a64b54879029d9c9ad08f1d61aa620fa4c5fc33b5c10aa26ef8a358ebc114701526f24af12bdf5ac10e9eae1f87db0d7bc6f24
6
+ metadata.gz: 83c82e8e0133a916105e6c6c76362d7f050ae9de11edd380f1deddc4233dc8a91bbe8ee98ae81b47800ee482080ccd9829cc9d009c368a6d940a9117e000136e
7
+ data.tar.gz: bcca07aa5d23f3c14cb1a189ed19886ddf2f8c59e9b958721a9e99d5606e90392acbca71d8bdb14a17e947251bd484e2a85fbaf22a0a8fde1d9d670e0c99dcd8
@@ -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
@@ -24,4 +24,5 @@ Gem::Specification.new do |spec|
24
24
  spec.add_development_dependency 'rake'
25
25
  spec.add_development_dependency 'vcr'
26
26
  spec.add_development_dependency 'rspec'
27
+ spec.add_development_dependency "pry"
27
28
  end
@@ -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, chunk_size = nil)
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
- chunk_size ||= Excon.defaults[:chunk_size]
74
- progress = 0
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.
@@ -1,4 +1,4 @@
1
1
  # Version information.
2
2
  module Atlas
3
- VERSION = '1.4.0'
3
+ VERSION = "1.5.0"
4
4
  end
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.0
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: 2016-10-16 00:00:00.000000000 Z
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