th 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.rvmrc +1 -0
- data/LICENSE +1 -1
- data/lib/th/integer.rb +10 -9
- data/lib/th/version.rb +1 -1
- data/spec/th/integer_spec.rb +3 -6
- data/th.gemspec +3 -2
- metadata +39 -60
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 8e80d35b8b562aaae581b47574a70c1793fba050
|
4
|
+
data.tar.gz: 746b3e86b907063f96094d1221a81d3179de85cc
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 43bda17fbe1c837c04c5b8051ed0dba728cecd8737e48ee3a9fcfe1188982aaabe303f9d667fd06a731904b9244d3a2f5195337ba0efc4a2f9729ac8b1c86c81
|
7
|
+
data.tar.gz: d8a77406291dc0acd3b2accb72759880302fed36d0221d11185fa2d6716801acd8b31fd961edaedf54a5216a9c80c04659cd189f3837d6f022d89d102974373a
|
data/.rvmrc
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
rvm use 2.0.0@th --create
|
data/LICENSE
CHANGED
data/lib/th/integer.rb
CHANGED
@@ -1,11 +1,12 @@
|
|
1
|
-
module Th
|
2
|
-
|
3
|
-
|
1
|
+
module Th
|
2
|
+
refine Integer do
|
3
|
+
def to_index
|
4
|
+
self - 1
|
5
|
+
end
|
6
|
+
|
7
|
+
alias st to_index
|
8
|
+
alias nd to_index
|
9
|
+
alias rd to_index
|
10
|
+
alias th to_index
|
4
11
|
end
|
5
|
-
alias st to_index
|
6
|
-
alias nd to_index
|
7
|
-
alias rd to_index
|
8
|
-
alias th to_index
|
9
12
|
end
|
10
|
-
|
11
|
-
Integer.send(:include, Th::Integer)
|
data/lib/th/version.rb
CHANGED
data/spec/th/integer_spec.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
require 'th/integer'
|
2
|
+
using Th
|
2
3
|
|
3
|
-
describe
|
4
|
-
it "should include itself into #{Integer}" do
|
5
|
-
Integer.ancestors.should include(Integer)
|
6
|
-
end
|
7
|
-
|
4
|
+
describe Integer do
|
8
5
|
describe '#to_index, #th, #rd and #st' do
|
9
6
|
it "should always be 1 less than the number" do
|
10
7
|
1.to_index.should == 0
|
@@ -14,4 +11,4 @@ describe Th::Integer do
|
|
14
11
|
10.th.should == 9
|
15
12
|
end
|
16
13
|
end
|
17
|
-
end
|
14
|
+
end
|
data/th.gemspec
CHANGED
@@ -9,8 +9,9 @@ Gem::Specification.new do |s|
|
|
9
9
|
s.authors = ["Abhijit Hiremagalur"]
|
10
10
|
s.email = ["abhijit@hiremaga.com"]
|
11
11
|
s.homepage = ""
|
12
|
-
s.summary = %q{
|
13
|
-
s.description = %q{
|
12
|
+
s.summary = %q{A somewhat arbitrary collection of Refinements to core Ruby classes}
|
13
|
+
s.description = %q{A somewhat arbitrary collection of Refinements to core Ruby classes}
|
14
|
+
s.required_ruby_version = '>= 2.0.0'
|
14
15
|
|
15
16
|
s.rubyforge_project = "th"
|
16
17
|
|
metadata
CHANGED
@@ -1,48 +1,38 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: th
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
5
|
-
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 0
|
9
|
-
- 1
|
10
|
-
version: 0.0.1
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.2
|
11
5
|
platform: ruby
|
12
|
-
authors:
|
6
|
+
authors:
|
13
7
|
- Abhijit Hiremagalur
|
14
8
|
autorequire:
|
15
9
|
bindir: bin
|
16
10
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
dependencies:
|
21
|
-
- !ruby/object:Gem::Dependency
|
11
|
+
date: 2013-03-03 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
22
14
|
name: rspec
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
- !ruby/object:Gem::Version
|
29
|
-
hash: 3
|
30
|
-
segments:
|
31
|
-
- 0
|
32
|
-
version: "0"
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - '>='
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
33
20
|
type: :development
|
34
|
-
|
35
|
-
|
36
|
-
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - '>='
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
27
|
+
description: A somewhat arbitrary collection of Refinements to core Ruby classes
|
28
|
+
email:
|
37
29
|
- abhijit@hiremaga.com
|
38
30
|
executables: []
|
39
|
-
|
40
31
|
extensions: []
|
41
|
-
|
42
32
|
extra_rdoc_files: []
|
43
|
-
|
44
|
-
files:
|
33
|
+
files:
|
45
34
|
- .gitignore
|
35
|
+
- .rvmrc
|
46
36
|
- Gemfile
|
47
37
|
- LICENSE
|
48
38
|
- Rakefile
|
@@ -52,39 +42,28 @@ files:
|
|
52
42
|
- spec/.rvmrc
|
53
43
|
- spec/th/integer_spec.rb
|
54
44
|
- th.gemspec
|
55
|
-
|
56
|
-
homepage: ""
|
45
|
+
homepage: ''
|
57
46
|
licenses: []
|
58
|
-
|
47
|
+
metadata: {}
|
59
48
|
post_install_message:
|
60
49
|
rdoc_options: []
|
61
|
-
|
62
|
-
require_paths:
|
50
|
+
require_paths:
|
63
51
|
- lib
|
64
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
65
|
-
|
66
|
-
|
67
|
-
|
68
|
-
|
69
|
-
|
70
|
-
|
71
|
-
|
72
|
-
|
73
|
-
|
74
|
-
none: false
|
75
|
-
requirements:
|
76
|
-
- - ">="
|
77
|
-
- !ruby/object:Gem::Version
|
78
|
-
hash: 3
|
79
|
-
segments:
|
80
|
-
- 0
|
81
|
-
version: "0"
|
52
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
53
|
+
requirements:
|
54
|
+
- - '>='
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
version: 2.0.0
|
57
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - '>='
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
82
62
|
requirements: []
|
83
|
-
|
84
63
|
rubyforge_project: th
|
85
|
-
rubygems_version:
|
64
|
+
rubygems_version: 2.0.0
|
86
65
|
signing_key:
|
87
|
-
specification_version:
|
88
|
-
summary:
|
89
|
-
test_files:
|
66
|
+
specification_version: 4
|
67
|
+
summary: A somewhat arbitrary collection of Refinements to core Ruby classes
|
68
|
+
test_files:
|
90
69
|
- spec/th/integer_spec.rb
|