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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 88ba28e5dfcc4e57a3cb76df12221a046202ff41
4
- data.tar.gz: d8d1255686349c190550f835fbd8d25e4f610344
3
+ metadata.gz: dc0996688ff5201c4e183a45361a1a4f5beb66d1
4
+ data.tar.gz: 086cf6bc3b0c3ca73152ae665c67d0a2545eb45e
5
5
  SHA512:
6
- metadata.gz: eed7fbbc8d954955ad284590a9e07f1784cbf41f1296185fc036fa331e1be13976d37d8110321d5af7e93a44fa7269b275689286c8c7a2ce7e7953912be33163
7
- data.tar.gz: cf76f062cb054529ce1b40daab520bf555209ae643b712cb5ec4cf701c9d5b1d34c8e3be6a110e09ec5ff314619d2368d5e044381a893abc853a121cbdcbd311
6
+ metadata.gz: 6bbf9b0ab8fa8ce1e41a0b9bbef676b9165bf51c341de57882acee751c68f1675093609336086215b3da02f24ca5b7131f26f9467611ad6dfc491d7f6035f59d
7
+ data.tar.gz: d2815e18826c25882274f407532b2aa0e2e684b59898f37b2484d6c944466ab1bb8216410c26ee4a1c4896e7cf2738af558d1d067321af41f0e7bad2a518a38a
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ language: ruby
2
+ rvm:
3
+ - 1.9.3
4
+ - 1.9.2
5
+ - jruby-19mode
6
+ - ruby-head
7
+ - jruby-head
data/README.md CHANGED
@@ -1,6 +1,6 @@
1
1
  # PrayerTimes
2
2
 
3
- Flexiable and configurable calculation for Muslim prayers times.
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
- Youre help is appreciated, specially in adjusting the calculation methods and making them more accurate.
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
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # Calculation class used to do the times calculation in given settings
3
4
  class Calculation
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # Calculation method instances and logic is encapsulated here
3
4
  class CalculationMethod
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # Helper class to initiate a list of calculation methods and add/update others
3
4
  class CalculationMethods
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # This is main interface class
3
4
  class Calculator
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # General constants. Don't try to change their values.
3
4
  # You have flexible general and instance configurations.
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # Math helpers module
3
4
  module MathHelpers
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # General setters
3
4
  module Setters
@@ -1,4 +1,5 @@
1
+ # encoding: UTF-8
1
2
  module PrayerTimes
2
3
  # Determines the version of this gem
3
- VERSION = "0.1.0"
4
+ VERSION = "0.1.1"
4
5
  end
data/lib/prayer_times.rb CHANGED
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require 'date'
2
3
  require 'forwardable'
3
4
  require_relative "prayer_times/version"
data/prayer_times.gemspec CHANGED
@@ -20,4 +20,6 @@ Gem::Specification.new do |spec|
20
20
 
21
21
  spec.add_development_dependency "bundler", "~> 1.3"
22
22
  spec.add_development_dependency "rake"
23
+ spec.add_development_dependency "minitest"
24
+
23
25
  end
@@ -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(:name){"Medina"}
6
+ let(:method_name){"Medina"}
6
7
  let(:description){"Medina testing methods"}
7
8
 
8
9
  describe "Object" do
9
- subject{PrayerTimes::CalculationMethod.new(name, description,{})}
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 name and description are provided" do
20
- subject{PrayerTimes::CalculationMethod.new(name, description)}
21
- it {subject.name.must_equal(name)}
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(name, description, {})}
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(name, description,opts)}
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(name, description, {}, {})}
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(name, description,{},opts)}
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
 
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes::CalculationMethods do
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  # Those results are tested against numbers from the js code
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes::Calculator do
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes::MathHelpers do
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes do
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes::Setters do
@@ -1,3 +1,4 @@
1
+ # encoding: UTF-8
1
2
  require_relative '../../test_helper'
2
3
 
3
4
  describe PrayerTimes do
data/test/test_helper.rb CHANGED
@@ -1,7 +1,7 @@
1
+ # encoding: UTF-8
1
2
  require 'minitest/autorun'
2
3
  require 'minitest/pride'
3
4
  require File.expand_path('../../lib/prayer_times.rb', __FILE__)
4
-
5
5
  class MiniTest::Spec
6
6
  class << self
7
7
  alias :context :describe
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.0
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-17 00:00:00.000000000 Z
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