console-poker 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile +1 -1
- data/Gemfile.lock +43 -25
- data/README.md +1 -1
- data/console-poker-1.0.1.gem +0 -0
- data/console-poker.gemspec +2 -2
- data/lib/poker/hand_ranker.rb +2 -2
- data/spec/factories/deck_factory.rb +1 -3
- data/spec/factories/poker_factory.rb +1 -1
- data/spec/lib/poker/deck_spec.rb +1 -1
- data/spec/lib/poker/hand_spec.rb +3 -3
- data/spec/lib/poker_spec.rb +2 -2
- metadata +5 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4a339a0b7b3616879ad6ee0aeda14d25c8d314ac3160a259520931d87637aa0e
|
4
|
+
data.tar.gz: 172e3b67a5f578ebb6cac193b44660954f8a53c97bd43e874a233c5fefd1fc9d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b39ed509a37c3d98f0528eae69ebeff390fb7d347a1e057a4b7982a38ca867591ed54296d6048225fc201f651e900da8c0d463b014c3ad23d90fa0896e4930bc
|
7
|
+
data.tar.gz: f45eeb3bbfcb2a67320c2bd9659c45eab434bb4f3563ddfc191682eb9e4f15c34201b975c315cce705d64e6dece2f65313f459d51b9949843f08188ab8701065
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,66 +1,85 @@
|
|
1
1
|
GEM
|
2
2
|
remote: https://rubygems.org/
|
3
3
|
specs:
|
4
|
-
activesupport (7.
|
4
|
+
activesupport (7.1.2)
|
5
|
+
base64
|
6
|
+
bigdecimal
|
5
7
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
8
|
+
connection_pool (>= 2.2.5)
|
9
|
+
drb
|
6
10
|
i18n (>= 1.6, < 2)
|
7
11
|
minitest (>= 5.1)
|
12
|
+
mutex_m
|
8
13
|
tzinfo (~> 2.0)
|
9
14
|
ast (2.4.2)
|
15
|
+
base64 (0.2.0)
|
16
|
+
bigdecimal (3.1.4)
|
10
17
|
coderay (1.1.3)
|
11
18
|
concurrent-ruby (1.2.2)
|
19
|
+
connection_pool (2.4.1)
|
12
20
|
diff-lcs (1.5.0)
|
13
21
|
docile (1.4.0)
|
14
|
-
|
22
|
+
drb (2.2.0)
|
23
|
+
ruby2_keywords
|
24
|
+
factory_bot (6.4.2)
|
15
25
|
activesupport (>= 5.0.0)
|
16
|
-
i18n (1.
|
26
|
+
i18n (1.14.1)
|
17
27
|
concurrent-ruby (~> 1.0)
|
18
|
-
json (2.
|
28
|
+
json (2.7.1)
|
29
|
+
language_server-protocol (3.17.0.3)
|
19
30
|
method_source (1.0.0)
|
20
|
-
minitest (5.
|
21
|
-
|
22
|
-
|
31
|
+
minitest (5.20.0)
|
32
|
+
mutex_m (0.2.0)
|
33
|
+
parallel (1.23.0)
|
34
|
+
parser (3.2.2.4)
|
23
35
|
ast (~> 2.4.1)
|
36
|
+
racc
|
24
37
|
pry (0.14.2)
|
25
38
|
coderay (~> 1.1)
|
26
39
|
method_source (~> 1.0)
|
40
|
+
racc (1.7.3)
|
27
41
|
rainbow (3.1.1)
|
28
|
-
rake (13.0
|
29
|
-
regexp_parser (2.
|
30
|
-
rexml (3.2.
|
42
|
+
rake (13.1.0)
|
43
|
+
regexp_parser (2.8.3)
|
44
|
+
rexml (3.2.6)
|
31
45
|
rspec (3.12.0)
|
32
46
|
rspec-core (~> 3.12.0)
|
33
47
|
rspec-expectations (~> 3.12.0)
|
34
48
|
rspec-mocks (~> 3.12.0)
|
35
|
-
rspec-core (3.12.
|
49
|
+
rspec-core (3.12.2)
|
36
50
|
rspec-support (~> 3.12.0)
|
37
|
-
rspec-expectations (3.12.
|
51
|
+
rspec-expectations (3.12.3)
|
38
52
|
diff-lcs (>= 1.2.0, < 2.0)
|
39
53
|
rspec-support (~> 3.12.0)
|
40
|
-
rspec-mocks (3.12.
|
54
|
+
rspec-mocks (3.12.6)
|
41
55
|
diff-lcs (>= 1.2.0, < 2.0)
|
42
56
|
rspec-support (~> 3.12.0)
|
43
|
-
rspec-support (3.12.
|
44
|
-
rubocop (1.
|
57
|
+
rspec-support (3.12.1)
|
58
|
+
rubocop (1.58.0)
|
45
59
|
json (~> 2.3)
|
60
|
+
language_server-protocol (>= 3.17.0)
|
46
61
|
parallel (~> 1.10)
|
47
|
-
parser (>= 3.2.
|
62
|
+
parser (>= 3.2.2.4)
|
48
63
|
rainbow (>= 2.2.2, < 4.0)
|
49
64
|
regexp_parser (>= 1.8, < 3.0)
|
50
65
|
rexml (>= 3.2.5, < 4.0)
|
51
|
-
rubocop-ast (>= 1.
|
66
|
+
rubocop-ast (>= 1.30.0, < 2.0)
|
52
67
|
ruby-progressbar (~> 1.7)
|
53
68
|
unicode-display_width (>= 2.4.0, < 3.0)
|
54
|
-
rubocop-ast (1.
|
69
|
+
rubocop-ast (1.30.0)
|
55
70
|
parser (>= 3.2.1.0)
|
56
|
-
rubocop-capybara (2.
|
71
|
+
rubocop-capybara (2.19.0)
|
57
72
|
rubocop (~> 1.41)
|
73
|
+
rubocop-factory_bot (2.24.0)
|
74
|
+
rubocop (~> 1.33)
|
58
75
|
rubocop-rake (0.6.0)
|
59
76
|
rubocop (~> 1.0)
|
60
|
-
rubocop-rspec (2.
|
61
|
-
rubocop (~> 1.
|
77
|
+
rubocop-rspec (2.25.0)
|
78
|
+
rubocop (~> 1.40)
|
62
79
|
rubocop-capybara (~> 2.17)
|
80
|
+
rubocop-factory_bot (~> 2.22)
|
63
81
|
ruby-progressbar (1.13.0)
|
82
|
+
ruby2_keywords (0.0.5)
|
64
83
|
simplecov (0.22.0)
|
65
84
|
docile (~> 1.1)
|
66
85
|
simplecov-html (~> 0.11)
|
@@ -69,10 +88,9 @@ GEM
|
|
69
88
|
simplecov_json_formatter (0.1.4)
|
70
89
|
tzinfo (2.0.6)
|
71
90
|
concurrent-ruby (~> 1.0)
|
72
|
-
unicode-display_width (2.
|
91
|
+
unicode-display_width (2.5.0)
|
73
92
|
|
74
93
|
PLATFORMS
|
75
|
-
arm64-darwin-21
|
76
94
|
arm64-darwin-22
|
77
95
|
x86_64-linux
|
78
96
|
|
@@ -87,7 +105,7 @@ DEPENDENCIES
|
|
87
105
|
simplecov
|
88
106
|
|
89
107
|
RUBY VERSION
|
90
|
-
ruby 3.
|
108
|
+
ruby 3.2.2p53
|
91
109
|
|
92
110
|
BUNDLED WITH
|
93
|
-
2.
|
111
|
+
2.4.22
|
data/README.md
CHANGED
@@ -17,7 +17,7 @@ Run:
|
|
17
17
|
## Status
|
18
18
|
|
19
19
|
[![Ruby](https://github.com/gdonald/console-poker-ruby/workflows/Ruby/badge.svg)](https://github.com/gdonald/console-poker-ruby/actions)
|
20
|
-
[![Downloads](https://
|
20
|
+
[![Downloads](https://img.shields.io/gem/dt/console-poker?color=blue)](https://rubygems.org/gems/console-poker)
|
21
21
|
|
22
22
|
## License
|
23
23
|
|
Binary file
|
data/console-poker.gemspec
CHANGED
@@ -3,9 +3,9 @@
|
|
3
3
|
require 'rake'
|
4
4
|
|
5
5
|
Gem::Specification.new do |spec|
|
6
|
-
spec.required_ruby_version = '>= 3.
|
6
|
+
spec.required_ruby_version = '>= 3.2'
|
7
7
|
spec.name = 'console-poker'
|
8
|
-
spec.version = '1.0.
|
8
|
+
spec.version = '1.0.2'
|
9
9
|
spec.summary = 'Console Poker'
|
10
10
|
spec.description = 'Poker for your console, full version.'
|
11
11
|
spec.author = 'Greg Donald'
|
data/lib/poker/hand_ranker.rb
CHANGED
data/spec/lib/poker/deck_spec.rb
CHANGED
@@ -101,7 +101,7 @@ RSpec.describe Deck do
|
|
101
101
|
end
|
102
102
|
|
103
103
|
describe '#next_card' do
|
104
|
-
let(:deck) { build(:deck,
|
104
|
+
let(:deck) { build(:deck, poker:) }
|
105
105
|
|
106
106
|
it 'removes the next card' do
|
107
107
|
expect { deck.next_card }.to change(deck.cards, :size).by(-1)
|
data/spec/lib/poker/hand_spec.rb
CHANGED
@@ -28,7 +28,7 @@ RSpec.describe Hand do
|
|
28
28
|
end
|
29
29
|
|
30
30
|
describe '#pay' do
|
31
|
-
context 'when a winning hand is
|
31
|
+
context 'when a winning hand is unpaid' do
|
32
32
|
let(:hand) { build(:hand, :one_pair, poker:) }
|
33
33
|
|
34
34
|
it 'adds the result to the poker money' do
|
@@ -38,7 +38,7 @@ RSpec.describe Hand do
|
|
38
38
|
end
|
39
39
|
end
|
40
40
|
|
41
|
-
context 'when a losing hand is
|
41
|
+
context 'when a losing hand is unpaid' do
|
42
42
|
let(:hand) { build(:hand, :unknown, poker:) }
|
43
43
|
|
44
44
|
it 'subtracts the result from the poker money' do
|
@@ -48,7 +48,7 @@ RSpec.describe Hand do
|
|
48
48
|
end
|
49
49
|
end
|
50
50
|
|
51
|
-
context 'when hand is already
|
51
|
+
context 'when hand is already paid' do
|
52
52
|
before { hand.result = 500 }
|
53
53
|
|
54
54
|
it 'ignores a hand with a result' do
|
data/spec/lib/poker_spec.rb
CHANGED
@@ -2,7 +2,7 @@
|
|
2
2
|
|
3
3
|
RSpec.describe Poker do
|
4
4
|
let(:hand) { build(:hand, poker:) }
|
5
|
-
let(:deck) { build(:deck
|
5
|
+
let(:deck) { build(:deck) }
|
6
6
|
let(:poker) { build(:poker, deck:) }
|
7
7
|
let(:input) { StringIO.new }
|
8
8
|
|
@@ -173,7 +173,7 @@ RSpec.describe Poker do
|
|
173
173
|
end
|
174
174
|
end
|
175
175
|
|
176
|
-
context 'when the player hand is already
|
176
|
+
context 'when the player hand is already paid' do
|
177
177
|
before do
|
178
178
|
allow(poker).to receive(:build_new_hand)
|
179
179
|
allow(hand).to receive(:ask_hand_action)
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: console-poker
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Greg Donald
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2023-
|
11
|
+
date: 2023-12-09 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Poker for your console, full version.
|
14
14
|
email: gdonald@gmail.com
|
@@ -24,6 +24,7 @@ files:
|
|
24
24
|
- Rakefile
|
25
25
|
- bin/console-poker
|
26
26
|
- console-poker-1.0.0.gem
|
27
|
+
- console-poker-1.0.1.gem
|
27
28
|
- console-poker.gemspec
|
28
29
|
- lib/poker.rb
|
29
30
|
- lib/poker/card.rb
|
@@ -65,14 +66,14 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
65
66
|
requirements:
|
66
67
|
- - ">="
|
67
68
|
- !ruby/object:Gem::Version
|
68
|
-
version: '3.
|
69
|
+
version: '3.2'
|
69
70
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
70
71
|
requirements:
|
71
72
|
- - ">="
|
72
73
|
- !ruby/object:Gem::Version
|
73
74
|
version: '0'
|
74
75
|
requirements: []
|
75
|
-
rubygems_version: 3.
|
76
|
+
rubygems_version: 3.4.22
|
76
77
|
signing_key:
|
77
78
|
specification_version: 4
|
78
79
|
summary: Console Poker
|