upstreamwatchr 0.0.43 → 0.0.44

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: 8bc3a1fd06d83c01b5628a968d7157d2ddbf8119
4
- data.tar.gz: 0ea870a9b04c8fce1b042938bd491bd6b40bdf8a
3
+ metadata.gz: 1508020e76ffa288665ce34525242ae91392a587
4
+ data.tar.gz: 77f3f382298020dd04eaf286ba2c7a2bfbc4e4b9
5
5
  SHA512:
6
- metadata.gz: b66f5aa3ebca33bb68979522bb96b7ecb98eb90a041d5fe819b29b555fd351e7e859bfe6e8552e813621bbb89e31d76d12a65c00b13655c170ed8a34a1b59fbc
7
- data.tar.gz: ec24d0f722b0ad960522c9d78641dc40b2321749941d1006959b397b6fbe95018ffd57ae2c47769ed7febf618f2f077a5fb524501e9b5de66d2d3aaeceb1ee30
6
+ metadata.gz: 31446f8f4231304ebaa459d8d815b73939015d28eb998926d8b36aa50b2973bdd8bd503b59091b773635948fba750c4a48d3d14984fb066f9b0f404a9e65599a
7
+ data.tar.gz: b7df04387c849886586cdd1ea432e2018e60f971bc39797dfc0cc8f8ca0d91176f1932b00e8d98aeb2fd5ee72276d39905f6906a16419de00a085628a86d3011
@@ -22,7 +22,7 @@ if not ARGV[0]
22
22
  begin
23
23
  watch = UpstreamWatchr::GitLabWatchr.new(project.ssh_url_to_repo)
24
24
  info = "Info: #{project.name} (#{project.ssh_url_to_repo}): #{watch.comparator.to_s}"
25
- if watch.comparator.has_changes?
25
+ if watch.comparator.upstream_ahead?
26
26
  puts info.color(:red)
27
27
  watch.grumble_in_issue
28
28
  else
@@ -36,8 +36,8 @@ if not ARGV[0]
36
36
  end
37
37
  else
38
38
  watch = UpstreamWatchr::GitLabWatchr.new(ARGV[0])
39
- puts "Debug: #{project.comparator.to_s}" if ENV['DEBUG']
40
- if watch.comparator.has_changes?
39
+ puts "Debug: #{watch.comparator.to_s}" if ENV['DEBUG']
40
+ if watch.comparator.upstream_ahead?
41
41
  watch.grumble_in_issue
42
42
  end
43
43
  end
@@ -61,10 +61,18 @@ module UpstreamWatchr
61
61
  ahead_behind[1]
62
62
  end
63
63
 
64
+ def upstream_ahead?
65
+ ahead_behind[1] > 0
66
+ end
67
+
64
68
  def upstream_behind
65
69
  ahead_behind[0]
66
70
  end
67
71
 
72
+ def upstream_behind?
73
+ ahead_behind[0] > 0
74
+ end
75
+
68
76
  def trees(branch = nil)
69
77
  branch ||= @main_branch
70
78
  [@repo.references["refs/remotes/origin/#{branch}"].target.tree, @repo.references["refs/remotes/upstream/#{branch}"].target.tree]
@@ -1,3 +1,3 @@
1
1
  module UpstreamWatchr
2
- VERSION = "0.0.43"
2
+ VERSION = "0.0.44"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: upstreamwatchr
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.43
4
+ version: 0.0.44
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marvin Frick
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-06-24 00:00:00.000000000 Z
11
+ date: 2015-08-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pry