githubwatcher 0.0.9 → 0.1.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 +3 -4
- data/bin/githubwatcher +16 -15
- data/githubwatcher.gemspec +1 -1
- data/lib/githubwatcher.rb +4 -4
- data/lib/githubwatcher/version.rb +1 -1
- metadata +10 -11
data/Rakefile
CHANGED
@@ -7,13 +7,12 @@ require 'bundler/gem_tasks'
|
|
7
7
|
end
|
8
8
|
end
|
9
9
|
|
10
|
-
desc
|
10
|
+
desc 'Bump version on github'
|
11
11
|
task :bump do
|
12
|
-
|
13
|
-
if `git status -s`.strip == ""
|
12
|
+
if `git status -s`.strip == ''
|
14
13
|
puts "\e[31mNothing to commit (working directory clean)\e[0m"
|
15
14
|
else
|
16
|
-
version
|
15
|
+
version = Bundler.load_gemspec(Dir[File.expand_path('../*.gemspec', __FILE__)].first).version
|
17
16
|
sh "git add .; git commit -a -m \"Bump to version #{version}\""
|
18
17
|
end
|
19
18
|
end
|
data/bin/githubwatcher
CHANGED
@@ -1,35 +1,36 @@
|
|
1
1
|
#!/usr/bin/ruby
|
2
|
-
|
3
|
-
|
2
|
+
$:.unshift File.expand_path('../../lib', __FILE__)
|
4
3
|
require 'rubygems' unless defined?(Gem)
|
5
|
-
require 'bundler/setup'
|
6
4
|
require 'forever'
|
7
5
|
require 'githubwatcher'
|
8
6
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
case arg = ARGV[0]
|
8
|
+
when "configure"
|
9
|
+
editor = `which mate`.chomp! || `which vim`.chomp!
|
10
|
+
puts "Im unable to find an editor, open manually ~/.githubwatcher/repos.yaml" and exit unless editor
|
11
|
+
system editor, File.expand_path('~/.githubwatcher/repos.yaml') and exit
|
12
|
+
when "reset"
|
13
|
+
system "rm -rf ~/.githubwatcher"
|
13
14
|
end
|
14
15
|
|
15
16
|
Forever.run do
|
16
|
-
# Our working directory, here we store pids/logs and obviously our list of repo to watch
|
17
17
|
dir File.expand_path('~/.githubwatcher')
|
18
18
|
|
19
19
|
on_error do |e|
|
20
|
-
Githubwatcher.notify("Error!", e.message)
|
20
|
+
Githubwatcher.notify("Error!", e.message) unless @_errors.include?(e.message)
|
21
21
|
end
|
22
22
|
|
23
|
-
|
23
|
+
before :all do
|
24
24
|
Githubwatcher.setup
|
25
25
|
Githubwatcher.notify("GitHub Watcher", "was started...")
|
26
|
-
|
27
|
-
|
28
|
-
on_exit do
|
29
|
-
Githubwatcher.notify("GitHub Watcher", "was stopped...")
|
26
|
+
@_errors = [] # Store common errors
|
30
27
|
end
|
31
28
|
|
32
29
|
every 5.seconds do
|
33
30
|
Githubwatcher.run
|
34
31
|
end
|
35
|
-
|
32
|
+
|
33
|
+
after :all do
|
34
|
+
Githubwatcher.notify("GitHub Watcher", "was stopped...")
|
35
|
+
end
|
36
|
+
end
|
data/githubwatcher.gemspec
CHANGED
data/lib/githubwatcher.rb
CHANGED
@@ -31,8 +31,8 @@ module Githubwatcher
|
|
31
31
|
end
|
32
32
|
|
33
33
|
@_watch = YAML.load_file(WATCH)
|
34
|
-
@_repos = YAML.load_file(DB) if File.exist?(DB)
|
35
34
|
@base_uri, @api_version = YAML.load_file(API)
|
35
|
+
@_repos = YAML.load_file(DB) if File.exist?(DB)
|
36
36
|
|
37
37
|
base_uri @base_uri
|
38
38
|
end
|
@@ -93,8 +93,8 @@ module Githubwatcher
|
|
93
93
|
@_watch ||= []
|
94
94
|
end
|
95
95
|
|
96
|
-
def notify(title, text)
|
97
|
-
Growl.notify
|
96
|
+
def notify(title, text, sticky=false)
|
97
|
+
Growl.notify(text, :title => title, :icon => File.expand_path("../../images/icon.png", __FILE__), :sticky => sticky); sleep 0.2
|
98
98
|
puts "=> #{title}: #{text}"
|
99
99
|
end
|
100
100
|
|
@@ -113,4 +113,4 @@ module Githubwatcher
|
|
113
113
|
raise "Unkown api version"
|
114
114
|
end
|
115
115
|
end
|
116
|
-
end
|
116
|
+
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: githubwatcher
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 27
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
+
- 1
|
8
9
|
- 0
|
9
|
-
|
10
|
-
version: 0.0.9
|
10
|
+
version: 0.1.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Davide D'Agostino
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2012-01-25 00:00:00 Z
|
20
19
|
dependencies:
|
21
20
|
- !ruby/object:Gem::Dependency
|
22
21
|
name: httparty
|
@@ -58,12 +57,12 @@ dependencies:
|
|
58
57
|
requirements:
|
59
58
|
- - ~>
|
60
59
|
- !ruby/object:Gem::Version
|
61
|
-
hash:
|
60
|
+
hash: 19
|
62
61
|
segments:
|
63
62
|
- 0
|
64
|
-
-
|
65
|
-
-
|
66
|
-
version: 0.
|
63
|
+
- 3
|
64
|
+
- 0
|
65
|
+
version: 0.3.0
|
67
66
|
type: :runtime
|
68
67
|
version_requirements: *id003
|
69
68
|
description: Github Growl Watcher, watch any project and receive growl notification for updates, new watchers, forks and issues
|
@@ -84,7 +83,6 @@ files:
|
|
84
83
|
- lib/githubwatcher.rb
|
85
84
|
- Rakefile
|
86
85
|
- README.md
|
87
|
-
has_rdoc: true
|
88
86
|
homepage: https://github.com/DAddYE/githubwatcher
|
89
87
|
licenses: []
|
90
88
|
|
@@ -114,9 +112,10 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
114
112
|
requirements: []
|
115
113
|
|
116
114
|
rubyforge_project: githubwatcher
|
117
|
-
rubygems_version: 1.
|
115
|
+
rubygems_version: 1.8.15
|
118
116
|
signing_key:
|
119
117
|
specification_version: 3
|
120
118
|
summary: Github Growl Watcher, watch any project and receive growl notification
|
121
119
|
test_files: []
|
122
120
|
|
121
|
+
has_rdoc:
|