jalalidate 0.3.4 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4bf7eba63c33a160c3553674f2bd1aad3d9f221d
4
- data.tar.gz: 41da84f5ba1469197043a770e155765359e74b4f
3
+ metadata.gz: ce55778a120d0e903285aa62163301fe071ff7f3
4
+ data.tar.gz: dba39bfda6c2a920e249d2fa07196614478790df
5
5
  SHA512:
6
- metadata.gz: eb4b079ca21386fb1f4e34f19126de5e08a4c53adb87441fc8d84049fc32b40c8582bbc1737db09a9849af9982e0dbf982d8ebb76660a57533ec04feb87894f6
7
- data.tar.gz: 66b452ef1d0b400eadc9b7705e711b2ba62a956e1c34fb0e3cdb736d754c975c3674eb2b1c788eefb3b52571b7e0efdb44027cd88c23fdb678e549ea61fb74a0
6
+ metadata.gz: b79a2663d3a9235526272539caf36a2f8c42e19fc536e3c94e1cf95d7454e58699c28617a54f1a8e292991875c616c487ee9e8daca971926c122aafea8f9af00
7
+ data.tar.gz: 3634470be5238844a10a9f647ea2ae92dd64645d90ddafd1ddb0cc7ec09a119095037e1d2e2b8d6c3e081b8955246ad86a34f9bb46f483bb801c2374799e84a1
@@ -0,0 +1,3 @@
1
+ language: ruby
2
+ rvm: 2.4
3
+ script: rspec
@@ -1,25 +1,33 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- jalalidate (0.3.2)
4
+ jalalidate (0.3.5)
5
5
 
6
6
  GEM
7
7
  remote: http://rubygems.org/
8
8
  specs:
9
- diff-lcs (1.2.2)
10
- rspec (2.13.0)
11
- rspec-core (~> 2.13.0)
12
- rspec-expectations (~> 2.13.0)
13
- rspec-mocks (~> 2.13.0)
14
- rspec-core (2.13.1)
15
- rspec-expectations (2.13.0)
16
- diff-lcs (>= 1.1.3, < 2.0)
17
- rspec-mocks (2.13.1)
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.3.0)
28
+ bundler (~> 1.16)
24
29
  jalalidate!
25
- rspec (~> 2.13.0)
30
+ rspec (~> 3.0)
31
+
32
+ BUNDLED WITH
33
+ 1.16.0
data/README.md CHANGED
@@ -1,7 +1,13 @@
1
1
  # Jalali Date Library
2
2
 
3
- ## Install
4
- gem install jalalidate
3
+ ## Install
4
+
5
+ $ gem install jalalidate
6
+
7
+ ## Tests
8
+ Simply run `rspec` command in the source directory:
9
+
10
+ $ rspec
5
11
 
6
12
  ## History
7
13
 
@@ -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(">= 0") if s.respond_to? :required_rubygems_version=
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
- s.add_development_dependency 'bundler', '~> 1.3', '>= 1.3.0'
23
- s.add_development_dependency 'rspec', '~> 2.13', '>= 2.13.0'
23
+
24
+ s.add_development_dependency 'bundler', '~> 1.16'
25
+ s.add_development_dependency 'rspec', '~> 3.0'
24
26
  end
@@ -1,3 +1,3 @@
1
1
  module Jalalidate
2
- VERSION = "0.3.4"
2
+ VERSION = "0.3.5"
3
3
  end
@@ -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.stub!(:today).and_return(Date.new(2010,1,1))
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 be_false
42
- JalaliDate.valid?(-1388,11,11).should be_false
43
- JalaliDate.valid?(1388,1,45).should be_false
44
- JalaliDate.valid?(1388,12,30).should be_false
45
- JalaliDate.valid?(1387,12,30).should be_true
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 be_true
50
- JalaliDate.leap?(1388).should be_false
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
@@ -5,4 +5,5 @@ require 'jalalidate'
5
5
  require 'rspec'
6
6
 
7
7
  RSpec.configure do |config|
8
+ config.expect_with(:rspec) { |c| c.syntax = :should }
8
9
  end
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
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-15 00:00:00.000000000 Z
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.3'
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.3'
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: '2.13'
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: '2.13'
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: '0'
85
+ version: '2.4'
97
86
  requirements: []
98
87
  rubyforge_project: jalalidate
99
88
  rubygems_version: 2.6.13