hebruby 2.0.3 → 2.0.4
Sign up to get free protection for your applications and to get access to all the features.
- data/CHANGELOG +2 -0
- data/LICENSE +1 -1
- data/hebruby.gemspec +8 -9
- data/lib/hebruby.rb +5 -1
- data/test/hebruby_tests.rb +8 -2
- metadata +6 -8
data/CHANGELOG
CHANGED
data/LICENSE
CHANGED
data/hebruby.gemspec
CHANGED
@@ -2,25 +2,24 @@
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = %q{hebruby}
|
5
|
-
s.version = "2.0.
|
5
|
+
s.version = "2.0.4"
|
6
6
|
|
7
7
|
s.required_rubygems_version = Gem::Requirement.new(">= 1.2") if s.respond_to? :required_rubygems_version=
|
8
|
-
s.authors = [
|
9
|
-
s.date = %q{
|
8
|
+
s.authors = [%q{Ron Evans}]
|
9
|
+
s.date = %q{2011-06-25}
|
10
10
|
s.description = %q{Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa.}
|
11
11
|
s.email = %q{}
|
12
|
-
s.extra_rdoc_files = [
|
13
|
-
s.files = [
|
12
|
+
s.extra_rdoc_files = [%q{CHANGELOG}, %q{LICENSE}, %q{README}, %q{README.rdoc}, %q{lib/hebruby.rb}]
|
13
|
+
s.files = [%q{CHANGELOG}, %q{LICENSE}, %q{Manifest}, %q{README}, %q{README.rdoc}, %q{Rakefile}, %q{lib/hebruby.rb}, %q{test/hebruby_tests.rb}, %q{hebruby.gemspec}]
|
14
14
|
s.homepage = %q{http://deadprogrammersociety.com/}
|
15
15
|
s.post_install_message = %q{*** Hebruby was installed ***}
|
16
|
-
s.rdoc_options = [
|
17
|
-
s.require_paths = [
|
16
|
+
s.rdoc_options = [%q{--line-numbers}, %q{--inline-source}, %q{--title}, %q{Hebruby}, %q{--main}, %q{README}]
|
17
|
+
s.require_paths = [%q{lib}]
|
18
18
|
s.rubyforge_project = %q{hebruby}
|
19
|
-
s.rubygems_version = %q{1.
|
19
|
+
s.rubygems_version = %q{1.8.5}
|
20
20
|
s.summary = %q{Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa.}
|
21
21
|
|
22
22
|
if s.respond_to? :specification_version then
|
23
|
-
current_version = Gem::Specification::CURRENT_SPECIFICATION_VERSION
|
24
23
|
s.specification_version = 3
|
25
24
|
|
26
25
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
data/lib/hebruby.rb
CHANGED
@@ -95,7 +95,11 @@ module Hebruby
|
|
95
95
|
|
96
96
|
# Provide Hebrew month name in Hebrew letters
|
97
97
|
def heb_month_name
|
98
|
-
|
98
|
+
if HebrewDate.leap?(@hy) and @hm >= 12 # leap year and from adar
|
99
|
+
return HEB_MONTH_NAMES[@hm + 1]
|
100
|
+
else
|
101
|
+
return HEB_MONTH_NAMES[@hm]
|
102
|
+
end
|
99
103
|
end
|
100
104
|
|
101
105
|
# Provide Hebrew day of the month, in hebrew letters.
|
data/test/hebruby_tests.rb
CHANGED
@@ -103,6 +103,14 @@ class TC_MyTest2 < Test::Unit::TestCase
|
|
103
103
|
assert_equal(29, @hb.day, "Wrong day.")
|
104
104
|
end
|
105
105
|
|
106
|
+
def test_h2j_10
|
107
|
+
@hb = Hebruby::HebrewDate.new(Date.new(2005, 3, 18))
|
108
|
+
assert_equal(13, @hb.month, "Wrong month.")
|
109
|
+
assert_equal("Adar Sheni", @hb.month_name, "Wrong month name.")
|
110
|
+
assert_equal(5765, @hb.year, "Wrong year.")
|
111
|
+
assert_equal(7, @hb.day, "Wrong day.")
|
112
|
+
end
|
113
|
+
|
106
114
|
def test_jd
|
107
115
|
orig=2454946
|
108
116
|
|
@@ -196,7 +204,5 @@ class TC_MyTest2 < Test::Unit::TestCase
|
|
196
204
|
assert_equal(Date.new(1941, 12, 10).jd, @hb.jd, "Wrong Julian date.")
|
197
205
|
end
|
198
206
|
|
199
|
-
|
200
|
-
|
201
207
|
end
|
202
208
|
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hebruby
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
5
|
-
prerelease:
|
4
|
+
hash: 7
|
5
|
+
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 0
|
9
|
-
-
|
10
|
-
version: 2.0.
|
9
|
+
- 4
|
10
|
+
version: 2.0.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Ron Evans
|
@@ -15,8 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date:
|
19
|
-
default_executable:
|
18
|
+
date: 2011-06-25 00:00:00 Z
|
20
19
|
dependencies: []
|
21
20
|
|
22
21
|
description: Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa.
|
@@ -41,7 +40,6 @@ files:
|
|
41
40
|
- lib/hebruby.rb
|
42
41
|
- test/hebruby_tests.rb
|
43
42
|
- hebruby.gemspec
|
44
|
-
has_rdoc: true
|
45
43
|
homepage: http://deadprogrammersociety.com/
|
46
44
|
licenses: []
|
47
45
|
|
@@ -77,7 +75,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
77
75
|
requirements: []
|
78
76
|
|
79
77
|
rubyforge_project: hebruby
|
80
|
-
rubygems_version: 1.
|
78
|
+
rubygems_version: 1.8.5
|
81
79
|
signing_key:
|
82
80
|
specification_version: 3
|
83
81
|
summary: Hebruby is a Ruby library to convert julian dates to hebrew dates, and vice-versa.
|