infostrada 0.1.26 → 0.1.27

Sign up to get free protection for your applications and to get access to all the features.
Files changed (76) hide show
  1. checksums.yaml +5 -13
  2. data/.rspec +2 -0
  3. data/.rubocop.yml +2 -0
  4. data/.travis.yml +6 -0
  5. data/README.md +2 -0
  6. data/infostrada.gemspec +4 -1
  7. data/lib/infostrada.rb +6 -12
  8. data/lib/infostrada/call_refresh.rb +2 -1
  9. data/lib/infostrada/competition.rb +2 -1
  10. data/lib/infostrada/core_ext/hash.rb +14 -0
  11. data/lib/infostrada/core_ext/string.rb +19 -2
  12. data/lib/infostrada/match.rb +2 -2
  13. data/lib/infostrada/match_event.rb +1 -1
  14. data/lib/infostrada/mock.rb +76 -0
  15. data/lib/infostrada/nation.rb +2 -2
  16. data/lib/infostrada/person_info.rb +12 -12
  17. data/lib/infostrada/phase.rb +11 -13
  18. data/lib/infostrada/player.rb +11 -11
  19. data/lib/infostrada/squad.rb +3 -6
  20. data/lib/infostrada/team.rb +4 -4
  21. data/lib/infostrada/team_info.rb +1 -1
  22. data/lib/infostrada/team_request.rb +2 -5
  23. data/lib/infostrada/version.rb +1 -1
  24. data/spec/base_request_spec.rb +19 -0
  25. data/spec/competition_spec.rb +67 -0
  26. data/spec/edition_request_spec.rb +20 -0
  27. data/spec/edition_spec.rb +111 -0
  28. data/spec/endpoint_spec.rb +62 -0
  29. data/spec/formatter_spec.rb +12 -0
  30. data/spec/helpers/json_helper.rb +41 -0
  31. data/spec/json/competition.json +55 -0
  32. data/spec/json/edition.json +61 -0
  33. data/spec/json/edition_request.json +242 -0
  34. data/spec/json/endpoint.json +46 -0
  35. data/spec/json/match.json +945 -0
  36. data/spec/json/match_event.json +187 -0
  37. data/spec/json/match_event_list.json +411 -0
  38. data/spec/json/nation.json +302 -0
  39. data/spec/json/person_info.json +52 -0
  40. data/spec/json/phase.json +158 -0
  41. data/spec/json/player.json +93 -0
  42. data/spec/json/referee.json +184 -0
  43. data/spec/json/sample_responses/all_editions.json +243 -0
  44. data/spec/json/sample_responses/competition_edition_league_21594_serie_a.json +4 -0
  45. data/spec/json/sample_responses/competition_match_days_league_21594_serie_a.json +473 -0
  46. data/spec/json/sample_responses/competition_match_list_league_21594_serie_a.json +25465 -0
  47. data/spec/json/sample_responses/competition_phases_cup_21204_capital_one_cup.json +138 -0
  48. data/spec/json/sample_responses/competition_phases_league_21594_serie_a.json +24 -0
  49. data/spec/json/sample_responses/competition_table_phase_114165_serie_a_2015.json +585 -0
  50. data/spec/json/sample_responses/competition_teams_league_21594.json +165 -0
  51. data/spec/json/sample_responses/get_api_call_refresh_module.json +65 -0
  52. data/spec/json/sample_responses/match_events_1788734_real_atletico_final_champions.json +7960 -0
  53. data/spec/json/sample_responses/match_info_1788734_real_atletico_final_champions.json +96 -0
  54. data/spec/json/sample_responses/match_info_upcoming_1968820_serie_a.json +96 -0
  55. data/spec/json/sample_responses/person_info_611005_bale.json +55 -0
  56. data/spec/json/sample_responses/squad_100163_on_edition_21590.json +1355 -0
  57. data/spec/json/sample_responses/team_info_100163.json +28 -0
  58. data/spec/json/sample_responses/template_dummy_response.json +4 -0
  59. data/spec/json/squad.json +514 -0
  60. data/spec/json/team.json +10 -0
  61. data/spec/json/team_info.json +25 -0
  62. data/spec/json/team_request.json +68 -0
  63. data/spec/match_event_list_spec.rb +21 -0
  64. data/spec/match_event_spec.rb +159 -0
  65. data/spec/match_spec.rb +430 -0
  66. data/spec/nation_spec.rb +179 -0
  67. data/spec/person_info_spec.rb +69 -0
  68. data/spec/phase_spec.rb +183 -0
  69. data/spec/player_spec.rb +112 -0
  70. data/spec/referee_spec.rb +71 -0
  71. data/spec/spec_helper.rb +117 -0
  72. data/spec/squad_spec.rb +25 -0
  73. data/spec/team_info_spec.rb +77 -0
  74. data/spec/team_request_spec.rb +24 -0
  75. data/spec/team_spec.rb +76 -0
  76. metadata +213 -43
@@ -0,0 +1,71 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Infostrada::Referee do
4
+ context 'Complete Referee' do
5
+ let(:referee_json) { JSONHelper::Referee.get(:complete_referee_match) }
6
+ let(:referee) { Infostrada::Referee.new(referee_json.clone) }
7
+ let(:referee_serialized) { referee.as_json }
8
+
9
+ describe '#initialize' do
10
+ it 'has id' do
11
+ expect(referee.id).to be(referee_json['n_RefereeID'])
12
+ end
13
+
14
+ it 'has name' do
15
+ expect(referee.name).to be(referee_json['c_Referee'])
16
+ end
17
+
18
+ it 'has nation_id' do
19
+ expect(referee.nation.id).not_to be_nil
20
+ end
21
+ end
22
+
23
+ describe '#from_json' do
24
+ it 'has id' do
25
+ expect(referee.id).to be(referee_serialized['id'])
26
+ end
27
+
28
+ it 'has name' do
29
+ expect(referee.name).to be(referee_serialized['name'])
30
+ end
31
+
32
+ it 'has nation_id' do
33
+ expect(referee.nation.id).to be(referee_serialized['nation']['id'])
34
+ end
35
+ end
36
+ end
37
+
38
+ context 'Without nation Referee' do
39
+ let(:referee_json) { JSONHelper::Referee.get(:without_nation_referee_match) }
40
+ let(:referee) { Infostrada::Referee.new(referee_json.clone) }
41
+ let(:referee_serialized) { referee.as_json }
42
+
43
+ describe '#initialize' do
44
+ it 'has id' do
45
+ expect(referee.id).to be(referee_json['n_RefereeID'])
46
+ end
47
+
48
+ it 'has name' do
49
+ expect(referee.name).to be(referee_json['c_Referee'])
50
+ end
51
+
52
+ it 'not_has nation_id' do
53
+ expect(referee.nation.id).to be_nil
54
+ end
55
+ end
56
+
57
+ describe '#from_json' do
58
+ it 'has id' do
59
+ expect(referee.id).to be(referee_serialized['id'])
60
+ end
61
+
62
+ it 'has name' do
63
+ expect(referee.name).to be(referee_serialized['name'])
64
+ end
65
+
66
+ it 'not_has nation_id' do
67
+ expect(referee.nation.id).to be(referee_serialized['nation']['id'])
68
+ end
69
+ end
70
+ end
71
+ end
@@ -0,0 +1,117 @@
1
+ # This file was generated by the `rspec --init` command. Conventionally, all
2
+ # specs live under a `spec` directory, which RSpec adds to the `$LOAD_PATH`.
3
+ # The generated `.rspec` file contains `--require spec_helper` which will cause
4
+ # this file to always be loaded, without a need to explicitly require it in any
5
+ # files.
6
+ #
7
+ # Given that it is always loaded, you are encouraged to keep this file as
8
+ # light-weight as possible. Requiring heavyweight dependencies from this file
9
+ # will add to the boot time of your test suite on EVERY test run, even for an
10
+ # individual file that may not need all of that loaded. Instead, consider making
11
+ # a separate helper file that requires the additional dependencies and performs
12
+ # the additional setup, and require it from the spec files that actually need
13
+ # it.
14
+ #
15
+ # The `.rspec` file also contains a few flags that are not defaults but that
16
+ # users commonly want.
17
+ #
18
+ # See http://rubydoc.info/gems/rspec-core/RSpec/Core/Configuration
19
+ require 'bundler/setup'
20
+ Bundler.setup
21
+
22
+ require 'json'
23
+ require 'webmock/rspec'
24
+ require 'infostrada/core_ext/hash'
25
+ require 'infostrada'
26
+ require 'infostrada/team_info'
27
+ require 'infostrada/team_request'
28
+ require 'pry'
29
+ require 'helpers/json_helper'
30
+
31
+ INFOSTRADA_DOMAIN = 'http://USERNAME:PASSWORD@demo.api.infostradasports.com'
32
+
33
+ Infostrada.configure do |config|
34
+ config.username = 'USERNAME'
35
+ config.password = 'PASSWORD'
36
+ config.domain = INFOSTRADA_DOMAIN
37
+ end
38
+
39
+ RSpec.configure do |config|
40
+ # For json loading
41
+ config.include JSONHelper
42
+
43
+ config.before(:each) do
44
+ @base_url = "#{INFOSTRADA_DOMAIN}/svc/Football.svc/json"
45
+ @default_params = 'languageCode=2'
46
+ end
47
+
48
+ # rspec-expectations config goes here. You can use an alternate
49
+ # assertion/expectation library such as wrong or the stdlib/minitest
50
+ # assertions if you prefer.
51
+ config.expect_with :rspec do |expectations|
52
+ # This option will default to `true` in RSpec 4. It makes the `description`
53
+ # and `failure_message` of custom matchers include text for helper methods
54
+ # defined using `chain`, e.g.:
55
+ # be_bigger_than(2).and_smaller_than(4).description
56
+ # # => "be bigger than 2 and smaller than 4"
57
+ # ...rather than:
58
+ # # => "be bigger than 2"
59
+ expectations.include_chain_clauses_in_custom_matcher_descriptions = true
60
+ end
61
+
62
+ # rspec-mocks config goes here. You can use an alternate test double
63
+ # library (such as bogus or mocha) by changing the `mock_with` option here.
64
+ config.mock_with :rspec do |mocks|
65
+ # Prevents you from mocking or stubbing a method that does not exist on
66
+ # a real object. This is generally recommended, and will default to
67
+ # `true` in RSpec 4.
68
+ mocks.verify_partial_doubles = true
69
+ end
70
+
71
+ # The settings below are suggested to provide a good initial experience
72
+ # with RSpec, but feel free to customize to your heart's content.
73
+
74
+ # These two settings work together to allow you to limit a spec run
75
+ # to individual examples or groups you care about by tagging them with
76
+ # `:focus` metadata. When nothing is tagged with `:focus`, all examples
77
+ # get run.
78
+ config.filter_run :focus
79
+ config.run_all_when_everything_filtered = true
80
+
81
+ # Limits the available syntax to the non-monkey patched syntax that is
82
+ # recommended. For more details, see:
83
+ # - http://myronmars.to/n/dev-blog/2012/06/rspecs-new-expectation-syntax
84
+ # - http://teaisaweso.me/blog/2013/05/27/rspecs-new-message-expectation-syntax/
85
+ # config.disable_monkey_patching!
86
+
87
+ # This setting enables warnings. It's recommended, but in some cases may
88
+ # be too noisy due to issues in dependencies.
89
+ config.warnings = true
90
+
91
+ # Many RSpec users commonly either run the entire suite or an individual
92
+ # file, and it's useful to allow more verbose output when running an
93
+ # individual spec file.
94
+ # if config.files_to_run.one?
95
+ # # Use the documentation formatter for detailed output,
96
+ # # unless a formatter has already been configured
97
+ # # (e.g. via a command-line flag).
98
+ # config.default_formatter = 'doc'
99
+ # end
100
+
101
+ # Print the 10 slowest examples and example groups at the
102
+ # end of the spec run, to help surface which specs are running
103
+ # particularly slow.
104
+ # config.profile_examples = 10
105
+
106
+ # Run specs in random order to surface order dependencies. If you find an
107
+ # order dependency and want to debug it, you can fix the order by providing
108
+ # the seed, which is printed after each run.
109
+ # --seed 1234
110
+ config.order = :random
111
+
112
+ # Seed global randomization in this process using the `--seed` CLI option.
113
+ # Setting this allows you to use `--seed` to deterministically reproduce
114
+ # test failures related to randomization by passing the same `--seed` value
115
+ # as the one that triggered the failure.
116
+ Kernel.srand config.seed
117
+ end
@@ -0,0 +1,25 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Infostrada::Squad do
4
+ let(:list) { JSONHelper::Squad.get(:list) }
5
+ let(:squad) { Infostrada::Squad }
6
+ let(:player) { Infostrada::Player }
7
+ let(:team_id) { 100086 }
8
+ let(:edition_id) { 21594 }
9
+ let(:uri) do
10
+ "#{@base_url}/GetSquad?#{@default_params}&&editionid=#{edition_id}&teamid=#{team_id}"
11
+ end
12
+
13
+ before do
14
+ stub_request(:get, uri)
15
+ .to_return(status: 200, body: list.to_json)
16
+ end
17
+
18
+ describe '.where' do
19
+ it 'returns a list of players' do
20
+ squads = squad.where(edition_id: edition_id, team_id: team_id)
21
+ expect(squads.count).to eq(list.count)
22
+ expect(squads.first).to be_a(player)
23
+ end
24
+ end
25
+ end
@@ -0,0 +1,77 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Infostrada::TeamInfo do
4
+ let(:default) { JSONHelper::TeamInfo.get(:default) }
5
+ let(:team_info) { Infostrada::TeamInfo }
6
+ let(:team_id) { 100163 }
7
+ let(:ti) { team_info.new(default.clone) }
8
+ let(:uri) do
9
+ "#{@base_url}/GetTeamInfo?#{@default_params}&&teamid=#{team_id}"
10
+ end
11
+
12
+ before do
13
+ stub_request(:get, uri)
14
+ .to_return(status: 200, body: [default].to_json)
15
+ end
16
+
17
+ describe '.fetch' do
18
+ it 'returns team_info' do
19
+ fetched = team_info.fetch(team_id)
20
+ expect(fetched).to be_a(team_info)
21
+ end
22
+ end
23
+
24
+ describe '#initialize' do
25
+ it 'has official_name' do
26
+ expect(ti.official_name).to eq(default['c_OfficialName'])
27
+ end
28
+
29
+ it 'has official_short_name' do
30
+ expect(ti.official_short_name).to eq(default['c_OfficialNameSort'])
31
+ end
32
+
33
+ it 'has public_name' do
34
+ expect(ti.public_name).to eq(default['c_PublicName'])
35
+ end
36
+
37
+ it 'has public_short_name' do
38
+ expect(ti.public_short_name).to eq(default['c_PublicNameSort'])
39
+ end
40
+
41
+ it 'has nickname' do
42
+ expect(ti.nickname).to eq(default['c_Nickname'])
43
+ end
44
+
45
+ it 'has foundation_date' do
46
+ expect(ti.foundation_date).to eq(default['d_FoundationDate'])
47
+ end
48
+
49
+ it 'has official_stadium_name' do
50
+ expect(ti.official_stadium_name).to eq(default['c_StadiumOfficialName'])
51
+ end
52
+
53
+ it 'has stadium_name' do
54
+ expect(ti.stadium_name).to eq(default['c_Stadium'])
55
+ end
56
+
57
+ it 'has stadium_capacity' do
58
+ expect(ti.stadium_capacity).to eq(default['n_StadiumCapacity'])
59
+ end
60
+
61
+ it 'has url' do
62
+ expect(ti.url).to eq(default['c_URL'])
63
+ end
64
+
65
+ it 'has city' do
66
+ expect(ti.city).to eq(default['c_City'])
67
+ end
68
+
69
+ it 'has country' do
70
+ expect(ti.country).to eq(default['c_Country'])
71
+ end
72
+
73
+ it 'has country_short_name' do
74
+ expect(ti.country_short_name).to eq(default['c_CountryShort'])
75
+ end
76
+ end
77
+ end
@@ -0,0 +1,24 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Infostrada::TeamRequest do
4
+ let(:list) { JSONHelper::TeamRequest.get(:list) }
5
+ let(:team_request) { Infostrada::TeamRequest }
6
+ let(:edition_id) { 21_594 }
7
+ let(:uri) do
8
+ "#{@base_url}/GetTeamList?#{@default_params}&&editionid=#{edition_id}"
9
+ end
10
+
11
+ before do
12
+ stub_request(:get, uri)
13
+ .to_return(status: 200, body: list.to_json)
14
+ end
15
+
16
+ describe '.get_edition' do
17
+ it 'returns list of Teams' do
18
+ result = team_request.get_edition(edition_id)
19
+
20
+ expect(result.count).to eq(list.count)
21
+ expect(result.first).to be_a(Infostrada::Team)
22
+ end
23
+ end
24
+ end
data/spec/team_spec.rb ADDED
@@ -0,0 +1,76 @@
1
+ require 'spec_helper'
2
+
3
+ RSpec.describe Infostrada::Team do
4
+ let(:default) { JSONHelper::Team.get(:default) }
5
+ let(:team) { Infostrada::Team }
6
+ let(:t) { team.new(default.clone, '') }
7
+
8
+ describe '#initialize' do
9
+ it 'has id' do
10
+ expect(t.id).to eq(100163)
11
+ end
12
+
13
+ it 'has name' do
14
+ expect(t.name).to eq('Atlético-MG')
15
+ end
16
+
17
+ it 'has short_name' do
18
+ expect(t.short_name).to eq('ATM')
19
+ end
20
+
21
+ it 'has nation' do
22
+ expect(t.nation).not_to be_nil
23
+ end
24
+ end
25
+
26
+ describe '.from_json' do
27
+ let(:serialized) { t.as_json }
28
+ let(:from_json) { team.from_json(serialized, '') }
29
+
30
+ it 'has id' do
31
+ expect(from_json.id).to eq(100163)
32
+ end
33
+
34
+ it 'has name' do
35
+ expect(from_json.name).to eq('Atlético-MG')
36
+ end
37
+
38
+ it 'has short_name' do
39
+ expect(from_json.short_name).to eq('ATM')
40
+ end
41
+
42
+ it 'has nation' do
43
+ expect(from_json.nation).not_to be_nil
44
+ end
45
+ end
46
+
47
+ describe '.where' do
48
+ let(:edition_id) { 134 }
49
+
50
+ # Needs some fixes
51
+ # module NullTeamRequest
52
+ # class Infostrada::TeamRequest
53
+ # class << self
54
+ # attr_accessor :edition_id
55
+
56
+ # def get_edition(id)
57
+ # @edition_id = id
58
+ # true
59
+ # end
60
+ # end
61
+ # end
62
+ # end
63
+
64
+ # Mock = Struct.new(:edition_id) do
65
+ # include NullTeamRequest
66
+ # end
67
+
68
+ # it 'calls TeamRequest.get_edition' do
69
+ # team.send(:include, NullTeamRequest)
70
+
71
+ # team.where(edition_id: edition_id)
72
+
73
+ # expect(Mock::Infostrada::TeamRequest.edition_id).to eq(edition_id)
74
+ # end
75
+ end
76
+ end
metadata CHANGED
@@ -1,201 +1,261 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: infostrada
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.26
4
+ version: 0.1.27
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ricardo Otero
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-03-17 00:00:00.000000000 Z
11
+ date: 2015-06-02 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.5'
20
20
  type: :development
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.5'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: rake
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '10.2'
34
- - - ! '>='
34
+ - - ">="
35
35
  - !ruby/object:Gem::Version
36
36
  version: 10.2.2
37
37
  type: :development
38
38
  prerelease: false
39
39
  version_requirements: !ruby/object:Gem::Requirement
40
40
  requirements:
41
- - - ~>
41
+ - - "~>"
42
42
  - !ruby/object:Gem::Version
43
43
  version: '10.2'
44
- - - ! '>='
44
+ - - ">="
45
45
  - !ruby/object:Gem::Version
46
46
  version: 10.2.2
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: reek
49
49
  requirement: !ruby/object:Gem::Requirement
50
50
  requirements:
51
- - - ~>
51
+ - - "~>"
52
52
  - !ruby/object:Gem::Version
53
53
  version: '1.3'
54
- - - ! '>='
54
+ - - ">="
55
55
  - !ruby/object:Gem::Version
56
56
  version: 1.3.7
57
57
  type: :development
58
58
  prerelease: false
59
59
  version_requirements: !ruby/object:Gem::Requirement
60
60
  requirements:
61
- - - ~>
61
+ - - "~>"
62
62
  - !ruby/object:Gem::Version
63
63
  version: '1.3'
64
- - - ! '>='
64
+ - - ">="
65
65
  - !ruby/object:Gem::Version
66
66
  version: 1.3.7
67
67
  - !ruby/object:Gem::Dependency
68
68
  name: rubocop
69
69
  requirement: !ruby/object:Gem::Requirement
70
70
  requirements:
71
- - - ~>
71
+ - - "~>"
72
72
  - !ruby/object:Gem::Version
73
73
  version: '0.20'
74
- - - ! '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: 0.20.1
77
77
  type: :development
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - ~>
81
+ - - "~>"
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0.20'
84
- - - ! '>='
84
+ - - ">="
85
85
  - !ruby/object:Gem::Version
86
86
  version: 0.20.1
87
87
  - !ruby/object:Gem::Dependency
88
88
  name: pry
89
89
  requirement: !ruby/object:Gem::Requirement
90
90
  requirements:
91
- - - ~>
91
+ - - "~>"
92
92
  - !ruby/object:Gem::Version
93
93
  version: '0.9'
94
- - - ! '>='
94
+ - - ">="
95
95
  - !ruby/object:Gem::Version
96
96
  version: 0.9.12
97
97
  type: :development
98
98
  prerelease: false
99
99
  version_requirements: !ruby/object:Gem::Requirement
100
100
  requirements:
101
- - - ~>
101
+ - - "~>"
102
102
  - !ruby/object:Gem::Version
103
103
  version: '0.9'
104
- - - ! '>='
104
+ - - ">="
105
105
  - !ruby/object:Gem::Version
106
106
  version: 0.9.12
107
+ - !ruby/object:Gem::Dependency
108
+ name: pry-byebug
109
+ requirement: !ruby/object:Gem::Requirement
110
+ requirements:
111
+ - - "~>"
112
+ - !ruby/object:Gem::Version
113
+ version: '3.1'
114
+ - - ">="
115
+ - !ruby/object:Gem::Version
116
+ version: 3.1.0
117
+ type: :development
118
+ prerelease: false
119
+ version_requirements: !ruby/object:Gem::Requirement
120
+ requirements:
121
+ - - "~>"
122
+ - !ruby/object:Gem::Version
123
+ version: '3.1'
124
+ - - ">="
125
+ - !ruby/object:Gem::Version
126
+ version: 3.1.0
127
+ - !ruby/object:Gem::Dependency
128
+ name: rspec
129
+ requirement: !ruby/object:Gem::Requirement
130
+ requirements:
131
+ - - "~>"
132
+ - !ruby/object:Gem::Version
133
+ version: '3.2'
134
+ - - ">="
135
+ - !ruby/object:Gem::Version
136
+ version: 3.2.0
137
+ type: :development
138
+ prerelease: false
139
+ version_requirements: !ruby/object:Gem::Requirement
140
+ requirements:
141
+ - - "~>"
142
+ - !ruby/object:Gem::Version
143
+ version: '3.2'
144
+ - - ">="
145
+ - !ruby/object:Gem::Version
146
+ version: 3.2.0
147
+ - !ruby/object:Gem::Dependency
148
+ name: webmock
149
+ requirement: !ruby/object:Gem::Requirement
150
+ requirements:
151
+ - - "~>"
152
+ - !ruby/object:Gem::Version
153
+ version: '1.21'
154
+ - - ">="
155
+ - !ruby/object:Gem::Version
156
+ version: 1.21.0
157
+ type: :development
158
+ prerelease: false
159
+ version_requirements: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - "~>"
162
+ - !ruby/object:Gem::Version
163
+ version: '1.21'
164
+ - - ">="
165
+ - !ruby/object:Gem::Version
166
+ version: 1.21.0
107
167
  - !ruby/object:Gem::Dependency
108
168
  name: httparty
109
169
  requirement: !ruby/object:Gem::Requirement
110
170
  requirements:
111
- - - ~>
171
+ - - "~>"
112
172
  - !ruby/object:Gem::Version
113
173
  version: '0.13'
114
- - - ! '>='
174
+ - - ">="
115
175
  - !ruby/object:Gem::Version
116
176
  version: 0.13.0
117
177
  type: :runtime
118
178
  prerelease: false
119
179
  version_requirements: !ruby/object:Gem::Requirement
120
180
  requirements:
121
- - - ~>
181
+ - - "~>"
122
182
  - !ruby/object:Gem::Version
123
183
  version: '0.13'
124
- - - ! '>='
184
+ - - ">="
125
185
  - !ruby/object:Gem::Version
126
186
  version: 0.13.0
127
187
  - !ruby/object:Gem::Dependency
128
188
  name: colored
129
189
  requirement: !ruby/object:Gem::Requirement
130
190
  requirements:
131
- - - ~>
191
+ - - "~>"
132
192
  - !ruby/object:Gem::Version
133
193
  version: '1.2'
134
194
  type: :runtime
135
195
  prerelease: false
136
196
  version_requirements: !ruby/object:Gem::Requirement
137
197
  requirements:
138
- - - ~>
198
+ - - "~>"
139
199
  - !ruby/object:Gem::Version
140
200
  version: '1.2'
141
201
  - !ruby/object:Gem::Dependency
142
202
  name: tzinfo
143
203
  requirement: !ruby/object:Gem::Requirement
144
204
  requirements:
145
- - - ~>
205
+ - - "~>"
146
206
  - !ruby/object:Gem::Version
147
207
  version: '1.1'
148
- - - ! '>='
208
+ - - ">="
149
209
  - !ruby/object:Gem::Version
150
210
  version: 1.1.0
151
211
  type: :runtime
152
212
  prerelease: false
153
213
  version_requirements: !ruby/object:Gem::Requirement
154
214
  requirements:
155
- - - ~>
215
+ - - "~>"
156
216
  - !ruby/object:Gem::Version
157
217
  version: '1.1'
158
- - - ! '>='
218
+ - - ">="
159
219
  - !ruby/object:Gem::Version
160
220
  version: 1.1.0
161
221
  - !ruby/object:Gem::Dependency
162
222
  name: eventmachine
163
223
  requirement: !ruby/object:Gem::Requirement
164
224
  requirements:
165
- - - ~>
225
+ - - "~>"
166
226
  - !ruby/object:Gem::Version
167
227
  version: '1.0'
168
- - - ! '>='
228
+ - - ">="
169
229
  - !ruby/object:Gem::Version
170
230
  version: 1.0.3
171
231
  type: :runtime
172
232
  prerelease: false
173
233
  version_requirements: !ruby/object:Gem::Requirement
174
234
  requirements:
175
- - - ~>
235
+ - - "~>"
176
236
  - !ruby/object:Gem::Version
177
237
  version: '1.0'
178
- - - ! '>='
238
+ - - ">="
179
239
  - !ruby/object:Gem::Version
180
240
  version: 1.0.3
181
241
  - !ruby/object:Gem::Dependency
182
242
  name: activemodel
183
243
  requirement: !ruby/object:Gem::Requirement
184
244
  requirements:
185
- - - ~>
245
+ - - "~>"
186
246
  - !ruby/object:Gem::Version
187
247
  version: '4.1'
188
- - - ! '>='
248
+ - - ">="
189
249
  - !ruby/object:Gem::Version
190
250
  version: 4.1.0
191
251
  type: :runtime
192
252
  prerelease: false
193
253
  version_requirements: !ruby/object:Gem::Requirement
194
254
  requirements:
195
- - - ~>
255
+ - - "~>"
196
256
  - !ruby/object:Gem::Version
197
257
  version: '4.1'
198
- - - ! '>='
258
+ - - ">="
199
259
  - !ruby/object:Gem::Version
200
260
  version: 4.1.0
201
261
  description: Wrapper for the Infostrada Football API using httparty.
@@ -206,7 +266,10 @@ executables:
206
266
  extensions: []
207
267
  extra_rdoc_files: []
208
268
  files:
209
- - .gitignore
269
+ - ".gitignore"
270
+ - ".rspec"
271
+ - ".rubocop.yml"
272
+ - ".travis.yml"
210
273
  - Gemfile
211
274
  - README.md
212
275
  - bin/strada
@@ -216,6 +279,7 @@ files:
216
279
  - lib/infostrada/call_refresh.rb
217
280
  - lib/infostrada/commands.rb
218
281
  - lib/infostrada/competition.rb
282
+ - lib/infostrada/core_ext/hash.rb
219
283
  - lib/infostrada/core_ext/string.rb
220
284
  - lib/infostrada/edition.rb
221
285
  - lib/infostrada/edition_request.rb
@@ -226,6 +290,7 @@ files:
226
290
  - lib/infostrada/match.rb
227
291
  - lib/infostrada/match_event.rb
228
292
  - lib/infostrada/match_event_list.rb
293
+ - lib/infostrada/mock.rb
229
294
  - lib/infostrada/nation.rb
230
295
  - lib/infostrada/person_info.rb
231
296
  - lib/infostrada/phase.rb
@@ -237,6 +302,58 @@ files:
237
302
  - lib/infostrada/team_info.rb
238
303
  - lib/infostrada/team_request.rb
239
304
  - lib/infostrada/version.rb
305
+ - spec/base_request_spec.rb
306
+ - spec/competition_spec.rb
307
+ - spec/edition_request_spec.rb
308
+ - spec/edition_spec.rb
309
+ - spec/endpoint_spec.rb
310
+ - spec/formatter_spec.rb
311
+ - spec/helpers/json_helper.rb
312
+ - spec/json/competition.json
313
+ - spec/json/edition.json
314
+ - spec/json/edition_request.json
315
+ - spec/json/endpoint.json
316
+ - spec/json/match.json
317
+ - spec/json/match_event.json
318
+ - spec/json/match_event_list.json
319
+ - spec/json/nation.json
320
+ - spec/json/person_info.json
321
+ - spec/json/phase.json
322
+ - spec/json/player.json
323
+ - spec/json/referee.json
324
+ - spec/json/sample_responses/all_editions.json
325
+ - spec/json/sample_responses/competition_edition_league_21594_serie_a.json
326
+ - spec/json/sample_responses/competition_match_days_league_21594_serie_a.json
327
+ - spec/json/sample_responses/competition_match_list_league_21594_serie_a.json
328
+ - spec/json/sample_responses/competition_phases_cup_21204_capital_one_cup.json
329
+ - spec/json/sample_responses/competition_phases_league_21594_serie_a.json
330
+ - spec/json/sample_responses/competition_table_phase_114165_serie_a_2015.json
331
+ - spec/json/sample_responses/competition_teams_league_21594.json
332
+ - spec/json/sample_responses/get_api_call_refresh_module.json
333
+ - spec/json/sample_responses/match_events_1788734_real_atletico_final_champions.json
334
+ - spec/json/sample_responses/match_info_1788734_real_atletico_final_champions.json
335
+ - spec/json/sample_responses/match_info_upcoming_1968820_serie_a.json
336
+ - spec/json/sample_responses/person_info_611005_bale.json
337
+ - spec/json/sample_responses/squad_100163_on_edition_21590.json
338
+ - spec/json/sample_responses/team_info_100163.json
339
+ - spec/json/sample_responses/template_dummy_response.json
340
+ - spec/json/squad.json
341
+ - spec/json/team.json
342
+ - spec/json/team_info.json
343
+ - spec/json/team_request.json
344
+ - spec/match_event_list_spec.rb
345
+ - spec/match_event_spec.rb
346
+ - spec/match_spec.rb
347
+ - spec/nation_spec.rb
348
+ - spec/person_info_spec.rb
349
+ - spec/phase_spec.rb
350
+ - spec/player_spec.rb
351
+ - spec/referee_spec.rb
352
+ - spec/spec_helper.rb
353
+ - spec/squad_spec.rb
354
+ - spec/team_info_spec.rb
355
+ - spec/team_request_spec.rb
356
+ - spec/team_spec.rb
240
357
  homepage: https://github.com/rikas/infostrada-api
241
358
  licenses:
242
359
  - MIT
@@ -245,20 +362,73 @@ post_install_message:
245
362
  rdoc_options: []
246
363
  require_paths:
247
364
  - lib
365
+ - lib/infostrada
248
366
  required_ruby_version: !ruby/object:Gem::Requirement
249
367
  requirements:
250
- - - ! '>='
368
+ - - ">="
251
369
  - !ruby/object:Gem::Version
252
370
  version: '0'
253
371
  required_rubygems_version: !ruby/object:Gem::Requirement
254
372
  requirements:
255
- - - ! '>='
373
+ - - ">="
256
374
  - !ruby/object:Gem::Version
257
375
  version: '0'
258
376
  requirements: []
259
377
  rubyforge_project:
260
- rubygems_version: 2.4.5
378
+ rubygems_version: 2.4.6
261
379
  signing_key:
262
380
  specification_version: 4
263
381
  summary: Infostrada Football API wrapper.
264
- test_files: []
382
+ test_files:
383
+ - spec/base_request_spec.rb
384
+ - spec/competition_spec.rb
385
+ - spec/edition_request_spec.rb
386
+ - spec/edition_spec.rb
387
+ - spec/endpoint_spec.rb
388
+ - spec/formatter_spec.rb
389
+ - spec/helpers/json_helper.rb
390
+ - spec/json/competition.json
391
+ - spec/json/edition.json
392
+ - spec/json/edition_request.json
393
+ - spec/json/endpoint.json
394
+ - spec/json/match.json
395
+ - spec/json/match_event.json
396
+ - spec/json/match_event_list.json
397
+ - spec/json/nation.json
398
+ - spec/json/person_info.json
399
+ - spec/json/phase.json
400
+ - spec/json/player.json
401
+ - spec/json/referee.json
402
+ - spec/json/sample_responses/all_editions.json
403
+ - spec/json/sample_responses/competition_edition_league_21594_serie_a.json
404
+ - spec/json/sample_responses/competition_match_days_league_21594_serie_a.json
405
+ - spec/json/sample_responses/competition_match_list_league_21594_serie_a.json
406
+ - spec/json/sample_responses/competition_phases_cup_21204_capital_one_cup.json
407
+ - spec/json/sample_responses/competition_phases_league_21594_serie_a.json
408
+ - spec/json/sample_responses/competition_table_phase_114165_serie_a_2015.json
409
+ - spec/json/sample_responses/competition_teams_league_21594.json
410
+ - spec/json/sample_responses/get_api_call_refresh_module.json
411
+ - spec/json/sample_responses/match_events_1788734_real_atletico_final_champions.json
412
+ - spec/json/sample_responses/match_info_1788734_real_atletico_final_champions.json
413
+ - spec/json/sample_responses/match_info_upcoming_1968820_serie_a.json
414
+ - spec/json/sample_responses/person_info_611005_bale.json
415
+ - spec/json/sample_responses/squad_100163_on_edition_21590.json
416
+ - spec/json/sample_responses/team_info_100163.json
417
+ - spec/json/sample_responses/template_dummy_response.json
418
+ - spec/json/squad.json
419
+ - spec/json/team.json
420
+ - spec/json/team_info.json
421
+ - spec/json/team_request.json
422
+ - spec/match_event_list_spec.rb
423
+ - spec/match_event_spec.rb
424
+ - spec/match_spec.rb
425
+ - spec/nation_spec.rb
426
+ - spec/person_info_spec.rb
427
+ - spec/phase_spec.rb
428
+ - spec/player_spec.rb
429
+ - spec/referee_spec.rb
430
+ - spec/spec_helper.rb
431
+ - spec/squad_spec.rb
432
+ - spec/team_info_spec.rb
433
+ - spec/team_request_spec.rb
434
+ - spec/team_spec.rb