ansible_tower_client 0.10.0 → 0.11.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/.rubocop.yml +4 -0
- data/.travis.yml +1 -1
- data/CHANGELOG.md +7 -1
- data/lib/ansible_tower_client.rb +1 -0
- data/lib/ansible_tower_client/api.rb +8 -0
- data/lib/ansible_tower_client/base_models/project.rb +14 -0
- data/lib/ansible_tower_client/base_models/project_update.rb +4 -0
- data/lib/ansible_tower_client/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8b3555fc824c01e90923150be087d089ee91f7ea
|
4
|
+
data.tar.gz: d46e9936d77a188a841826484284e4b4a0da4cc3
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 59bb794ead947894b115c5b57e9b3e812f56bc53d55a2f7b9b1adb9dc4e395bae19d6f87b89fbdf2645664298b40e85459f4d924a862a26c5aa04bfa5e0e94bf
|
7
|
+
data.tar.gz: 7e7089772810da5baa0b38d6950a0a7eb22e446527106b6b3ec749250a93e6b9145a5c74b4adedd0b13e645014e65304c0ae50c26ffcca3b0fb95346e5fa546d
|
data/.gitignore
CHANGED
data/.rubocop.yml
ADDED
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -5,6 +5,10 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
5
5
|
|
6
6
|
## [Unreleased]
|
7
7
|
|
8
|
+
## [0.11.0] - 2017-04-10
|
9
|
+
### Added
|
10
|
+
- Add ProjectUpdate and expose Project#update [(#82)](https://github.com/ansible/ansible_tower_client_ruby/pull/82)
|
11
|
+
|
8
12
|
## [0.10.0] - 2017-03-23
|
9
13
|
### Added
|
10
14
|
- Allow formatted stdout, default to plain text [(#80)](https://github.com/ansible/ansible_tower_client_ruby/pull/80)
|
@@ -40,7 +44,9 @@ This project adheres to [Semantic Versioning](http://semver.org/).
|
|
40
44
|
### Fixed
|
41
45
|
- Adjusted project_spec to test on a Project [(#63)](https://github.com/ansible/ansible_tower_client_ruby/pull/63)
|
42
46
|
|
43
|
-
[Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.
|
47
|
+
[Unreleased]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.11.0...master
|
48
|
+
[0.11.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.10.0...v0.11.0
|
49
|
+
[0.10.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.9.0...v0.10.0
|
44
50
|
[0.9.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.8.0...v0.9.0
|
45
51
|
[0.8.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.7.0...v0.8.0
|
46
52
|
[0.7.0]: https://github.com/ansible/ansible_tower_client_ruby/compare/v0.6.0...v0.7.0
|
data/lib/ansible_tower_client.rb
CHANGED
@@ -25,6 +25,7 @@ require "ansible_tower_client/base_models/job_play"
|
|
25
25
|
require "ansible_tower_client/base_models/job_template"
|
26
26
|
require "ansible_tower_client/base_models/organization"
|
27
27
|
require "ansible_tower_client/base_models/project"
|
28
|
+
require "ansible_tower_client/base_models/project_update"
|
28
29
|
|
29
30
|
require "ansible_tower_client/v2/job_template_v2"
|
30
31
|
|
@@ -79,6 +79,10 @@ module AnsibleTowerClient
|
|
79
79
|
Collection.new(self, project_class)
|
80
80
|
end
|
81
81
|
|
82
|
+
def project_updates
|
83
|
+
Collection.new(self, project_update_class)
|
84
|
+
end
|
85
|
+
|
82
86
|
def method_missing(method_name, *args, &block)
|
83
87
|
if instance.respond_to?(method_name)
|
84
88
|
path = build_path_to_resource(args.shift)
|
@@ -166,6 +170,10 @@ module AnsibleTowerClient
|
|
166
170
|
@project_class ||= AnsibleTowerClient::Project
|
167
171
|
end
|
168
172
|
|
173
|
+
def project_update_class
|
174
|
+
@project_update_class ||= AnsibleTowerClient::ProjectUpdate
|
175
|
+
end
|
176
|
+
|
169
177
|
private
|
170
178
|
|
171
179
|
def build_path_to_resource(original)
|
@@ -3,5 +3,19 @@ module AnsibleTowerClient
|
|
3
3
|
def playbooks
|
4
4
|
Collection.new(api).find_all_by_url(related['playbooks'])
|
5
5
|
end
|
6
|
+
|
7
|
+
def can_update?
|
8
|
+
response = api.get(related['update'].to_s).body
|
9
|
+
updatable = JSON.parse(response)
|
10
|
+
|
11
|
+
updatable['can_update']
|
12
|
+
end
|
13
|
+
|
14
|
+
def update
|
15
|
+
response = api.post(related['update'].to_s).body
|
16
|
+
update = JSON.parse(response)
|
17
|
+
|
18
|
+
api.project_updates.find(update['project_update'])
|
19
|
+
end
|
6
20
|
end
|
7
21
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansible_tower_client
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.11.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Dunne
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: exe
|
11
11
|
cert_chain: []
|
12
|
-
date: 2017-
|
12
|
+
date: 2017-04-10 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: activesupport
|
@@ -161,6 +161,7 @@ files:
|
|
161
161
|
- lib/ansible_tower_client/base_models/job_template.rb
|
162
162
|
- lib/ansible_tower_client/base_models/organization.rb
|
163
163
|
- lib/ansible_tower_client/base_models/project.rb
|
164
|
+
- lib/ansible_tower_client/base_models/project_update.rb
|
164
165
|
- lib/ansible_tower_client/collection.rb
|
165
166
|
- lib/ansible_tower_client/connection.rb
|
166
167
|
- lib/ansible_tower_client/exception.rb
|
@@ -190,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
190
191
|
version: '0'
|
191
192
|
requirements: []
|
192
193
|
rubyforge_project:
|
193
|
-
rubygems_version: 2.5.
|
194
|
+
rubygems_version: 2.5.2
|
194
195
|
signing_key:
|
195
196
|
specification_version: 4
|
196
197
|
summary: Ansible Tower REST API wrapper gem
|