shitty 0.0.2

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.
@@ -0,0 +1,57 @@
1
+ == shitty
2
+
3
+ Why so serious son?
4
+
5
+ == Description:
6
+
7
+ With no offense to ruby this is the result of a chat with some of my friends. It is an attempt at being
8
+ humorous and intuitively obscene.
9
+
10
+ == Feature request:
11
+
12
+ I need lots and lots of ideas about how to go around doing it. What makes it funny? If you have an idea
13
+ raise an feature request on https://github.com/arusarka/shitty/issues. If its funny or ridiculously obscene
14
+ I might include it.
15
+
16
+ == Aliases:
17
+
18
+ * puts => poop
19
+ * p => pee
20
+ * poop/pee works on all strategies of implementations of IO class
21
+
22
+ poop 'hello world'
23
+ pee 'aaa'
24
+ File.open('great_poop', 'w') {|fd| fd.poop 'release'}
25
+
26
+ * enumerable.inject is called enumerable.fuck
27
+
28
+ ['thats', 'what', 'she', 'said'].fuck {|statement, word| statement + ' ' + word}
29
+
30
+ == Install:
31
+
32
+ gem install shitty
33
+
34
+ == License:
35
+
36
+ (The MIT License)
37
+
38
+ Copyright (c) 2011 Arusarka Haldar
39
+
40
+ Permission is hereby granted, free of charge, to any person obtaining
41
+ a copy of this software and associated documentation files (the
42
+ 'Software'), to deal in the Software without restriction, including
43
+ without limitation the rights to use, copy, modify, merge, publish,
44
+ distribute, sublicense, and/or sell copies of the Software, and to
45
+ permit persons to whom the Software is furnished to do so, subject to
46
+ the following conditions:
47
+
48
+ The above copyright notice and this permission notice shall be
49
+ included in all copies or substantial portions of the Software.
50
+
51
+ THE SOFTWARE IS PROVIDED 'AS IS', WITHOUT WARRANTY OF ANY KIND,
52
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
53
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
54
+ IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
55
+ CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
56
+ TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
57
+ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
@@ -0,0 +1,6 @@
1
+ $:.unshift File.expand_path(File.dirname(__FILE__))
2
+
3
+ require 'shitty/aliases'
4
+
5
+ module Shitty
6
+ end
@@ -0,0 +1,12 @@
1
+ module Kernel
2
+ alias_method :poop, :puts
3
+ alias_method :pee, :p
4
+ end
5
+
6
+ class IO
7
+ alias_method :poop, :puts
8
+ end
9
+
10
+ module Enumerable
11
+ alias_method :fuck, :inject
12
+ end
@@ -0,0 +1,3 @@
1
+ module Shitty
2
+ VERSION = "0.0.2"
3
+ end
@@ -0,0 +1,36 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
2
+
3
+ describe "aliases" do
4
+ context "in Kernel module" do
5
+ it "for puts is poop" do
6
+ method(:poop).should == method(:puts)
7
+ end
8
+
9
+ it "for p is pee" do
10
+ method(:pee).should == method(:p)
11
+ end
12
+ end
13
+
14
+ context "in IO class" do
15
+ it "for puts is poop" do
16
+ class DummyIO < IO
17
+ def initialize; end # for test only, to get rid of arguments
18
+ end
19
+ io = DummyIO.new
20
+
21
+ io.method(:poop).should == io.method(:puts)
22
+ end
23
+ end
24
+
25
+ context "in Enumerable module" do
26
+ it "for inject is fuck" do
27
+ class DummyClass
28
+ include Enumerable
29
+ def each; end
30
+ end
31
+
32
+ obj = DummyClass.new
33
+ obj.method(:fuck).should == obj.method(:inject)
34
+ end
35
+ end
36
+ end
@@ -0,0 +1,8 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../spec_helper.rb')
2
+ require 'shitty/version'
3
+
4
+ describe "version" do
5
+ it "be correct" do
6
+ Shitty::VERSION.should == '0.0.2'
7
+ end
8
+ end
@@ -0,0 +1,2 @@
1
+ require File.expand_path(File.dirname(__FILE__) + '/../lib/shitty')
2
+ require 'rspec/unit'
metadata ADDED
@@ -0,0 +1,117 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: shitty
3
+ version: !ruby/object:Gem::Version
4
+ hash: 27
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 2
10
+ version: 0.0.2
11
+ platform: ruby
12
+ authors:
13
+ - asur
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-16 00:00:00 +05:30
19
+ default_executable:
20
+ dependencies:
21
+ - !ruby/object:Gem::Dependency
22
+ name: rspec
23
+ prerelease: false
24
+ requirement: &id001 !ruby/object:Gem::Requirement
25
+ none: false
26
+ requirements:
27
+ - - ">="
28
+ - !ruby/object:Gem::Version
29
+ hash: 3
30
+ segments:
31
+ - 0
32
+ version: "0"
33
+ type: :development
34
+ version_requirements: *id001
35
+ - !ruby/object:Gem::Dependency
36
+ name: rspec-unit
37
+ prerelease: false
38
+ requirement: &id002 !ruby/object:Gem::Requirement
39
+ none: false
40
+ requirements:
41
+ - - ">="
42
+ - !ruby/object:Gem::Version
43
+ hash: 3
44
+ segments:
45
+ - 0
46
+ version: "0"
47
+ type: :development
48
+ version_requirements: *id002
49
+ - !ruby/object:Gem::Dependency
50
+ name: ZenTest
51
+ prerelease: false
52
+ requirement: &id003 !ruby/object:Gem::Requirement
53
+ none: false
54
+ requirements:
55
+ - - ">="
56
+ - !ruby/object:Gem::Version
57
+ hash: 3
58
+ segments:
59
+ - 0
60
+ version: "0"
61
+ type: :development
62
+ version_requirements: *id003
63
+ description: Let's write some shit
64
+ email:
65
+ - arusarka@gmail.com
66
+ executables: []
67
+
68
+ extensions: []
69
+
70
+ extra_rdoc_files:
71
+ - README.rdoc
72
+ files:
73
+ - lib/shitty.rb
74
+ - lib/shitty/version.rb
75
+ - lib/shitty/aliases.rb
76
+ - README.rdoc
77
+ - spec/spec_helper.rb
78
+ - spec/shitty/aliases_spec.rb
79
+ - spec/shitty/version_spec.rb
80
+ has_rdoc: true
81
+ homepage: ""
82
+ licenses: []
83
+
84
+ post_install_message:
85
+ rdoc_options: []
86
+
87
+ require_paths:
88
+ - lib
89
+ required_ruby_version: !ruby/object:Gem::Requirement
90
+ none: false
91
+ requirements:
92
+ - - ">="
93
+ - !ruby/object:Gem::Version
94
+ hash: 3
95
+ segments:
96
+ - 0
97
+ version: "0"
98
+ required_rubygems_version: !ruby/object:Gem::Requirement
99
+ none: false
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ hash: 3
104
+ segments:
105
+ - 0
106
+ version: "0"
107
+ requirements: []
108
+
109
+ rubyforge_project:
110
+ rubygems_version: 1.6.2
111
+ signing_key:
112
+ specification_version: 3
113
+ summary: This gem is written in jest when I was on bench and had nothing much to work on. It is not written with an intention to belittle ruby. I love ruby. But thought why not write something to put a smile on your face
114
+ test_files:
115
+ - spec/spec_helper.rb
116
+ - spec/shitty/aliases_spec.rb
117
+ - spec/shitty/version_spec.rb