infostrada 0.1.17 → 0.1.18
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +8 -8
- data/lib/infostrada/call_refresh.rb +9 -13
- data/lib/infostrada/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,15 +1,15 @@
|
|
1
1
|
---
|
2
2
|
!binary "U0hBMQ==":
|
3
3
|
metadata.gz: !binary |-
|
4
|
-
|
4
|
+
Y2YyNTBlOGMwM2Y4NDQ0M2MyYzdjYzRiNzVhOGM3NmEzN2YwNzRhNA==
|
5
5
|
data.tar.gz: !binary |-
|
6
|
-
|
6
|
+
NjdjOTBmZGVmMzc1NTk1ZWNkMzY2NWVjODkxMDFlMWVlOTJkN2ZhZQ==
|
7
7
|
SHA512:
|
8
8
|
metadata.gz: !binary |-
|
9
|
-
|
10
|
-
|
11
|
-
|
9
|
+
ZWJjM2QzNzE4ZWVmMzcyYjlkNGZkYWYzYWNhZTA5Y2JhMmM5YjRkNmVkODMz
|
10
|
+
M2UzNjEwMjk2MTdhYWNiNTZhYTYwZDJhOTE0MzdhMjM0NDMyYmVhYjEwODY3
|
11
|
+
MzA2NGVmZTg5MTEyNmFiODlkMzA4NDM1YmMzOTMxZGUxZDM2OWE=
|
12
12
|
data.tar.gz: !binary |-
|
13
|
-
|
14
|
-
|
15
|
-
|
13
|
+
NWI1OGU0MjAwY2IxYTc2M2U4YTBhMjc0Mzk4MzNlZTNlYjUwOTViNzMxZDYz
|
14
|
+
NTdjMGJmYTdjNGI2MTA0YmNjY2FlMDhkNmIwMGVkODc1MmNkMTYyMGViOTJk
|
15
|
+
MmZjNDA0ZTk5ZmJlNzFmYWRmMmE0MzAxZjg5ZTYxY2QwMGM3YzU=
|
@@ -42,7 +42,10 @@ module Infostrada
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def self.last_update=(date)
|
45
|
-
store.transaction {
|
45
|
+
store.transaction {
|
46
|
+
store[:last_update] = date
|
47
|
+
store.commit
|
48
|
+
}
|
46
49
|
end
|
47
50
|
|
48
51
|
def self.api_time(date)
|
@@ -51,27 +54,20 @@ module Infostrada
|
|
51
54
|
end
|
52
55
|
|
53
56
|
def self.get_latest
|
54
|
-
since
|
57
|
+
since(last_update || api_time(Time.now))
|
55
58
|
end
|
56
59
|
|
57
60
|
def self.since(date)
|
58
|
-
|
61
|
+
self.last_update = date
|
59
62
|
|
60
|
-
|
61
|
-
date = "#{Time.now.strftime('%F')}T00:00:00"
|
63
|
+
date_str = date.strftime(DATE_FORMAT)
|
62
64
|
|
63
|
-
|
65
|
+
list = get!(URL, query: { from: date_str, outputType: OUTPUT_TYPE, module: 'football' })
|
64
66
|
|
65
|
-
list
|
66
|
-
|
67
|
-
endpoints = []
|
68
|
-
list.each do |hash|
|
67
|
+
list.each_with_object([]) do |hash, endpoints|
|
69
68
|
lang = hash['c_QueryString'].scan(/languagecode=(\d+)/).flatten.first.to_i
|
70
|
-
|
71
69
|
endpoints << Endpoint.new(hash) if LANGUAGE_CODES.include?(lang)
|
72
70
|
end
|
73
|
-
|
74
|
-
endpoints
|
75
71
|
end
|
76
72
|
end
|
77
73
|
end
|
data/lib/infostrada/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: infostrada
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ricardo Otero
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-06 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|