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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 9a36f9f5ee4cd08482186eb82e1b4832f942c482d65ef3b3acb059d1377d1c96
4
- data.tar.gz: 4ed8029b401abbfae509c107de62784083f4194b9c4da01808ae55f1c2b834dd
3
+ metadata.gz: c4a6d80baaa6942d0e98d3015732c0625fc8037c123a115a47b452adc19f45be
4
+ data.tar.gz: eccfc8c6c3455e7379c3f3807e95c5422f2ba4348d30672266224358fa373357
5
5
  SHA512:
6
- metadata.gz: b199bceb9378e2a15ab30e5400aa884a0fe709f44720a62367ea1f699d6344a6dfa87168bd5b7224d6d1f59c379459af3308d029f1b94674eb7ffc9e1923de29
7
- data.tar.gz: e8da10bb9ec1cdfffd79ab75e4e91d3c0dc6a1dcaeccc820ef5681b08a3dc11ca5932e5f75cc1b50b10b17f965d5f3ff418441554814d6c7e93a37b76209fe69
6
+ metadata.gz: e36d14bc45b5c3d9126000625fa7e1ae8392f6ccec6c1531aa532d55a57725a90ba57c4d2bb987dd90bf0ffe65ee3b88e422258d0647b29af1bdecdd7af31974
7
+ data.tar.gz: 00a1c6b6162a6ca6b5ca4beeec02db2a3326bb7bdce2a95418b6c100859947e4f2d3356693b8a25d83aed72fec35e21a9dbe767cd3ef7473693199d32585611c
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,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 "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.1'
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,30 +1,30 @@
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
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.0
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-16 00:00:00.000000000 Z
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: []