vakit 0.1.2 → 0.1.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/README.md +1 -2
- data/lib/vakit.rb +1 -1
- data/lib/vakit/connect.rb +4 -5
- data/lib/vakit/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 30d2c8850299007a34d50a8343c37b7284473b86
|
4
|
+
data.tar.gz: 8c983959fc5db11fd2236f8b7b60c0a7ffab4dd4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fc28694595181eb0b6831ba9d870f0f18817d5840dfc5f0cf70785528cea6f9ee7388336ee36014d8929bab1dcf23c1268092766a9af4305b534e197573d56b8
|
7
|
+
data.tar.gz: c27cceba3e945c6dfabb19bcb0183dd2457696dd6636fa4175655e550cdda484f411087e5abc84fd4e33c8896e8a089c837850f920ffc4129fa2f21a21efb072
|
data/README.md
CHANGED
@@ -1,5 +1,4 @@
|
|
1
|
-
!https://badge.fury.io/rb/vakit.png
|
2
|
-
|
1
|
+
[![Gem Version](https://badge.fury.io/rb/vakit.png)](http://badge.fury.io/rb/vakit)
|
3
2
|
# Vakit
|
4
3
|
Vakit is a small tool which fetches prayer times for Turkey from www.samanyoluhaber.com and persists data in a Rails way. I plan to extend its capabilities to serve global prayer times for all nations.
|
5
4
|
|
data/lib/vakit.rb
CHANGED
data/lib/vakit/connect.rb
CHANGED
@@ -5,8 +5,8 @@ class Connect
|
|
5
5
|
end
|
6
6
|
|
7
7
|
def self.shaber
|
8
|
-
doc
|
9
|
-
x = doc.css('#hnmzT')
|
8
|
+
@doc ||= Nokogiri::HTML(open('http://www.samanyoluhaber.com/'))
|
9
|
+
x = @doc.css('#hnmzT')
|
10
10
|
|
11
11
|
times = []
|
12
12
|
x.each do |vakit|
|
@@ -14,11 +14,10 @@ class Connect
|
|
14
14
|
data_add = data.slice(0..data.length-2)
|
15
15
|
times.push(data_add)
|
16
16
|
end
|
17
|
-
times
|
18
17
|
vakit = {
|
19
18
|
|
20
|
-
imsak: times[0],
|
21
|
-
sabah: times[1],
|
19
|
+
imsak: "0"+times[0],
|
20
|
+
sabah: "0"+times[1],
|
22
21
|
oglen: times[2],
|
23
22
|
ikindi: times[3],
|
24
23
|
aksam: times[4],
|
data/lib/vakit/version.rb
CHANGED