gameye 0.0.1 → 0.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.ruby-version +1 -1
- data/.travis.yml +1 -3
- data/README.md +5 -0
- data/lib/gameye/match.rb +1 -1
- data/lib/gameye/version.rb +1 -1
- data/spec/lib/gameye/client_spec.rb +18 -0
- data/spec/lib/gameye/match_spec.rb +1 -1
- data/spec/lib/gameye_spec.rb +10 -0
- data/spec/spec_helper.rb +1 -4
- metadata +7 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: ee4227eb22924a6a97992fe62ad7ffd23e722634ccadddcb9b68707e0bde05f5
|
4
|
+
data.tar.gz: 1dff88fa2ab2b48a48b5bb0c17ea9f7b500d46eb4c6c942d5b310dcef29a1d8f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 68c8f51cab8b376df4e4c2ca2bb9613f96a71aeb55f942a2aafc490a074eb07724aef9fca21f6599ce58344b24f599e51c206eff031ad4693855bc6a6f922e71
|
7
|
+
data.tar.gz: ccb203f66178890c8039e136216ff58665e80561e162f798e3bc180e43296d441529cefd6a1482219dc47c9901ac6f3ed8dd9541e9d6367e844ec98f2935eca7
|
data/.ruby-version
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.
|
1
|
+
2.6.0
|
data/.travis.yml
CHANGED
data/README.md
ADDED
@@ -0,0 +1,5 @@
|
|
1
|
+
# [Gameye API gem](https://gameye.com)
|
2
|
+
[![Build Status](https://secure.travis-ci.org/Arie/gameye.png)](http://travis-ci.org/Arie/gameye) [![Code Climate](https://codeclimate.com/github/Arie/gameye.png)](https://codeclimate.com/github/Arie/gameye) [![Coverage Status](https://coveralls.io/repos/Arie/gameye/badge.png?branch=master)](https://coveralls.io/r/Arie/gameye)
|
3
|
+
|
4
|
+
A gem to interface with the Gameye API
|
5
|
+
|
data/lib/gameye/match.rb
CHANGED
@@ -8,7 +8,7 @@ module Gameye
|
|
8
8
|
@location_key = json["locationKey"]
|
9
9
|
@host = json["host"]
|
10
10
|
@port = json["port"]["game"]
|
11
|
-
@tv_port = json["port"]["hltv"]
|
11
|
+
@tv_port = json["port"]["stv"] || json["port"]["hltv"]
|
12
12
|
@created = Time.at((json["created"] / 1000.0).to_i)
|
13
13
|
end
|
14
14
|
|
data/lib/gameye/version.rb
CHANGED
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
module Gameye
|
4
|
+
|
5
|
+
describe Client do
|
6
|
+
|
7
|
+
after(:each) do
|
8
|
+
Gameye.endpoint = nil
|
9
|
+
end
|
10
|
+
|
11
|
+
it "can use an overriden endpoint" do
|
12
|
+
endpoint = "https://my-special-endpoint.localhost"
|
13
|
+
Gameye.endpoint = endpoint
|
14
|
+
expect(Gameye::Client.new.endpoint).to eql(endpoint)
|
15
|
+
end
|
16
|
+
|
17
|
+
end
|
18
|
+
end
|
@@ -27,7 +27,7 @@ module Gameye
|
|
27
27
|
expect(match.location_key).to eql("rotterdam")
|
28
28
|
expect(match.port).to eql(56494)
|
29
29
|
expect(match.tv_port).to eql(61828)
|
30
|
-
expect(match.created.
|
30
|
+
expect(match.created.to_i).to eql(1540925319)
|
31
31
|
end
|
32
32
|
|
33
33
|
it "returns the status if the match couldn't be started", :vcr do
|
data/spec/spec_helper.rb
CHANGED
@@ -1,10 +1,7 @@
|
|
1
1
|
require "simplecov"
|
2
2
|
require "coveralls"
|
3
3
|
|
4
|
-
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter[
|
5
|
-
SimpleCov::Formatter::HTMLFormatter,
|
6
|
-
Coveralls::SimpleCov::Formatter
|
7
|
-
]
|
4
|
+
SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter.new([SimpleCov::Formatter::HTMLFormatter, Coveralls::SimpleCov::Formatter])
|
8
5
|
SimpleCov.start
|
9
6
|
|
10
7
|
require "pry-nav"
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gameye
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Arie
|
@@ -92,6 +92,7 @@ files:
|
|
92
92
|
- ".travis.yml"
|
93
93
|
- Gemfile
|
94
94
|
- Gemfile.lock
|
95
|
+
- README.md
|
95
96
|
- gameye.gemspec
|
96
97
|
- lib/gameye.rb
|
97
98
|
- lib/gameye/client.rb
|
@@ -111,10 +112,12 @@ files:
|
|
111
112
|
- spec/fixtures/vcr/Gameye_Match/starts_a_match.yml
|
112
113
|
- spec/fixtures/vcr/Gameye_Match/stop_a_running_match.yml
|
113
114
|
- spec/fixtures/vcr/Gameye_Template/fetches_template_information_for_a_game.yml
|
115
|
+
- spec/lib/gameye/client_spec.rb
|
114
116
|
- spec/lib/gameye/game_spec.rb
|
115
117
|
- spec/lib/gameye/location_spec.rb
|
116
118
|
- spec/lib/gameye/match_spec.rb
|
117
119
|
- spec/lib/gameye/template_spec.rb
|
120
|
+
- spec/lib/gameye_spec.rb
|
118
121
|
- spec/spec_helper.rb
|
119
122
|
homepage: http://github.com/Arie/gameye
|
120
123
|
licenses: []
|
@@ -134,8 +137,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
134
137
|
- !ruby/object:Gem::Version
|
135
138
|
version: '0'
|
136
139
|
requirements: []
|
137
|
-
|
138
|
-
rubygems_version: 2.7.6
|
140
|
+
rubygems_version: 3.0.1
|
139
141
|
signing_key:
|
140
142
|
specification_version: 4
|
141
143
|
summary: Gameye API
|
@@ -149,8 +151,10 @@ test_files:
|
|
149
151
|
- spec/fixtures/vcr/Gameye_Match/starts_a_match.yml
|
150
152
|
- spec/fixtures/vcr/Gameye_Match/stop_a_running_match.yml
|
151
153
|
- spec/fixtures/vcr/Gameye_Template/fetches_template_information_for_a_game.yml
|
154
|
+
- spec/lib/gameye/client_spec.rb
|
152
155
|
- spec/lib/gameye/game_spec.rb
|
153
156
|
- spec/lib/gameye/location_spec.rb
|
154
157
|
- spec/lib/gameye/match_spec.rb
|
155
158
|
- spec/lib/gameye/template_spec.rb
|
159
|
+
- spec/lib/gameye_spec.rb
|
156
160
|
- spec/spec_helper.rb
|