electric_monk 0.3.0 → 0.4.0

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: 5fdfdaae4c92e5e8022a74520096288cb223d15a
4
- data.tar.gz: '05250191c08281ba24c7ed36ab47741d3bcbebbf'
3
+ metadata.gz: 3f911b6fcb7defd18bd2e0f93b6517c52ca5ea93
4
+ data.tar.gz: 9b80c9f9fdb75051ae027919f22a0123640091a6
5
5
  SHA512:
6
- metadata.gz: e0aa2604ed8edf53aaf82013f52c58f23ce54379f7930c902ef3f10b03d0d52c476b76eceb47ef75f1f0e66f01c1b35600507665533b9b34cb9c4faf126ae0b6
7
- data.tar.gz: e099cbc0b6a154aa1b7bf54397179bf9b50ee3af11b7ffe759081daa05622a64c9ba8091c440681bbf7a144926efd6745781ae64f4aab67c23642a3818673f69
6
+ metadata.gz: c2c5a88e53d0d134bbd062fcee1b68137d6376c35556abc9bb2df310320bdd23a64ee816228dd4a1a77abe10a7dfe0fa77c2305b7f941cbacb191894dae0e052
7
+ data.tar.gz: 3bad6c2fc7cd78a62a0f3295143a10f41e9a1690043c293f8df6d0c22381f1d740c67b38d2825725afcfaa95598e323aadbfe1b7f582dc7b46a1c2e9e0a75fac
data/README.md CHANGED
@@ -1,11 +1,14 @@
1
1
  # ElectricMonk
2
+ [![Gem](https://img.shields.io/gem/v/electric_monk.svg?style=flat-square)](https://rubygems.org/gems/electric_monk)
2
3
 
3
4
  Manage your git-based projects with a CLI: It assumes that you have a directory with your
4
5
  repositories and will clone/update them for you and report their status.
5
6
 
7
+ [![asciicast](https://asciinema.org/a/145472.png)](https://asciinema.org/a/145472)
8
+
6
9
  ## Installation
7
10
 
8
- Install it as a gem:
11
+ You need Ruby for this to work. Install it as a gem:
9
12
 
10
13
  $ gem install electric_monk
11
14
 
@@ -28,6 +28,19 @@ module ElectricMonk
28
28
  reporter.succeed(project.name)
29
29
  end
30
30
  end
31
+
32
+ reporter.start("Untracked projects")
33
+ if untracked_projects.empty?
34
+ reporter.succeed("No untracked projects")
35
+ else
36
+ reporter.fail "#{untracked_projects.size} untracked projects: #{untracked_projects.join(', ')}"
37
+ end
38
+
39
+ reporter.report
40
+ end
41
+
42
+ def untracked_projects
43
+ @untracked_projects ||= Dir.entries(config.root) - config.projects.map(&:name) - [".", ".."]
31
44
  end
32
45
  end
33
46
 
@@ -145,8 +158,31 @@ module ElectricMonk
145
158
  end
146
159
 
147
160
  def fail(msg)
161
+ increase_failures
148
162
  @final_message = "✗ #{msg}"
149
163
  @spinner.join
150
164
  end
165
+
166
+ def report
167
+ puts
168
+
169
+ if @failures.nil?
170
+ puts "Everything ok"
171
+ else
172
+ puts "#{@failures} failures"
173
+ # I probably do not belong here
174
+ exit(1)
175
+ end
176
+ end
177
+
178
+ private
179
+
180
+ def increase_failures
181
+ if @failures.nil?
182
+ @failures = 1
183
+ else
184
+ @failures += 1
185
+ end
186
+ end
151
187
  end
152
188
  end
@@ -1,3 +1,3 @@
1
1
  module ElectricMonk
2
- VERSION = "0.3.0"
2
+ VERSION = "0.4.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: electric_monk
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.0
4
+ version: 0.4.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Lucas Dohmen
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-11-01 00:00:00.000000000 Z
11
+ date: 2017-12-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: toml-rb