integer 0.1.0 → 0.1.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/Rakefile +2 -2
- data/VERSION +1 -1
- data/integer.gemspec +3 -3
- data/test/test_integer.rb +10 -10
- metadata +5 -5
data/Rakefile
CHANGED
@@ -17,8 +17,8 @@ Jeweler::Tasks.new do |gem|
|
|
17
17
|
gem.name = "integer"
|
18
18
|
gem.homepage = "http://github.com/mspwong/integer"
|
19
19
|
gem.license = "mspwong"
|
20
|
-
gem.summary = "extends Integer by adding
|
21
|
-
gem.description = "This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest
|
20
|
+
gem.summary = "extends Integer by adding fibonacci support"
|
21
|
+
gem.description = "This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest fibonacci number that is less than or equal to the integer."
|
22
22
|
gem.authors = ["Mary Wong"]
|
23
23
|
# dependencies defined in Gemfile
|
24
24
|
end
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.1.
|
1
|
+
0.1.1
|
data/integer.gemspec
CHANGED
@@ -5,12 +5,12 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{integer}
|
8
|
-
s.version = "0.1.
|
8
|
+
s.version = "0.1.1"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Mary Wong"]
|
12
12
|
s.date = %q{2011-08-09}
|
13
|
-
s.description = %q{This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest
|
13
|
+
s.description = %q{This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest fibonacci number that is less than or equal to the integer.}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"LICENSE.txt",
|
16
16
|
"README.rdoc"
|
@@ -36,7 +36,7 @@ Gem::Specification.new do |s|
|
|
36
36
|
s.licenses = ["mspwong"]
|
37
37
|
s.require_paths = ["lib"]
|
38
38
|
s.rubygems_version = %q{1.6.2}
|
39
|
-
s.summary = %q{extends Integer by adding
|
39
|
+
s.summary = %q{extends Integer by adding fibonacci support}
|
40
40
|
|
41
41
|
if s.respond_to? :specification_version then
|
42
42
|
s.specification_version = 3
|
data/test/test_integer.rb
CHANGED
@@ -8,17 +8,17 @@ class TestInteger < ActiveSupport::TestCase
|
|
8
8
|
should "retain core Integer behavior" do
|
9
9
|
test_fixnum = 4
|
10
10
|
assert_equal Fixnum, test_fixnum.class
|
11
|
-
assert test_fixnum.is_a?
|
12
|
-
assert test_fixnum.is_a?
|
13
|
-
assert test_fixnum.is_a?
|
14
|
-
assert test_fixnum.is_a?
|
15
|
-
assert test_fixnum.is_a?
|
11
|
+
assert test_fixnum.is_a? Fixnum
|
12
|
+
assert test_fixnum.is_a? Integer
|
13
|
+
assert test_fixnum.is_a? Numeric
|
14
|
+
assert test_fixnum.is_a? Precision
|
15
|
+
assert test_fixnum.is_a? Object
|
16
16
|
assert test_fixnum.integer?
|
17
17
|
assert test_fixnum == 4
|
18
|
-
assert test_fixnum.eql?
|
18
|
+
assert test_fixnum.eql? 4
|
19
19
|
four = 4
|
20
20
|
assert test_fixnum == four
|
21
|
-
assert test_fixnum.eql?
|
21
|
+
assert test_fixnum.eql? four
|
22
22
|
assert test_fixnum == 4.0
|
23
23
|
assert !test_fixnum.eql?(4.0)
|
24
24
|
assert !test_fixnum.zero?
|
@@ -29,7 +29,7 @@ class TestInteger < ActiveSupport::TestCase
|
|
29
29
|
assert_equal 1, test_fixnum.modulo(3)
|
30
30
|
assert_equal "4", test_fixnum.to_s
|
31
31
|
assert_equal 2, test_fixnum / 2
|
32
|
-
assert_equal -4,
|
32
|
+
assert_equal -4, test_fixnum * -1
|
33
33
|
assert_equal test_fixnum, (test_fixnum * -1).abs
|
34
34
|
assert test_fixnum.even?
|
35
35
|
assert !test_fixnum.odd?
|
@@ -39,8 +39,8 @@ class TestInteger < ActiveSupport::TestCase
|
|
39
39
|
|
40
40
|
test_bignum = 999999999999999999999999999999
|
41
41
|
assert_equal Bignum, test_bignum.class
|
42
|
-
assert test_bignum.is_a?
|
43
|
-
assert test_bignum.is_a?
|
42
|
+
assert test_bignum.is_a? Bignum
|
43
|
+
assert test_bignum.is_a? Integer
|
44
44
|
assert test_bignum < test_bignum + 1
|
45
45
|
assert test_bignum > test_bignum - 1
|
46
46
|
assert_not_nil test_bignum.hash
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: integer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 25
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 1
|
9
|
-
-
|
10
|
-
version: 0.1.
|
9
|
+
- 1
|
10
|
+
version: 0.1.1
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Mary Wong
|
@@ -80,7 +80,7 @@ dependencies:
|
|
80
80
|
name: rcov
|
81
81
|
version_requirements: *id004
|
82
82
|
prerelease: false
|
83
|
-
description: This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest
|
83
|
+
description: This gem adds to the Integer type an extra instance method 'closest_fibonacci_smaller_or_equal_to' which returns the largest fibonacci number that is less than or equal to the integer.
|
84
84
|
email:
|
85
85
|
executables: []
|
86
86
|
|
@@ -138,6 +138,6 @@ rubyforge_project:
|
|
138
138
|
rubygems_version: 1.6.2
|
139
139
|
signing_key:
|
140
140
|
specification_version: 3
|
141
|
-
summary: extends Integer by adding
|
141
|
+
summary: extends Integer by adding fibonacci support
|
142
142
|
test_files: []
|
143
143
|
|