manifestly 2.3.0 → 2.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: d62c8dfcbbf81b5c0214dba1f2af56f95629122b
4
- data.tar.gz: ac1e5f68ffd0c99cbfd42a99cd8119b8602fd2db
3
+ metadata.gz: 895f93d31c23ecd85d45ef0bc0a0e985d7744390
4
+ data.tar.gz: 4886dc88611d99521892befaf02bcad32f7ddb4e
5
5
  SHA512:
6
- metadata.gz: 2b5b02fb9c83d0082f5a1f641ed377a32daeafd4dd317c7cef1d09a963ed5d4381ab45776bf921183ee049fe4b37996989aa079cf862f16f80137f2212da78fa
7
- data.tar.gz: 587e782061553e4c1957e25e3bec0361d2657c5dc893fb8335d33c5248d64d550e1070a2b614d798875ce45a57e15cf592c34f9f0b46adcad7ba8abb7cebe88c
6
+ metadata.gz: e22a5a5b506cc1ccaabdd852fd79125e39b3a0873aba54fc7523f6a285123703a8c0136b18b95a32f640ce671ef7259664c374989a5acc016b287548da1fcda0
7
+ data.tar.gz: fbb7edb40a4448e09ce55d879611facda4315011ab4c7710af3b73650196fe4e1c9e021d004f9ad190514a35c521bc54d958376174d68136358572c5f99630c5
data/README.md CHANGED
@@ -15,6 +15,18 @@ To update to the latest version:
15
15
 
16
16
  $ gem update manifestly
17
17
 
18
+ ## What is a manifest?
19
+
20
+ A manifest is simple: just a file listing off repositories at specified commits, e.g.:
21
+
22
+ ```
23
+ my_github_org/application_1 @ fb186400247779f90aacf23fa2cde044cbac387c
24
+ my_github_org/application_2 @ c4eb68d6b16f61af04dd0e02df2249382d411104
25
+ ```
26
+
27
+ When you have deploys that span multiple applications, a manifest lets you identify exactly what is deployed for each app.
28
+ This tool, Manifestly, helps you create, find, and use these manifests in your deploy infrastructure.
29
+
18
30
  ## Usage
19
31
 
20
32
  Manifestly has built in help:
@@ -73,6 +85,10 @@ You can diff two manifests, resulting in markdown output that lists the PRs merg
73
85
 
74
86
  See `$> manifestly help diff`.
75
87
 
88
+ ## Miscellaneous
89
+
90
+ 1. You can add comments to manifests using a `# comment here` style. Blank lines and leading and trailing whitespace are ignored in manifests.
91
+
76
92
  ## Development
77
93
 
78
94
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -575,7 +575,7 @@ module Manifestly
575
575
  Manifest.read_file(options[:file], available_repositories)
576
576
  elsif options[:repository] && options[:sha]
577
577
  content = options[:repository].get_commit_content(options[:sha])
578
- Manifest.read_lines(content, available_repositories).tap do |manifest|
578
+ Manifest.read_string(content, available_repositories).tap do |manifest|
579
579
  manifest.manifest_repository = options[:repository]
580
580
  manifest.manifest_sha = options[:sha]
581
581
  manifest.manifest_file = options[:repository].get_commit_filename(options[:sha])
@@ -30,17 +30,29 @@ module Manifestly
30
30
  end
31
31
 
32
32
  def self.read_file(filename, repositories)
33
- lines = File.read(filename)
34
- read_lines(lines, repositories)
33
+ content = File.read(filename)
34
+ read_string(content, repositories)
35
35
  end
36
36
 
37
- def self.read_lines(lines, repositories)
38
- lines.split("\n").each_with_object(Manifest.new) do |line, manifest|
37
+ def self.read_string(string, repositories)
38
+ lines = get_lines_from_string(string)
39
+
40
+ lines.each_with_object(Manifest.new) do |line, manifest|
39
41
  item = ManifestItem.from_file_string(line, repositories)
40
42
  manifest.add_item(item)
41
43
  end
42
44
  end
43
45
 
46
+ def self.get_lines_from_string(line_string)
47
+ all_lines = line_string.split("\n")
48
+
49
+ all_lines.each_with_object([]) do |line, lines|
50
+ line.gsub!(/#.*/,'')
51
+ line.strip!
52
+ lines.push(line) if line != ''
53
+ end
54
+ end
55
+
44
56
  def write(filename)
45
57
  File.open(filename, 'w') do |file|
46
58
  @items.sort_by!(&:repository_name)
@@ -1,3 +1,3 @@
1
1
  module Manifestly
2
- VERSION = "2.3.0"
2
+ VERSION = "2.3.1"
3
3
  end
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: 2.3.0
4
+ version: 2.3.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - JP Slavinsky
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2016-04-22 00:00:00.000000000 Z
11
+ date: 2016-05-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: thor