nanakshahi 0.1.7 → 0.2.0.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.
- checksums.yaml +4 -4
- data/.github/workflows/gempush.yml +48 -0
- data/CHANGELOG.md +25 -0
- data/Gemfile.lock +10 -10
- data/README.md +4 -3
- data/lib/nanakshahi/version.rb +1 -1
- data/lib/nanakshahi.rb +3 -10
- data/nanakshahi.gemspec +4 -4
- metadata +15 -14
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e4d16cf644cdb08a9b0133ec2a7604691a39a7a1de9ae7c04938f71ec5dc7e83
|
4
|
+
data.tar.gz: fcf9406d0425d71278698b31b2b88c0b074c8a1ee516e5ac381bb672870adc52
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d16dcee496705ee6a622e056f028d86348d7ae0da31e2ae10f82f5357b5cc7e8d53365c641156432a6ddef0a5fdf689be98ac503d8e4449a90e554903a44eaf5
|
7
|
+
data.tar.gz: 43471634300cb517fd94ea0ad556f03f3aaeec5cb7e61a9efc679d8298992d9b2d3ebe153e2b62a7f4e434bdea00c2acfaa7b6303b7974bfb63cc5da5bdbf4a9
|
@@ -0,0 +1,48 @@
|
|
1
|
+
name: Ruby Gem
|
2
|
+
|
3
|
+
on: [push]
|
4
|
+
|
5
|
+
jobs:
|
6
|
+
minitest:
|
7
|
+
name: Run tests
|
8
|
+
runs-on: ubuntu-latest
|
9
|
+
|
10
|
+
steps:
|
11
|
+
- uses: actions/checkout@master
|
12
|
+
|
13
|
+
- name: Set up Ruby 2.7.1
|
14
|
+
uses: actions/setup-ruby@v1
|
15
|
+
with:
|
16
|
+
ruby-version: 2.7.x
|
17
|
+
|
18
|
+
- name: Run minitest
|
19
|
+
run: |
|
20
|
+
bundle install
|
21
|
+
bundle exec rake test
|
22
|
+
|
23
|
+
publish:
|
24
|
+
name: Publish
|
25
|
+
runs-on: ubuntu-latest
|
26
|
+
|
27
|
+
if: github.ref == 'refs/heads/master'
|
28
|
+
|
29
|
+
needs: minitest
|
30
|
+
|
31
|
+
steps:
|
32
|
+
- uses: actions/checkout@master
|
33
|
+
|
34
|
+
- name: Set up Ruby 2.7
|
35
|
+
uses: actions/setup-ruby@v1
|
36
|
+
with:
|
37
|
+
ruby-version: 2.7.x
|
38
|
+
|
39
|
+
- name: Publish to RubyGems
|
40
|
+
run: |
|
41
|
+
mkdir -p $HOME/.gem
|
42
|
+
touch $HOME/.gem/credentials
|
43
|
+
chmod 0600 $HOME/.gem/credentials
|
44
|
+
printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
|
45
|
+
gem build *.gemspec
|
46
|
+
gem push *.gem
|
47
|
+
env:
|
48
|
+
GEM_HOST_API_KEY: ${{secrets.RUBYGEMS_AUTH_TOKEN}}
|
data/CHANGELOG.md
ADDED
@@ -0,0 +1,25 @@
|
|
1
|
+
# coding: UTF-8
|
2
|
+
=== 0.2.0 / 2021-09-12
|
3
|
+
|
4
|
+
Bug fixes:
|
5
|
+
|
6
|
+
- Updated rake 13.0.6 (was 13.0.1)
|
7
|
+
- Updated minitest 5.14.4 (was 5.14.0)
|
8
|
+
- Updated i18n 1.8.10 (was 1.8.2)
|
9
|
+
|
10
|
+
=== 0.1.9 / 2020-04-15
|
11
|
+
|
12
|
+
Bug fixes:
|
13
|
+
|
14
|
+
- Updated Rakefile to Version 13.0 - security fix
|
15
|
+
- Updated minitest to version to 15.4
|
16
|
+
- Updated i18n to version 1.8.2
|
17
|
+
- Updated bundler to version 2.1
|
18
|
+
- Added a new test for 1 Vaisakh
|
19
|
+
|
20
|
+
=== 0.1.8 / 2019-03-14
|
21
|
+
|
22
|
+
Bug fixes:
|
23
|
+
|
24
|
+
- Fixed to_s method that failed because of unavailability of locales.
|
25
|
+
- Added a CHANGELOG.md to the gem code to keep track of changes over time.
|
data/Gemfile.lock
CHANGED
@@ -1,26 +1,26 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
nanakshahi (0.
|
5
|
-
i18n (~> 1.
|
4
|
+
nanakshahi (0.2.0)
|
5
|
+
i18n (~> 1.8, >= 1.8.1)
|
6
6
|
|
7
7
|
GEM
|
8
8
|
remote: https://rubygems.org/
|
9
9
|
specs:
|
10
|
-
concurrent-ruby (1.1.
|
11
|
-
i18n (1.
|
10
|
+
concurrent-ruby (1.1.9)
|
11
|
+
i18n (1.8.10)
|
12
12
|
concurrent-ruby (~> 1.0)
|
13
|
-
minitest (5.
|
14
|
-
rake (
|
13
|
+
minitest (5.14.4)
|
14
|
+
rake (13.0.6)
|
15
15
|
|
16
16
|
PLATFORMS
|
17
17
|
ruby
|
18
18
|
|
19
19
|
DEPENDENCIES
|
20
|
-
bundler (~> 1
|
21
|
-
minitest (~> 5.
|
20
|
+
bundler (~> 2.1)
|
21
|
+
minitest (~> 5.14)
|
22
22
|
nanakshahi!
|
23
|
-
rake (~>
|
23
|
+
rake (~> 13.0)
|
24
24
|
|
25
25
|
BUNDLED WITH
|
26
|
-
|
26
|
+
2.2.22
|
data/README.md
CHANGED
@@ -1,8 +1,9 @@
|
|
1
|
-
|
1
|
+
ਨਾਨਕਸ਼ਾਹੀ (Nanakshahi)[](https://badge.fury.io/rb/nanakshahi) 
|
2
|
+
========
|
2
3
|
|
3
4
|
ਨਾਨਕਸ਼ਾਹੀ ਇੱਕ ਰੂਬੀ ਪਰੋਗਰਾਮਿੰਗ ਭਾਸ਼ਾ ਚ ਲਿਖਿਆ ਗਿਆ gem ਹੈ ਜੋ ਕਿ [ਪਾਲ ਸਿੰਘ ਪੁਰੇਵਾਲ](http://purewal.biz/) ਦੁਆਰਾ ਲਿਖੇ ਗਏ [ਮੂਲ ਨਾਨਕਸ਼ਾਹੀ ਕਲੰਡਰ](http://www.purewal.biz/Gurbani_and_Nanakshahi_Calendar.pdf) ਤੇ ਅਧਾਰਿਤ ਹੈ।
|
4
5
|
|
5
|
-
ਇਹ ਆਮ/ਗਰਿਗੋਰੀਅਨ ਕਲੰਡਰ ਦੀਆਂ ਤਰੀਕਾਂ ਤੋਂ ਨਾਨਕਸ਼ਾਹੀ ਤੇ ਵਾਪਸ ਬਦਲਣ ਦੇ ਤਰੀਕੇ
|
6
|
+
ਇਹ ਆਮ/ਗਰਿਗੋਰੀਅਨ ਕਲੰਡਰ ਦੀਆਂ ਤਰੀਕਾਂ ਤੋਂ ਨਾਨਕਸ਼ਾਹੀ ਤੇ ਵਾਪਸ ਬਦਲਣ ਦੇ ਤਰੀਕੇ ਮੁਹੱਈਆ ਕਰਵਾਉਂਦਾ ਹੈ। ਤੁਸੀਂ ਇਸ ਨੂੰ ਕਿਸੇ ਵੀ ਰੂਬੀ ਪਰੋਗਰਾਮ ਵਿੱਚ ਨਾਨਕਸ਼ਾਹੀ ਤਰੀਕਾਂ ਵਰਤਣ ਲਈ ਵਰਤ ਸਕਦੇ ਹੋ।
|
6
7
|
|
7
8
|
Nanakshahi is a ruby gem for Nanakshahi Calendar based on the [original work](http://www.purewal.biz/Gurbani_and_Nanakshahi_Calendar.pdf) by [Pal Singh Purewal](http://purewal.biz/).
|
8
9
|
|
@@ -96,7 +97,7 @@ For a complete list of all the methods, check out [the documentation](https://ww
|
|
96
97
|
|
97
98
|
## Contributing
|
98
99
|
|
99
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
100
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/akaltakht/nanakshahi.
|
100
101
|
|
101
102
|
## License
|
102
103
|
|
data/lib/nanakshahi/version.rb
CHANGED
data/lib/nanakshahi.rb
CHANGED
@@ -1,6 +1,5 @@
|
|
1
1
|
require "date"
|
2
2
|
require "i18n"
|
3
|
-
I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
|
4
3
|
require "nanakshahi/version"
|
5
4
|
require "nanakshahi/grid"
|
6
5
|
require "nanakshahi/utils"
|
@@ -15,6 +14,8 @@ require "nanakshahi/gurpurab"
|
|
15
14
|
# @attr_reader [Integer] month Month part of Nanakshahi date object
|
16
15
|
# @attr_reader [Integer] day Day part of Nanakshahi date object
|
17
16
|
class Nanakshahi
|
17
|
+
I18n.load_path << Dir[File.expand_path("config/locales") + "/*.yml"]
|
18
|
+
I18n.available_locales = [:en, :pa]
|
18
19
|
include Comparable
|
19
20
|
extend Utils
|
20
21
|
extend Grid
|
@@ -41,15 +42,7 @@ class Nanakshahi
|
|
41
42
|
#
|
42
43
|
# @return [Date] Converts nanakshahi into corresponding gregorian# as Date object
|
43
44
|
def to_gregorian
|
44
|
-
|
45
|
-
last_nday_of_gyear = 18 # ੧੮
|
46
|
-
|
47
|
-
if month <= last_nmonth_of_gyear && day <= last_nday_of_gyear
|
48
|
-
gyear = year + 1468
|
49
|
-
else
|
50
|
-
gyear = year + 1469
|
51
|
-
end
|
52
|
-
|
45
|
+
gyear = year + 1468
|
53
46
|
nanakshahi_months = self.class.date_grid(gyear)
|
54
47
|
nanakshahi_months[month - 1][day - 1]
|
55
48
|
end
|
data/nanakshahi.gemspec
CHANGED
@@ -23,8 +23,8 @@ Gem::Specification.new do |spec|
|
|
23
23
|
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
24
24
|
spec.require_paths = ["lib"]
|
25
25
|
|
26
|
-
spec.add_development_dependency "bundler", "~> 1
|
27
|
-
spec.add_development_dependency "rake", "~>
|
28
|
-
spec.add_development_dependency "minitest", "~> 5.
|
29
|
-
spec.add_runtime_dependency "i18n", "~> 1.
|
26
|
+
spec.add_development_dependency "bundler", "~> 2.1"
|
27
|
+
spec.add_development_dependency "rake", "~> 13.0"
|
28
|
+
spec.add_development_dependency "minitest", "~> 5.14"
|
29
|
+
spec.add_runtime_dependency "i18n", "~> 1.8", ">= 1.8.1"
|
30
30
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: nanakshahi
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1
|
4
|
+
version: 0.2.0.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arvinder Singh
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -16,62 +16,62 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '1
|
19
|
+
version: '2.1'
|
20
20
|
type: :development
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: '1
|
26
|
+
version: '2.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: rake
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
30
30
|
requirements:
|
31
31
|
- - "~>"
|
32
32
|
- !ruby/object:Gem::Version
|
33
|
-
version: '
|
33
|
+
version: '13.0'
|
34
34
|
type: :development
|
35
35
|
prerelease: false
|
36
36
|
version_requirements: !ruby/object:Gem::Requirement
|
37
37
|
requirements:
|
38
38
|
- - "~>"
|
39
39
|
- !ruby/object:Gem::Version
|
40
|
-
version: '
|
40
|
+
version: '13.0'
|
41
41
|
- !ruby/object:Gem::Dependency
|
42
42
|
name: minitest
|
43
43
|
requirement: !ruby/object:Gem::Requirement
|
44
44
|
requirements:
|
45
45
|
- - "~>"
|
46
46
|
- !ruby/object:Gem::Version
|
47
|
-
version: '5.
|
47
|
+
version: '5.14'
|
48
48
|
type: :development
|
49
49
|
prerelease: false
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
51
51
|
requirements:
|
52
52
|
- - "~>"
|
53
53
|
- !ruby/object:Gem::Version
|
54
|
-
version: '5.
|
54
|
+
version: '5.14'
|
55
55
|
- !ruby/object:Gem::Dependency
|
56
56
|
name: i18n
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
58
58
|
requirements:
|
59
59
|
- - "~>"
|
60
60
|
- !ruby/object:Gem::Version
|
61
|
-
version: '1.
|
61
|
+
version: '1.8'
|
62
62
|
- - ">="
|
63
63
|
- !ruby/object:Gem::Version
|
64
|
-
version: 1.
|
64
|
+
version: 1.8.1
|
65
65
|
type: :runtime
|
66
66
|
prerelease: false
|
67
67
|
version_requirements: !ruby/object:Gem::Requirement
|
68
68
|
requirements:
|
69
69
|
- - "~>"
|
70
70
|
- !ruby/object:Gem::Version
|
71
|
-
version: '1.
|
71
|
+
version: '1.8'
|
72
72
|
- - ">="
|
73
73
|
- !ruby/object:Gem::Version
|
74
|
-
version: 1.
|
74
|
+
version: 1.8.1
|
75
75
|
description: Implementation of original nanakshahi calendar developed by Pal Singh
|
76
76
|
Purewal
|
77
77
|
email:
|
@@ -80,9 +80,11 @@ executables: []
|
|
80
80
|
extensions: []
|
81
81
|
extra_rdoc_files: []
|
82
82
|
files:
|
83
|
+
- ".github/workflows/gempush.yml"
|
83
84
|
- ".gitignore"
|
84
85
|
- ".gitlab-ci.yml"
|
85
86
|
- ".travis.yml"
|
87
|
+
- CHANGELOG.md
|
86
88
|
- Gemfile
|
87
89
|
- Gemfile.lock
|
88
90
|
- LICENSE.txt
|
@@ -118,8 +120,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
118
120
|
- !ruby/object:Gem::Version
|
119
121
|
version: '0'
|
120
122
|
requirements: []
|
121
|
-
|
122
|
-
rubygems_version: 2.7.8
|
123
|
+
rubygems_version: 3.1.6
|
123
124
|
signing_key:
|
124
125
|
specification_version: 4
|
125
126
|
summary: Nanakshahi calendar by Pal Singh Purewal
|