repos_report 1.1.1 → 1.1.2

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: c58e80e01a67209c7dfeeaf75d7b3f38e5045285
4
- data.tar.gz: c2ee92bb5107314aaecbf9b4e923ac14c877563d
3
+ metadata.gz: 1b16cafc516d147399b90a3f72110a18e73f24bf
4
+ data.tar.gz: 6e1c351baf6958132bd3964e551c42d65f66aedd
5
5
  SHA512:
6
- metadata.gz: d8c60cd923e1a5bd1546b2390f85395d4c36485f052424f882fbab03b5c6b3545484649fc118e96029ef36b7a9a8e4c7c1c4570e206dc6987afab55fed4468ae
7
- data.tar.gz: 422a697426c6bf3cd627a4f899d226075b882b3294765a18b5ecdcbac697fae299c71417e47df5e79c28af45bb3ed83f77c9c594abfa96fd3da0db7c7f2c0e4b
6
+ metadata.gz: 521e5d9fd9dfb985f085cfc2dfdc815d5b128db02e2fdf0d2218584ba0a2f3164bcd95a3d3f66b375d702720c7a39ea42c84de164a7b9af964f1d36474d5ed1b
7
+ data.tar.gz: 80f2e32472467d2ee17a66cdd1216ba9972f149dbcc03fc6615db375c18c71c3c2556e3f88c124acae264faadd8bd69055ba2c298fba4b2eb2f1276e4bc1fce5
@@ -9,14 +9,12 @@ class Repo
9
9
  end
10
10
 
11
11
  def project_name_length
12
- @directory.split("/").last.length
12
+ project_name.length
13
13
  end
14
14
 
15
15
  def concise_status(error_indentation)
16
- project_name = @directory.split('/').last
17
16
 
18
- error_indentation = error_indentation
19
- whitespace_after_project_name = ' '*(error_indentation - project_name.length)
17
+ whitespace_after_project_name = ' '*(error_indentation - project_name_length)
20
18
 
21
19
  message = project_name
22
20
  issues = [
@@ -25,7 +23,7 @@ class Repo
25
23
  ].compact.join(', ')
26
24
 
27
25
 
28
- if unpulled_or_unpushed_commits or
26
+ if unpulled_or_unpushed_commits or
29
27
  uncommitted_changes
30
28
 
31
29
  message = "#{message}#{whitespace_after_project_name}#{issues}".red
@@ -36,6 +34,14 @@ class Repo
36
34
  message
37
35
  end
38
36
 
37
+
38
+
39
+ private
40
+
41
+ def project_name
42
+ @directory.split("/").last
43
+ end
44
+
39
45
  def unpulled_or_unpushed_commits
40
46
 
41
47
  ahead_or_behind = `cd #{@directory}; git for-each-ref --format="%(upstream:track) %(upstream:short)" | grep origin/master`
@@ -1,3 +1,3 @@
1
1
  module ReposReport
2
- VERSION = "1.1.1"
2
+ VERSION = "1.1.2"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: repos_report
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.1
4
+ version: 1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - neurodynamic
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-07-01 00:00:00.000000000 Z
11
+ date: 2015-07-16 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler