putsy 0.1.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 +1 -0
  2. data/lib/putsy.rb +8 -0
  3. data/putsy.gemspec +12 -0
  4. data/spec/putsy_spec.rb +22 -0
  5. metadata +70 -0
data/README ADDED
@@ -0,0 +1 @@
1
+ puts in yellow, only.
data/lib/putsy.rb ADDED
@@ -0,0 +1,8 @@
1
+ Kernel.module_eval do
2
+
3
+ define_method :putsy do |obj|
4
+ puts "\e[33m\e[1m#{obj}\e[0m"
5
+ end
6
+
7
+ end
8
+
data/putsy.gemspec ADDED
@@ -0,0 +1,12 @@
1
+ Gem::Specification.new do |s|
2
+ s.name = "putsy"
3
+ s.version = "0.1.0"
4
+ s.description = "Puts anything in yellow. Good for debug."
5
+ s.summary = "puts anything in yellow"
6
+ s.author = "Thiago Vieira"
7
+ s.email = %q{thiago.rails@gmail.com}
8
+ s.homepage = %q{http://github.com/thiago-vieira/putsy}
9
+ s.files = ["README", "putsy.gemspec", "spec/putsy_spec.rb", "lib/putsy.rb"]
10
+ s.test_files = ["spec/putsy_spec.rb"]
11
+ end
12
+
@@ -0,0 +1,22 @@
1
+ require File.join(File.dirname(__FILE__), '..', 'lib', 'putsy')
2
+
3
+ describe "putsy" do
4
+
5
+ it "should be defined on Kernel" do
6
+ Kernel.method_defined?(:putsy).should be true
7
+ end
8
+
9
+ it "should appear in yellow" do
10
+ output { putsy "Hello!" }.should == "\e[33m\e[1mHello!\e[0m\n"
11
+ end
12
+
13
+ end
14
+
15
+ def output
16
+ input, output = IO.pipe
17
+ $stdout = output
18
+ yield
19
+ $stdout = STDOUT
20
+ input.readline
21
+ end
22
+
metadata ADDED
@@ -0,0 +1,70 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: putsy
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease: false
6
+ segments:
7
+ - 0
8
+ - 1
9
+ - 0
10
+ version: 0.1.0
11
+ platform: ruby
12
+ authors:
13
+ - Thiago Vieira
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-24 00:00:00 -03:00
19
+ default_executable:
20
+ dependencies: []
21
+
22
+ description: Puts anything in yellow. Good for debug.
23
+ email: thiago.rails@gmail.com
24
+ executables: []
25
+
26
+ extensions: []
27
+
28
+ extra_rdoc_files: []
29
+
30
+ files:
31
+ - README
32
+ - putsy.gemspec
33
+ - spec/putsy_spec.rb
34
+ - lib/putsy.rb
35
+ has_rdoc: true
36
+ homepage: http://github.com/thiago-vieira/putsy
37
+ licenses: []
38
+
39
+ post_install_message:
40
+ rdoc_options: []
41
+
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
+ hash: 3
50
+ segments:
51
+ - 0
52
+ version: "0"
53
+ required_rubygems_version: !ruby/object:Gem::Requirement
54
+ none: false
55
+ requirements:
56
+ - - ">="
57
+ - !ruby/object:Gem::Version
58
+ hash: 3
59
+ segments:
60
+ - 0
61
+ version: "0"
62
+ requirements: []
63
+
64
+ rubyforge_project:
65
+ rubygems_version: 1.3.7
66
+ signing_key:
67
+ specification_version: 3
68
+ summary: puts anything in yellow
69
+ test_files:
70
+ - spec/putsy_spec.rb