hubeye 0.2.8 → 0.3.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.
data/Rakefile CHANGED
@@ -15,3 +15,4 @@ task :version do
15
15
  require_relative 'VERSION'
16
16
  puts Hubeye::VERSION * '.'
17
17
  end
18
+
data/VERSION.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  class Hubeye
2
- # 0.2.8 since Dec. 4, 2011
3
- VERSION = [0,2,8]
2
+ # 0.3.0 since Dec. 4, 2011
3
+ VERSION = [0,3,0]
4
4
  end
5
5
 
@@ -10,17 +10,15 @@ module Hooks
10
10
  dir = opts[:directory]
11
11
  repo = opts[:repo]
12
12
  begin
13
-
14
- commands.each do |cmd|
15
- if dir
16
- Dir.chdir(File.expand_path(dir)) do
13
+ commands.each do |cmd|
14
+ if dir
15
+ Dir.chdir(File.expand_path(dir)) do
16
+ ::Kernel.system cmd
17
+ end
18
+ else
17
19
  ::Kernel.system cmd
18
20
  end
19
- else
20
- ::Kernel.system cmd
21
21
  end
22
- end
23
-
24
22
  rescue ArgumentError
25
23
  raise NoHookError.new "There aren't any hook commands for the repository #{repo}"
26
24
  end
@@ -28,3 +26,4 @@ module Hooks
28
26
 
29
27
  end
30
28
  end
29
+
@@ -1,6 +1,5 @@
1
1
  module Hooks
2
2
  module Git
3
-
4
3
  module Default
5
4
 
6
5
  def self.fetch(local_reponame, remotename, branchname)
@@ -16,6 +15,6 @@ module Hooks
16
15
  end
17
16
 
18
17
  end
19
-
20
18
  end
21
19
  end
20
+
data/lib/log/logger.rb CHANGED
@@ -1,5 +1,6 @@
1
1
  module Log
2
2
  class Logger
3
+
3
4
  LOG_DIR = File.join(ENV['HOME'], '.hubeye', 'log')
4
5
 
5
6
  def self.log(msg)
@@ -17,7 +18,6 @@ module Log
17
18
 
18
19
  # If {include_terminal: true}, log to the terminal too (make sure that the
19
20
  # process is not daemonized). Always log to the logfile.
20
-
21
21
  def self.log_change(repo_name, commit_msg, committer, options={})
22
22
  opts = {:include_terminal => false}.merge options
23
23
  change_msg = <<-MSG
@@ -35,3 +35,4 @@ module Log
35
35
 
36
36
  end
37
37
  end
38
+
@@ -5,39 +5,26 @@ module Notification
5
5
  CHANGE_ICON_PATH = (File.join(ROOTDIR, "images", CHANGE_ICON))
6
6
 
7
7
  class Finder
8
-
9
8
  def self.find_notify
10
9
  if RUBY_PLATFORM =~ /mswin/
11
10
  return
12
11
  elsif RUBY_PLATFORM =~ /linux/
13
12
  libnotify = system('locate libnotify-bin > /dev/null')
14
-
15
- if libnotify && LibCheck.autotest
13
+ if libnotify
16
14
  require_relative "gnomenotify"
17
15
  return "libnotify"
18
16
  elsif LibCheck.autotest_notification
19
17
  require_relative "growl"
20
18
  return "growl"
21
- else
22
- return
23
19
  end
24
-
25
- elsif RUBY_PLATFORM =~ /darwin/i
26
-
27
- if LibCheck.autotest_notification
20
+ elsif RUBY_PLATFORM =~ /darwin/i and LibCheck.autotest_notification
28
21
  require_relative "growl"
29
22
  return "growl"
30
- else
31
- return
32
- end
33
-
34
23
  end
35
24
  end
36
-
37
25
  end
38
26
 
39
27
  class LibCheck
40
-
41
28
  class << self
42
29
  def autotest
43
30
  begin
@@ -54,7 +41,6 @@ module Notification
54
41
  end
55
42
  end
56
43
 
57
-
58
44
  def autotest_notification
59
45
  begin
60
46
  require 'autotest_notification'
@@ -70,7 +56,6 @@ module Notification
70
56
  end
71
57
  end
72
58
  end
73
-
74
59
  end
75
60
 
76
61
  end # end module
@@ -10,3 +10,4 @@ module Notification
10
10
 
11
11
  end
12
12
  end
13
+
@@ -10,3 +10,4 @@ module Autotest
10
10
 
11
11
  end
12
12
  end
13
+
@@ -134,7 +134,6 @@ class ConfigParserTests < Test::Unit::TestCase
134
134
  assert_equal ['myforks', 'myprojects', 'mywork'], @repos
135
135
  assert_equal ['myhook1', 'myhook2', 'captain_hook'], @hooks
136
136
  assert_equal 'hansolo', @username
137
-
138
137
  end
139
138
 
140
139
  end
data/test/environment.rb CHANGED
@@ -1,6 +1,5 @@
1
1
  class EnvironmentTests < Test::Unit::TestCase
2
-
3
- include ::Environment
2
+ include Environment
4
3
 
5
4
  def test_proper_rootdir
6
5
  assert_equal File.expand_path(File.dirname(__FILE__) + '/..'), ROOTDIR
data/test/notification.rb CHANGED
@@ -2,13 +2,13 @@ class NotifyTests < Test::Unit::TestCase
2
2
 
3
3
  def test_libnotify_on_linux
4
4
  if RUBY_PLATFORM =~ /linux/i
5
- assert_equal "libnotify", ::Notification::Finder.find_notify
5
+ assert_equal "libnotify", Notification::Finder.find_notify
6
6
  end
7
7
  end
8
8
 
9
9
  def test_growl_returns_on_darwin
10
10
  if RUBY_PLATFORM =~ /darwin/i
11
- assert_equal "growl", ::Notification::Finder.find_notify
11
+ assert_equal "growl", Notification::Finder.find_notify
12
12
  end
13
13
  end
14
14
 
data/test/runner.rb CHANGED
@@ -8,7 +8,7 @@ require 'test/unit'
8
8
 
9
9
  # test files
10
10
  require_relative 'environment'
11
- require File.join(File.expand_path(File.dirname(__FILE__) + '/..'), "lib/notification/notification")
11
+ require File.join(File.expand_path(File.dirname(__FILE__) + '/..'), "lib/notification/finder")
12
12
  require_relative "notification"
13
13
  require Environment::LIBDIR + '/config/parser'
14
14
  require_relative "config_parser"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hubeye
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.8
4
+ version: 0.3.0
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: