manifestly 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -0
- data/changelog.md +11 -0
- data/lib/manifestly/cli.rb +6 -1
- data/lib/manifestly/manifest.rb +2 -2
- data/lib/manifestly/manifest_item.rb +5 -2
- data/lib/manifestly/utilities.rb +5 -0
- data/lib/manifestly/version.rb +1 -1
- metadata +4 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a2aed560e442a4e6fdfe2f3543f9f51ad3a1bfb5
|
4
|
+
data.tar.gz: 48ed77e6d0e1272595e976374371f2ac8ddd6978
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ef9afdcfbcc3c9ae088bd6fb52d3e23feda51390a7949abff0ec17b81845347771bffbc651d146a3514afb9a29a0e2c467a77508388cc73c9fdce6ec95b3790a
|
7
|
+
data.tar.gz: aed77cfd8d92a3f13cf1fc51e86fc45cfb0a045b229246c86a2d946a38c7004f302c3d77a1c22d30e26da67fa3d3d980c72e8b1a1062a527534606ae41ee28f5
|
data/.gitignore
CHANGED
data/changelog.md
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
# Changelog
|
2
|
+
|
3
|
+
# 3.1.0
|
4
|
+
|
5
|
+
* Adds an option `--full-shas` to use the full-length SHAs in manifests (defaults to false)
|
6
|
+
|
7
|
+
# 3.0.0
|
8
|
+
|
9
|
+
* Prepends the directory of the repository at the start of the manifest line
|
10
|
+
* Puts tags in a comment at the end of the manifest line
|
11
|
+
* Uses the first 10 characters of SHAs in manifests
|
data/lib/manifestly/cli.rb
CHANGED
@@ -95,6 +95,11 @@ module Manifestly
|
|
95
95
|
banner: '',
|
96
96
|
required: false,
|
97
97
|
default: ''
|
98
|
+
method_option :full_shas,
|
99
|
+
desc: "Use full instead of shortened SHAs",
|
100
|
+
type: :boolean,
|
101
|
+
default: false,
|
102
|
+
required: false
|
98
103
|
long_desc <<-DESC
|
99
104
|
Creates a manifest.
|
100
105
|
|
@@ -508,7 +513,7 @@ module Manifestly
|
|
508
513
|
|
509
514
|
filename = default_filename if filename.blank?
|
510
515
|
|
511
|
-
manifest.write(filename)
|
516
|
+
manifest.write(filename, options.slice("full_shas"))
|
512
517
|
end
|
513
518
|
|
514
519
|
def present_commit_menu(manifest_item, options={})
|
data/lib/manifestly/manifest.rb
CHANGED
@@ -53,11 +53,11 @@ module Manifestly
|
|
53
53
|
end
|
54
54
|
end
|
55
55
|
|
56
|
-
def write(filename)
|
56
|
+
def write(filename, options={})
|
57
57
|
File.open(filename, 'w') do |file|
|
58
58
|
@items.sort_by!(&:repository_name)
|
59
59
|
@items.each do |item|
|
60
|
-
file.write(item.to_file_string + "\n")
|
60
|
+
file.write(item.to_file_string(options) + "\n")
|
61
61
|
end
|
62
62
|
end
|
63
63
|
end
|
@@ -41,12 +41,15 @@ module Manifestly
|
|
41
41
|
end.map(&:name)
|
42
42
|
end
|
43
43
|
|
44
|
-
def to_file_string
|
44
|
+
def to_file_string(options={})
|
45
|
+
options[:full_shas] ||= false
|
46
|
+
|
45
47
|
dir = @repository.deepest_working_dir
|
46
48
|
repo = @repository.github_name_or_path
|
47
49
|
tags = commit_tags
|
50
|
+
sha = options[:full_shas] ? commit.sha : commit.sha[0..9]
|
48
51
|
|
49
|
-
"[#{dir}]#{repo.nil? ? '' : ' ' + repo}@#{
|
52
|
+
"[#{dir}]#{repo.nil? ? '' : ' ' + repo}@#{sha}#{' # ' + tags.join(",") if tags.any?}"
|
50
53
|
end
|
51
54
|
|
52
55
|
def self.from_file_string(string, repositories)
|
data/lib/manifestly/utilities.rb
CHANGED
@@ -11,6 +11,11 @@ class Hash
|
|
11
11
|
def except(*keys)
|
12
12
|
dup.except!(*keys)
|
13
13
|
end
|
14
|
+
|
15
|
+
def slice(*keys)
|
16
|
+
keys.map! { |key| convert_key(key) } if respond_to?(:convert_key, true)
|
17
|
+
keys.each_with_object(self.class.new) { |k, hash| hash[k] = self[k] if has_key?(k) }
|
18
|
+
end
|
14
19
|
end
|
15
20
|
|
16
21
|
class String
|
data/lib/manifestly/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: manifestly
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- JP Slavinsky
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2017-01-30 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: thor
|
@@ -155,6 +155,7 @@ files:
|
|
155
155
|
- Rakefile
|
156
156
|
- bin/console
|
157
157
|
- bin/setup
|
158
|
+
- changelog.md
|
158
159
|
- exe/manifestly
|
159
160
|
- lib/manifestly.rb
|
160
161
|
- lib/manifestly/cli.rb
|
@@ -188,7 +189,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
188
189
|
version: '0'
|
189
190
|
requirements: []
|
190
191
|
rubyforge_project:
|
191
|
-
rubygems_version: 2.4.
|
192
|
+
rubygems_version: 2.4.5.1
|
192
193
|
signing_key:
|
193
194
|
specification_version: 4
|
194
195
|
summary: Manage multi-site deploy manifests
|