dockerapi 0.20.0 → 0.21.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.
data/CHANGELOG.md DELETED
@@ -1,234 +0,0 @@
1
- # 0.18.0
2
-
3
- Method `Docker::API::Image#distribution` now accepts authentication parameters. Feature introduced in [PR#3](https://github.com/nu12/dockerapi/pull/3)
4
-
5
- Contributors: @zarqman
6
-
7
- # 0.17.0
8
-
9
- New block execution introduced in [PR#1](https://github.com/nu12/dockerapi/pull/1).
10
-
11
- Contributors: @zarqman
12
-
13
- # 0.16.0
14
-
15
- `Docker::API::Task#logs` method can now receive a block to replace standard output to stdout behavior.
16
-
17
- Add `auth_encoder` to provide standard implementation for the authentication header where needed.
18
-
19
- # 0.15.0
20
-
21
- `Docker::API::System#events` and `Docker::API::Exec#start` methods can now receive a block to replace standard output to stdout behavior.
22
-
23
- General refactoring and API documentation.
24
-
25
- # 0.14.0
26
-
27
- Method `Docker::API::Container#archive` is splitted in `#get_archive` and `#put_archive` as per Docker API documentation.
28
-
29
- The following `Docker::API::Container` methods that can now receive a block:
30
- * logs (output to stdout)
31
- * attach (output to stdout)
32
- * stats (output to stdout)
33
- * export (write file)
34
- * get_archive (write file)
35
-
36
- # 0.13.0
37
-
38
- Add default behavior for file read, write and output to stdout. Whenever a method can receive a block, this default behavior can be replaced.
39
-
40
- The following `Docker::API::Image` methods that can now receive a block:
41
- * export (write file)
42
- * create (output to stdout)
43
- * build (output to stdout)
44
-
45
- Default output to stdout can be supressed by setting `Docker::API::PRINT_TO_STDOUT` to `false`
46
-
47
- Method parameters `params` and `body` will be automatically evaluated whenever they are present in the method's signature.
48
-
49
- # 0.12.0
50
-
51
- Add `Docker::API::Plugin` methods:
52
- * list
53
- * privileges
54
- * install
55
- * details
56
- * remove
57
- * enable
58
- * disable
59
- * upgrade
60
- * create
61
- * push
62
- * configure
63
-
64
- # 0.11.0
65
-
66
- Add `Docker::API::Task` methods:
67
- * list
68
- * details
69
- * logs
70
-
71
- Add `Docker::API::Secret` methods:
72
- * create
73
- * update
74
- * list
75
- * details
76
- * delete
77
-
78
- Add `Docker::API::Config` methods:
79
- * create
80
- * update
81
- * list
82
- * details
83
- * delete
84
-
85
- Add `Docker::API::Image` methods:
86
- * distribution
87
-
88
- # 0.10.0
89
-
90
- Add `Docker::API::Service` methods:
91
- * create
92
- * update
93
- * list
94
- * details
95
- * logs
96
- * delete
97
-
98
- # 0.9.0
99
-
100
- Significant change: `#inspect` is now deprecated and replaced by `#details` in the following classes:
101
- * `Docker::API::Container`
102
- * `Docker::API::Image`
103
- * `Docker::API::Network`
104
- * `Docker::API::Volume`
105
- * `Docker::API::Exec`
106
- * `Docker::API::Swarm`
107
- * `Docker::API::Node`
108
-
109
- The method will be removed in the refactoring phase.
110
-
111
- # 0.8.1
112
-
113
- Restore the default `#inspect` output for `Docker::API` classes.
114
-
115
- Most of the overriding methods take an argument, therefore calling using the expect arguments will return a `Docker::API::Response` object, while calling without arguments will return `Kernel#inspect`. To avoid this confusing schema, next release will rename `#inspect` within `Docker::API` to something else.
116
-
117
- # 0.8.0
118
-
119
- Add `Docker::API::Swarm` methods:
120
- * init
121
- * update
122
- * ~~inspect~~ details
123
- * unlock_key
124
- * unlock
125
- * join
126
- * leave
127
-
128
- Add `Docker::API::Node` methods:
129
- * list
130
- * ~~inspect~~ details
131
- * update
132
- * delete
133
-
134
- Query parameters and request body json can now skip the validation step with `:skip_validation => true` option.
135
-
136
- # 0.7.0
137
-
138
- Significant changes: `Docker::API::Connection` is now a regular class intead of a Singleton, allowing multiple connections to be stablished within the same program (replacing the connect_to implementation). To leverage this feature, API-related classes must be initialized and may or may not receive a `Docker::API::Connection` as parameter, or it'll connect to `/var/run/docker.sock` by default. For this reason, class methods were replaced with instance methods. Documentation will reflect this changes of implementation.
139
-
140
- Bug fix: Image push returns a 20X status even when the push is unsucessful. To prevent false positives, it now requires the authentication parameters to be provided, generating a 403 status for invalid credentials or an error if they are absent.
141
-
142
- # 0.6.0
143
-
144
- Add connection parameters specifications with connect_to in Docker::API::Connection.
145
-
146
- Add `Docker::API::Exec` methods:
147
- * create
148
- * start
149
- * resize
150
- * ~~inspect~~ details
151
-
152
- # 0.5.0
153
-
154
- Add `Docker::API::System` methods:
155
- * auth
156
- * ping
157
- * info
158
- * version
159
- * events
160
- * df
161
-
162
- Add new response class `Docker::API::Response` with the following methods:
163
- * json
164
- * path
165
- * success?
166
-
167
- Error classes output better error messages.
168
-
169
- # 0.4.0
170
-
171
- Add `Docker::API::Network` methods:
172
- * list
173
- * ~~inspect~~ details
174
- * create
175
- * remove
176
- * prune
177
- * connect
178
- * disconnect
179
-
180
- # 0.3.0
181
-
182
- Add `Docker::API::Volume` methods:
183
- * list
184
- * ~~inspect~~ details
185
- * create
186
- * remove
187
- * prune
188
-
189
-
190
- # 0.2.0
191
-
192
- Add `Docker::API::Image` methods:
193
- * ~~inspect~~ details
194
- * history
195
- * list
196
- * search
197
- * tag
198
- * prune
199
- * remove
200
- * export
201
- * import
202
- * push
203
- * commit
204
- * create
205
- * build
206
- * delete_cache
207
-
208
- Add `Docker::API::System.auth` (untested) for basic authentication
209
-
210
- # 0.1.0
211
-
212
- Add `Docker::API::Container` methods:
213
- * list
214
- * ~~inspect~~ details
215
- * top
216
- * changes
217
- * start
218
- * stop
219
- * restart
220
- * kill
221
- * wait
222
- * update
223
- * rename
224
- * resize
225
- * prune
226
- * pause
227
- * unpause
228
- * remove
229
- * logs
230
- * attach
231
- * create
232
- * stats
233
- * export
234
- * archive
data/bin/setup DELETED
@@ -1,30 +0,0 @@
1
- #!/usr/bin/env bash
2
- set -euo pipefail
3
- IFS=$'\n\t'
4
- #set -vx
5
-
6
- # Do any other automated setup that you need to do here
7
- if [ $USER == 'root' ]
8
- then
9
- echo "Enabling TCP port 2375 for external connection to Docker"
10
- echo '{"hosts": ["tcp://0.0.0.0:2375", "unix:///var/run/docker.sock"]}' > /etc/docker/daemon.json
11
- mkdir -p /etc/systemd/system/docker.service.d
12
- echo '[Service]' > /etc/systemd/system/docker.service.d/override.conf
13
- echo 'ExecStart=' >> /etc/systemd/system/docker.service.d/override.conf
14
- echo 'ExecStart=/usr/bin/dockerd' >> /etc/systemd/system/docker.service.d/override.conf
15
- systemctl daemon-reload
16
- systemctl restart docker.service
17
- echo "Done!"
18
- else
19
- echo "Running bundle install"
20
- bundle install
21
-
22
- echo "Creating self-signed certificate to use in tests"
23
- openssl req -newkey rsa:2048 -nodes -keyout resources/registry_authentication/registry_auth.key -x509 -days 365 -out resources/registry_authentication/registry_auth.crt -subj "/C=CL/ST=Santiago/L=Santiago/O=dockerapi/OU=dockerapi/CN=localhost"
24
-
25
- echo "Creating htpasswd file to use in tests"
26
- docker run --rm --entrypoint htpasswd registry:2.7.0 -Bbn janedoe password > resources/registry_authentication/htpasswd
27
- docker image rm registry:2.7.0
28
- echo "Run this script as root for further configurations"
29
- fi
30
-
@@ -1,33 +0,0 @@
1
- module Docker
2
- module API
3
-
4
- ##
5
- # This class represents a validation error.
6
- class ValidationError < StandardError
7
-
8
- ##
9
- # @params permitted [Array]: permitted values.
10
- # @params unpermitted [Array]: unpermitted values.
11
- def initialize permitted, unpermitted
12
- super("Unpermitted options found: #{unpermitted.to_s}. Permitted are #{permitted.to_s}")
13
- end
14
- end
15
-
16
- ##
17
- # This class represents a parameter validation error.
18
- class InvalidParameter < Docker::API::ValidationError; end
19
-
20
- ##
21
- # This class represents a request body validation error.
22
- class InvalidRequestBody < Docker::API::ValidationError; end
23
-
24
- ##
25
- # This class represents a generic error.
26
- class Error < StandardError
27
- def initialize msg = "Error without specific message"
28
- super(msg)
29
- end
30
- end
31
-
32
- end
33
- end