infostrada 0.1.5 → 0.1.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 27dc57d05a8dda8028e5277f40f37c3c54abb4a2
4
- data.tar.gz: f270a70f2c00f227506b467f0944138c0e569041
3
+ metadata.gz: d79a8bcf5c2ab67f9fe7998508270fba23dee9c8
4
+ data.tar.gz: 8ddff3986c64c29a170f9421c9e6e6f603fcb2c9
5
5
  SHA512:
6
- metadata.gz: 2081e65cd8379bd3d0f00acb2c6951c296e51221f9b8ca22e9d390e88b79997138d160931749040c3dcdce07c092b7b1c6f1de340aa9e41fec980fd09cd42ae4
7
- data.tar.gz: f03d4a93953f6a623d7f0122ca8addce70eeeefac0ab87da45df08bc5b6ffe3ca7e577cf10396f20f25aa7683f65cf0bfa91045c868d1c1048f9a2c5c115515f
6
+ metadata.gz: cc2b7440ea74ea185293bad6debd6a697341926fe7956c9562da94bc07bb4a66ff162ad0080a56b0c653151a94e0ab007c4be6f6360bb7468f93f3249cc41fff
7
+ data.tar.gz: 3e066c351a0a95db10ad6e91d7010514a2fe43fdf42d91900b874ad972d22d2ca74a7fa813c80048193cca27c91d7af2ca7b99517a8dfa93dbb9a460e970ee17
data/infostrada.gemspec CHANGED
@@ -26,6 +26,6 @@ Gem::Specification.new do |spec|
26
26
 
27
27
  spec.add_dependency 'httparty', '~> 0.13', '>= 0.13.0'
28
28
  spec.add_dependency 'colored', '~> 1.2'
29
- spec.add_dependency 'tzinfo', '~> 0.3', '>= 0.3.37'
29
+ spec.add_dependency 'tzinfo', '>= 1.1.0'
30
30
  spec.add_dependency 'eventmachine', '~> 1.0', '>= 1.0.3'
31
31
  end
@@ -50,7 +50,7 @@ module Infostrada
50
50
  end
51
51
 
52
52
  def self.get_latest
53
- updated_endpoints = since(last_update || api_time(Time.now))
53
+ since last_update || api_time(Time.now)
54
54
  end
55
55
 
56
56
  def self.since(date)
@@ -1,4 +1,6 @@
1
1
  class String
2
+ # This is a version of the method stolen from railties and it converts 'Text-LikeThis' to
3
+ # 'text_like_this'.
2
4
  def snake_case
3
5
  result = self.gsub(/::/, '/')
4
6
  result.gsub!(/([A-Z]+)([A-Z][a-z])/,'\1_\2')
@@ -18,7 +18,7 @@ module Infostrada
18
18
  attr_accessor :stadium_id, :stadium_name, :goals, :match_status, :finished, :awarded
19
19
  attr_accessor :postponed, :referee, :spectators, :leg, :knockout_phase, :first_leg_score
20
20
  attr_accessor :aggregate_winner_id, :current_period_started_at, :status, :started_at, :started
21
- attr_accessor :edition
21
+ attr_accessor :edition, :time_unknown, :date_unknown
22
22
 
23
23
  # Check if the live score, live goals and live lineups are already available
24
24
  attr_accessor :live, :live_score, :live_goals, :live_lineup
@@ -59,8 +59,8 @@ module Infostrada
59
59
  # day, n_MatchStatusCode is set to 512 (=Abandoned).
60
60
  attr_accessor :status_code
61
61
 
62
+ def_delegator :@phase, :id, :phase_id
62
63
  def_delegator :@referee, :name, :referee_name
63
- def_delegator :@phase, :name, :phase_name
64
64
  def_delegator :@goals, :away_goals, :away_goals
65
65
  def_delegator :@goals, :home_goals, :home_goals
66
66
  def_delegator :@edition, :id, :edition_id
@@ -81,7 +81,7 @@ module Infostrada
81
81
  matches << Match.new(match_hash)
82
82
  end
83
83
 
84
- matches.size > 1 ? matches : matches.first
84
+ matches
85
85
  end
86
86
 
87
87
  def self.get_match_list(options)
@@ -99,9 +99,11 @@ module Infostrada
99
99
 
100
100
  def initialize(hash)
101
101
  @id = hash['n_MatchID']
102
- @date = Formatter.format_date(hash['d_DateUTC'])
102
+ @date = Formatter.format_date(hash['d_Date'])
103
103
  @rescheduled = hash['b_RescheduledToBeResumed']
104
104
  @round = hash['n_RoundNr']
105
+ @time_unknown = hash['b_TimeUnknown']
106
+ @date_unknown = hash['b_DateUnknown']
105
107
 
106
108
  @aggregate_winner_id = hash['n_WinnerOnAggregateTeamID']
107
109
  @current_period_started_at = Formatter.format_date(hash['d_CurrentPeriodStartTime'])
@@ -1,3 +1,3 @@
1
1
  module Infostrada
2
- VERSION = '0.1.5'
2
+ VERSION = '0.1.6'
3
3
  end
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.5
4
+ version: 0.1.6
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-04-10 00:00:00.000000000 Z
11
+ date: 2014-04-22 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -142,22 +142,16 @@ dependencies:
142
142
  name: tzinfo
143
143
  requirement: !ruby/object:Gem::Requirement
144
144
  requirements:
145
- - - "~>"
146
- - !ruby/object:Gem::Version
147
- version: '0.3'
148
145
  - - ">="
149
146
  - !ruby/object:Gem::Version
150
- version: 0.3.37
147
+ version: 1.1.0
151
148
  type: :runtime
152
149
  prerelease: false
153
150
  version_requirements: !ruby/object:Gem::Requirement
154
151
  requirements:
155
- - - "~>"
156
- - !ruby/object:Gem::Version
157
- version: '0.3'
158
152
  - - ">="
159
153
  - !ruby/object:Gem::Version
160
- version: 0.3.37
154
+ version: 1.1.0
161
155
  - !ruby/object:Gem::Dependency
162
156
  name: eventmachine
163
157
  requirement: !ruby/object:Gem::Requirement