Permalink
Browse files

first commit!

  • Loading branch information...
0 parents commit 0abbbb106d93b98aa158de4e16a8d0d5bb5d44f7 @jugyo committed May 21, 2009
Showing with 138 additions and 0 deletions.
  1. +2 −0 .gitignore
  2. +60 −0 README.markdown
  3. +35 −0 Rakefile
  4. +16 −0 g.gemspec
  5. +11 −0 lib/g.rb
  6. +14 −0 spec/g_spec.rb
@@ -0,0 +1,2 @@
+*.gem
+
@@ -0,0 +1,60 @@
+g
+========
+
+[http://github.com/jugyo/g/tree/master](http://github.com/jugyo/g/tree/master)
+
+Description
+--------
+
+The Kernel.g that works like Kernel.p on growl :)
+
+Install
+--------
+
+ sudo gem install jugyo-g --source http://gems.github.com
+
+Synopsis
+--------
+
+ g 'foo'
+ g 1
+ g self
+ g %w(foo bar)
+ g ({:a=>"aaaaaaaaaaaaaaaaaa",
+ :b=>"bbbbbbbbbbbbbbbbbbb",
+ :c=>
+ ["cccccccccccccccc",
+ "CCCCCCCCCCCCCCCCC",
+ "c c c c c ",
+ "C C C C C C C C C "]})
+
+Requirements
+--------
+
+* ruby-growl
+
+License
+--------
+
+(The MIT License)
+
+Copyright (c) 2008-2009 jugyo
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+'Software'), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
+IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
+CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
+TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
+SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,35 @@
+$:.unshift File.dirname(__FILE__) + '/lib/'
+
+task :spec do
+ system 'spec', 'spec'
+end
+
+desc 'Generate gemspec'
+task :gemspec do |t|
+ open('g.gemspec', "wb" ) do |file|
+ file << <<-EOS
+Gem::Specification.new do |s|
+ s.name = 'g'
+ s.version = '1.0.0'
+ s.summary = "The Kernel.g that works like Kernel.p on growl :)"
+ s.description = "The Kernel.g that works like Kernel.p on growl :)"
+ s.files = %w( #{Dir['lib/**/*.rb'].join(' ')}
+ #{Dir['spec/**/*.rb'].join(' ')}
+ README.markdown
+ Rakefile )
+ s.add_dependency("ruby-growl", ">= 1.0.1")
+ s.author = 'jugyo'
+ s.email = 'jugyo.org@gmail.com'
+ s.homepage = 'http://github.com/jugyo/g'
+ s.rubyforge_project = 'g'
+ s.has_rdoc = false
+end
+ EOS
+ end
+ puts "Generate gemspec"
+end
+
+desc 'Generate gem'
+task :gem => :gemspec do |t|
+ system 'gem', 'build', 'g.gemspec'
+end
@@ -0,0 +1,16 @@
+Gem::Specification.new do |s|
+ s.name = 'g'
+ s.version = '1.0.0'
+ s.summary = "The Kernel.g that works like Kernel.p on growl :)"
+ s.description = "The Kernel.g that works like Kernel.p on growl :)"
+ s.files = %w( lib/g.rb
+ spec/g_spec.rb
+ README.markdown
+ Rakefile )
+ s.add_dependency("ruby-growl", ">= 1.0.1")
+ s.author = 'jugyo'
+ s.email = 'jugyo.org@gmail.com'
+ s.homepage = 'http://github.com/jugyo/g'
+ s.rubyforge_project = 'g'
+ s.has_rdoc = false
+end
@@ -0,0 +1,11 @@
+require 'rubygems'
+require 'ruby-growl'
+require 'pp'
+
+module Kernel
+ GROWL = Growl.new "localhost", $0, ["Kernel.g"]
+ def g(*args)
+ args.each { |i| GROWL.notify "Kernel.g", $0, i.pretty_inspect }
+ nil
+ end
+end
@@ -0,0 +1,14 @@
+$:.unshift File.dirname(__FILE__) + '/../lib'
+require 'g'
+
+g 'foo', 'bar'
+g 1
+g self
+g %w(foo bar)
+g ({:a=>"aaaaaaaaaaaaaaaaaa",
+ :b=>"bbbbbbbbbbbbbbbbbbb",
+ :c=>
+ ["cccccccccccccccc",
+ "CCCCCCCCCCCCCCCCC",
+ "c c c c c ",
+ "C C C C C C C C C "]})

0 comments on commit 0abbbb1

Please sign in to comment.