ansible_spec 0.3 → 0.3.1
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/.travis.yml +4 -4
- data/CHANGELOG.md +3 -0
- data/lib/ansible_spec/load_ansible.rb +1 -1
- data/lib/ansible_spec/version.rb +1 -1
- data/spec/load_ansible_spec.rb +68 -0
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2d87ec24d89e985e499037877255f902b7eb7345a4fd4d4af1d262c55287ef9a
|
4
|
+
data.tar.gz: 819cc6ef8696ac2dbd09026e00ef05ffea63ccb6ca59a54cea75bb54dce0981d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7f59e840375f84b5df3df071cc1e9687734038556c3a6a888c7f8529f710130f337db4161dad2234ef787f0c493bbc88ce2256c19e95cd8e6052d37be478dc8b
|
7
|
+
data.tar.gz: 01d38a3d50b2f704351ae2c9f0e33c18d101b85f5c049d6126d66f485e6132634ef6936a3ca7059d7ff53f371cf8296b85f3d4cd2c4d916574850b785c1b445a
|
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,6 @@
|
|
1
|
+
# v0.3.1
|
2
|
+
- Fix [#126 no implicit conversion of nil into Array Error when process get_parent](https://github.com/volanja/ansible_spec/issues/126) by [shogos3](https://github.com/shogos3)
|
3
|
+
|
1
4
|
# v0.3
|
2
5
|
- Support Ansible Vault (Run Ruby 2.1.0 and higher.)
|
3
6
|
- Merge [#116 Feature ansible vault](https://github.com/volanja/ansible_spec/pull/116) by [RebelCodeBase](https://github.com/RebelCodeBase)
|
data/lib/ansible_spec/version.rb
CHANGED
data/spec/load_ansible_spec.rb
CHANGED
@@ -1801,4 +1801,72 @@ EOF
|
|
1801
1801
|
File.delete(tmp_hosts)
|
1802
1802
|
end
|
1803
1803
|
end
|
1804
|
+
|
1805
|
+
context 'Issue 126 Array Error' do
|
1806
|
+
require 'yaml'
|
1807
|
+
tmp_ansiblespec = '.ansiblespec'
|
1808
|
+
tmp_playbook = 'site.yml'
|
1809
|
+
tmp_hosts = 'hosts'
|
1810
|
+
|
1811
|
+
before do
|
1812
|
+
|
1813
|
+
content = <<'EOF'
|
1814
|
+
---
|
1815
|
+
-
|
1816
|
+
playbook: site.yml
|
1817
|
+
inventory: hosts
|
1818
|
+
EOF
|
1819
|
+
|
1820
|
+
content_p = <<'EOF'
|
1821
|
+
- name: Ansible-Sample-TDD-1
|
1822
|
+
hosts:
|
1823
|
+
- server
|
1824
|
+
user: root
|
1825
|
+
roles:
|
1826
|
+
- role: nginx
|
1827
|
+
EOF
|
1828
|
+
|
1829
|
+
content_h = <<'EOF'
|
1830
|
+
[server]
|
1831
|
+
host1
|
1832
|
+
host2
|
1833
|
+
host3
|
1834
|
+
host4
|
1835
|
+
host5
|
1836
|
+
EOF
|
1837
|
+
|
1838
|
+
create_file(tmp_ansiblespec,content)
|
1839
|
+
create_file(tmp_playbook,content_p)
|
1840
|
+
create_file(tmp_hosts,content_h)
|
1841
|
+
@res = AnsibleSpec.get_properties
|
1842
|
+
end
|
1843
|
+
|
1844
|
+
it 'check 5 hosts' do
|
1845
|
+
expect(@res[0]["hosts"].length).to eq 5
|
1846
|
+
end
|
1847
|
+
|
1848
|
+
it 'check host1' do
|
1849
|
+
expect(@res[0]["hosts"][0]["name"]).to eq "host1"
|
1850
|
+
end
|
1851
|
+
|
1852
|
+
it 'check host2' do
|
1853
|
+
expect(@res[0]["hosts"][1]["name"]).to eq "host2" #not " host2"
|
1854
|
+
end
|
1855
|
+
it 'check host3' do
|
1856
|
+
expect(@res[0]["hosts"][2]["name"]).to eq "host3" #not "host3\t"
|
1857
|
+
end
|
1858
|
+
it 'check host4' do
|
1859
|
+
expect(@res[0]["hosts"][3]["name"]).to eq "host4" #not "\thost4"
|
1860
|
+
end
|
1861
|
+
|
1862
|
+
it 'check host5' do
|
1863
|
+
expect(@res[0]["hosts"][4]["name"]).to eq "host5" #not "\thost5\t"
|
1864
|
+
end
|
1865
|
+
|
1866
|
+
after do
|
1867
|
+
File.delete(tmp_ansiblespec)
|
1868
|
+
File.delete(tmp_playbook)
|
1869
|
+
File.delete(tmp_hosts)
|
1870
|
+
end
|
1871
|
+
end
|
1804
1872
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: ansible_spec
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version:
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- volanja
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2020-01-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -361,8 +361,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
361
361
|
- !ruby/object:Gem::Version
|
362
362
|
version: '0'
|
363
363
|
requirements: []
|
364
|
-
|
365
|
-
rubygems_version: 2.7.6
|
364
|
+
rubygems_version: 3.1.2
|
366
365
|
signing_key:
|
367
366
|
specification_version: 4
|
368
367
|
summary: Ansible Config Parser for Serverspec. Run test Multi Role and Multi Host
|