thegamesdb 1.1.2 → 2.0.0

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.
@@ -0,0 +1,16 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative './test_helper'
4
+
5
+ describe 'GamesDB - Publishers', :vcr do
6
+ let(:client) { Gamesdb::Client.new(ENV['GAMESDB_API_KEY']) }
7
+
8
+ describe 'publishers' do
9
+ it 'should return publishers' do
10
+ publishers = client.publishers
11
+
12
+ expect(publishers.count).must_equal 4371
13
+ expect(publishers.first.keys).must_equal(['id', 'name'])
14
+ end
15
+ end
16
+ end
@@ -1,10 +1,11 @@
1
- require 'simplecov'
2
- SimpleCov.start
1
+ # frozen_string_literal: true
2
+
3
3
  require 'minitest/autorun'
4
4
  require 'minitest/reporters'
5
5
  require 'minitest/spec'
6
6
  require 'vcr'
7
7
  require 'minitest-vcr'
8
+
8
9
  Minitest::Reporters.use! Minitest::Reporters::SpecReporter.new
9
10
  MinitestVcr::Spec.configure!
10
11
 
@@ -1,8 +1,11 @@
1
+ # frozen_string_literal: true
2
+
1
3
  lib = File.expand_path('lib', __dir__)
2
4
 
3
5
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
6
  require 'thegamesdb/version'
5
7
 
8
+ # rubocop:disable Metrics/BlockLength
6
9
  Gem::Specification.new do |spec|
7
10
  spec.name = 'thegamesdb'
8
11
  spec.version = Gamesdb::VERSION
@@ -13,23 +16,25 @@ Gem::Specification.new do |spec|
13
16
  spec.homepage = 'http://github.com/picandocodigo/gamesdb'
14
17
  spec.license = 'MIT'
15
18
 
16
- spec.files = `git ls-files`.split($/)
19
+ spec.files = `git ls-files`.split($INPUT_RECORD_SEPARATOR)
17
20
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
21
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
22
  spec.require_paths = ['lib']
23
+ spec.required_ruby_version = '> 2.5.0'
20
24
  spec.add_development_dependency 'bundler'
21
- spec.add_development_dependency 'byebug'
25
+ spec.add_development_dependency 'byebug' unless defined?(JRUBY_VERSION)
22
26
  spec.add_development_dependency 'minitest-reporters'
23
27
  spec.add_development_dependency 'minitest-vcr'
24
28
  spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'simplecov'
29
+ spec.add_development_dependency 'rubocop'
26
30
  spec.add_development_dependency 'vcr', '~> 4'
27
31
  spec.add_development_dependency 'webmock'
28
- spec.metadata = {
29
- "bug_tracker_uri" => "https://github.com/picandocodigo/gamesdb/issues",
30
- "changelog_uri" => "https://github.com/picandocodigo/gamesdb/blob/master/CHANGELOG.md",
31
- "documentation_uri" => "https://github.com/picandocodigo/gamesdb/blob/master/README.md#gamesdb",
32
- "homepage_uri" => "https://github.com/picandocodigo/gamesdb",
33
- "source_code_uri" => "https://github.com/picandocodigo/gamesdb",
32
+ spec.metadata = {
33
+ 'bug_tracker_uri' => 'https://github.com/picandocodigo/gamesdb/issues',
34
+ 'changelog_uri' => 'https://github.com/picandocodigo/gamesdb/blob/master/CHANGELOG.md',
35
+ 'documentation_uri' => 'https://github.com/picandocodigo/gamesdb/blob/master/README.md#gamesdb',
36
+ 'homepage_uri' => 'https://github.com/picandocodigo/gamesdb',
37
+ 'source_code_uri' => 'https://github.com/picandocodigo/gamesdb'
34
38
  }
35
39
  end
40
+ # rubocop:enable Metrics/BlockLength
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: thegamesdb
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.2
4
+ version: 2.0.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Fernando Briano
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-02-16 00:00:00.000000000 Z
11
+ date: 2020-11-30 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: simplecov
84
+ name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -129,18 +129,29 @@ executables: []
129
129
  extensions: []
130
130
  extra_rdoc_files: []
131
131
  files:
132
+ - ".github/workflows/master.yml"
133
+ - ".github/workflows/rubocop.yml"
132
134
  - ".gitignore"
133
- - ".travis.yml"
135
+ - ".rubocop.yml"
134
136
  - CHANGELOG.md
135
137
  - Gemfile
136
138
  - LICENSE.txt
137
139
  - README.md
138
140
  - Rakefile
139
141
  - lib/thegamesdb.rb
140
- - lib/thegamesdb/config.rb
142
+ - lib/thegamesdb/developers.rb
143
+ - lib/thegamesdb/games.rb
144
+ - lib/thegamesdb/genres.rb
145
+ - lib/thegamesdb/images.rb
146
+ - lib/thegamesdb/platforms.rb
147
+ - lib/thegamesdb/publishers.rb
141
148
  - lib/thegamesdb/version.rb
149
+ - test/client_test.rb
150
+ - test/developers_test.rb
142
151
  - test/games_test.rb
152
+ - test/genres_test.rb
143
153
  - test/platform_test.rb
154
+ - test/publishers_test.rb
144
155
  - test/test_helper.rb
145
156
  - thegamesdb.gemspec
146
157
  homepage: http://github.com/picandocodigo/gamesdb
@@ -158,20 +169,24 @@ require_paths:
158
169
  - lib
159
170
  required_ruby_version: !ruby/object:Gem::Requirement
160
171
  requirements:
161
- - - ">="
172
+ - - ">"
162
173
  - !ruby/object:Gem::Version
163
- version: '0'
174
+ version: 2.5.0
164
175
  required_rubygems_version: !ruby/object:Gem::Requirement
165
176
  requirements:
166
177
  - - ">="
167
178
  - !ruby/object:Gem::Version
168
179
  version: '0'
169
180
  requirements: []
170
- rubygems_version: 3.0.6
181
+ rubygems_version: 3.0.8
171
182
  signing_key:
172
183
  specification_version: 4
173
184
  summary: Client for TheGamesDB API (thegamesdb.net).
174
185
  test_files:
186
+ - test/client_test.rb
187
+ - test/developers_test.rb
175
188
  - test/games_test.rb
189
+ - test/genres_test.rb
176
190
  - test/platform_test.rb
191
+ - test/publishers_test.rb
177
192
  - test/test_helper.rb
@@ -1,24 +0,0 @@
1
- env:
2
- global:
3
- - CC_TEST_REPORTER_ID=3ca09808c18a3fb0a12a7b113aeca064acf88831f8a36ee2e9fda89ca37b0650
4
- language: ruby
5
- rvm:
6
- - 2.3.8
7
- - 2.4.9
8
- - 2.5.7
9
- - 2.6.5
10
- - 2.7.0
11
- - truffleruby
12
- - ruby-head
13
- install: bundle install
14
- before_script:
15
- - curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
16
- - chmod +x ./cc-test-reporter
17
- - ./cc-test-reporter before-build
18
- script:
19
- - bundle exec rake test
20
- after_script:
21
- - ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT
22
- allow_failures:
23
- - rvm: ruby-head
24
- - rvm: truffleruby
@@ -1,9 +0,0 @@
1
- module Gamesdb
2
- class Config
3
- attr_accessor :api_key
4
-
5
- def initialize
6
- @api_key = ENV['GAMESDB_API_KEY'] || nil
7
- end
8
- end
9
- end