prayer_times 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.
- checksums.yaml +4 -4
- data/.travis.yml +7 -0
- data/README.md +2 -2
- data/lib/prayer_times/calculation.rb +1 -0
- data/lib/prayer_times/calculation_method.rb +1 -0
- data/lib/prayer_times/calculation_methods.rb +1 -0
- data/lib/prayer_times/calculator.rb +1 -0
- data/lib/prayer_times/constants.rb +1 -0
- data/lib/prayer_times/math_helpers.rb +1 -0
- data/lib/prayer_times/setters.rb +1 -0
- data/lib/prayer_times/version.rb +2 -1
- data/lib/prayer_times.rb +1 -0
- data/prayer_times.gemspec +2 -0
- data/test/lib/prayer_times/calculation_method_test.rb +10 -9
- data/test/lib/prayer_times/calculation_methods_test.rb +1 -0
- data/test/lib/prayer_times/calculation_test.rb +1 -0
- data/test/lib/prayer_times/calculator_test.rb +1 -0
- data/test/lib/prayer_times/math_helpers_test.rb +1 -0
- data/test/lib/prayer_times/prayer_times_test.rb +1 -0
- data/test/lib/prayer_times/setters_test.rb +1 -0
- data/test/lib/prayer_times/version_test.rb +1 -0
- data/test/test_helper.rb +1 -1
- metadata +17 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: dc0996688ff5201c4e183a45361a1a4f5beb66d1
|
|
4
|
+
data.tar.gz: 086cf6bc3b0c3ca73152ae665c67d0a2545eb45e
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 6bbf9b0ab8fa8ce1e41a0b9bbef676b9165bf51c341de57882acee751c68f1675093609336086215b3da02f24ca5b7131f26f9467611ad6dfc491d7f6035f59d
|
|
7
|
+
data.tar.gz: d2815e18826c25882274f407532b2aa0e2e684b59898f37b2484d6c944466ab1bb8216410c26ee4a1c4896e7cf2738af558d1d067321af41f0e7bad2a518a38a
|
data/.travis.yml
ADDED
data/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# PrayerTimes
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
Flexible and configurable calculation for Muslim prayers times.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -69,7 +69,7 @@ pt = PrayerTimes.new("Makkah", options)
|
|
|
69
69
|
|
|
70
70
|
## Help
|
|
71
71
|
|
|
72
|
-
|
|
72
|
+
Your help is appreciated, specially in adjusting the calculation methods and making them more accurate.
|
|
73
73
|
Your contribution is welcome.
|
|
74
74
|
|
|
75
75
|
## Contributing
|
data/lib/prayer_times/setters.rb
CHANGED
data/lib/prayer_times/version.rb
CHANGED
data/lib/prayer_times.rb
CHANGED
data/prayer_times.gemspec
CHANGED
|
@@ -1,12 +1,13 @@
|
|
|
1
|
+
# encoding: UTF-8
|
|
1
2
|
require_relative '../../test_helper'
|
|
2
3
|
|
|
3
4
|
describe PrayerTimes::CalculationMethod do
|
|
4
5
|
|
|
5
|
-
let(:
|
|
6
|
+
let(:method_name){"Medina"}
|
|
6
7
|
let(:description){"Medina testing methods"}
|
|
7
8
|
|
|
8
9
|
describe "Object" do
|
|
9
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
10
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description,{})}
|
|
10
11
|
it {subject.must_respond_to :description}
|
|
11
12
|
it {subject.must_respond_to :description=}
|
|
12
13
|
it {subject.must_respond_to :settings}
|
|
@@ -16,14 +17,14 @@ describe PrayerTimes::CalculationMethod do
|
|
|
16
17
|
end
|
|
17
18
|
|
|
18
19
|
describe "#initialize" do
|
|
19
|
-
context "when
|
|
20
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
21
|
-
it {subject.name.must_equal(
|
|
20
|
+
context "when method_name and description are provided" do
|
|
21
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description)}
|
|
22
|
+
it {subject.name.must_equal(method_name)}
|
|
22
23
|
it {subject.description.must_equal(description)}
|
|
23
24
|
end
|
|
24
25
|
|
|
25
26
|
context "when settings are not provided" do
|
|
26
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
27
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description, {})}
|
|
27
28
|
it {subject.settings.must_equal(PrayerTimes::CalculationMethod.default_settings)}
|
|
28
29
|
end
|
|
29
30
|
|
|
@@ -33,12 +34,12 @@ describe PrayerTimes::CalculationMethod do
|
|
|
33
34
|
asr: 'Hanafi',
|
|
34
35
|
isha: 18
|
|
35
36
|
}}
|
|
36
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
37
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description,opts)}
|
|
37
38
|
it {subject.settings.must_equal(PrayerTimes::CalculationMethod.default_settings.merge opts)}
|
|
38
39
|
end
|
|
39
40
|
|
|
40
41
|
context "when offsets are not provided" do
|
|
41
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
42
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description, {}, {})}
|
|
42
43
|
it {subject.offsets.must_equal(PrayerTimes::Constants.times_offsets)}
|
|
43
44
|
end
|
|
44
45
|
|
|
@@ -48,7 +49,7 @@ describe PrayerTimes::CalculationMethod do
|
|
|
48
49
|
asr: -1,
|
|
49
50
|
isha: 6
|
|
50
51
|
}}
|
|
51
|
-
subject{PrayerTimes::CalculationMethod.new(
|
|
52
|
+
subject{PrayerTimes::CalculationMethod.new(method_name, description,{},opts)}
|
|
52
53
|
it {subject.offsets.must_equal(PrayerTimes::Constants.times_offsets.merge opts)}
|
|
53
54
|
end
|
|
54
55
|
|
data/test/test_helper.rb
CHANGED
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: prayer_times
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.1.
|
|
4
|
+
version: 0.1.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Khaled alHabache
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2013-12-
|
|
11
|
+
date: 2013-12-19 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -38,6 +38,20 @@ dependencies:
|
|
|
38
38
|
- - '>='
|
|
39
39
|
- !ruby/object:Gem::Version
|
|
40
40
|
version: '0'
|
|
41
|
+
- !ruby/object:Gem::Dependency
|
|
42
|
+
name: minitest
|
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
|
44
|
+
requirements:
|
|
45
|
+
- - '>='
|
|
46
|
+
- !ruby/object:Gem::Version
|
|
47
|
+
version: '0'
|
|
48
|
+
type: :development
|
|
49
|
+
prerelease: false
|
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
|
51
|
+
requirements:
|
|
52
|
+
- - '>='
|
|
53
|
+
- !ruby/object:Gem::Version
|
|
54
|
+
version: '0'
|
|
41
55
|
description: Calculates Muslim prayers times in given settings
|
|
42
56
|
email:
|
|
43
57
|
- khellls@gmail.com
|
|
@@ -46,6 +60,7 @@ extensions: []
|
|
|
46
60
|
extra_rdoc_files: []
|
|
47
61
|
files:
|
|
48
62
|
- .gitignore
|
|
63
|
+
- .travis.yml
|
|
49
64
|
- Gemfile
|
|
50
65
|
- LICENSE.txt
|
|
51
66
|
- README.md
|