jalalidate 0.3.4 → 0.3.5
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.
- checksums.yaml +4 -4
- data/.travis.yml +3 -0
- data/Gemfile.lock +20 -12
- data/README.md +8 -2
- data/jalalidate.gemspec +5 -3
- data/lib/jalalidate/version.rb +1 -1
- data/spec/jalalidate_spec.rb +8 -8
- data/spec/spec_helper.rb +1 -0
- metadata +8 -19
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ce55778a120d0e903285aa62163301fe071ff7f3
|
4
|
+
data.tar.gz: dba39bfda6c2a920e249d2fa07196614478790df
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b79a2663d3a9235526272539caf36a2f8c42e19fc536e3c94e1cf95d7454e58699c28617a54f1a8e292991875c616c487ee9e8daca971926c122aafea8f9af00
|
7
|
+
data.tar.gz: 3634470be5238844a10a9f647ea2ae92dd64645d90ddafd1ddb0cc7ec09a119095037e1d2e2b8d6c3e081b8955246ad86a34f9bb46f483bb801c2374799e84a1
|
data/.travis.yml
ADDED
data/Gemfile.lock
CHANGED
@@ -1,25 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
jalalidate (0.3.
|
4
|
+
jalalidate (0.3.5)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: http://rubygems.org/
|
8
8
|
specs:
|
9
|
-
diff-lcs (1.
|
10
|
-
rspec (
|
11
|
-
rspec-core (~>
|
12
|
-
rspec-expectations (~>
|
13
|
-
rspec-mocks (~>
|
14
|
-
rspec-core (
|
15
|
-
|
16
|
-
|
17
|
-
|
9
|
+
diff-lcs (1.3)
|
10
|
+
rspec (3.7.0)
|
11
|
+
rspec-core (~> 3.7.0)
|
12
|
+
rspec-expectations (~> 3.7.0)
|
13
|
+
rspec-mocks (~> 3.7.0)
|
14
|
+
rspec-core (3.7.0)
|
15
|
+
rspec-support (~> 3.7.0)
|
16
|
+
rspec-expectations (3.7.0)
|
17
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
18
|
+
rspec-support (~> 3.7.0)
|
19
|
+
rspec-mocks (3.7.0)
|
20
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
21
|
+
rspec-support (~> 3.7.0)
|
22
|
+
rspec-support (3.7.0)
|
18
23
|
|
19
24
|
PLATFORMS
|
20
25
|
ruby
|
21
26
|
|
22
27
|
DEPENDENCIES
|
23
|
-
bundler (~> 1.
|
28
|
+
bundler (~> 1.16)
|
24
29
|
jalalidate!
|
25
|
-
rspec (~>
|
30
|
+
rspec (~> 3.0)
|
31
|
+
|
32
|
+
BUNDLED WITH
|
33
|
+
1.16.0
|
data/README.md
CHANGED
data/jalalidate.gemspec
CHANGED
@@ -8,10 +8,11 @@ Gem::Specification.new do |s|
|
|
8
8
|
s.platform = Gem::Platform::RUBY
|
9
9
|
s.authors = ["Allen A. Bargi"]
|
10
10
|
s.email = %q{allen.bargi@gmail.com}
|
11
|
+
|
11
12
|
s.homepage = %q{http://github.com/aziz/jalalidate}
|
12
13
|
s.license = "MIT"
|
13
14
|
s.summary = %q{A library for working with Jalali Calendar (a.k.a Persian Calendar)}
|
14
|
-
s.required_rubygems_version = Gem::Requirement.new(">=
|
15
|
+
s.required_rubygems_version = Gem::Requirement.new(">= 2.4") if s.respond_to? :required_rubygems_version=
|
15
16
|
s.rubyforge_project = "jalalidate"
|
16
17
|
s.files = `git ls-files`.split("\n")
|
17
18
|
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
@@ -19,6 +20,7 @@ Gem::Specification.new do |s|
|
|
19
20
|
s.require_paths = ["lib"]
|
20
21
|
s.extra_rdoc_files = [ "LICENSE", "README.md"]
|
21
22
|
s.rdoc_options = ["--charset=UTF-8"]
|
22
|
-
|
23
|
-
s.add_development_dependency '
|
23
|
+
|
24
|
+
s.add_development_dependency 'bundler', '~> 1.16'
|
25
|
+
s.add_development_dependency 'rspec', '~> 3.0'
|
24
26
|
end
|
data/lib/jalalidate/version.rb
CHANGED
data/spec/jalalidate_spec.rb
CHANGED
@@ -31,23 +31,23 @@ describe JalaliDate do
|
|
31
31
|
end
|
32
32
|
|
33
33
|
it "should return today, yesterday, and tomorrow date according to jalali calendar" do
|
34
|
-
Date.
|
34
|
+
allow(Date).to receive(:today).and_return Date.new(2010,1,1)
|
35
35
|
JalaliDate.today.should === JalaliDate.new(1388,10,11)
|
36
36
|
JalaliDate.yesterday.should === JalaliDate.new(1388,10,10)
|
37
37
|
JalaliDate.tomorrow.should === JalaliDate.new(1388,10,12)
|
38
38
|
end
|
39
39
|
|
40
40
|
it "should distinguish invalid jalali dates" do
|
41
|
-
JalaliDate.valid?(1388,13,11).should
|
42
|
-
JalaliDate.valid?(-1388,11,11).should
|
43
|
-
JalaliDate.valid?(1388,1,45).should
|
44
|
-
JalaliDate.valid?(1388,12,30).should
|
45
|
-
JalaliDate.valid?(1387,12,30).should
|
41
|
+
JalaliDate.valid?(1388,13,11).should be_falsey
|
42
|
+
JalaliDate.valid?(-1388,11,11).should be_falsey
|
43
|
+
JalaliDate.valid?(1388,1,45).should be_falsey
|
44
|
+
JalaliDate.valid?(1388,12,30).should be_falsey
|
45
|
+
JalaliDate.valid?(1387,12,30).should be_truthy
|
46
46
|
end
|
47
47
|
|
48
48
|
it "should distinguish leap years" do
|
49
|
-
JalaliDate.leap?(1387).should
|
50
|
-
JalaliDate.leap?(1388).should
|
49
|
+
JalaliDate.leap?(1387).should be_truthy
|
50
|
+
JalaliDate.leap?(1388).should be_falsey
|
51
51
|
end
|
52
52
|
|
53
53
|
it "should convert to gregorian date correctly" do
|
data/spec/spec_helper.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jalalidate
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Allen A. Bargi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-11-
|
11
|
+
date: 2017-11-27 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,40 +16,28 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1.
|
20
|
-
- - ">="
|
21
|
-
- !ruby/object:Gem::Version
|
22
|
-
version: 1.3.0
|
19
|
+
version: '1.16'
|
23
20
|
type: :development
|
24
21
|
prerelease: false
|
25
22
|
version_requirements: !ruby/object:Gem::Requirement
|
26
23
|
requirements:
|
27
24
|
- - "~>"
|
28
25
|
- !ruby/object:Gem::Version
|
29
|
-
version: '1.
|
30
|
-
- - ">="
|
31
|
-
- !ruby/object:Gem::Version
|
32
|
-
version: 1.3.0
|
26
|
+
version: '1.16'
|
33
27
|
- !ruby/object:Gem::Dependency
|
34
28
|
name: rspec
|
35
29
|
requirement: !ruby/object:Gem::Requirement
|
36
30
|
requirements:
|
37
31
|
- - "~>"
|
38
32
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
40
|
-
- - ">="
|
41
|
-
- !ruby/object:Gem::Version
|
42
|
-
version: 2.13.0
|
33
|
+
version: '3.0'
|
43
34
|
type: :development
|
44
35
|
prerelease: false
|
45
36
|
version_requirements: !ruby/object:Gem::Requirement
|
46
37
|
requirements:
|
47
38
|
- - "~>"
|
48
39
|
- !ruby/object:Gem::Version
|
49
|
-
version: '
|
50
|
-
- - ">="
|
51
|
-
- !ruby/object:Gem::Version
|
52
|
-
version: 2.13.0
|
40
|
+
version: '3.0'
|
53
41
|
description:
|
54
42
|
email: allen.bargi@gmail.com
|
55
43
|
executables:
|
@@ -61,6 +49,7 @@ extra_rdoc_files:
|
|
61
49
|
- README.md
|
62
50
|
files:
|
63
51
|
- ".gitignore"
|
52
|
+
- ".travis.yml"
|
64
53
|
- Gemfile
|
65
54
|
- Gemfile.lock
|
66
55
|
- LICENSE
|
@@ -93,7 +82,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
93
82
|
requirements:
|
94
83
|
- - ">="
|
95
84
|
- !ruby/object:Gem::Version
|
96
|
-
version: '
|
85
|
+
version: '2.4'
|
97
86
|
requirements: []
|
98
87
|
rubyforge_project: jalalidate
|
99
88
|
rubygems_version: 2.6.13
|