grid-plugin-growl 0.0.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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in grid-plugin-growl.gemspec
4
+ gemspec
data/Rakefile ADDED
@@ -0,0 +1 @@
1
+ require "bundler/gem_tasks"
@@ -0,0 +1,24 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "grid-plugin-growl/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "grid-plugin-growl"
7
+ s.version = Grid::Plugin::Growl::VERSION
8
+ s.authors = ["myobie"]
9
+ s.email = ["nathan@myobie.com"]
10
+ s.homepage = ""
11
+ s.summary = %q{Show growl notifications for grid updates.}
12
+ s.description = %q{Growling it up, yo.}
13
+
14
+ s.rubyforge_project = "grid-plugin-growl"
15
+
16
+ s.files = `git ls-files`.split("\n")
17
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
18
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
19
+ s.require_paths = ["lib"]
20
+
21
+ # specify any dependencies here; for example:
22
+ # s.add_development_dependency "rspec"
23
+ s.add_runtime_dependency "gridcli"
24
+ end
@@ -0,0 +1,7 @@
1
+ module Grid
2
+ module Plugin
3
+ module Growl
4
+ VERSION = "0.0.1"
5
+ end
6
+ end
7
+ end
@@ -0,0 +1,24 @@
1
+ require "grid-plugin-growl/version"
2
+
3
+ GridCLI.hooker.register :after_update do |posts|
4
+ puts "Growwwwwwl"
5
+ if not `which growlnotify`.present?
6
+ puts "Warning: grownotify is not in PATH. Growl support cannot be enabled until it is."
7
+ else
8
+ if posts
9
+ posts.each do |post|
10
+ type = post.known_attributes.first
11
+ obj = post.send(type)
12
+ title = if type == 'message'
13
+ obj.subject
14
+ else
15
+ type.humanize
16
+ end
17
+
18
+ message = GridCLI::PrettyPrinter.new(obj.to_json(:root => type), :cmd).to_s
19
+
20
+ `growlnotify -t #{title} -m '#{message}'`
21
+ end
22
+ end
23
+ end
24
+ end
metadata ADDED
@@ -0,0 +1,62 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: grid-plugin-growl
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.0.1
5
+ prerelease:
6
+ platform: ruby
7
+ authors:
8
+ - myobie
9
+ autorequire:
10
+ bindir: bin
11
+ cert_chain: []
12
+ date: 2011-10-31 00:00:00.000000000Z
13
+ dependencies:
14
+ - !ruby/object:Gem::Dependency
15
+ name: gridcli
16
+ requirement: &70225698694240 !ruby/object:Gem::Requirement
17
+ none: false
18
+ requirements:
19
+ - - ! '>='
20
+ - !ruby/object:Gem::Version
21
+ version: '0'
22
+ type: :runtime
23
+ prerelease: false
24
+ version_requirements: *70225698694240
25
+ description: Growling it up, yo.
26
+ email:
27
+ - nathan@myobie.com
28
+ executables: []
29
+ extensions: []
30
+ extra_rdoc_files: []
31
+ files:
32
+ - .gitignore
33
+ - Gemfile
34
+ - Rakefile
35
+ - grid-plugin-growl.gemspec
36
+ - lib/grid-plugin-growl.rb
37
+ - lib/grid-plugin-growl/version.rb
38
+ homepage: ''
39
+ licenses: []
40
+ post_install_message:
41
+ rdoc_options: []
42
+ require_paths:
43
+ - lib
44
+ required_ruby_version: !ruby/object:Gem::Requirement
45
+ none: false
46
+ requirements:
47
+ - - ! '>='
48
+ - !ruby/object:Gem::Version
49
+ version: '0'
50
+ required_rubygems_version: !ruby/object:Gem::Requirement
51
+ none: false
52
+ requirements:
53
+ - - ! '>='
54
+ - !ruby/object:Gem::Version
55
+ version: '0'
56
+ requirements: []
57
+ rubyforge_project: grid-plugin-growl
58
+ rubygems_version: 1.8.6
59
+ signing_key:
60
+ specification_version: 3
61
+ summary: Show growl notifications for grid updates.
62
+ test_files: []