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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: ce7f4e96ddc8661200dc7915fee90d85e3ab0a231f63531ce8537fbff6463dee
4
- data.tar.gz: 44c45cc3439b4ec330d0fedac5f568b29cd32a49579041350961db65f6843f2f
3
+ metadata.gz: ee4227eb22924a6a97992fe62ad7ffd23e722634ccadddcb9b68707e0bde05f5
4
+ data.tar.gz: 1dff88fa2ab2b48a48b5bb0c17ea9f7b500d46eb4c6c942d5b310dcef29a1d8f
5
5
  SHA512:
6
- metadata.gz: bfeb232df4c631507f8839b9cd3bbfcfdc244135650409f4e676eeade385f7112407d828c6474893d83206d3828b8fc02eac786ac77c6442671752a5f5d486cc
7
- data.tar.gz: 63ed40f164b1af9152821f27a9fa36577b2783c5606f9b0f5aaa0f561ff1c1d8ff46fc9764589e57c695c3223e2aef674e8127c00adc99abd867345ee39b7a3a
6
+ metadata.gz: 68c8f51cab8b376df4e4c2ca2bb9613f96a71aeb55f942a2aafc490a074eb07724aef9fca21f6599ce58344b24f599e51c206eff031ad4693855bc6a6f922e71
7
+ data.tar.gz: ccb203f66178890c8039e136216ff58665e80561e162f798e3bc180e43296d441529cefd6a1482219dc47c9901ac6f3ed8dd9541e9d6367e844ec98f2935eca7
data/.ruby-version CHANGED
@@ -1 +1 @@
1
- 2.5.1
1
+ 2.6.0
data/.travis.yml CHANGED
@@ -1,6 +1,4 @@
1
1
  language: ruby
2
2
  rvm:
3
- - 2.3.1
4
- - rbx-19mode
5
- -# jruby-19mode
3
+ - 2.5.1
6
4
  script: ./script/ci
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
 
@@ -1,3 +1,3 @@
1
1
  module Gameye
2
- VERSION = "0.0.1"
2
+ VERSION = "0.0.2"
3
3
  end
@@ -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.to_s).to eql("2018-10-30 19:48:39 +0100")
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
@@ -0,0 +1,10 @@
1
+ require 'spec_helper'
2
+
3
+ describe Gameye do
4
+
5
+ it "raises an error when no token is set" do
6
+ Gameye.token = nil
7
+ expect { Gameye.token }.to raise_error(StandardError)
8
+ end
9
+ end
10
+
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.1
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
- rubyforge_project:
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