puppetfile_editor 0.7.1 → 0.8.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/CHANGELOG.md +6 -0
- data/lib/puppetfile_editor/cli.rb +2 -3
- data/lib/puppetfile_editor/module.rb +8 -6
- data/lib/puppetfile_editor/puppetfile.rb +6 -6
- data/lib/puppetfile_editor/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: f80e573ccac2a8b14e1802a81e148da2caf73e00
|
4
|
+
data.tar.gz: 9803399f5d16f23fdbcb8b95701db9352d94bbcd
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 4f932f8a8f111cf09ec710a36edf5e82f6fffd117f10ab6942ff3df5b9a96497955a198501dff84492658c50e84810def1c2324614d442eaf70dd36580bc23de
|
7
|
+
data.tar.gz: c181a94a1a5a6cdc150c565abb65991d33f1cb140732eae87f0d777cde6aa1187ba89809987fba9ea31049d959799f8ba4c7b3087e95e06f41d8947219177175
|
data/CHANGELOG.md
CHANGED
@@ -4,6 +4,12 @@ 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.8.0] - 2018-07-12
|
8
|
+
### Changed
|
9
|
+
- [#1](https://github.com/pegasd/puppetfile_editor/issues/1): Do not downgrade modules while merging, whenever possible (see issue for more details).
|
10
|
+
- Changed status message and color for modules not found in original Puppetfile (old one generated too much noise).
|
11
|
+
|
12
|
+
|
7
13
|
## [0.7.1] - 2018-02-22
|
8
14
|
### Fixed
|
9
15
|
- Fix for older rubies where `Gem::Version` broke for versions like `0.1.0-dev1`.
|
@@ -35,7 +35,7 @@ module PuppetfileEditor
|
|
35
35
|
@pfile.dump
|
36
36
|
end
|
37
37
|
|
38
|
-
def format(
|
38
|
+
def format(_why_am_i_here)
|
39
39
|
@pfile.dump
|
40
40
|
end
|
41
41
|
|
@@ -113,10 +113,9 @@ module PuppetfileEditor
|
|
113
113
|
updated: "[ \e[32;1m+\e[0m ]",
|
114
114
|
matched: "[ \e[0;1m=\e[0m ]",
|
115
115
|
skipped: "[ \e[33;1m~\e[0m ]",
|
116
|
-
not_found: "[ \e[
|
116
|
+
not_found: "[ \e[0;1m-\e[0m ]",
|
117
117
|
type_mismatched: "[ \e[31;1mx\e[0m ]",
|
118
118
|
wont_upgrade: "[ \e[33;1m!\e[0m ]",
|
119
|
-
downgrade: "[ \e[31;1m!\e[0m ]",
|
120
119
|
warn: "[ \e[31;1m!!\e[0m ]",
|
121
120
|
undef: '',
|
122
121
|
}
|
@@ -85,7 +85,8 @@ module PuppetfileEditor
|
|
85
85
|
set_message("could not compare versions, so updating (#{full_version} to #{mod.full_version})", :updated)
|
86
86
|
else
|
87
87
|
if old_version > new_version
|
88
|
-
set_message("
|
88
|
+
set_message("not downgrading (#{full_version} > #{mod.full_version})", :matched)
|
89
|
+
return
|
89
90
|
else
|
90
91
|
set_message("updated (#{full_version} to #{mod.full_version})", :updated)
|
91
92
|
end
|
@@ -105,7 +106,8 @@ module PuppetfileEditor
|
|
105
106
|
set_message("versions match (#{full_version})", :matched)
|
106
107
|
return
|
107
108
|
elsif Gem::Version.new(full_version) > Gem::Version.new(mod.full_version)
|
108
|
-
set_message("
|
109
|
+
set_message("not downgrading (#{full_version} > #{mod.full_version})", :matched)
|
110
|
+
return
|
109
111
|
else
|
110
112
|
set_message("updated (#{full_version} to #{mod.full_version})", :updated)
|
111
113
|
end
|
@@ -122,10 +124,10 @@ module PuppetfileEditor
|
|
122
124
|
output.push "mod '#{full_title}'"
|
123
125
|
@params.each do |param_name, param_value|
|
124
126
|
value = if param_value == :latest
|
125
|
-
|
126
|
-
|
127
|
-
|
128
|
-
|
127
|
+
':latest'
|
128
|
+
else
|
129
|
+
"'#{param_value}'"
|
130
|
+
end
|
129
131
|
param = "#{param_name}:".ljust(@indent)
|
130
132
|
output.push " #{param} #{value}"
|
131
133
|
end
|
@@ -78,16 +78,14 @@ module PuppetfileEditor
|
|
78
78
|
@modules[name].set(param, value, true)
|
79
79
|
end
|
80
80
|
|
81
|
-
def compare_with(
|
81
|
+
def compare_with(pfile)
|
82
82
|
diff = {}
|
83
|
-
|
83
|
+
pfile.modules.each do |mod_name, mod|
|
84
84
|
next unless [:git, :hg, :forge].include? mod.type
|
85
85
|
version_key = mod.type == :forge ? :version : :tag
|
86
86
|
|
87
87
|
unless @modules.key? mod_name
|
88
|
-
if mod.params.key?(version_key)
|
89
|
-
diff[mod_name] = { new: mod.params[version_key], type: mod.type }
|
90
|
-
end
|
88
|
+
diff[mod_name] = { new: mod.params[version_key], type: mod.type } if mod.params.key?(version_key)
|
91
89
|
next
|
92
90
|
end
|
93
91
|
|
@@ -134,7 +132,9 @@ module PuppetfileEditor
|
|
134
132
|
@librarian.update_forge_url(url)
|
135
133
|
end
|
136
134
|
|
137
|
-
def
|
135
|
+
def respond_to_missing?(method, include_private); end
|
136
|
+
|
137
|
+
def method_missing(method, *_why_am_i_here)
|
138
138
|
raise NoMethodError, "Unrecognized declaration: '#{method}'"
|
139
139
|
end
|
140
140
|
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.
|
4
|
+
version: 0.8.0
|
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-
|
11
|
+
date: 2018-07-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -103,7 +103,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
103
103
|
version: '0'
|
104
104
|
requirements: []
|
105
105
|
rubyforge_project:
|
106
|
-
rubygems_version: 2.
|
106
|
+
rubygems_version: 2.6.14.1
|
107
107
|
signing_key:
|
108
108
|
specification_version: 4
|
109
109
|
summary: Parse and edit Puppetfile
|