deck_of_cards_handler 0.1.6 → 0.1.7

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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c7de6705b81dcdbf0b0a3401bb40a0a343fd6794ff909994c658c8a9f3d2304c
4
- data.tar.gz: 8a4e77d32f0bf80d9fb5aab2b0fb79ce88c4a00715cc0ee40a13b019e1278ba4
3
+ metadata.gz: d6a1a1dd5335b11ff724511d5d322b9d50f2d58dd3397b02eefdc9cef3f5a552
4
+ data.tar.gz: 79619874720f88fc3828ba1562e9171c2ab0d9d6a955bae07e3bed0dd2681453
5
5
  SHA512:
6
- metadata.gz: 2493bd9f55e74662de828a3a4260bb4a0d4f638fb4e1d26326091921e654cf1f8313243dccecd0e06f152229a68f9d331429ff4a25621ea35b419d84506f3d73
7
- data.tar.gz: 18f233fa7fd9626e39b49b599d39381a3a69cf2c7650e85d1b2f9b0c345a8d9be6a521fce8d05a84526c556630973b849033d62a9c64285977b63bf3a508287d
6
+ metadata.gz: 775cde0e2b4948b4052c7e1abb21a377212821016f390942c5cae7a739195f2efcd74b7b7b64f2bd9ced44e0a637fc05f5797faa282850bd1bdf8187854d515e
7
+ data.tar.gz: b40aef85c522e65bcd590ed920c9113d16e4a64750d8a6b534fa72be150e01743d46631d3ec8eff434275089d73b2ba1820975dcef958e81a18485e45b6b3336
data/.rubocop.yml CHANGED
@@ -1,6 +1,18 @@
1
1
  AllCops:
2
2
  TargetRubyVersion: 3.1
3
3
 
4
+ Metrics/AbcSize:
5
+ Enabled: false
6
+
7
+ Metrics/MethodLength:
8
+ Enabled: false
9
+
10
+ Metrics/ClassLength:
11
+ Enabled: false
12
+
13
+ Style/Documentation:
14
+ Enabled: false
15
+
4
16
  Style/StringLiterals:
5
17
  EnforcedStyle: double_quotes
6
18
 
@@ -29,7 +29,7 @@ class Packet
29
29
  extend T::Sig
30
30
 
31
31
  sig { params(file_path: String).returns(Packet) }
32
- def build_from_text_file(file_path:) # rubocop:disable Metrics
32
+ def build_from_text_file(file_path:)
33
33
  file_content = File.read(file_path)
34
34
  cards = []
35
35
  cards_set = Set.new
@@ -53,7 +53,7 @@ class Packet
53
53
  end
54
54
 
55
55
  sig { overridable.params(string: String).returns(Packet) }
56
- def build_from_string(string:) # rubocop:disable Metrics
56
+ def build_from_string(string:)
57
57
  content = string.split(",").map(&:strip)
58
58
  cards = []
59
59
  cards_set = Set.new
@@ -5,7 +5,7 @@ module Shuffles
5
5
  class << self
6
6
  extend T::Sig
7
7
  sig { params(left_half: Packet, right_half: Packet).returns(T::Array[Card]) }
8
- def riffle_shuffle(left_half:, right_half:) # rubocop:disable Metrics/AbcSize
8
+ def riffle_shuffle(left_half:, right_half:)
9
9
  shuffled_cards = []
10
10
  until left_half.cards.empty? && right_half.cards.empty?
11
11
  if !left_half.cards.empty? && (right_half.cards.empty? || Kernel.rand < 0.5)
@@ -22,7 +22,7 @@ module PokerHands
22
22
  end
23
23
 
24
24
  sig { override.params(other: T.untyped).returns(T.nilable(Integer)) }
25
- def <=>(other) # rubocop:disable Metrics/AbcSize
25
+ def <=>(other)
26
26
  return rank <=> other.rank unless instance_of?(other.class)
27
27
 
28
28
  first_pair_comparison = pair_values.first <=> other.pair_values.first
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module DeckOfCardsHandler
4
- VERSION = "0.1.6"
4
+ VERSION = "0.1.7"
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: deck_of_cards_handler
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.6
4
+ version: 0.1.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Simon Bernard