jugyo-g 1.0.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (5) hide show
  1. data/README.markdown +60 -0
  2. data/Rakefile +35 -0
  3. data/lib/g.rb +11 -0
  4. data/spec/g_spec.rb +14 -0
  5. metadata +65 -0
data/README.markdown ADDED
@@ -0,0 +1,60 @@
1
+ g
2
+ ========
3
+
4
+ [http://github.com/jugyo/g/tree/master](http://github.com/jugyo/g/tree/master)
5
+
6
+ Description
7
+ --------
8
+
9
+ The Kernel.g that works like Kernel.p on growl :)
10
+
11
+ Install
12
+ --------
13
+
14
+ sudo gem install jugyo-g --source http://gems.github.com
15
+
16
+ Synopsis
17
+ --------
18
+
19
+ g 'foo'
20
+ g 1
21
+ g self
22
+ g %w(foo bar)
23
+ g ({:a=>"aaaaaaaaaaaaaaaaaa",
24
+ :b=>"bbbbbbbbbbbbbbbbbbb",
25
+ :c=>
26
+ ["cccccccccccccccc",
27
+ "CCCCCCCCCCCCCCCCC",
28
+ "c c c c c ",
29
+ "C C C C C C C C C "]})
30
+
31
+ Requirements
32
+ --------
33
+
34
+ * ruby-growl
35
+
36
+ License
37
+ --------
38
+
39
+ (The MIT License)
40
+
41
+ Copyright (c) 2008-2009 jugyo
42
+
43
+ Permission is hereby granted, free of charge, to any person obtaining
44
+ a copy of this software and associated documentation files (the
45
+ 'Software'), to deal in the Software without restriction, including
46
+ without limitation the rights to use, copy, modify, merge, publish,
47
+ distribute, sublicense, and/or sell copies of the Software, and to
48
+ permit persons to whom the Software is furnished to do so, subject to
49
+ the following conditions:
50
+
51
+ The above copyright notice and this permission notice shall be
52
+ included in all copies or substantial portions of the Software.
53
+
54
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
55
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
56
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
57
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
58
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
59
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
60
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,35 @@
1
+ $:.unshift File.dirname(__FILE__) + '/lib/'
2
+
3
+ task :spec do
4
+ system 'spec', 'spec'
5
+ end
6
+
7
+ desc 'Generate gemspec'
8
+ task :gemspec do |t|
9
+ open('g.gemspec', "wb" ) do |file|
10
+ file << <<-EOS
11
+ Gem::Specification.new do |s|
12
+ s.name = 'g'
13
+ s.version = '1.0.0'
14
+ s.summary = "The Kernel.g that works like Kernel.p on growl :)"
15
+ s.description = "The Kernel.g that works like Kernel.p on growl :)"
16
+ s.files = %w( #{Dir['lib/**/*.rb'].join(' ')}
17
+ #{Dir['spec/**/*.rb'].join(' ')}
18
+ README.markdown
19
+ Rakefile )
20
+ s.add_dependency("ruby-growl", ">= 1.0.1")
21
+ s.author = 'jugyo'
22
+ s.email = 'jugyo.org@gmail.com'
23
+ s.homepage = 'http://github.com/jugyo/g'
24
+ s.rubyforge_project = 'kernelg'
25
+ s.has_rdoc = false
26
+ end
27
+ EOS
28
+ end
29
+ puts "Generate gemspec"
30
+ end
31
+
32
+ desc 'Generate gem'
33
+ task :gem => :gemspec do |t|
34
+ system 'gem', 'build', 'g.gemspec'
35
+ end
data/lib/g.rb ADDED
@@ -0,0 +1,11 @@
1
+ require 'rubygems'
2
+ require 'ruby-growl'
3
+ require 'pp'
4
+
5
+ module Kernel
6
+ GROWL = Growl.new "localhost", $0, ["Kernel.g"]
7
+ def g(*args)
8
+ args.each { |i| GROWL.notify "Kernel.g", $0, i.pretty_inspect }
9
+ nil
10
+ end
11
+ end
data/spec/g_spec.rb ADDED
@@ -0,0 +1,14 @@
1
+ $:.unshift File.dirname(__FILE__) + '/../lib'
2
+ require 'g'
3
+
4
+ g 'foo', 'bar'
5
+ g 1
6
+ g self
7
+ g %w(foo bar)
8
+ g ({:a=>"aaaaaaaaaaaaaaaaaa",
9
+ :b=>"bbbbbbbbbbbbbbbbbbb",
10
+ :c=>
11
+ ["cccccccccccccccc",
12
+ "CCCCCCCCCCCCCCCCC",
13
+ "c c c c c ",
14
+ "C C C C C C C C C "]})
metadata ADDED
@@ -0,0 +1,65 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: jugyo-g
3
+ version: !ruby/object:Gem::Version
4
+ version: 1.0.0
5
+ platform: ruby
6
+ authors:
7
+ - jugyo
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+
12
+ date: 2009-05-16 00:00:00 -07:00
13
+ default_executable:
14
+ dependencies:
15
+ - !ruby/object:Gem::Dependency
16
+ name: ruby-growl
17
+ type: :runtime
18
+ version_requirement:
19
+ version_requirements: !ruby/object:Gem::Requirement
20
+ requirements:
21
+ - - ">="
22
+ - !ruby/object:Gem::Version
23
+ version: 1.0.1
24
+ version:
25
+ description: The Kernel.g that works like Kernel.p on growl :)
26
+ email: jugyo.org@gmail.com
27
+ executables: []
28
+
29
+ extensions: []
30
+
31
+ extra_rdoc_files: []
32
+
33
+ files:
34
+ - lib/g.rb
35
+ - spec/g_spec.rb
36
+ - README.markdown
37
+ - Rakefile
38
+ has_rdoc: false
39
+ homepage: http://github.com/jugyo/g
40
+ post_install_message:
41
+ rdoc_options: []
42
+
43
+ require_paths:
44
+ - lib
45
+ required_ruby_version: !ruby/object:Gem::Requirement
46
+ requirements:
47
+ - - ">="
48
+ - !ruby/object:Gem::Version
49
+ version: "0"
50
+ version:
51
+ required_rubygems_version: !ruby/object:Gem::Requirement
52
+ requirements:
53
+ - - ">="
54
+ - !ruby/object:Gem::Version
55
+ version: "0"
56
+ version:
57
+ requirements: []
58
+
59
+ rubyforge_project: kernelg
60
+ rubygems_version: 1.2.0
61
+ signing_key:
62
+ specification_version: 2
63
+ summary: The Kernel.g that works like Kernel.p on growl :)
64
+ test_files: []
65
+