ansible-utils 0.1.0 → 0.2.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: 4e2e4706605599532f5bd35b3576e4192d9d9c65ebc0575b39f9f5f8ad8843cb
4
- data.tar.gz: f350353767ba75a8fd7c2b8de9e39ebe08a5fa478662951891714fbad20c9cf1
3
+ metadata.gz: 3e434924464bb914010725f2ae7f15b9544e3cff1be3146820ae9575ae73ca2a
4
+ data.tar.gz: 2904ed1e60761cdf3b60e88e1ac97661b378c93513c76f1a0c00e940e96cc464
5
5
  SHA512:
6
- metadata.gz: 7b9c279fd741799d5f8270a8ddcfbdd5898174d6da17bcfad43031be1dfb52a05c0f789e20de1d2b7192037ee7868f685c69d3728d631cbddf72ec955dc3eceb
7
- data.tar.gz: 2f52f0f7a042a1323c32ffc0fb28d4e9911e4b965513b6babe685bb7729620e741dd451bf98ff729cf621b6180935a4859614dfff28499ac7f8c59aa3e31fc61
6
+ metadata.gz: 3fbd77441e5dc5ad9ad206e442253911171c6823fd176996562d9e62953b68a61ba9a8d8a7c769b4ae81f063d810c4f5c15f39dff4f9ca650414d96eda1a024b
7
+ data.tar.gz: e706df986913c772ab8c6c69a5807048af7cfc2c796a52890aa3eb21aedc6f48d325e9cddbc83e015e534b4f7c60fc836b1db003ef6a83cdad439b43fa12e5c2
data/Gemfile.lock CHANGED
@@ -1,42 +1,44 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ansible-utils (0.1.0)
4
+ ansible-utils (0.1.1)
5
5
  commander (~> 4.5)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
- ast (2.4.1)
10
+ ast (2.4.2)
11
11
  coderay (1.1.3)
12
- commander (4.5.2)
12
+ commander (4.6.0)
13
13
  highline (~> 2.0.0)
14
- diff-lcs (1.4.4)
14
+ diff-lcs (1.5.1)
15
15
  highline (2.0.3)
16
- jaro_winkler (1.5.4)
17
- method_source (1.0.0)
18
- parallel (1.20.1)
19
- parser (3.0.0.0)
16
+ jaro_winkler (1.5.6)
17
+ method_source (1.1.0)
18
+ parallel (1.24.0)
19
+ parser (3.3.0.5)
20
20
  ast (~> 2.4.1)
21
+ racc
21
22
  powerpack (0.1.3)
22
- pry (0.13.1)
23
+ pry (0.14.2)
23
24
  coderay (~> 1.1)
24
25
  method_source (~> 1.0)
25
- rainbow (3.0.0)
26
- rake (13.0.3)
27
- rspec (3.10.0)
28
- rspec-core (~> 3.10.0)
29
- rspec-expectations (~> 3.10.0)
30
- rspec-mocks (~> 3.10.0)
31
- rspec-core (3.10.1)
32
- rspec-support (~> 3.10.0)
33
- rspec-expectations (3.10.1)
26
+ racc (1.7.3)
27
+ rainbow (3.1.1)
28
+ rake (13.2.1)
29
+ rspec (3.13.0)
30
+ rspec-core (~> 3.13.0)
31
+ rspec-expectations (~> 3.13.0)
32
+ rspec-mocks (~> 3.13.0)
33
+ rspec-core (3.13.0)
34
+ rspec-support (~> 3.13.0)
35
+ rspec-expectations (3.13.0)
34
36
  diff-lcs (>= 1.2.0, < 2.0)
35
- rspec-support (~> 3.10.0)
36
- rspec-mocks (3.10.1)
37
+ rspec-support (~> 3.13.0)
38
+ rspec-mocks (3.13.0)
37
39
  diff-lcs (>= 1.2.0, < 2.0)
38
- rspec-support (~> 3.10.0)
39
- rspec-support (3.10.1)
40
+ rspec-support (~> 3.13.0)
41
+ rspec-support (3.13.1)
40
42
  rubocop (0.59.2)
41
43
  jaro_winkler (~> 1.5.1)
42
44
  parallel (~> 1.10)
@@ -45,10 +47,11 @@ GEM
45
47
  rainbow (>= 2.2.2, < 4.0)
46
48
  ruby-progressbar (~> 1.7)
47
49
  unicode-display_width (~> 1.0, >= 1.0.1)
48
- ruby-progressbar (1.11.0)
49
- unicode-display_width (1.7.0)
50
+ ruby-progressbar (1.13.0)
51
+ unicode-display_width (1.8.0)
50
52
 
51
53
  PLATFORMS
54
+ arm64-darwin-21
52
55
  x86_64-linux
53
56
 
54
57
  DEPENDENCIES
@@ -6,7 +6,7 @@ require 'ansible_utils/version'
6
6
 
7
7
  Gem::Specification.new do |spec|
8
8
  spec.name = "ansible-utils"
9
- spec.version = "0.1.0"
9
+ spec.version = AnsibleUtils::VERSION
10
10
  spec.authors = ['Víctor Martín', 'Fernando Blat']
11
11
  spec.email = ['victor@populate.tools', 'fernando@populate.tools']
12
12
  spec.summary = "PopulateTools Ansible Utils"
@@ -16,7 +16,7 @@ Gem::Specification.new do |spec|
16
16
  spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
17
  spec.executables = ['ansible-utils']
18
18
  spec.require_paths = ['lib']
19
- spec.required_ruby_version = '>= 2.7.0'
19
+ spec.required_ruby_version = '>= 3.2.0'
20
20
 
21
21
  spec.add_dependency "commander", "~> 4.5"
22
22
  spec.add_development_dependency 'bundler', '~> 2.1'
data/bin/ansible-utils CHANGED
@@ -56,7 +56,7 @@ command :config do |c|
56
56
  else
57
57
  puts "[!!] Syntax seems to be wrong, couldn't read value"
58
58
  end
59
- if Dir.exists?(folder)
59
+ if Dir.exist?(folder)
60
60
  puts "[OK] Generic folder exist: #{folder}"
61
61
  else
62
62
  puts "[!!] Generic folder referenced in the file doesn't exist: #{folder}"
@@ -27,10 +27,10 @@ module AnsibleUtils
27
27
  file_utils_method = action == :copy ? :copy_entry : :ln_s
28
28
 
29
29
  if !File.directory?(populate_ansible_path)
30
- puts "- Ignoring role '#{path}' because it does not exist in populate-ansible"
30
+ puts "- Ignoring role '#{path}' because it does not exist in #{populate_ansible_path}"
31
31
  else
32
32
  dirname = File.dirname(project_path)
33
- if Dir.exists?(project_path)
33
+ if Dir.exist?(project_path)
34
34
  if options.force
35
35
  puts "+ Overwritting role '#{path}'"
36
36
  delete_if_exists(project_path)
@@ -10,7 +10,13 @@ module AnsibleUtils
10
10
  end
11
11
 
12
12
  def paths
13
- @paths ||= roles.map{|role| role['role'] }
13
+ @paths ||= roles.map do |role|
14
+ if role.is_a?(Hash)
15
+ role['role']
16
+ else
17
+ role
18
+ end
19
+ end
14
20
  end
15
21
 
16
22
  def roles
@@ -18,7 +24,7 @@ module AnsibleUtils
18
24
  end
19
25
 
20
26
  def project_folder
21
- @project_folder ||= File.dirname(playbook_path)
27
+ @project_folder ||= Dir.pwd
22
28
  end
23
29
 
24
30
  def generic_roles_folder
@@ -1,3 +1,3 @@
1
1
  module AnsibleUtils
2
- VERSION = '0.1.0'
2
+ VERSION = '0.2.0'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ansible-utils
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Víctor Martín
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2021-01-06 00:00:00.000000000 Z
12
+ date: 2024-04-17 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: commander
@@ -127,14 +127,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
127
127
  requirements:
128
128
  - - ">="
129
129
  - !ruby/object:Gem::Version
130
- version: 2.7.0
130
+ version: 3.2.0
131
131
  required_rubygems_version: !ruby/object:Gem::Requirement
132
132
  requirements:
133
133
  - - ">="
134
134
  - !ruby/object:Gem::Version
135
135
  version: '0'
136
136
  requirements: []
137
- rubygems_version: 3.2.3
137
+ rubygems_version: 3.5.5
138
138
  signing_key:
139
139
  specification_version: 4
140
140
  summary: PopulateTools Ansible Utils