g 1.0.0

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.
Files changed (5) hide show
  1. data/README.markdown +67 -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,67 @@
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 g
15
+
16
+ or
17
+
18
+ sudo gem install jugyo-g --source http://gems.github.com
19
+
20
+ Synopsis
21
+ --------
22
+
23
+ require 'rubygems'
24
+ require 'g'
25
+
26
+ g 'foo'
27
+ g 1
28
+ g self
29
+ g %w(foo bar)
30
+ g ({:a=>"aaaaaaaaaaaaaaaaaa",
31
+ :b=>"bbbbbbbbbbbbbbbbbbb",
32
+ :c=>
33
+ ["cccccccccccccccc",
34
+ "CCCCCCCCCCCCCCCCC",
35
+ "c c c c c ",
36
+ "C C C C C C C C C "]})
37
+
38
+ Requirements
39
+ --------
40
+
41
+ * ruby-growl
42
+
43
+ License
44
+ --------
45
+
46
+ (The MIT License)
47
+
48
+ Copyright (c) 2008-2009 jugyo
49
+
50
+ Permission is hereby granted, free of charge, to any person obtaining
51
+ a copy of this software and associated documentation files (the
52
+ 'Software'), to deal in the Software without restriction, including
53
+ without limitation the rights to use, copy, modify, merge, publish,
54
+ distribute, sublicense, and/or sell copies of the Software, and to
55
+ permit persons to whom the Software is furnished to do so, subject to
56
+ the following conditions:
57
+
58
+ The above copyright notice and this permission notice shall be
59
+ included in all copies or substantial portions of the Software.
60
+
61
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
62
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
63
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
64
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
65
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
66
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
67
+ 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: 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-21 00:00:00 +09: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.3.1
61
+ signing_key:
62
+ specification_version: 2
63
+ summary: The Kernel.g that works like Kernel.p on growl :)
64
+ test_files: []
65
+