githubwatcher 0.1.0 → 0.1.1

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.
@@ -17,13 +17,16 @@ Forever.run do
17
17
  dir File.expand_path('~/.githubwatcher')
18
18
 
19
19
  on_error do |e|
20
- Githubwatcher.notify("Error!", e.message) unless @_errors.include?(e.message)
20
+ unless @_errors.include?(e.message)
21
+ @_errors << e.message
22
+ Githubwatcher.notify("Error!", e.message)
23
+ end
21
24
  end
22
25
 
23
26
  before :all do
27
+ @_errors = [] # Store common errors
24
28
  Githubwatcher.setup
25
29
  Githubwatcher.notify("GitHub Watcher", "was started...")
26
- @_errors = [] # Store common errors
27
30
  end
28
31
 
29
32
  every 5.seconds do
@@ -17,7 +17,8 @@ Gem::Specification.new do |s|
17
17
  s.test_files = []
18
18
  s.executables = %w[githubwatcher]
19
19
  s.require_paths = %w[lib]
20
- s.add_dependency 'httparty', '~>0.7.8'
21
- s.add_dependency 'growl', '~>1.0.3'
22
- s.add_dependency 'foreverb', '~>0.3.0'
20
+ s.add_dependency 'yajl-ruby', '~>1.1.0'
21
+ s.add_dependency 'httparty', '~>0.8.1'
22
+ s.add_dependency 'notifier', '~>0.1.4'
23
+ s.add_dependency 'foreverb', '~>0.3.0'
23
24
  end
@@ -1,13 +1,14 @@
1
1
  require 'yaml' unless defined?(YAML)
2
- require "githubwatcher/version"
3
- require "httparty"
4
- require "growl"
2
+ require 'githubwatcher/version'
3
+ require 'httparty'
4
+ require 'notifier'
5
5
 
6
6
  YAML::ENGINE.yamler = "syck" if defined?(YAML::ENGINE)
7
7
 
8
8
  module Githubwatcher
9
9
  extend self
10
10
  include HTTParty
11
+ include Notifier
11
12
 
12
13
  API = File.expand_path("~/.githubwatcher/api.yaml")
13
14
  WATCH = File.expand_path("~/.githubwatcher/repos.yaml")
@@ -16,7 +17,6 @@ module Githubwatcher
16
17
  format :json
17
18
 
18
19
  def setup
19
- raise "You need to install growlnotify, use brew install growlnotify or install it from growl.info site" unless Growl.installed?
20
20
  puts "Starting GitHub Watcher..."
21
21
 
22
22
  unless File.exist?(API)
@@ -94,7 +94,7 @@ module Githubwatcher
94
94
  end
95
95
 
96
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
97
+ Growl.notify(:message => text, :title => title, :image => File.expand_path("../../images/icon.png", __FILE__)); sleep 0.2
98
98
  puts "=> #{title}: #{text}"
99
99
  end
100
100
 
@@ -1,3 +1,3 @@
1
1
  module Githubwatcher
2
- VERSION = "0.1.0"
2
+ VERSION = "0.1.1"
3
3
  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: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 1
9
- - 0
10
- version: 0.1.0
9
+ - 1
10
+ version: 0.1.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Davide D'Agostino
@@ -15,10 +15,10 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2012-01-25 00:00:00 Z
18
+ date: 2012-01-27 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
- name: httparty
21
+ name: yajl-ruby
22
22
  prerelease: false
23
23
  requirement: &id001 !ruby/object:Gem::Requirement
24
24
  none: false
@@ -27,32 +27,48 @@ dependencies:
27
27
  - !ruby/object:Gem::Version
28
28
  hash: 19
29
29
  segments:
30
+ - 1
31
+ - 1
30
32
  - 0
31
- - 7
32
- - 8
33
- version: 0.7.8
33
+ version: 1.1.0
34
34
  type: :runtime
35
35
  version_requirements: *id001
36
36
  - !ruby/object:Gem::Dependency
37
- name: growl
37
+ name: httparty
38
38
  prerelease: false
39
39
  requirement: &id002 !ruby/object:Gem::Requirement
40
40
  none: false
41
41
  requirements:
42
42
  - - ~>
43
43
  - !ruby/object:Gem::Version
44
- hash: 17
44
+ hash: 61
45
45
  segments:
46
- - 1
47
46
  - 0
48
- - 3
49
- version: 1.0.3
47
+ - 8
48
+ - 1
49
+ version: 0.8.1
50
50
  type: :runtime
51
51
  version_requirements: *id002
52
52
  - !ruby/object:Gem::Dependency
53
- name: foreverb
53
+ name: notifier
54
54
  prerelease: false
55
55
  requirement: &id003 !ruby/object:Gem::Requirement
56
+ none: false
57
+ requirements:
58
+ - - ~>
59
+ - !ruby/object:Gem::Version
60
+ hash: 19
61
+ segments:
62
+ - 0
63
+ - 1
64
+ - 4
65
+ version: 0.1.4
66
+ type: :runtime
67
+ version_requirements: *id003
68
+ - !ruby/object:Gem::Dependency
69
+ name: foreverb
70
+ prerelease: false
71
+ requirement: &id004 !ruby/object:Gem::Requirement
56
72
  none: false
57
73
  requirements:
58
74
  - - ~>
@@ -64,7 +80,7 @@ dependencies:
64
80
  - 0
65
81
  version: 0.3.0
66
82
  type: :runtime
67
- version_requirements: *id003
83
+ version_requirements: *id004
68
84
  description: Github Growl Watcher, watch any project and receive growl notification for updates, new watchers, forks and issues
69
85
  email:
70
86
  - d.dagostino@lipsiasoft.com