gameye 0.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +22 -0
- data/.rspec +1 -0
- data/.ruby-version +1 -0
- data/.travis.yml +6 -0
- data/Gemfile +4 -0
- data/Gemfile.lock +66 -0
- data/gameye.gemspec +23 -0
- data/lib/gameye.rb +26 -0
- data/lib/gameye/client.rb +43 -0
- data/lib/gameye/game.rb +15 -0
- data/lib/gameye/location.rb +8 -0
- data/lib/gameye/match.rb +46 -0
- data/lib/gameye/template.rb +24 -0
- data/lib/gameye/version.rb +3 -0
- data/script/bundler +10 -0
- data/script/ci +22 -0
- data/spec/fixtures/vcr/Gameye_Game/fetches_game_information.yml +32 -0
- data/spec/fixtures/vcr/Gameye_Location/fetches_location_information_for_a_game.yml +32 -0
- data/spec/fixtures/vcr/Gameye_Match/fetches_an_empty_list_of_matches.yml +32 -0
- data/spec/fixtures/vcr/Gameye_Match/fetches_matches.yml +32 -0
- data/spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_match_couldn_t_be_started.yml +34 -0
- data/spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_running_match_couldn_t_be_stopped.yml +34 -0
- data/spec/fixtures/vcr/Gameye_Match/starts_a_match.yml +30 -0
- data/spec/fixtures/vcr/Gameye_Match/stop_a_running_match.yml +30 -0
- data/spec/fixtures/vcr/Gameye_Template/fetches_template_information_for_a_game.yml +66 -0
- data/spec/lib/gameye/game_spec.rb +17 -0
- data/spec/lib/gameye/location_spec.rb +15 -0
- data/spec/lib/gameye/match_spec.rb +49 -0
- data/spec/lib/gameye/template_spec.rb +25 -0
- data/spec/spec_helper.rb +24 -0
- metadata +156 -0
    
        checksums.yaml
    ADDED
    
    | @@ -0,0 +1,7 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            SHA256:
         | 
| 3 | 
            +
              metadata.gz: ce7f4e96ddc8661200dc7915fee90d85e3ab0a231f63531ce8537fbff6463dee
         | 
| 4 | 
            +
              data.tar.gz: 44c45cc3439b4ec330d0fedac5f568b29cd32a49579041350961db65f6843f2f
         | 
| 5 | 
            +
            SHA512:
         | 
| 6 | 
            +
              metadata.gz: bfeb232df4c631507f8839b9cd3bbfcfdc244135650409f4e676eeade385f7112407d828c6474893d83206d3828b8fc02eac786ac77c6442671752a5f5d486cc
         | 
| 7 | 
            +
              data.tar.gz: 63ed40f164b1af9152821f27a9fa36577b2783c5606f9b0f5aaa0f561ff1c1d8ff46fc9764589e57c695c3223e2aef674e8127c00adc99abd867345ee39b7a3a
         | 
    
        data/.gitignore
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            *.gem
         | 
| 2 | 
            +
            *.rbc
         | 
| 3 | 
            +
            .bundle
         | 
| 4 | 
            +
            .config
         | 
| 5 | 
            +
            coverage
         | 
| 6 | 
            +
            InstalledFiles
         | 
| 7 | 
            +
            lib/bundler/man
         | 
| 8 | 
            +
            pkg
         | 
| 9 | 
            +
            rdoc
         | 
| 10 | 
            +
            spec/reports
         | 
| 11 | 
            +
            test/tmp
         | 
| 12 | 
            +
            test/version_tmp
         | 
| 13 | 
            +
            tmp
         | 
| 14 | 
            +
            rspec.html
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            # RBX files
         | 
| 17 | 
            +
            .rbx/
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            # YARD artifacts
         | 
| 20 | 
            +
            .yardoc
         | 
| 21 | 
            +
            _yardoc
         | 
| 22 | 
            +
            doc/
         | 
    
        data/.rspec
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            --color
         | 
    
        data/.ruby-version
    ADDED
    
    | @@ -0,0 +1 @@ | |
| 1 | 
            +
            2.5.1
         | 
    
        data/.travis.yml
    ADDED
    
    
    
        data/Gemfile
    ADDED
    
    
    
        data/Gemfile.lock
    ADDED
    
    | @@ -0,0 +1,66 @@ | |
| 1 | 
            +
            PATH
         | 
| 2 | 
            +
              remote: .
         | 
| 3 | 
            +
              specs:
         | 
| 4 | 
            +
                gameye (0.0.1)
         | 
| 5 | 
            +
                  faraday (~> 0.8)
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            GEM
         | 
| 8 | 
            +
              remote: https://rubygems.org/
         | 
| 9 | 
            +
              specs:
         | 
| 10 | 
            +
                coderay (1.1.2)
         | 
| 11 | 
            +
                coveralls (0.8.22)
         | 
| 12 | 
            +
                  json (>= 1.8, < 3)
         | 
| 13 | 
            +
                  simplecov (~> 0.16.1)
         | 
| 14 | 
            +
                  term-ansicolor (~> 1.3)
         | 
| 15 | 
            +
                  thor (~> 0.19.4)
         | 
| 16 | 
            +
                  tins (~> 1.6)
         | 
| 17 | 
            +
                diff-lcs (1.3)
         | 
| 18 | 
            +
                docile (1.3.1)
         | 
| 19 | 
            +
                faraday (0.15.3)
         | 
| 20 | 
            +
                  multipart-post (>= 1.2, < 3)
         | 
| 21 | 
            +
                json (2.1.0)
         | 
| 22 | 
            +
                method_source (0.8.2)
         | 
| 23 | 
            +
                multipart-post (2.0.0)
         | 
| 24 | 
            +
                pry (0.10.4)
         | 
| 25 | 
            +
                  coderay (~> 1.1.0)
         | 
| 26 | 
            +
                  method_source (~> 0.8.1)
         | 
| 27 | 
            +
                  slop (~> 3.4)
         | 
| 28 | 
            +
                pry-nav (0.2.4)
         | 
| 29 | 
            +
                  pry (>= 0.9.10, < 0.11.0)
         | 
| 30 | 
            +
                rspec (3.8.0)
         | 
| 31 | 
            +
                  rspec-core (~> 3.8.0)
         | 
| 32 | 
            +
                  rspec-expectations (~> 3.8.0)
         | 
| 33 | 
            +
                  rspec-mocks (~> 3.8.0)
         | 
| 34 | 
            +
                rspec-core (3.8.0)
         | 
| 35 | 
            +
                  rspec-support (~> 3.8.0)
         | 
| 36 | 
            +
                rspec-expectations (3.8.2)
         | 
| 37 | 
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         | 
| 38 | 
            +
                  rspec-support (~> 3.8.0)
         | 
| 39 | 
            +
                rspec-mocks (3.8.0)
         | 
| 40 | 
            +
                  diff-lcs (>= 1.2.0, < 2.0)
         | 
| 41 | 
            +
                  rspec-support (~> 3.8.0)
         | 
| 42 | 
            +
                rspec-support (3.8.0)
         | 
| 43 | 
            +
                simplecov (0.16.1)
         | 
| 44 | 
            +
                  docile (~> 1.1)
         | 
| 45 | 
            +
                  json (>= 1.8, < 3)
         | 
| 46 | 
            +
                  simplecov-html (~> 0.10.0)
         | 
| 47 | 
            +
                simplecov-html (0.10.2)
         | 
| 48 | 
            +
                slop (3.6.0)
         | 
| 49 | 
            +
                term-ansicolor (1.6.0)
         | 
| 50 | 
            +
                  tins (~> 1.0)
         | 
| 51 | 
            +
                thor (0.19.4)
         | 
| 52 | 
            +
                tins (1.17.0)
         | 
| 53 | 
            +
                vcr (4.0.0)
         | 
| 54 | 
            +
             | 
| 55 | 
            +
            PLATFORMS
         | 
| 56 | 
            +
              ruby
         | 
| 57 | 
            +
             | 
| 58 | 
            +
            DEPENDENCIES
         | 
| 59 | 
            +
              coveralls
         | 
| 60 | 
            +
              gameye!
         | 
| 61 | 
            +
              pry-nav
         | 
| 62 | 
            +
              rspec
         | 
| 63 | 
            +
              vcr
         | 
| 64 | 
            +
             | 
| 65 | 
            +
            BUNDLED WITH
         | 
| 66 | 
            +
               1.14.5
         | 
    
        data/gameye.gemspec
    ADDED
    
    | @@ -0,0 +1,23 @@ | |
| 1 | 
            +
            # -*- encoding: utf-8 -*-
         | 
| 2 | 
            +
            require File.expand_path('../lib/gameye/version', __FILE__)
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            Gem::Specification.new do |gem|
         | 
| 5 | 
            +
              gem.name          = 'gameye'
         | 
| 6 | 
            +
              gem.version       = Gameye::VERSION
         | 
| 7 | 
            +
              gem.date          = '2018-10-25'
         | 
| 8 | 
            +
              gem.summary       = "Gameye API"
         | 
| 9 | 
            +
              gem.description   = "A gem to interface with the Gameye API"
         | 
| 10 | 
            +
              gem.authors       = ["Arie"]
         | 
| 11 | 
            +
              gem.email         = 'rubygems@ariekanarie.nl'
         | 
| 12 | 
            +
              gem.files         = `git ls-files`.split($\)
         | 
| 13 | 
            +
              gem.test_files    = gem.files.grep(%r{^(test|spec|features)/})
         | 
| 14 | 
            +
              gem.require_paths = ["lib"]
         | 
| 15 | 
            +
              gem.homepage      = 'http://github.com/Arie/gameye'
         | 
| 16 | 
            +
             | 
| 17 | 
            +
              gem.add_dependency "faraday",         "~> 0.8"
         | 
| 18 | 
            +
             | 
| 19 | 
            +
              gem.add_development_dependency "vcr"
         | 
| 20 | 
            +
              gem.add_development_dependency 'coveralls'
         | 
| 21 | 
            +
              gem.add_development_dependency "pry-nav"
         | 
| 22 | 
            +
              gem.add_development_dependency "rspec"
         | 
| 23 | 
            +
            end
         | 
    
        data/lib/gameye.rb
    ADDED
    
    | @@ -0,0 +1,26 @@ | |
| 1 | 
            +
            require "gameye/version"
         | 
| 2 | 
            +
            require "gameye/client"
         | 
| 3 | 
            +
            require "gameye/template"
         | 
| 4 | 
            +
            require "gameye/game"
         | 
| 5 | 
            +
            require "gameye/location"
         | 
| 6 | 
            +
            require "gameye/match"
         | 
| 7 | 
            +
             | 
| 8 | 
            +
            module Gameye
         | 
| 9 | 
            +
              class << self
         | 
| 10 | 
            +
                def token=(token)
         | 
| 11 | 
            +
                  @token = token
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                def token
         | 
| 15 | 
            +
                  @token || raise(StandardError, "No Gameye API token set")
         | 
| 16 | 
            +
                end
         | 
| 17 | 
            +
             | 
| 18 | 
            +
                def endpoint=(endpoint)
         | 
| 19 | 
            +
                  @endpoint = endpoint
         | 
| 20 | 
            +
                end
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                def endpoint
         | 
| 23 | 
            +
                  @endpoint || "https://api.gameye.com"
         | 
| 24 | 
            +
                end
         | 
| 25 | 
            +
              end
         | 
| 26 | 
            +
            end
         | 
| @@ -0,0 +1,43 @@ | |
| 1 | 
            +
            require 'json'
         | 
| 2 | 
            +
            require 'faraday'
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            module Gameye
         | 
| 5 | 
            +
              class Client
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                attr_writer :endpoint, :token
         | 
| 8 | 
            +
             | 
| 9 | 
            +
                def token
         | 
| 10 | 
            +
                  @token || Gameye.token
         | 
| 11 | 
            +
                end
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                def endpoint
         | 
| 14 | 
            +
                  @endpoint || Gameye.endpoint
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                def connection
         | 
| 18 | 
            +
                  Faraday.new(:url => endpoint) do |conn|
         | 
| 19 | 
            +
                    conn.request :url_encoded
         | 
| 20 | 
            +
                    conn.adapter :net_http
         | 
| 21 | 
            +
                  end
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                def post(path, params)
         | 
| 25 | 
            +
                  connection.post do |req|
         | 
| 26 | 
            +
                    req.url "/action/#{path}"
         | 
| 27 | 
            +
                    req.headers['Content-Type'] = 'application/json'
         | 
| 28 | 
            +
                    req.headers['Authorization'] = "Bearer #{token}"
         | 
| 29 | 
            +
                    req.body = params.to_json
         | 
| 30 | 
            +
                  end
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                def get(path)
         | 
| 34 | 
            +
                  response = connection.get do |req|
         | 
| 35 | 
            +
                    req.url "/fetch/#{path}"
         | 
| 36 | 
            +
                    req.headers['Authorization'] = "Bearer #{token}"
         | 
| 37 | 
            +
                  end
         | 
| 38 | 
            +
                  if response.success?
         | 
| 39 | 
            +
                    JSON.parse(response.body)
         | 
| 40 | 
            +
                  end
         | 
| 41 | 
            +
                end
         | 
| 42 | 
            +
              end
         | 
| 43 | 
            +
            end
         | 
    
        data/lib/gameye/game.rb
    ADDED
    
    | @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            module Gameye
         | 
| 2 | 
            +
              class Game
         | 
| 3 | 
            +
             | 
| 4 | 
            +
                attr_accessor :key, :locations
         | 
| 5 | 
            +
                def initialize(json)
         | 
| 6 | 
            +
                  @key        = json["gameKey"]
         | 
| 7 | 
            +
                  @locations  = json["location"].keys
         | 
| 8 | 
            +
                end
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                def self.fetch(client: Gameye::Client.new)
         | 
| 11 | 
            +
                  response = client.get("game")
         | 
| 12 | 
            +
                  response["game"].map { |g| new(g[1]) }
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
            end
         | 
    
        data/lib/gameye/match.rb
    ADDED
    
    | @@ -0,0 +1,46 @@ | |
| 1 | 
            +
            module Gameye
         | 
| 2 | 
            +
              class Match
         | 
| 3 | 
            +
             | 
| 4 | 
            +
                attr_accessor :game_key, :location_key, :host, :port, :tv_port, :created
         | 
| 5 | 
            +
                def initialize(json)
         | 
| 6 | 
            +
                  @game_key     = json["gameKey"]
         | 
| 7 | 
            +
                  @match_key    = json["matchKey"]
         | 
| 8 | 
            +
                  @location_key = json["locationKey"]
         | 
| 9 | 
            +
                  @host         = json["host"]
         | 
| 10 | 
            +
                  @port         = json["port"]["game"]
         | 
| 11 | 
            +
                  @tv_port      = json["port"]["hltv"]
         | 
| 12 | 
            +
                  @created      = Time.at((json["created"] / 1000.0).to_i)
         | 
| 13 | 
            +
                end
         | 
| 14 | 
            +
             | 
| 15 | 
            +
                def self.start(client: Gameye::Client.new, game_key:, location_keys:, template_key:, match_key:, options: {})
         | 
| 16 | 
            +
                  response = client.post("start-match", {
         | 
| 17 | 
            +
                    gameKey: game_key,
         | 
| 18 | 
            +
                    locationKeys: location_keys,
         | 
| 19 | 
            +
                    templateKey: template_key,
         | 
| 20 | 
            +
                    matchKey: match_key,
         | 
| 21 | 
            +
                    config: options
         | 
| 22 | 
            +
                  })
         | 
| 23 | 
            +
                  if response.status == 204
         | 
| 24 | 
            +
                    true
         | 
| 25 | 
            +
                  else
         | 
| 26 | 
            +
                    response.status
         | 
| 27 | 
            +
                  end
         | 
| 28 | 
            +
                end
         | 
| 29 | 
            +
             | 
| 30 | 
            +
                def self.stop(client: Gameye::Client.new, match_key:)
         | 
| 31 | 
            +
                  response = client.post("stop-match", { matchKey: match_key })
         | 
| 32 | 
            +
                  if response.status == 204
         | 
| 33 | 
            +
                    true
         | 
| 34 | 
            +
                  else
         | 
| 35 | 
            +
                    response.status
         | 
| 36 | 
            +
                  end
         | 
| 37 | 
            +
                end
         | 
| 38 | 
            +
             | 
| 39 | 
            +
                def self.all(client: Gameye::Client.new)
         | 
| 40 | 
            +
                  response = client.get("match")
         | 
| 41 | 
            +
                  if response["match"]
         | 
| 42 | 
            +
                    response["match"].map { |m| new(m[1]) if !m[1].nil? }
         | 
| 43 | 
            +
                  end
         | 
| 44 | 
            +
                end
         | 
| 45 | 
            +
              end
         | 
| 46 | 
            +
            end
         | 
| @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            module Gameye
         | 
| 2 | 
            +
              class Template
         | 
| 3 | 
            +
             | 
| 4 | 
            +
                attr_accessor :key, :arguments, :maps
         | 
| 5 | 
            +
                def initialize(json)
         | 
| 6 | 
            +
                  @key        = json[0]
         | 
| 7 | 
            +
                  args        = json[1]["arg"] || []
         | 
| 8 | 
            +
                  @arguments  = args.map { |a| OpenStruct.new(a) }
         | 
| 9 | 
            +
                  @maps       = named_argument("map")["option"]
         | 
| 10 | 
            +
                end
         | 
| 11 | 
            +
             | 
| 12 | 
            +
                def self.fetch(client: Gameye::Client.new, game_key:)
         | 
| 13 | 
            +
                  response = client.get("template?gameKey=#{game_key}")
         | 
| 14 | 
            +
                  response["template"].map { |t| new(t) }
         | 
| 15 | 
            +
                end
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                private
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                def named_argument(name)
         | 
| 20 | 
            +
                  arguments.find { |key| key["name"] == name } || {}
         | 
| 21 | 
            +
                end
         | 
| 22 | 
            +
             | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
    
        data/script/bundler
    ADDED
    
    
    
        data/script/ci
    ADDED
    
    | @@ -0,0 +1,22 @@ | |
| 1 | 
            +
            run() {
         | 
| 2 | 
            +
              time bundle exec $*
         | 
| 3 | 
            +
            }
         | 
| 4 | 
            +
             | 
| 5 | 
            +
            echo "--- Starting continuous integration build"
         | 
| 6 | 
            +
             | 
| 7 | 
            +
            ./script/bundler
         | 
| 8 | 
            +
             | 
| 9 | 
            +
            if [[ -d coverage ]]; then
         | 
| 10 | 
            +
              echo "Removing old coverage report"
         | 
| 11 | 
            +
              rm -r coverage
         | 
| 12 | 
            +
            fi
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            echo "--- Running RSpec"
         | 
| 15 | 
            +
             | 
| 16 | 
            +
            run rspec --color spec --format progress --format html --out rspec.html
         | 
| 17 | 
            +
            rspec=$?
         | 
| 18 | 
            +
             | 
| 19 | 
            +
            if [[ $rspec -ne 0 ]]; then
         | 
| 20 | 
            +
              echo "--- Some tests have failed."
         | 
| 21 | 
            +
              exit 1
         | 
| 22 | 
            +
            fi
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://api.gameye.com/fetch/game
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Authorization:
         | 
| 13 | 
            +
                  - Bearer api-token
         | 
| 14 | 
            +
              response:
         | 
| 15 | 
            +
                status:
         | 
| 16 | 
            +
                  code: 200
         | 
| 17 | 
            +
                  message: OK
         | 
| 18 | 
            +
                headers:
         | 
| 19 | 
            +
                  date:
         | 
| 20 | 
            +
                  - Tue, 30 Oct 2018 18:11:40 GMT
         | 
| 21 | 
            +
                  content-type:
         | 
| 22 | 
            +
                  - application/json; charset=utf-8
         | 
| 23 | 
            +
                  content-length:
         | 
| 24 | 
            +
                  - '679'
         | 
| 25 | 
            +
                  connection:
         | 
| 26 | 
            +
                  - close
         | 
| 27 | 
            +
                body:
         | 
| 28 | 
            +
                  encoding: UTF-8
         | 
| 29 | 
            +
                  string: '{"game":{"csgo":{"gameKey":"csgo","location":{"rotterdam":true,"los_angeles":true,"washington_dc":true,"frankfurt":true}},"tf2":{"gameKey":"tf2","location":{"rotterdam":true,"los_angeles":true,"washington_dc":true,"frankfurt":true}},"css":{"gameKey":"css","location":{}},"l4d2":{"gameKey":"l4d2","location":{}},"kf2":{"gameKey":"kf2","location":{}}},"location":{"rotterdam":{"locationKey":"rotterdam"},"ireland":{"locationKey":"ireland"},"dubai":{"locationKey":"dubai"},"tokyo":{"locationKey":"tokyo"},"los_angeles":{"locationKey":"los_angeles"},"washington_dc":{"locationKey":"washington_dc"},"brazilsouth":{"locationKey":"brazilsouth"},"frankfurt":{"locationKey":"frankfurt"}}}'
         | 
| 30 | 
            +
                http_version:
         | 
| 31 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:11:40 GMT
         | 
| 32 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://api.gameye.com/fetch/game
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Authorization:
         | 
| 13 | 
            +
                  - Bearer api-token
         | 
| 14 | 
            +
              response:
         | 
| 15 | 
            +
                status:
         | 
| 16 | 
            +
                  code: 200
         | 
| 17 | 
            +
                  message: OK
         | 
| 18 | 
            +
                headers:
         | 
| 19 | 
            +
                  date:
         | 
| 20 | 
            +
                  - Tue, 30 Oct 2018 19:02:12 GMT
         | 
| 21 | 
            +
                  content-type:
         | 
| 22 | 
            +
                  - application/json; charset=utf-8
         | 
| 23 | 
            +
                  content-length:
         | 
| 24 | 
            +
                  - '679'
         | 
| 25 | 
            +
                  connection:
         | 
| 26 | 
            +
                  - close
         | 
| 27 | 
            +
                body:
         | 
| 28 | 
            +
                  encoding: UTF-8
         | 
| 29 | 
            +
                  string: '{"game":{"csgo":{"gameKey":"csgo","location":{"rotterdam":true,"los_angeles":true,"washington_dc":true,"frankfurt":true}},"tf2":{"gameKey":"tf2","location":{"rotterdam":true,"los_angeles":true,"washington_dc":true,"frankfurt":true}},"css":{"gameKey":"css","location":{}},"l4d2":{"gameKey":"l4d2","location":{}},"kf2":{"gameKey":"kf2","location":{}}},"location":{"rotterdam":{"locationKey":"rotterdam"},"ireland":{"locationKey":"ireland"},"dubai":{"locationKey":"dubai"},"tokyo":{"locationKey":"tokyo"},"los_angeles":{"locationKey":"los_angeles"},"washington_dc":{"locationKey":"washington_dc"},"brazilsouth":{"locationKey":"brazilsouth"},"frankfurt":{"locationKey":"frankfurt"}}}'
         | 
| 30 | 
            +
                http_version:
         | 
| 31 | 
            +
              recorded_at: Tue, 30 Oct 2018 19:02:12 GMT
         | 
| 32 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://api.gameye.com/fetch/match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Authorization:
         | 
| 13 | 
            +
                  - Bearer api-token
         | 
| 14 | 
            +
              response:
         | 
| 15 | 
            +
                status:
         | 
| 16 | 
            +
                  code: 200
         | 
| 17 | 
            +
                  message: OK
         | 
| 18 | 
            +
                headers:
         | 
| 19 | 
            +
                  date:
         | 
| 20 | 
            +
                  - Tue, 30 Oct 2018 18:58:49 GMT
         | 
| 21 | 
            +
                  content-type:
         | 
| 22 | 
            +
                  - application/json; charset=utf-8
         | 
| 23 | 
            +
                  content-length:
         | 
| 24 | 
            +
                  - '12'
         | 
| 25 | 
            +
                  connection:
         | 
| 26 | 
            +
                  - close
         | 
| 27 | 
            +
                body:
         | 
| 28 | 
            +
                  encoding: UTF-8
         | 
| 29 | 
            +
                  string: '{"match":{}}'
         | 
| 30 | 
            +
                http_version:
         | 
| 31 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:58:49 GMT
         | 
| 32 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,32 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://api.gameye.com/fetch/match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Authorization:
         | 
| 13 | 
            +
                  - Bearer api-token
         | 
| 14 | 
            +
              response:
         | 
| 15 | 
            +
                status:
         | 
| 16 | 
            +
                  code: 200
         | 
| 17 | 
            +
                  message: OK
         | 
| 18 | 
            +
                headers:
         | 
| 19 | 
            +
                  date:
         | 
| 20 | 
            +
                  - Tue, 30 Oct 2018 18:51:12 GMT
         | 
| 21 | 
            +
                  content-type:
         | 
| 22 | 
            +
                  - application/json; charset=utf-8
         | 
| 23 | 
            +
                  content-length:
         | 
| 24 | 
            +
                  - '172'
         | 
| 25 | 
            +
                  connection:
         | 
| 26 | 
            +
                  - close
         | 
| 27 | 
            +
                body:
         | 
| 28 | 
            +
                  encoding: UTF-8
         | 
| 29 | 
            +
                  string: '{"match":{"duplicate":{"matchKey":"duplicate","gameKey":"tf2","locationKey":"rotterdam","host":"213.163.71.11","created":1540925319300,"port":{"game":56494,"hltv":61828}}}}'
         | 
| 30 | 
            +
                http_version:
         | 
| 31 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:51:12 GMT
         | 
| 32 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,34 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: post
         | 
| 5 | 
            +
                uri: https://api.gameye.com/action/start-match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: UTF-8
         | 
| 8 | 
            +
                  string: '{"gameKey":"tf2","locationKeys":["rotterdam"],"templateKey":"bots","matchKey":"duplicate","config":{"hostname":"Foobarwidget"}}'
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Content-Type:
         | 
| 13 | 
            +
                  - application/json
         | 
| 14 | 
            +
                  Authorization:
         | 
| 15 | 
            +
                  - Bearer api-token
         | 
| 16 | 
            +
              response:
         | 
| 17 | 
            +
                status:
         | 
| 18 | 
            +
                  code: 500
         | 
| 19 | 
            +
                  message: Internal Server Error
         | 
| 20 | 
            +
                headers:
         | 
| 21 | 
            +
                  date:
         | 
| 22 | 
            +
                  - Tue, 30 Oct 2018 18:49:04 GMT
         | 
| 23 | 
            +
                  content-type:
         | 
| 24 | 
            +
                  - text/plain; charset=utf-8
         | 
| 25 | 
            +
                  content-length:
         | 
| 26 | 
            +
                  - '21'
         | 
| 27 | 
            +
                  connection:
         | 
| 28 | 
            +
                  - close
         | 
| 29 | 
            +
                body:
         | 
| 30 | 
            +
                  encoding: UTF-8
         | 
| 31 | 
            +
                  string: Internal Server Error
         | 
| 32 | 
            +
                http_version:
         | 
| 33 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:49:04 GMT
         | 
| 34 | 
            +
            recorded_with: VCR 4.0.0
         | 
    
        data/spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_running_match_couldn_t_be_stopped.yml
    ADDED
    
    | @@ -0,0 +1,34 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: post
         | 
| 5 | 
            +
                uri: https://api.gameye.com/action/stop-match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: UTF-8
         | 
| 8 | 
            +
                  string: '{"matchKey":"serveme-test-123"}'
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Content-Type:
         | 
| 13 | 
            +
                  - application/json
         | 
| 14 | 
            +
                  Authorization:
         | 
| 15 | 
            +
                  - Bearer api-token
         | 
| 16 | 
            +
              response:
         | 
| 17 | 
            +
                status:
         | 
| 18 | 
            +
                  code: 404
         | 
| 19 | 
            +
                  message: Not Found
         | 
| 20 | 
            +
                headers:
         | 
| 21 | 
            +
                  date:
         | 
| 22 | 
            +
                  - Tue, 30 Oct 2018 18:50:26 GMT
         | 
| 23 | 
            +
                  content-type:
         | 
| 24 | 
            +
                  - text/plain; charset=utf-8
         | 
| 25 | 
            +
                  content-length:
         | 
| 26 | 
            +
                  - '26'
         | 
| 27 | 
            +
                  connection:
         | 
| 28 | 
            +
                  - close
         | 
| 29 | 
            +
                body:
         | 
| 30 | 
            +
                  encoding: UTF-8
         | 
| 31 | 
            +
                  string: Match is already destroyed
         | 
| 32 | 
            +
                http_version:
         | 
| 33 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:50:26 GMT
         | 
| 34 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,30 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: post
         | 
| 5 | 
            +
                uri: https://api.gameye.com/action/start-match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: UTF-8
         | 
| 8 | 
            +
                  string: '{"gameKey":"tf2","locationKeys":["rotterdam"],"templateKey":"bots","matchKey":"serveme-test-123","config":{"hostname":"Foobarwidget"}}'
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Content-Type:
         | 
| 13 | 
            +
                  - application/json
         | 
| 14 | 
            +
                  Authorization:
         | 
| 15 | 
            +
                  - Bearer api-token
         | 
| 16 | 
            +
              response:
         | 
| 17 | 
            +
                status:
         | 
| 18 | 
            +
                  code: 204
         | 
| 19 | 
            +
                  message: No Content
         | 
| 20 | 
            +
                headers:
         | 
| 21 | 
            +
                  date:
         | 
| 22 | 
            +
                  - Tue, 30 Oct 2018 18:47:33 GMT
         | 
| 23 | 
            +
                  connection:
         | 
| 24 | 
            +
                  - close
         | 
| 25 | 
            +
                body:
         | 
| 26 | 
            +
                  encoding: UTF-8
         | 
| 27 | 
            +
                  string: ''
         | 
| 28 | 
            +
                http_version:
         | 
| 29 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:47:33 GMT
         | 
| 30 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,30 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: post
         | 
| 5 | 
            +
                uri: https://api.gameye.com/action/stop-match
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: UTF-8
         | 
| 8 | 
            +
                  string: '{"matchKey":"serveme-test-123"}'
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Content-Type:
         | 
| 13 | 
            +
                  - application/json
         | 
| 14 | 
            +
                  Authorization:
         | 
| 15 | 
            +
                  - Bearer api-token
         | 
| 16 | 
            +
              response:
         | 
| 17 | 
            +
                status:
         | 
| 18 | 
            +
                  code: 204
         | 
| 19 | 
            +
                  message: No Content
         | 
| 20 | 
            +
                headers:
         | 
| 21 | 
            +
                  date:
         | 
| 22 | 
            +
                  - Tue, 30 Oct 2018 18:50:02 GMT
         | 
| 23 | 
            +
                  connection:
         | 
| 24 | 
            +
                  - close
         | 
| 25 | 
            +
                body:
         | 
| 26 | 
            +
                  encoding: UTF-8
         | 
| 27 | 
            +
                  string: ''
         | 
| 28 | 
            +
                http_version:
         | 
| 29 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:50:02 GMT
         | 
| 30 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,66 @@ | |
| 1 | 
            +
            ---
         | 
| 2 | 
            +
            http_interactions:
         | 
| 3 | 
            +
            - request:
         | 
| 4 | 
            +
                method: get
         | 
| 5 | 
            +
                uri: https://api.gameye.com/fetch/template?gameKey=csgo
         | 
| 6 | 
            +
                body:
         | 
| 7 | 
            +
                  encoding: US-ASCII
         | 
| 8 | 
            +
                  string: ''
         | 
| 9 | 
            +
                headers:
         | 
| 10 | 
            +
                  User-Agent:
         | 
| 11 | 
            +
                  - Faraday v0.15.3
         | 
| 12 | 
            +
                  Authorization:
         | 
| 13 | 
            +
                  - Bearer api-token
         | 
| 14 | 
            +
              response:
         | 
| 15 | 
            +
                status:
         | 
| 16 | 
            +
                  code: 200
         | 
| 17 | 
            +
                  message: OK
         | 
| 18 | 
            +
                headers:
         | 
| 19 | 
            +
                  date:
         | 
| 20 | 
            +
                  - Tue, 30 Oct 2018 18:40:19 GMT
         | 
| 21 | 
            +
                  content-type:
         | 
| 22 | 
            +
                  - application/json; charset=utf-8
         | 
| 23 | 
            +
                  content-length:
         | 
| 24 | 
            +
                  - '27180'
         | 
| 25 | 
            +
                  connection:
         | 
| 26 | 
            +
                  - close
         | 
| 27 | 
            +
                body:
         | 
| 28 | 
            +
                  encoding: UTF-8
         | 
| 29 | 
            +
                  string: '{"template":{"2v2wingman":{"templateKey":"2v2wingman","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 30 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_cbble","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":2,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":16,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":4,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":300,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 31 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"bots":{"templateKey":"bots","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 32 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":30,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 33 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl1on1":{"templateKey":"esl1on1","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 34 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"maxSpectators","type":"number","defaultValue":2,"minimumValue":0,"maximumValue":4},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 35 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl1on1aim":{"templateKey":"esl1on1aim","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 36 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 37 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl1on1awp":{"templateKey":"esl1on1awp","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 38 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 39 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl1on1hg":{"templateKey":"esl1on1hg","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 40 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 41 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl1on1ka":{"templateKey":"esl1on1ka","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 42 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 43 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl2on2":{"templateKey":"esl2on2","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 44 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 45 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl2on2aim":{"templateKey":"esl2on2aim","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 46 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":18,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 47 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl2on2awp":{"templateKey":"esl2on2awp","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 48 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":18,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 49 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl2on2hg":{"templateKey":"esl2on2hg","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 50 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":18,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 51 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl3on3":{"templateKey":"esl3on3","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 52 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":30,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 53 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esl5on5":{"templateKey":"esl5on5","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 54 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"overtime","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":30,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"startMoney","type":"number","defaultValue":800,"minimumValue":0,"maximumValue":16000},{"name":"startMoneyOvertime","type":"number","defaultValue":10000,"minimumValue":0,"maximumValue":16000},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 55 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esw1v1":{"templateKey":"esw1v1","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 56 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":15,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 57 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esw5v5":{"templateKey":"esw5v5","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 58 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":30,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":12,"minimumValue":2,"maximumValue":24},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 59 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"esw5vs5-lan":{"templateKey":"esw5vs5-lan"},"ffa":{"templateKey":"ffa","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 60 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":1,"minimumValue":1,"maximumValue":30},{"name":"roundTime","type":"number","defaultValue":10,"minimumValue":1,"maximumValue":60},{"name":"maxPlayers","type":"number","defaultValue":10,"minimumValue":2,"maximumValue":24},{"name":"warmupTime","type":"number","defaultValue":120,"minimumValue":1,"maximumValue":600},{"name":"warmupTimeConnected","type":"number","defaultValue":60,"minimumValue":1,"maximumValue":600},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"defaultSecondary","type":"string","defaultValue":"weapon_elite"},{"name":"defaultPrimary","type":"string","defaultValue":"weapon_ak47"},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 61 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]},"testone":{"templateKey":"testone","arg":[{"name":"tickRate","type":"number","defaultValue":128,"option":[64,128]},{"name":"steamToken","type":"string","defaultValue":""},{"name":"hostname","type":"string","defaultValue":"gameye.com
         | 
| 62 | 
            +
                    Match Server"},{"name":"mapgroup","type":"string","defaultValue":"mg_active","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"map","type":"string","defaultValue":"de_dust2","validatePattern":"^\\w+$","validateIgnoreCase":true},{"name":"gameMode","type":"number","defaultValue":1,"option":[0,1,2]},{"name":"gameType","type":"number","defaultValue":0,"option":[0,1]},{"name":"maxRounds","type":"number","defaultValue":3,"minimumValue":1,"maximumValue":30},{"name":"maxPlayers","type":"number","defaultValue":2,"minimumValue":2,"maximumValue":24},{"name":"canClinch","type":"number","defaultValue":1,"option":[0,1]},{"name":"enableOvertime","type":"number","defaultValue":1,"option":[0,1]},{"name":"overtimeRounds","type":"number","defaultValue":6,"minimumValue":2,"maximumValue":6},{"name":"gotvDelay","type":"number","defaultValue":0,"minimumValue":0,"maximum":300},{"name":"gotvMaxClients","type":"number","defaultValue":10,"minimumValue":1,"maximum":128},{"name":"coachingMode","type":"number","defaultValue":0,"option":[0,1]},{"name":"teamNameOne","type":"string","defaultValue":"Counter
         | 
| 63 | 
            +
                    Terrorists"},{"name":"teamNameTwo","type":"string","defaultValue":"Terrorists"},{"name":"workshopMap","type":"string","defaultValue":""},{"name":"authkey","type":"string","defaultValue":""},{"name":"rconPassword","type":"string","defaultValue":""}]}}}'
         | 
| 64 | 
            +
                http_version:
         | 
| 65 | 
            +
              recorded_at: Tue, 30 Oct 2018 18:40:19 GMT
         | 
| 66 | 
            +
            recorded_with: VCR 4.0.0
         | 
| @@ -0,0 +1,17 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            module Gameye
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe Game do
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                it "fetches game information", :vcr do
         | 
| 9 | 
            +
                  response = described_class.fetch
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  expect(response.size).to eql(5)
         | 
| 12 | 
            +
                  expect(response.first.key).to eql("csgo")
         | 
| 13 | 
            +
                  expect(response.first.locations).to eql(["rotterdam", "los_angeles", "washington_dc", "frankfurt"])
         | 
| 14 | 
            +
                end
         | 
| 15 | 
            +
             | 
| 16 | 
            +
              end
         | 
| 17 | 
            +
            end
         | 
| @@ -0,0 +1,15 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
            module Gameye
         | 
| 4 | 
            +
             | 
| 5 | 
            +
              describe Location do
         | 
| 6 | 
            +
             | 
| 7 | 
            +
                it "fetches location information for a game", :vcr do
         | 
| 8 | 
            +
                  game = described_class.fetch(game_key: "tf2")
         | 
| 9 | 
            +
             | 
| 10 | 
            +
                  expect(game.key).to eql("tf2")
         | 
| 11 | 
            +
                  expect(game.locations).to eql(["rotterdam", "los_angeles", "washington_dc", "frankfurt"])
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
              end
         | 
| 15 | 
            +
            end
         | 
| @@ -0,0 +1,49 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            module Gameye
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe Match do
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                it "fetches an empty list of matches", :vcr do
         | 
| 9 | 
            +
                  matches = described_class.all
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  expect(matches).to eql([])
         | 
| 12 | 
            +
                end
         | 
| 13 | 
            +
             | 
| 14 | 
            +
                it "starts a match", :vcr do
         | 
| 15 | 
            +
                  response = described_class.start(game_key: "tf2", match_key: "serveme-test-123", location_keys: ["rotterdam"], template_key: "bots", options: {hostname: "Foobarwidget"})
         | 
| 16 | 
            +
                  expect(response).to be true
         | 
| 17 | 
            +
                end
         | 
| 18 | 
            +
             | 
| 19 | 
            +
                it "fetches matches", :vcr do
         | 
| 20 | 
            +
                  matches = described_class.all
         | 
| 21 | 
            +
             | 
| 22 | 
            +
                  expect(matches.size).to eql(1)
         | 
| 23 | 
            +
             | 
| 24 | 
            +
                  match = matches.first
         | 
| 25 | 
            +
                  expect(match.game_key).to eql("tf2")
         | 
| 26 | 
            +
                  expect(match.host).to eql("213.163.71.11")
         | 
| 27 | 
            +
                  expect(match.location_key).to eql("rotterdam")
         | 
| 28 | 
            +
                  expect(match.port).to eql(56494)
         | 
| 29 | 
            +
                  expect(match.tv_port).to eql(61828)
         | 
| 30 | 
            +
                  expect(match.created.to_s).to eql("2018-10-30 19:48:39 +0100")
         | 
| 31 | 
            +
                end
         | 
| 32 | 
            +
             | 
| 33 | 
            +
                it "returns the status if the match couldn't be started", :vcr do
         | 
| 34 | 
            +
                  response = described_class.start(game_key: "tf2", match_key: "duplicate", location_keys: ["rotterdam"], template_key: "bots", options: {hostname: "Foobarwidget"})
         | 
| 35 | 
            +
                  expect(response).to eql 500
         | 
| 36 | 
            +
                end
         | 
| 37 | 
            +
             | 
| 38 | 
            +
                it "stop a running match", :vcr do
         | 
| 39 | 
            +
                  response = described_class.stop(match_key: "serveme-test-123")
         | 
| 40 | 
            +
                  expect(response).to be true
         | 
| 41 | 
            +
                end
         | 
| 42 | 
            +
             | 
| 43 | 
            +
                it "returns the status if the running match couldn't be stopped", :vcr do
         | 
| 44 | 
            +
                  response = described_class.stop(match_key: "serveme-test-123")
         | 
| 45 | 
            +
                  expect(response).to eql 404
         | 
| 46 | 
            +
                end
         | 
| 47 | 
            +
             | 
| 48 | 
            +
              end
         | 
| 49 | 
            +
            end
         | 
| @@ -0,0 +1,25 @@ | |
| 1 | 
            +
            require 'spec_helper'
         | 
| 2 | 
            +
             | 
| 3 | 
            +
             | 
| 4 | 
            +
            module Gameye
         | 
| 5 | 
            +
             | 
| 6 | 
            +
              describe Template do
         | 
| 7 | 
            +
             | 
| 8 | 
            +
                it "fetches template information for a game", :vcr do
         | 
| 9 | 
            +
                  templates = described_class.fetch(game_key: "csgo")
         | 
| 10 | 
            +
             | 
| 11 | 
            +
                  expect(templates.size).to eql(18)
         | 
| 12 | 
            +
             | 
| 13 | 
            +
                  template = templates.first
         | 
| 14 | 
            +
                  expect(template.key).to eql("2v2wingman")
         | 
| 15 | 
            +
                  expect(template.arguments.size).to eql(20)
         | 
| 16 | 
            +
             | 
| 17 | 
            +
                  argument = template.arguments.first
         | 
| 18 | 
            +
                  expect(argument.name).to eql "tickRate"
         | 
| 19 | 
            +
                  expect(argument.type).to eql "number"
         | 
| 20 | 
            +
                  expect(argument.defaultValue).to eql 128
         | 
| 21 | 
            +
                  expect(argument.option).to eql [64, 128]
         | 
| 22 | 
            +
                end
         | 
| 23 | 
            +
             | 
| 24 | 
            +
              end
         | 
| 25 | 
            +
            end
         | 
    
        data/spec/spec_helper.rb
    ADDED
    
    | @@ -0,0 +1,24 @@ | |
| 1 | 
            +
            require "simplecov"
         | 
| 2 | 
            +
            require "coveralls"
         | 
| 3 | 
            +
             | 
| 4 | 
            +
            SimpleCov.formatters = SimpleCov::Formatter::MultiFormatter[
         | 
| 5 | 
            +
              SimpleCov::Formatter::HTMLFormatter,
         | 
| 6 | 
            +
              Coveralls::SimpleCov::Formatter
         | 
| 7 | 
            +
            ]
         | 
| 8 | 
            +
            SimpleCov.start
         | 
| 9 | 
            +
             | 
| 10 | 
            +
            require "pry-nav"
         | 
| 11 | 
            +
            require "vcr"
         | 
| 12 | 
            +
            require "gameye"
         | 
| 13 | 
            +
             | 
| 14 | 
            +
            VCR.configure do |c|
         | 
| 15 | 
            +
              c.cassette_library_dir = "spec/fixtures/vcr"
         | 
| 16 | 
            +
              c.hook_into :faraday
         | 
| 17 | 
            +
              c.configure_rspec_metadata!
         | 
| 18 | 
            +
            end
         | 
| 19 | 
            +
             | 
| 20 | 
            +
            RSpec.configure do |config|
         | 
| 21 | 
            +
              config.before(:suite) do
         | 
| 22 | 
            +
                Gameye.token = "api-token"
         | 
| 23 | 
            +
              end
         | 
| 24 | 
            +
            end
         | 
    
        metadata
    ADDED
    
    | @@ -0,0 +1,156 @@ | |
| 1 | 
            +
            --- !ruby/object:Gem::Specification
         | 
| 2 | 
            +
            name: gameye
         | 
| 3 | 
            +
            version: !ruby/object:Gem::Version
         | 
| 4 | 
            +
              version: 0.0.1
         | 
| 5 | 
            +
            platform: ruby
         | 
| 6 | 
            +
            authors:
         | 
| 7 | 
            +
            - Arie
         | 
| 8 | 
            +
            autorequire: 
         | 
| 9 | 
            +
            bindir: bin
         | 
| 10 | 
            +
            cert_chain: []
         | 
| 11 | 
            +
            date: 2018-10-25 00:00:00.000000000 Z
         | 
| 12 | 
            +
            dependencies:
         | 
| 13 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 14 | 
            +
              name: faraday
         | 
| 15 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 16 | 
            +
                requirements:
         | 
| 17 | 
            +
                - - "~>"
         | 
| 18 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 19 | 
            +
                    version: '0.8'
         | 
| 20 | 
            +
              type: :runtime
         | 
| 21 | 
            +
              prerelease: false
         | 
| 22 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 23 | 
            +
                requirements:
         | 
| 24 | 
            +
                - - "~>"
         | 
| 25 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 26 | 
            +
                    version: '0.8'
         | 
| 27 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 28 | 
            +
              name: vcr
         | 
| 29 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 30 | 
            +
                requirements:
         | 
| 31 | 
            +
                - - ">="
         | 
| 32 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 33 | 
            +
                    version: '0'
         | 
| 34 | 
            +
              type: :development
         | 
| 35 | 
            +
              prerelease: false
         | 
| 36 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 37 | 
            +
                requirements:
         | 
| 38 | 
            +
                - - ">="
         | 
| 39 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 40 | 
            +
                    version: '0'
         | 
| 41 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 42 | 
            +
              name: coveralls
         | 
| 43 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 44 | 
            +
                requirements:
         | 
| 45 | 
            +
                - - ">="
         | 
| 46 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 47 | 
            +
                    version: '0'
         | 
| 48 | 
            +
              type: :development
         | 
| 49 | 
            +
              prerelease: false
         | 
| 50 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 51 | 
            +
                requirements:
         | 
| 52 | 
            +
                - - ">="
         | 
| 53 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 54 | 
            +
                    version: '0'
         | 
| 55 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 56 | 
            +
              name: pry-nav
         | 
| 57 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 58 | 
            +
                requirements:
         | 
| 59 | 
            +
                - - ">="
         | 
| 60 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 61 | 
            +
                    version: '0'
         | 
| 62 | 
            +
              type: :development
         | 
| 63 | 
            +
              prerelease: false
         | 
| 64 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 65 | 
            +
                requirements:
         | 
| 66 | 
            +
                - - ">="
         | 
| 67 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 68 | 
            +
                    version: '0'
         | 
| 69 | 
            +
            - !ruby/object:Gem::Dependency
         | 
| 70 | 
            +
              name: rspec
         | 
| 71 | 
            +
              requirement: !ruby/object:Gem::Requirement
         | 
| 72 | 
            +
                requirements:
         | 
| 73 | 
            +
                - - ">="
         | 
| 74 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 75 | 
            +
                    version: '0'
         | 
| 76 | 
            +
              type: :development
         | 
| 77 | 
            +
              prerelease: false
         | 
| 78 | 
            +
              version_requirements: !ruby/object:Gem::Requirement
         | 
| 79 | 
            +
                requirements:
         | 
| 80 | 
            +
                - - ">="
         | 
| 81 | 
            +
                  - !ruby/object:Gem::Version
         | 
| 82 | 
            +
                    version: '0'
         | 
| 83 | 
            +
            description: A gem to interface with the Gameye API
         | 
| 84 | 
            +
            email: rubygems@ariekanarie.nl
         | 
| 85 | 
            +
            executables: []
         | 
| 86 | 
            +
            extensions: []
         | 
| 87 | 
            +
            extra_rdoc_files: []
         | 
| 88 | 
            +
            files:
         | 
| 89 | 
            +
            - ".gitignore"
         | 
| 90 | 
            +
            - ".rspec"
         | 
| 91 | 
            +
            - ".ruby-version"
         | 
| 92 | 
            +
            - ".travis.yml"
         | 
| 93 | 
            +
            - Gemfile
         | 
| 94 | 
            +
            - Gemfile.lock
         | 
| 95 | 
            +
            - gameye.gemspec
         | 
| 96 | 
            +
            - lib/gameye.rb
         | 
| 97 | 
            +
            - lib/gameye/client.rb
         | 
| 98 | 
            +
            - lib/gameye/game.rb
         | 
| 99 | 
            +
            - lib/gameye/location.rb
         | 
| 100 | 
            +
            - lib/gameye/match.rb
         | 
| 101 | 
            +
            - lib/gameye/template.rb
         | 
| 102 | 
            +
            - lib/gameye/version.rb
         | 
| 103 | 
            +
            - script/bundler
         | 
| 104 | 
            +
            - script/ci
         | 
| 105 | 
            +
            - spec/fixtures/vcr/Gameye_Game/fetches_game_information.yml
         | 
| 106 | 
            +
            - spec/fixtures/vcr/Gameye_Location/fetches_location_information_for_a_game.yml
         | 
| 107 | 
            +
            - spec/fixtures/vcr/Gameye_Match/fetches_an_empty_list_of_matches.yml
         | 
| 108 | 
            +
            - spec/fixtures/vcr/Gameye_Match/fetches_matches.yml
         | 
| 109 | 
            +
            - spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_match_couldn_t_be_started.yml
         | 
| 110 | 
            +
            - spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_running_match_couldn_t_be_stopped.yml
         | 
| 111 | 
            +
            - spec/fixtures/vcr/Gameye_Match/starts_a_match.yml
         | 
| 112 | 
            +
            - spec/fixtures/vcr/Gameye_Match/stop_a_running_match.yml
         | 
| 113 | 
            +
            - spec/fixtures/vcr/Gameye_Template/fetches_template_information_for_a_game.yml
         | 
| 114 | 
            +
            - spec/lib/gameye/game_spec.rb
         | 
| 115 | 
            +
            - spec/lib/gameye/location_spec.rb
         | 
| 116 | 
            +
            - spec/lib/gameye/match_spec.rb
         | 
| 117 | 
            +
            - spec/lib/gameye/template_spec.rb
         | 
| 118 | 
            +
            - spec/spec_helper.rb
         | 
| 119 | 
            +
            homepage: http://github.com/Arie/gameye
         | 
| 120 | 
            +
            licenses: []
         | 
| 121 | 
            +
            metadata: {}
         | 
| 122 | 
            +
            post_install_message: 
         | 
| 123 | 
            +
            rdoc_options: []
         | 
| 124 | 
            +
            require_paths:
         | 
| 125 | 
            +
            - lib
         | 
| 126 | 
            +
            required_ruby_version: !ruby/object:Gem::Requirement
         | 
| 127 | 
            +
              requirements:
         | 
| 128 | 
            +
              - - ">="
         | 
| 129 | 
            +
                - !ruby/object:Gem::Version
         | 
| 130 | 
            +
                  version: '0'
         | 
| 131 | 
            +
            required_rubygems_version: !ruby/object:Gem::Requirement
         | 
| 132 | 
            +
              requirements:
         | 
| 133 | 
            +
              - - ">="
         | 
| 134 | 
            +
                - !ruby/object:Gem::Version
         | 
| 135 | 
            +
                  version: '0'
         | 
| 136 | 
            +
            requirements: []
         | 
| 137 | 
            +
            rubyforge_project: 
         | 
| 138 | 
            +
            rubygems_version: 2.7.6
         | 
| 139 | 
            +
            signing_key: 
         | 
| 140 | 
            +
            specification_version: 4
         | 
| 141 | 
            +
            summary: Gameye API
         | 
| 142 | 
            +
            test_files:
         | 
| 143 | 
            +
            - spec/fixtures/vcr/Gameye_Game/fetches_game_information.yml
         | 
| 144 | 
            +
            - spec/fixtures/vcr/Gameye_Location/fetches_location_information_for_a_game.yml
         | 
| 145 | 
            +
            - spec/fixtures/vcr/Gameye_Match/fetches_an_empty_list_of_matches.yml
         | 
| 146 | 
            +
            - spec/fixtures/vcr/Gameye_Match/fetches_matches.yml
         | 
| 147 | 
            +
            - spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_match_couldn_t_be_started.yml
         | 
| 148 | 
            +
            - spec/fixtures/vcr/Gameye_Match/returns_the_status_if_the_running_match_couldn_t_be_stopped.yml
         | 
| 149 | 
            +
            - spec/fixtures/vcr/Gameye_Match/starts_a_match.yml
         | 
| 150 | 
            +
            - spec/fixtures/vcr/Gameye_Match/stop_a_running_match.yml
         | 
| 151 | 
            +
            - spec/fixtures/vcr/Gameye_Template/fetches_template_information_for_a_game.yml
         | 
| 152 | 
            +
            - spec/lib/gameye/game_spec.rb
         | 
| 153 | 
            +
            - spec/lib/gameye/location_spec.rb
         | 
| 154 | 
            +
            - spec/lib/gameye/match_spec.rb
         | 
| 155 | 
            +
            - spec/lib/gameye/template_spec.rb
         | 
| 156 | 
            +
            - spec/spec_helper.rb
         |