valorant 0.1.0 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a36f9f5ee4cd08482186eb82e1b4832f942c482d65ef3b3acb059d1377d1c96
4
- data.tar.gz: 4ed8029b401abbfae509c107de62784083f4194b9c4da01808ae55f1c2b834dd
3
+ metadata.gz: c6b02dcc5bada5f9e14dcf5e7c2b4a4e3dfebd62e733a74ef343d51eb7024829
4
+ data.tar.gz: 8a8ea52fff1028a4e9d8bee3f3292a032c448aed75ec2cf39d18516884ad7cda
5
5
  SHA512:
6
- metadata.gz: b199bceb9378e2a15ab30e5400aa884a0fe709f44720a62367ea1f699d6344a6dfa87168bd5b7224d6d1f59c379459af3308d029f1b94674eb7ffc9e1923de29
7
- data.tar.gz: e8da10bb9ec1cdfffd79ab75e4e91d3c0dc6a1dcaeccc820ef5681b08a3dc11ca5932e5f75cc1b50b10b17f965d5f3ff418441554814d6c7e93a37b76209fe69
6
+ metadata.gz: 867981bdb05ded4140216a83c9f49975ec1a5d403e8cd0b04467ea4abf9ca0b0f3c2bfd22941fb84b34a769c63042094663ff4de90313a7baa4238e6bd4f9aa2
7
+ data.tar.gz: 2ab91164dd128aac7d4025b33308bdcc8fc26b94a186c3fa1727f50e150fd1a9f8887c1a3881b5a25fedd5efd7cea8480947492783ee990af999406e06172b86
data/CHANGELOG.md CHANGED
@@ -3,3 +3,9 @@
3
3
  ## [0.1.0] - 2022-11-16
4
4
 
5
5
  - Initial release
6
+
7
+ ## [Unreleased]
8
+
9
+ ## [0.1.1] - 2022-11-21
10
+
11
+ - Added spec files for all utilities in the valorant module.
data/Gemfile.lock ADDED
@@ -0,0 +1,83 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ valorant (0.1.3)
5
+ fast_jsonparser
6
+ rest-client
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ date (3.2.2)
13
+ diff-lcs (1.5.0)
14
+ domain_name (0.5.20190701)
15
+ unf (>= 0.0.5, < 1.0.0)
16
+ fast_jsonparser (0.6.0)
17
+ http-accept (1.7.0)
18
+ http-cookie (1.0.5)
19
+ domain_name (~> 0.5)
20
+ json (2.6.2)
21
+ mime-types (3.4.1)
22
+ mime-types-data (~> 3.2015)
23
+ mime-types-data (3.2022.0105)
24
+ netrc (0.11.0)
25
+ parallel (1.22.1)
26
+ parser (3.1.2.1)
27
+ ast (~> 2.4.1)
28
+ rainbow (3.1.1)
29
+ rake (13.0.6)
30
+ regexp_parser (2.6.0)
31
+ rest-client (2.1.0)
32
+ http-accept (>= 1.7.0, < 2.0)
33
+ http-cookie (>= 1.0.2, < 2.0)
34
+ mime-types (>= 1.16, < 4.0)
35
+ netrc (~> 0.8)
36
+ rexml (3.2.5)
37
+ rspec (3.12.0)
38
+ rspec-core (~> 3.12.0)
39
+ rspec-expectations (~> 3.12.0)
40
+ rspec-mocks (~> 3.12.0)
41
+ rspec-core (3.12.0)
42
+ rspec-support (~> 3.12.0)
43
+ rspec-expectations (3.12.0)
44
+ diff-lcs (>= 1.2.0, < 2.0)
45
+ rspec-support (~> 3.12.0)
46
+ rspec-mocks (3.12.0)
47
+ diff-lcs (>= 1.2.0, < 2.0)
48
+ rspec-support (~> 3.12.0)
49
+ rspec-support (3.12.0)
50
+ rubocop (1.39.0)
51
+ json (~> 2.3)
52
+ parallel (~> 1.10)
53
+ parser (>= 3.1.2.1)
54
+ rainbow (>= 2.2.2, < 4.0)
55
+ regexp_parser (>= 1.8, < 3.0)
56
+ rexml (>= 3.2.5, < 4.0)
57
+ rubocop-ast (>= 1.23.0, < 2.0)
58
+ ruby-progressbar (~> 1.7)
59
+ unicode-display_width (>= 1.4.0, < 3.0)
60
+ rubocop-ast (1.23.0)
61
+ parser (>= 3.1.1.0)
62
+ ruby-progressbar (1.11.0)
63
+ unf (0.1.4)
64
+ unf_ext
65
+ unf_ext (0.0.8.2)
66
+ unicode-display_width (2.3.0)
67
+
68
+ PLATFORMS
69
+ arm64-darwin-21
70
+ x86_64-darwin-21
71
+ x86_64-linux
72
+
73
+ DEPENDENCIES
74
+ date
75
+ fast_jsonparser
76
+ rake (~> 13.0)
77
+ rest-client
78
+ rspec (~> 3.0)
79
+ rubocop (~> 1.21)
80
+ valorant!
81
+
82
+ BUNDLED WITH
83
+ 2.3.25
data/README.md CHANGED
@@ -1,4 +1,9 @@
1
- # Valorant
1
+ # Valorant
2
+ [![GitHub Workflow Status (event)](https://img.shields.io/github/workflow/status/jaredthejellyfish/ruby-hendriks-val/CI?event=push&label=CI&style=flat)](https://github.com/jaredthejellyfish/ruby-hendriks-val/actions/workflows/main.yml)
3
+ [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jaredthejellyfish/ruby-hendriks-val/CodeQL?label=CodeQL)](https://github.com/jaredthejellyfish/ruby-hendriks-val/actions/workflows/codeql.yml)
4
+ [![Gem](https://img.shields.io/gem/v/valorant?style=flat)](https://rubygems.org/gems/valorant)
5
+ [![Gem](https://img.shields.io/gem/dt/valorant)](https://rubygems.org/gems/valorant)
6
+ [![GitHub last commit](https://img.shields.io/github/last-commit/jaredthejellyfish/ruby-hendriks-val)](https://github.com/jaredthejellyfish/ruby-hendriks-val/commits/master)
2
7
 
3
8
  Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/valorant`. To experiment with that code, run `bin/console` for an interactive prompt.
4
9
 
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 "bundler/setup"
5
- require "valorant"
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 "irb"
14
+ require 'irb'
15
15
  IRB.start(__FILE__)
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
File without changes
File without changes
@@ -78,7 +78,7 @@ class Player
78
78
  end
79
79
 
80
80
  def session_platform_formatter(platform)
81
- "#{platform['tpye']} #{platform['os'].values.join(' ')}"
81
+ "#{platform["tpye"]} #{platform["os"].values.join(" ")}"
82
82
  end
83
83
 
84
84
  def keys_to_sim(hash)
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['message']}"
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(', ')}" unless filters.include?(filter)
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(', ')}" unless locales.include?(locale)
36
+ raise "Error: Invalid locale. Valid locales are: #{locales.join(", ")}" unless locales.include?(locale)
37
37
 
38
38
  locale
39
39
  end
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Valorant
4
4
  class Api
5
- VERSION = '0.1.0'
5
+ VERSION = '0.1.3'
6
6
  end
7
7
  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 'valorant/version'
5
- require_relative 'valorant/account'
6
- require_relative 'valorant/match'
7
- require_relative 'valorant/mmr'
8
- require_relative 'valorant/misc'
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,34 +1,38 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- require_relative "lib/valorant/version"
3
+ require_relative 'lib/api/version'
4
4
 
5
5
  Gem::Specification.new do |spec|
6
- spec.name = "valorant"
6
+ spec.name = 'valorant'
7
7
  spec.version = Valorant::Api::VERSION
8
- spec.authors = ["Gerard Hernandez"]
9
- spec.email = ["ger.almenara@gmail.com"]
8
+ spec.authors = ['Gerard Hernandez']
9
+ spec.email = ['ger.almenara@gmail.com']
10
10
 
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"
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["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"
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
- 'bin/*',
24
- '[A-Z]*'].to_a
25
- spec.bindir = "exe"
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 = ["lib"]
27
+ spec.require_paths = ['lib']
28
+
29
+ spec.add_dependency 'fast_jsonparser'
30
+ spec.add_dependency 'rest-client'
28
31
 
29
32
  # Uncomment to register a new dependency of your gem
30
33
  # spec.add_dependency "example-gem", "~> 1.0"
31
34
 
32
35
  # For more information and examples about making a new gem, check out our
33
36
  # guide at: https://bundler.io/guides/creating_gem.html
37
+ spec.metadata['rubygems_mfa_required'] = 'true'
34
38
  end
metadata CHANGED
@@ -1,15 +1,43 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: valorant
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
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-16 00:00:00.000000000 Z
12
- dependencies: []
11
+ date: 2022-11-26 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: fast_jsonparser
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - ">="
18
+ - !ruby/object:Gem::Version
19
+ version: '0'
20
+ type: :runtime
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - ">="
25
+ - !ruby/object:Gem::Version
26
+ version: '0'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rest-client
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :runtime
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
13
41
  description:
14
42
  email:
15
43
  - ger.almenara@gmail.com
@@ -19,27 +47,28 @@ extra_rdoc_files: []
19
47
  files:
20
48
  - CHANGELOG.md
21
49
  - Gemfile
50
+ - Gemfile.lock
22
51
  - README.md
23
52
  - Rakefile
24
53
  - bin/console
25
54
  - bin/setup
55
+ - lib/api/account.rb
56
+ - lib/api/match.rb
57
+ - lib/api/misc.rb
58
+ - lib/api/mmr.rb
59
+ - lib/api/utils/article.rb
60
+ - lib/api/utils/articles.rb
61
+ - lib/api/utils/leader.rb
62
+ - lib/api/utils/leader_board.rb
63
+ - lib/api/utils/match.rb
64
+ - lib/api/utils/matches_history.rb
65
+ - lib/api/utils/mmr_history.rb
66
+ - lib/api/utils/mmr_v1.rb
67
+ - lib/api/utils/player.rb
68
+ - lib/api/utils/user.rb
69
+ - lib/api/utils/utilities.rb
70
+ - lib/api/version.rb
26
71
  - 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
72
  - valorant.gemspec
44
73
  homepage: https://github.com/jaredthejellyfish/ruby-hendriks-val
45
74
  licenses: []
@@ -47,6 +76,7 @@ metadata:
47
76
  homepage_uri: https://github.com/jaredthejellyfish/ruby-hendriks-val
48
77
  source_code_uri: https://github.com/jaredthejellyfish/ruby-hendriks-val
49
78
  changelog_uri: https://github.com/jaredthejellyfish/ruby-hendriks-val
79
+ rubygems_mfa_required: 'true'
50
80
  post_install_message:
51
81
  rdoc_options: []
52
82
  require_paths: