puppetfile_editor 0.7.0 → 0.7.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/puppetfile_editor/module.rb +19 -7
- data/lib/puppetfile_editor/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c87e60bcb47337f1e82ddebb3cf63438ca86d16d469c4a7837bc179a7a2ca1c9
|
4
|
+
data.tar.gz: 1cdd31477c5668a7fb8170b60df48a0156a8f8e2786a575c52b56ecfadf0d563
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1095879f6b4423febcc3c225e944ad410622155ab4d3ed6a196b33dd96f87114d7b2d028f94ff626fa993a7492831df7d275791dc06f7abd443a6f5071872ce4
|
7
|
+
data.tar.gz: 84f21e96aee3e29ea6513a0b6012242aa5b41b9fd2ac1e2fba6cc85a8817d162b9c7cdaa80ad8d0c3997eab33e6b7f517f69b82e70fb660df190048cb910dbc2
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,10 @@ All notable changes to this project will be documented in this file.
|
|
4
4
|
The format is based on [Keep a Changelog](http://keepachangelog.com/)
|
5
5
|
and this project adheres to [Semantic Versioning](http://semver.org/).
|
6
6
|
|
7
|
+
## [0.7.1] - 2018-02-22
|
8
|
+
### Fixed
|
9
|
+
- Fix for older rubies where `Gem::Version` broke for versions like `0.1.0-dev1`.
|
10
|
+
|
7
11
|
## [0.7.0] - 2018-02-15
|
8
12
|
### Added
|
9
13
|
- Warn about downgrading forge, git, and hg modules while merging.
|
@@ -74,11 +74,23 @@ module PuppetfileEditor
|
|
74
74
|
if full_version == mod.full_version
|
75
75
|
set_message("versions match (#{full_version})", :matched)
|
76
76
|
return
|
77
|
-
|
78
|
-
|
77
|
+
end
|
78
|
+
|
79
|
+
begin
|
80
|
+
old_version = Gem::Version.new(full_version.sub('tag: ', ''))
|
81
|
+
new_version = Gem::Version.new(mod.full_version.sub('tag: ', ''))
|
82
|
+
rescue ArgumentError
|
83
|
+
# Older rubies throw ArgumentError when version is '0.1.0-dev1', for example.
|
84
|
+
# Sad.
|
85
|
+
set_message("could not compare versions, so updating (#{full_version} to #{mod.full_version})", :updated)
|
79
86
|
else
|
80
|
-
|
87
|
+
if old_version > new_version
|
88
|
+
set_message("DOWNGRADED (#{full_version} to #{mod.full_version})", :downgrade)
|
89
|
+
else
|
90
|
+
set_message("updated (#{full_version} to #{mod.full_version})", :updated)
|
91
|
+
end
|
81
92
|
end
|
93
|
+
|
82
94
|
@params.delete_if { |param, _| [:branch, :tag, :ref, :changeset].include? param }
|
83
95
|
@params.merge!(new)
|
84
96
|
calculate_indent
|
@@ -110,10 +122,10 @@ module PuppetfileEditor
|
|
110
122
|
output.push "mod '#{full_title}'"
|
111
123
|
@params.each do |param_name, param_value|
|
112
124
|
value = if param_value == :latest
|
113
|
-
|
114
|
-
|
115
|
-
|
116
|
-
|
125
|
+
':latest'
|
126
|
+
else
|
127
|
+
"'#{param_value}'"
|
128
|
+
end
|
117
129
|
param = "#{param_name}:".ljust(@indent)
|
118
130
|
output.push " #{param} #{value}"
|
119
131
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: puppetfile_editor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.7.
|
4
|
+
version: 0.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Eugene Piven
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-02-
|
11
|
+
date: 2018-02-22 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|