Skip to content
Browse files

Bump to version 0.1.0

  • Loading branch information...
1 parent bb0da88 commit 8598a9e5550fadd9353515c83fd6c7faf9823efd @DAddYE committed
Showing with 14 additions and 10 deletions.
  1. +5 −2 bin/githubwatcher
  2. BIN gem_graph.png
  3. +4 −3 githubwatcher.gemspec
  4. +5 −5 lib/githubwatcher.rb
View
7 bin/githubwatcher
@@ -17,13 +17,16 @@ Forever.run do
dir File.expand_path('~/.githubwatcher')
on_error do |e|
- Githubwatcher.notify("Error!", e.message) unless @_errors.include?(e.message)
+ unless @_errors.include?(e.message)
+ @_errors << e.message
+ Githubwatcher.notify("Error!", e.message)
+ end
end
before :all do
+ @_errors = [] # Store common errors
Githubwatcher.setup
Githubwatcher.notify("GitHub Watcher", "was started...")
- @_errors = [] # Store common errors
end
every 5.seconds do
View
BIN gem_graph.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View
7 githubwatcher.gemspec
@@ -17,7 +17,8 @@ Gem::Specification.new do |s|
s.test_files = []
s.executables = %w[githubwatcher]
s.require_paths = %w[lib]
- s.add_dependency 'httparty', '~>0.7.8'
- s.add_dependency 'growl', '~>1.0.3'
- s.add_dependency 'foreverb', '~>0.3.0'
+ s.add_dependency 'yajl-ruby', '~>1.1.0'
+ s.add_dependency 'httparty', '~>0.8.1'
+ s.add_dependency 'notifier', '~>0.1.4'
+ s.add_dependency 'foreverb', '~>0.3.0'
end
View
10 lib/githubwatcher.rb
@@ -1,13 +1,14 @@
require 'yaml' unless defined?(YAML)
-require "githubwatcher/version"
-require "httparty"
-require "growl"
+require 'githubwatcher/version'
+require 'httparty'
+require 'notifier'
YAML::ENGINE.yamler = "syck" if defined?(YAML::ENGINE)
module Githubwatcher
extend self
include HTTParty
+ include Notifier
API = File.expand_path("~/.githubwatcher/api.yaml")
WATCH = File.expand_path("~/.githubwatcher/repos.yaml")
@@ -16,7 +17,6 @@ module Githubwatcher
format :json
def setup
- raise "You need to install growlnotify, use brew install growlnotify or install it from growl.info site" unless Growl.installed?
puts "Starting GitHub Watcher..."
unless File.exist?(API)
@@ -94,7 +94,7 @@ def watch
end
def notify(title, text, sticky=false)
- Growl.notify(text, :title => title, :icon => File.expand_path("../../images/icon.png", __FILE__), :sticky => sticky); sleep 0.2
+ Growl.notify(:message => text, :title => title, :image => File.expand_path("../../images/icon.png", __FILE__)); sleep 0.2
puts "=> #{title}: #{text}"
end

0 comments on commit 8598a9e

Please sign in to comment.
Something went wrong with that request. Please try again.