docker-api 2.3.0 → 2.4.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
  SHA256:
3
- metadata.gz: 8bcdc6793c2627d187d2844a679965abf7903c58b89dc26de88f411feb8d0fd6
4
- data.tar.gz: 3cc8a8aadeee74ab3ba28b25d147b795dae8aff22e53923a2911f36f7bbc3d5d
3
+ metadata.gz: c8c844030bda8d245234ddd5d977ad5202b9a2f0a2e34175579790d79e6f584b
4
+ data.tar.gz: 5b793f7689d091a8a765853511e4f0f8f495338250cdec62bce30fc7a83d5117
5
5
  SHA512:
6
- metadata.gz: 6fb00d23f25120f8341002958a9abedbff05bc27e11d5992308063569a640b9e51c3a492a0fdd00dae15e8f6ddbb62bc8c706b8fbe25d6a7c79719178194b328
7
- data.tar.gz: f8fee2e81864164601e6cccd2e3cd3235df383217a2fd0c362a06a9da8448f0ef452306fa6a2d370c02ea95dbe9b9db1669d1ab39cdd4d1b880265fd0e57752d
6
+ metadata.gz: d5ce08a8dfbe1e5377ceb62d8186e4973ca6f7fa8d166bd9177f8f4a3338dc2dfeb3d735d3c54e31b15373f4124cc87d509d369a34e0f1598291105a4593947f
7
+ data.tar.gz: d27a38af366bbb20febcc3699238a56f5c52d24394780c25d3caf72bc6f9314fb8bae6dd9c7f53cd5ff30558f5bbc353d22fc9f236913a2d8786488c9a702aea
data/lib/docker/base.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class is a base class for Docker Container and Image.
2
4
  # It is implementing accessor methods for the models attributes.
3
5
  module Docker::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Connection to a Docker server. The Connection is
2
4
  # immutable in that once the url and options is set they cannot be changed.
3
5
  class Docker::Connection
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Docker Container. It's important to note that nothing
2
4
  # is cached so that the information is always up to date.
3
5
  class Docker::Container
data/lib/docker/error.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This module holds the Errors for the gem.
2
4
  module Docker::Error
3
5
 
data/lib/docker/event.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Docker Event.
2
4
  class Docker::Event
3
5
  include Docker::Error
data/lib/docker/exec.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Docker Exec Instance.
2
4
  class Docker::Exec
3
5
  include Docker::Base
data/lib/docker/image.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Docker Image.
2
4
  class Docker::Image
3
5
  include Docker::Base
@@ -28,7 +30,7 @@ class Docker::Image
28
30
  repo, tag = Docker::Util.parse_repo_tag(repo_tag)
29
31
  raise ArgumentError, "Image does not have a name to push." if repo.nil?
30
32
 
31
- body = ""
33
+ body = +""
32
34
  credentials = creds || Docker.creds || {}
33
35
  headers = Docker::Util.build_auth_header(credentials)
34
36
  opts = {:tag => tag}.merge(options)
@@ -119,7 +121,7 @@ class Docker::Image
119
121
  def create(opts = {}, creds = nil, conn = Docker.connection, &block)
120
122
  credentials = creds.nil? ? Docker.creds : MultiJson.dump(creds)
121
123
  headers = credentials && Docker::Util.build_auth_header(credentials) || {}
122
- body = ''
124
+ body = +''
123
125
  conn.post(
124
126
  '/images/create',
125
127
  opts,
@@ -168,7 +170,7 @@ class Docker::Image
168
170
  end
169
171
  nil
170
172
  else
171
- string = ''
173
+ string = +''
172
174
  save_stream(names, {}, conn, &response_block_for_save(string))
173
175
  string
174
176
  end
@@ -196,7 +198,7 @@ class Docker::Image
196
198
  def load(tar, opts = {}, conn = Docker.connection, creds = nil, &block)
197
199
  headers = build_headers(creds)
198
200
  io = tar.is_a?(String) ? File.open(tar, 'rb') : tar
199
- body = ""
201
+ body = +""
200
202
  conn.post(
201
203
  '/images/load',
202
204
  opts,
@@ -267,7 +269,7 @@ class Docker::Image
267
269
 
268
270
  # Given a Dockerfile as a string, builds an Image.
269
271
  def build(commands, opts = {}, connection = Docker.connection, &block)
270
- body = ""
272
+ body = +""
271
273
  connection.post(
272
274
  '/build', opts,
273
275
  :body => Docker::Util.create_tar('Dockerfile' => commands),
@@ -288,7 +290,7 @@ class Docker::Image
288
290
  headers = build_headers(creds)
289
291
 
290
292
  # The response_block passed to Excon will build up this body variable.
291
- body = ""
293
+ body = +""
292
294
  connection.post(
293
295
  '/build', opts,
294
296
  :headers => headers,
@@ -340,7 +342,7 @@ class Docker::Image
340
342
  # Convience method to get the Dockerfile for a file hash and a path to
341
343
  # output to.
342
344
  def dockerfile_for(file_hash, output_path)
343
- dockerfile = "from #{self.id}\n"
345
+ dockerfile = +"from #{self.id}\n"
344
346
 
345
347
  file_hash.keys.each do |basename|
346
348
  dockerfile << "add #{basename} #{output_path}\n"
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents all the messages either received by chunks from attach
2
4
  class Docker::Messages
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a messages stack
2
4
  class Docker::MessagesStack
3
5
 
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class represents a Docker Network.
2
4
  class Docker::Network
3
5
  include Docker::Base
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # This class allows image-based tasks to be created.
2
4
  class Docker::ImageTask < Rake::Task
3
5
  def self.scope_name(_scope, task_name)
data/lib/docker/util.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'set'
2
4
 
3
5
  # This module holds shared logic that doesn't really belong anywhere else in the
@@ -1,4 +1,6 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Docker
2
4
  # The version of the docker-api gem.
3
- VERSION = '2.3.0'
5
+ VERSION = '2.4.0'
4
6
  end
data/lib/docker/volume.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  # class represents a Docker Volume
2
4
  class Docker::Volume
3
5
  include Docker::Base
data/lib/docker-api.rb CHANGED
@@ -1 +1,3 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'docker'
data/lib/docker.rb CHANGED
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  require 'cgi'
2
4
  require 'multi_json'
3
5
  require 'excon'
@@ -1,3 +1,5 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Excon
2
4
  module Middleware
3
5
  # Hijack is an Excon middleware which parses response headers and then
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: docker-api
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.0
4
+ version: 2.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Swipely, Inc.
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2024-07-08 00:00:00.000000000 Z
11
+ date: 2024-10-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: excon
@@ -80,20 +80,6 @@ dependencies:
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
- - !ruby/object:Gem::Dependency
84
- name: cane
85
- requirement: !ruby/object:Gem::Requirement
86
- requirements:
87
- - - ">="
88
- - !ruby/object:Gem::Version
89
- version: '0'
90
- type: :development
91
- prerelease: false
92
- version_requirements: !ruby/object:Gem::Requirement
93
- requirements:
94
- - - ">="
95
- - !ruby/object:Gem::Version
96
- version: '0'
97
83
  - !ruby/object:Gem::Dependency
98
84
  name: pry
99
85
  requirement: !ruby/object:Gem::Requirement