puppetfile-updater 0.2.0 → 0.2.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- Y2FkZjBlNmZjNWM3NTEwYWM0OTY1YTBlZjY4OWUxZjJhOGJhM2Y4Mw==
4
+ YzY4Y2ZlOTU5M2RjMDQ0NjYxYjAxNjU3NWY1MmFjZjJiYmNmZThiMA==
5
5
  data.tar.gz: !binary |-
6
- YTBlYTRlNGU3ZWVlNWZjM2FiMmIyZGEyNGZiYTBjNzQxYjI1NTY1MQ==
6
+ MWVkZDQ0ZmExYTc2NWQ4OTg3MTgwZjAxMmU2NWNhYTU5MTQ2MDFhZg==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- ZTNjOGIxNzc0YTAwYWE4MDlhNDc5ZjQ3MTVlYTYwMTBjYmI3YTFiZjJjOGEz
10
- ZDk2ZGViMDI4Njk2ZDkyOGE5MThkNGMzODkzMjFlYWIyMTJjNjNkY2E3OWQz
11
- MWMxNGFlZmNlNTZlMTQ2NTVlZWNkNzQ0ZjkxMjQxMjgwZGZiNTg=
9
+ YTMwN2EyYjQ4MDY1YmUwNmE5ZTgyMDVhNTdlOTI5NjBkYzEzMmYxY2IwNjIx
10
+ ZTRkMDYzYWFhODg1ZTFhNzk0Y2RkYzNhN2MwNjcwOTZmMmQxYmYyNjgyMDNm
11
+ YjA4Zjg3YjUwZmE0ZWFlOGMwNDM4NzYzNDllYzFlMTllMzkzMDM=
12
12
  data.tar.gz: !binary |-
13
- MDhjMTQyNDU3YzcyNjc3NjRkZTQ1ODc2MzljZTQyZmEzZGQzOTZhMTUzYjg0
14
- Nzc0ODE0ZTFhMzgyMzkwYWM0MWRkM2RkNTI2MThhNzIxZTJjOGM1YjUwYzk0
15
- NzkwMzk5YWVlMDg5NjQwY2Y5OGJlOWE4Njk1YzdjNTVhYzUyN2E=
13
+ ODE4OTc1ODQwNWJmMzA1NDhlMzhmODYxYWY2YWUxN2NhN2M1M2ZjMjEzMzlm
14
+ ZmU2Mzk5ZTI1NDA0NDM5YzY2YTA1ZDVhMDliOTQxYjM2NjVhZmE1YTNlODJi
15
+ Y2M5ZGVhMDBiNmIzNzBjMWIwYTcxZTk4ZGFhMTFkMzY2Njk2NmU=
@@ -80,17 +80,18 @@ class PuppetfileUpdater
80
80
  next if !@module.nil? && @module != m.gsub(%r{.*[-/]}, '')
81
81
  v = aug.get("#{mpath}/@version")
82
82
  forge_m = PuppetForge::Module.find(m)
83
- new_v = forge_m.releases[0].version
83
+ release = forge_m.releases.select { |r| r.deleted_at.nil? }[0]
84
+ new_v = release.version
84
85
  if new_v.split('.')[0] != v.split('.')[0]
85
86
  if @major
86
87
  warn "W: #{m} has incompatible changes between #{v} and #{new_v}"
87
- aug.set("#{mpath}/@version", forge_m.releases[0].version)
88
+ aug.set("#{mpath}/@version", new_v)
88
89
  else
89
90
  warn "W: Not upgrading #{m} from #{v} to new major version #{new_v}"
90
91
  end
91
92
  else
92
93
  warn "W: #{m} got new features between #{v} and #{new_v}" if new_v.split('.')[1] != v.split('.')[1]
93
- aug.set("#{mpath}/@version", forge_m.releases[0].version)
94
+ aug.set("#{mpath}/@version", new_v)
94
95
  end
95
96
  end
96
97
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: puppetfile-updater
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.0
4
+ version: 0.2.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Camptocamp