valorant 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +6 -0
- data/Gemfile.lock +80 -0
- data/Rakefile +28 -0
- data/bin/console +3 -3
- data/lib/{valorant → api}/account.rb +0 -0
- data/lib/{valorant → api}/match.rb +0 -0
- data/lib/{valorant → api}/misc.rb +0 -0
- data/lib/{valorant → api}/mmr.rb +0 -0
- data/lib/{valorant → api}/utils/article.rb +0 -0
- data/lib/{valorant → api}/utils/articles.rb +0 -0
- data/lib/{valorant → api}/utils/leader.rb +0 -0
- data/lib/{valorant → api}/utils/leader_board.rb +0 -0
- data/lib/{valorant → api}/utils/match.rb +0 -0
- data/lib/{valorant → api}/utils/matches_history.rb +0 -0
- data/lib/{valorant → api}/utils/mmr_history.rb +0 -0
- data/lib/{valorant → api}/utils/mmr_v1.rb +0 -0
- data/lib/{valorant → api}/utils/player.rb +1 -1
- data/lib/{valorant → api}/utils/user.rb +0 -0
- data/lib/{valorant → api}/utils/utilities.rb +3 -3
- data/lib/{valorant → api}/version.rb +1 -1
- data/lib/valorant.rb +5 -5
- data/valorant.gemspec +15 -15
- metadata +19 -18
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c4a6d80baaa6942d0e98d3015732c0625fc8037c123a115a47b452adc19f45be
|
4
|
+
data.tar.gz: eccfc8c6c3455e7379c3f3807e95c5422f2ba4348d30672266224358fa373357
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e36d14bc45b5c3d9126000625fa7e1ae8392f6ccec6c1531aa532d55a57725a90ba57c4d2bb987dd90bf0ffe65ee3b88e422258d0647b29af1bdecdd7af31974
|
7
|
+
data.tar.gz: 00a1c6b6162a6ca6b5ca4beeec02db2a3326bb7bdce2a95418b6c100859947e4f2d3356693b8a25d83aed72fec35e21a9dbe767cd3ef7473693199d32585611c
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
ADDED
@@ -0,0 +1,80 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
valorant (0.1.1)
|
5
|
+
|
6
|
+
GEM
|
7
|
+
remote: https://rubygems.org/
|
8
|
+
specs:
|
9
|
+
ast (2.4.2)
|
10
|
+
date (3.2.2)
|
11
|
+
diff-lcs (1.5.0)
|
12
|
+
domain_name (0.5.20190701)
|
13
|
+
unf (>= 0.0.5, < 1.0.0)
|
14
|
+
fast_jsonparser (0.6.0)
|
15
|
+
http-accept (1.7.0)
|
16
|
+
http-cookie (1.0.5)
|
17
|
+
domain_name (~> 0.5)
|
18
|
+
json (2.6.2)
|
19
|
+
mime-types (3.4.1)
|
20
|
+
mime-types-data (~> 3.2015)
|
21
|
+
mime-types-data (3.2022.0105)
|
22
|
+
netrc (0.11.0)
|
23
|
+
parallel (1.22.1)
|
24
|
+
parser (3.1.2.1)
|
25
|
+
ast (~> 2.4.1)
|
26
|
+
rainbow (3.1.1)
|
27
|
+
rake (13.0.6)
|
28
|
+
regexp_parser (2.6.0)
|
29
|
+
rest-client (2.1.0)
|
30
|
+
http-accept (>= 1.7.0, < 2.0)
|
31
|
+
http-cookie (>= 1.0.2, < 2.0)
|
32
|
+
mime-types (>= 1.16, < 4.0)
|
33
|
+
netrc (~> 0.8)
|
34
|
+
rexml (3.2.5)
|
35
|
+
rspec (3.12.0)
|
36
|
+
rspec-core (~> 3.12.0)
|
37
|
+
rspec-expectations (~> 3.12.0)
|
38
|
+
rspec-mocks (~> 3.12.0)
|
39
|
+
rspec-core (3.12.0)
|
40
|
+
rspec-support (~> 3.12.0)
|
41
|
+
rspec-expectations (3.12.0)
|
42
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
43
|
+
rspec-support (~> 3.12.0)
|
44
|
+
rspec-mocks (3.12.0)
|
45
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
46
|
+
rspec-support (~> 3.12.0)
|
47
|
+
rspec-support (3.12.0)
|
48
|
+
rubocop (1.39.0)
|
49
|
+
json (~> 2.3)
|
50
|
+
parallel (~> 1.10)
|
51
|
+
parser (>= 3.1.2.1)
|
52
|
+
rainbow (>= 2.2.2, < 4.0)
|
53
|
+
regexp_parser (>= 1.8, < 3.0)
|
54
|
+
rexml (>= 3.2.5, < 4.0)
|
55
|
+
rubocop-ast (>= 1.23.0, < 2.0)
|
56
|
+
ruby-progressbar (~> 1.7)
|
57
|
+
unicode-display_width (>= 1.4.0, < 3.0)
|
58
|
+
rubocop-ast (1.23.0)
|
59
|
+
parser (>= 3.1.1.0)
|
60
|
+
ruby-progressbar (1.11.0)
|
61
|
+
unf (0.1.4)
|
62
|
+
unf_ext
|
63
|
+
unf_ext (0.0.8.2)
|
64
|
+
unicode-display_width (2.3.0)
|
65
|
+
|
66
|
+
PLATFORMS
|
67
|
+
x86_64-darwin-21
|
68
|
+
x86_64-linux
|
69
|
+
|
70
|
+
DEPENDENCIES
|
71
|
+
date
|
72
|
+
fast_jsonparser
|
73
|
+
rake (~> 13.0)
|
74
|
+
rest-client
|
75
|
+
rspec (~> 3.0)
|
76
|
+
rubocop (~> 1.21)
|
77
|
+
valorant!
|
78
|
+
|
79
|
+
BUNDLED WITH
|
80
|
+
2.3.25
|
data/Rakefile
CHANGED
@@ -26,4 +26,32 @@ task :console do
|
|
26
26
|
sh 'bin/console'
|
27
27
|
end
|
28
28
|
|
29
|
+
## Exposed API methods tests
|
30
|
+
|
31
|
+
namespace :api do
|
32
|
+
desc 'Run rspec on api/match.rb'
|
33
|
+
RSpec::Core::RakeTask.new(:match) do |t|
|
34
|
+
t.rspec_opts = ' --require utils/helpers/bonus_formatter.rb --format BonusFormatter'
|
35
|
+
t.pattern = 'spec/valorant/api_match_spec.rb'
|
36
|
+
end
|
37
|
+
|
38
|
+
desc 'Run rspec on api/account.rb'
|
39
|
+
RSpec::Core::RakeTask.new(:account) do |t|
|
40
|
+
t.rspec_opts = ' --require utils/helpers/bonus_formatter.rb --format BonusFormatter'
|
41
|
+
t.pattern = 'spec/valorant/api_account_spec.rb'
|
42
|
+
end
|
43
|
+
|
44
|
+
desc 'Run rspec on api/misc.rb'
|
45
|
+
RSpec::Core::RakeTask.new(:misc) do |t|
|
46
|
+
t.rspec_opts = ' --require utils/helpers/bonus_formatter.rb --format BonusFormatter'
|
47
|
+
t.pattern = 'spec/valorant/api_misc_spec.rb'
|
48
|
+
end
|
49
|
+
|
50
|
+
desc 'Run rspec on api/mmr.rb'
|
51
|
+
RSpec::Core::RakeTask.new(:mmr) do |t|
|
52
|
+
t.rspec_opts = ' --require utils/helpers/bonus_formatter.rb --format BonusFormatter'
|
53
|
+
t.pattern = 'spec/valorant/api_mmr_spec.rb'
|
54
|
+
end
|
55
|
+
end
|
56
|
+
|
29
57
|
task default: %i[spec rubocop]
|
data/bin/console
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
#!/usr/bin/env ruby
|
2
2
|
# frozen_string_literal: true
|
3
3
|
|
4
|
-
require
|
5
|
-
require
|
4
|
+
require 'bundler/setup'
|
5
|
+
require 'valorant'
|
6
6
|
|
7
7
|
# You can add fixtures and/or initialization code here to make experimenting
|
8
8
|
# with your gem easier. You can also use a different console, if you like.
|
@@ -11,5 +11,5 @@ require "valorant"
|
|
11
11
|
# require "pry"
|
12
12
|
# Pry.start
|
13
13
|
|
14
|
-
require
|
14
|
+
require 'irb'
|
15
15
|
IRB.start(__FILE__)
|
File without changes
|
File without changes
|
File without changes
|
data/lib/{valorant → api}/mmr.rb
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -16,7 +16,7 @@ end
|
|
16
16
|
def validate_response(response)
|
17
17
|
return response.body if response.code == 200
|
18
18
|
|
19
|
-
raise "Error: #{response.code} - #{response[
|
19
|
+
raise "Error: #{response.code} - #{response["message"]}"
|
20
20
|
end
|
21
21
|
|
22
22
|
def validate_filter(filter)
|
@@ -24,7 +24,7 @@ def validate_filter(filter)
|
|
24
24
|
|
25
25
|
filters = %w[escalation spikerush deathmatch competitive unrated replication game_updates dev esports
|
26
26
|
announcments]
|
27
|
-
raise "Error: Invalid filter. Valid filters are: #{filters.join(
|
27
|
+
raise "Error: Invalid filter. Valid filters are: #{filters.join(", ")}" unless filters.include?(filter)
|
28
28
|
|
29
29
|
filter
|
30
30
|
end
|
@@ -33,7 +33,7 @@ def validate_locale(locale)
|
|
33
33
|
return if locale.empty?
|
34
34
|
|
35
35
|
locales = %w[en-us en-gb de-de es-es fr-fr it-it ru-ru tr-tr es-mx ja-jp ko-kr pt-br]
|
36
|
-
raise "Error: Invalid locale. Valid locales are: #{locales.join(
|
36
|
+
raise "Error: Invalid locale. Valid locales are: #{locales.join(", ")}" unless locales.include?(locale)
|
37
37
|
|
38
38
|
locale
|
39
39
|
end
|
data/lib/valorant.rb
CHANGED
@@ -1,9 +1,9 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
3
|
module Valorant
|
4
|
-
require_relative '
|
5
|
-
require_relative '
|
6
|
-
require_relative '
|
7
|
-
require_relative '
|
8
|
-
require_relative '
|
4
|
+
require_relative 'api/version'
|
5
|
+
require_relative 'api/account'
|
6
|
+
require_relative 'api/match'
|
7
|
+
require_relative 'api/mmr'
|
8
|
+
require_relative 'api/misc'
|
9
9
|
end
|
data/valorant.gemspec
CHANGED
@@ -1,30 +1,30 @@
|
|
1
1
|
# frozen_string_literal: true
|
2
2
|
|
3
|
-
require_relative
|
3
|
+
require_relative 'lib/api/version'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.name =
|
6
|
+
spec.name = 'valorant'
|
7
7
|
spec.version = Valorant::Api::VERSION
|
8
|
-
spec.authors = [
|
9
|
-
spec.email = [
|
8
|
+
spec.authors = ['Gerard Hernandez']
|
9
|
+
spec.email = ['ger.almenara@gmail.com']
|
10
10
|
|
11
|
-
spec.summary =
|
12
|
-
spec.homepage =
|
13
|
-
spec.required_ruby_version =
|
11
|
+
spec.summary = 'An API wrapper for the Hendriks Valorant API 🍬'
|
12
|
+
spec.homepage = 'https://github.com/jaredthejellyfish/ruby-hendriks-val'
|
13
|
+
spec.required_ruby_version = '>= 3.1.2'
|
14
14
|
|
15
|
-
spec.metadata[
|
16
|
-
spec.metadata[
|
17
|
-
spec.metadata[
|
15
|
+
spec.metadata['homepage_uri'] = spec.homepage
|
16
|
+
spec.metadata['source_code_uri'] = 'https://github.com/jaredthejellyfish/ruby-hendriks-val'
|
17
|
+
spec.metadata['changelog_uri'] = 'https://github.com/jaredthejellyfish/ruby-hendriks-val'
|
18
18
|
|
19
19
|
# Specify which files should be added to the gem when it is released.
|
20
20
|
# The `git ls-files -z` loads the files in the RubyGem that have been added into git.
|
21
21
|
require 'rake'
|
22
|
-
spec.files = FileList['lib/**/*.rb',
|
23
|
-
|
24
|
-
|
25
|
-
spec.bindir =
|
22
|
+
spec.files = FileList['lib/**/*.rb',
|
23
|
+
'bin/*',
|
24
|
+
'[A-Z]*'].to_a
|
25
|
+
spec.bindir = 'exe'
|
26
26
|
spec.executables = spec.files.grep(%r{\Aexe/}) { |f| File.basename(f) }
|
27
|
-
spec.require_paths = [
|
27
|
+
spec.require_paths = ['lib']
|
28
28
|
|
29
29
|
# Uncomment to register a new dependency of your gem
|
30
30
|
# spec.add_dependency "example-gem", "~> 1.0"
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: valorant
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Gerard Hernandez
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2022-11-
|
11
|
+
date: 2022-11-21 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description:
|
14
14
|
email:
|
@@ -19,27 +19,28 @@ extra_rdoc_files: []
|
|
19
19
|
files:
|
20
20
|
- CHANGELOG.md
|
21
21
|
- Gemfile
|
22
|
+
- Gemfile.lock
|
22
23
|
- README.md
|
23
24
|
- Rakefile
|
24
25
|
- bin/console
|
25
26
|
- bin/setup
|
27
|
+
- lib/api/account.rb
|
28
|
+
- lib/api/match.rb
|
29
|
+
- lib/api/misc.rb
|
30
|
+
- lib/api/mmr.rb
|
31
|
+
- lib/api/utils/article.rb
|
32
|
+
- lib/api/utils/articles.rb
|
33
|
+
- lib/api/utils/leader.rb
|
34
|
+
- lib/api/utils/leader_board.rb
|
35
|
+
- lib/api/utils/match.rb
|
36
|
+
- lib/api/utils/matches_history.rb
|
37
|
+
- lib/api/utils/mmr_history.rb
|
38
|
+
- lib/api/utils/mmr_v1.rb
|
39
|
+
- lib/api/utils/player.rb
|
40
|
+
- lib/api/utils/user.rb
|
41
|
+
- lib/api/utils/utilities.rb
|
42
|
+
- lib/api/version.rb
|
26
43
|
- lib/valorant.rb
|
27
|
-
- lib/valorant/account.rb
|
28
|
-
- lib/valorant/match.rb
|
29
|
-
- lib/valorant/misc.rb
|
30
|
-
- lib/valorant/mmr.rb
|
31
|
-
- lib/valorant/utils/article.rb
|
32
|
-
- lib/valorant/utils/articles.rb
|
33
|
-
- lib/valorant/utils/leader.rb
|
34
|
-
- lib/valorant/utils/leader_board.rb
|
35
|
-
- lib/valorant/utils/match.rb
|
36
|
-
- lib/valorant/utils/matches_history.rb
|
37
|
-
- lib/valorant/utils/mmr_history.rb
|
38
|
-
- lib/valorant/utils/mmr_v1.rb
|
39
|
-
- lib/valorant/utils/player.rb
|
40
|
-
- lib/valorant/utils/user.rb
|
41
|
-
- lib/valorant/utils/utilities.rb
|
42
|
-
- lib/valorant/version.rb
|
43
44
|
- valorant.gemspec
|
44
45
|
homepage: https://github.com/jaredthejellyfish/ruby-hendriks-val
|
45
46
|
licenses: []
|