rancher-api 0.5.2 → 0.6.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/.gitignore +1 -0
- data/CHANGELOG.md +7 -0
- data/Gemfile.lock +19 -17
- data/README.md +3 -2
- data/examples/create_docker_host.rb +1 -1
- data/lib/rancher/api/models/machine.rb +2 -0
- data/lib/rancher/api/models/project.rb +1 -0
- data/lib/rancher/api/version.rb +1 -1
- data/rancher-api.gemspec +1 -0
- metadata +17 -4
- data/.ruby-version +0 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 28b3fd216a5f0a320ef4207a71862d3bc28127f7
|
4
|
+
data.tar.gz: 7a92291162373ffb05e5856441618af5d6d05c94
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8fcfbd57cfcf91bfc1f0149088923967611aac804ba1ee6fbf0ead829f67032d4cdd8c1f3278a2891db2f6f775ec74ee5cec3769dd2bb9d848857a46fa6e24fa
|
7
|
+
data.tar.gz: 63c23561df29aa8623826eb4df8cbc62c89fd4e612aa3b9001a728033009028045c6fd0ad5c738f1ec57b326516fd34bcdcf1380804a1161c486df99c76a1b16
|
data/.gitignore
CHANGED
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,13 @@
|
|
2
2
|
All notable changes to this project will be documented in this file.
|
3
3
|
This project adheres to [Semantic Versioning](http://semver.org/).
|
4
4
|
|
5
|
+
## [0.6.0] - 2016-12-14
|
6
|
+
|
7
|
+
### Changed
|
8
|
+
|
9
|
+
- update `Rancher::Api::Machine` model to use collection path that has `project_id` as part of url, i.e. `/v1/projects/1a5/machines/1ph1` instead of `/v1/machines/1ph1`. It seems like Rancher 1.2 forces you to use full path instead of supplying `project_id` as parameter
|
10
|
+
|
11
|
+
|
5
12
|
## [0.5.2] - 2016-08-22
|
6
13
|
|
7
14
|
- adding models for registry and registrycredentials
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
rancher-api (0.
|
4
|
+
rancher-api (0.6.0)
|
5
5
|
faraday_middleware
|
6
6
|
faye-websocket
|
7
7
|
her (~> 0.8.1)
|
@@ -9,30 +9,29 @@ PATH
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
activemodel (
|
13
|
-
activesupport (=
|
14
|
-
|
15
|
-
|
12
|
+
activemodel (5.0.0.1)
|
13
|
+
activesupport (= 5.0.0.1)
|
14
|
+
activesupport (5.0.0.1)
|
15
|
+
concurrent-ruby (~> 1.0, >= 1.0.2)
|
16
16
|
i18n (~> 0.7)
|
17
|
-
json (~> 1.7, >= 1.7.7)
|
18
17
|
minitest (~> 5.1)
|
19
|
-
thread_safe (~> 0.3, >= 0.3.4)
|
20
18
|
tzinfo (~> 1.1)
|
21
19
|
addressable (2.3.8)
|
22
20
|
awesome_print (1.7.0)
|
23
|
-
builder (3.2.2)
|
24
21
|
byebug (6.0.0)
|
25
22
|
coderay (1.1.0)
|
23
|
+
colorize (0.8.1)
|
24
|
+
concurrent-ruby (1.0.2)
|
26
25
|
crack (0.4.2)
|
27
26
|
safe_yaml (~> 1.0.0)
|
28
27
|
diff-lcs (1.2.5)
|
29
28
|
docile (1.1.5)
|
30
|
-
eventmachine (1.2.
|
31
|
-
faraday (0.
|
29
|
+
eventmachine (1.2.1)
|
30
|
+
faraday (0.10.0)
|
32
31
|
multipart-post (>= 1.2, < 3)
|
33
|
-
faraday_middleware (0.10.
|
34
|
-
faraday (>= 0.7.4, < 0
|
35
|
-
faye-websocket (0.10.
|
32
|
+
faraday_middleware (0.10.1)
|
33
|
+
faraday (>= 0.7.4, < 1.0)
|
34
|
+
faye-websocket (0.10.5)
|
36
35
|
eventmachine (>= 0.12.0)
|
37
36
|
websocket-driver (>= 0.5.1)
|
38
37
|
ffi (1.9.10)
|
@@ -51,11 +50,13 @@ GEM
|
|
51
50
|
guard (~> 2.1)
|
52
51
|
guard-compat (~> 1.1)
|
53
52
|
rspec (>= 2.99.0, < 4.0)
|
54
|
-
her (0.8.
|
55
|
-
activemodel (>= 3.0.0, <=
|
56
|
-
activesupport (>= 3.0.0, <=
|
53
|
+
her (0.8.2)
|
54
|
+
activemodel (>= 3.0.0, <= 6.0.0)
|
55
|
+
activesupport (>= 3.0.0, <= 6.0.0)
|
57
56
|
faraday (>= 0.8, < 1.0)
|
58
57
|
multi_json (~> 1.7)
|
58
|
+
httplog (0.3.3)
|
59
|
+
colorize
|
59
60
|
i18n (0.7.0)
|
60
61
|
json (1.8.3)
|
61
62
|
listen (3.1.5)
|
@@ -64,7 +65,7 @@ GEM
|
|
64
65
|
ruby_dep (~> 1.2)
|
65
66
|
lumberjack (1.0.10)
|
66
67
|
method_source (0.8.2)
|
67
|
-
minitest (5.
|
68
|
+
minitest (5.10.1)
|
68
69
|
multi_json (1.12.1)
|
69
70
|
multipart-post (2.0.0)
|
70
71
|
nenv (0.3.0)
|
@@ -121,6 +122,7 @@ DEPENDENCIES
|
|
121
122
|
bundler (~> 1.10)
|
122
123
|
byebug
|
123
124
|
guard-rspec
|
125
|
+
httplog
|
124
126
|
pry
|
125
127
|
rake (~> 10.0)
|
126
128
|
rancher-api!
|
data/README.md
CHANGED
@@ -38,7 +38,8 @@ Or install it yourself as:
|
|
38
38
|
## Rancher Version
|
39
39
|
|
40
40
|
Tested with:
|
41
|
-
Rancher v1.1.0
|
41
|
+
gem < 0.6.0 -> Rancher v1.1.0
|
42
|
+
gem >= 0.6.0 -> Rancher v1.2.0
|
42
43
|
|
43
44
|
## Usage
|
44
45
|
|
@@ -91,7 +92,7 @@ Now, you're able to query entities like this:
|
|
91
92
|
|
92
93
|
```ruby
|
93
94
|
project = Rancher::Api::Project.all.to_a
|
94
|
-
machine = Rancher::Api::Machine.find('1ph1')
|
95
|
+
machine = Rancher::Api::Machine.find('1ph1', _project_id: project.id)
|
95
96
|
```
|
96
97
|
|
97
98
|
`rancher/api` gem uses ORM Her which hence inherently supports all of the features that Her has to offer. To get more details, review this page https://github.com/remiprev/her#fetching-data
|
@@ -9,6 +9,8 @@ module Rancher
|
|
9
9
|
DIGITAL_OCEAN = 'digitalocean'.freeze
|
10
10
|
VMWARE_VSPHERE = 'vmwarevsphere'.freeze
|
11
11
|
|
12
|
+
collection_path 'projects/:project_id/machines'
|
13
|
+
|
12
14
|
attributes :name, :state, :amazonec2Config, :azureConfig, :description,
|
13
15
|
:digitaloceanConfig, :driver, :exoscaleConfig, :externalId,
|
14
16
|
:labels, :openstackConfig, :packetConfig, :rackspaceConfig,
|
data/lib/rancher/api/version.rb
CHANGED
data/rancher-api.gemspec
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rancher-api
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.6.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Alex Kurkin
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-12-14 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: her
|
@@ -192,6 +192,20 @@ dependencies:
|
|
192
192
|
- - ">="
|
193
193
|
- !ruby/object:Gem::Version
|
194
194
|
version: '0'
|
195
|
+
- !ruby/object:Gem::Dependency
|
196
|
+
name: httplog
|
197
|
+
requirement: !ruby/object:Gem::Requirement
|
198
|
+
requirements:
|
199
|
+
- - ">="
|
200
|
+
- !ruby/object:Gem::Version
|
201
|
+
version: '0'
|
202
|
+
type: :development
|
203
|
+
prerelease: false
|
204
|
+
version_requirements: !ruby/object:Gem::Requirement
|
205
|
+
requirements:
|
206
|
+
- - ">="
|
207
|
+
- !ruby/object:Gem::Version
|
208
|
+
version: '0'
|
195
209
|
description: Ruby gem to easily connect to Rancher API. Via this gem you can do anything
|
196
210
|
that API lets you to do it
|
197
211
|
email:
|
@@ -203,7 +217,6 @@ files:
|
|
203
217
|
- ".gitignore"
|
204
218
|
- ".rspec"
|
205
219
|
- ".rubocop.yml"
|
206
|
-
- ".ruby-version"
|
207
220
|
- ".simplecov"
|
208
221
|
- ".travis.yml"
|
209
222
|
- CHANGELOG.md
|
@@ -259,7 +272,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
259
272
|
version: '0'
|
260
273
|
requirements: []
|
261
274
|
rubyforge_project:
|
262
|
-
rubygems_version: 2.
|
275
|
+
rubygems_version: 2.5.1
|
263
276
|
signing_key:
|
264
277
|
specification_version: 4
|
265
278
|
summary: Easily connect to Rancher API!
|
data/.ruby-version
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
2.2.5
|