th 0.0.1

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.
data/.gitignore ADDED
@@ -0,0 +1,4 @@
1
+ *.gem
2
+ .bundle
3
+ Gemfile.lock
4
+ pkg/*
data/Gemfile ADDED
@@ -0,0 +1,4 @@
1
+ source "http://rubygems.org"
2
+
3
+ # Specify your gem's dependencies in th.gemspec
4
+ gemspec
data/LICENSE ADDED
@@ -0,0 +1,19 @@
1
+ Copyright (C) <year> by <copyright holders>
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining a copy
4
+ of this software and associated documentation files (the "Software"), to deal
5
+ in the Software without restriction, including without limitation the rights
6
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7
+ copies of the Software, and to permit persons to whom the Software is
8
+ furnished to do so, subject to the following conditions:
9
+
10
+ The above copyright notice and this permission notice shall be included in
11
+ all copies or substantial portions of the Software.
12
+
13
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19
+ THE SOFTWARE.
data/Rakefile ADDED
@@ -0,0 +1,2 @@
1
+ require 'bundler'
2
+ Bundler::GemHelper.install_tasks
data/lib/th/integer.rb ADDED
@@ -0,0 +1,11 @@
1
+ module Th::Integer
2
+ def to_index
3
+ self - 1
4
+ end
5
+ alias st to_index
6
+ alias nd to_index
7
+ alias rd to_index
8
+ alias th to_index
9
+ end
10
+
11
+ Integer.send(:include, Th::Integer)
data/lib/th/version.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Th
2
+ VERSION = "0.0.1"
3
+ end
data/lib/th.rb ADDED
@@ -0,0 +1,3 @@
1
+ module Th
2
+ # Your code goes here...
3
+ end
data/spec/.rvmrc ADDED
@@ -0,0 +1 @@
1
+ rvm use ree@th
@@ -0,0 +1,17 @@
1
+ require 'th/integer'
2
+
3
+ describe Th::Integer do
4
+ it "should include itself into #{Integer}" do
5
+ Integer.ancestors.should include(Integer)
6
+ end
7
+
8
+ describe '#to_index, #th, #rd and #st' do
9
+ it "should always be 1 less than the number" do
10
+ 1.to_index.should == 0
11
+ 1.st.should == 0
12
+ 2.nd.should == 1
13
+ 3.rd.should == 2
14
+ 10.th.should == 9
15
+ end
16
+ end
17
+ end
data/th.gemspec ADDED
@@ -0,0 +1,23 @@
1
+ # -*- encoding: utf-8 -*-
2
+ $:.push File.expand_path("../lib", __FILE__)
3
+ require "th/version"
4
+
5
+ Gem::Specification.new do |s|
6
+ s.name = "th"
7
+ s.version = Th::VERSION
8
+ s.platform = Gem::Platform::RUBY
9
+ s.authors = ["Abhijit Hiremagalur"]
10
+ s.email = ["abhijit@hiremaga.com"]
11
+ s.homepage = ""
12
+ s.summary = %q{My personal utility belt of Ruby methods and extensions I seem to add to projects over and over.}
13
+ s.description = %q{My personal utility belt of Ruby methods and extensions I seem to add to projects over and over.}
14
+
15
+ s.rubyforge_project = "th"
16
+
17
+ s.add_development_dependency "rspec"
18
+
19
+ s.files = `git ls-files`.split("\n")
20
+ s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
21
+ s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
22
+ s.require_paths = ["lib"]
23
+ end
metadata ADDED
@@ -0,0 +1,90 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: th
3
+ version: !ruby/object:Gem::Version
4
+ hash: 29
5
+ prerelease:
6
+ segments:
7
+ - 0
8
+ - 0
9
+ - 1
10
+ version: 0.0.1
11
+ platform: ruby
12
+ authors:
13
+ - Abhijit Hiremagalur
14
+ autorequire:
15
+ bindir: bin
16
+ cert_chain: []
17
+
18
+ date: 2011-03-15 00:00:00 -07:00
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
+ description: My personal utility belt of Ruby methods and extensions I seem to add to projects over and over.
36
+ email:
37
+ - abhijit@hiremaga.com
38
+ executables: []
39
+
40
+ extensions: []
41
+
42
+ extra_rdoc_files: []
43
+
44
+ files:
45
+ - .gitignore
46
+ - Gemfile
47
+ - LICENSE
48
+ - Rakefile
49
+ - lib/th.rb
50
+ - lib/th/integer.rb
51
+ - lib/th/version.rb
52
+ - spec/.rvmrc
53
+ - spec/th/integer_spec.rb
54
+ - th.gemspec
55
+ has_rdoc: true
56
+ homepage: ""
57
+ licenses: []
58
+
59
+ post_install_message:
60
+ rdoc_options: []
61
+
62
+ require_paths:
63
+ - lib
64
+ required_ruby_version: !ruby/object:Gem::Requirement
65
+ none: false
66
+ requirements:
67
+ - - ">="
68
+ - !ruby/object:Gem::Version
69
+ hash: 3
70
+ segments:
71
+ - 0
72
+ version: "0"
73
+ required_rubygems_version: !ruby/object:Gem::Requirement
74
+ none: false
75
+ requirements:
76
+ - - ">="
77
+ - !ruby/object:Gem::Version
78
+ hash: 3
79
+ segments:
80
+ - 0
81
+ version: "0"
82
+ requirements: []
83
+
84
+ rubyforge_project: th
85
+ rubygems_version: 1.4.1
86
+ signing_key:
87
+ specification_version: 3
88
+ summary: My personal utility belt of Ruby methods and extensions I seem to add to projects over and over.
89
+ test_files:
90
+ - spec/th/integer_spec.rb