nerd_dice 0.5.0 → 0.5.1

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: a5edc034febc13a688b57e15a6254ee4523144a9619f95ade4af6284b59df578
4
- data.tar.gz: c60102fe7b1cc8b4e09c290b2bdbb9c6602b8b6311fca595e930397f10db3ed0
3
+ metadata.gz: 6e6e1993a7ddd4782146fdb532f44983eb8d67c71a71740c7b10a2a7d943a8a4
4
+ data.tar.gz: cc708f79a5fcd24024112802beb58cd0701677df7f5fceaf5be24008570d5fbf
5
5
  SHA512:
6
- metadata.gz: 7097d5f6df166b480954546c6e8d8dd1b771bb67fe515093cb60a4d29aee4f3f6e244fa0eec3f099bbfb1bc2291fe9da91acda973080887cd94d98738d7ec240
7
- data.tar.gz: 3fa7a50fe3b4217bf11e4335f9ecdce9118c432f3a5a542e36a2a9963ccd9defc602885478c782596fffe4c1a6e9a540dfdd9eb024ced1a839f44b2fbceaba1e
6
+ metadata.gz: aa4194ee43ce436d055a72cf40c4f88abefb503025e0ea368f2fd9cfaf069373c4ff9abe36d8e0309ab4fdfed942998c72ac5425ac231792fae28cfebc3dab93
7
+ data.tar.gz: a1d4ebea184f994f02206665f7b77223a9a0c2c199cf637147ecb2da71f30b62067328e5c660e5fb9692a75f146546af4d893262c7c234309f91657ed5385cc8
checksums.yaml.gz.sig CHANGED
Binary file
@@ -14,7 +14,7 @@ jobs:
14
14
  runs-on: ubuntu-latest
15
15
  strategy:
16
16
  matrix:
17
- ruby-version: ['3.0', '3.1', '3.2']
17
+ ruby-version: ['3.0', '3.1', '3.2', '3.3']
18
18
 
19
19
  steps:
20
20
  - uses: actions/checkout@v2
data/.rubocop.yml CHANGED
@@ -166,6 +166,9 @@ Metrics/BlockLength:
166
166
  - 'spec/**/*.rb'
167
167
  - 'nerd_dice.gemspec'
168
168
 
169
+ Gemspec/DevelopmentDependencies:
170
+ EnforcedStyle: gemspec
171
+
169
172
  Lint/ErbNewArguments:
170
173
  Enabled: true
171
174
 
data/CHANGELOG.md CHANGED
@@ -1,140 +1,8 @@
1
1
  # Nerd Dice Changelog
2
2
 
3
- ## master \(unreleased\)
4
- ### Added
5
- ### Changed
6
- ### Fixed
3
+ <img src="https://i.kym-cdn.com/photos/images/newsfeed/000/186/610/thankyou.png?1318726198" alt="Our CHANGELOG is in another castle" />
7
4
 
8
- ## 0.5.0 \(2023-02-23\)
9
- ### Added
10
- * Add Ruby 3.1 and 3.2 to GitHub actions
11
- * Add security policy to gem
12
- * Add contributing guidelines to project
13
- ### Changed
14
- * Remove Ruby 2.7 from GitHub actions
15
- * Change minimum Ruby version to 3.0
16
- * Refactor RuboCop to enable new cops by default and delete redundant config
17
- * Update bundle for dependencies and development dependencies
18
- ### Fixed
19
- * Remove hardcoded link from README
20
- * Fix cognitive complexity code smell in convenience_methods
21
- * Update expired gem signing certificate
5
+ ## Legacy Branch: See master
6
+ This is a legacy maintenance branch.
22
7
 
23
- ## 0.4.1 \(2023-02-23\)
24
- ### Added
25
- * Add Ruby 3.1 and 3.2 to GitHub actions
26
- ### Changed
27
- * Remove Ruby 2.7 from GitHub actions
28
- * Refactor RuboCop to enable new cops by default and delete redundant config
29
- * Update bundle for dependencies and development dependencies
30
- ### Fixed
31
- * Remove hardcoded link from README
32
- * Fix cognitive complexity code smell in convenience_methods
33
- * Update expired gem signing certificate
34
-
35
- ## 0.4.0 \(2021-10-23\)
36
- ### Added
37
- * Add `NerdDice::ConvenienceMethods` method_missing mixin module that allows for dynamic invocation of patterns in the method name that get converted into calls to `NerdDice.roll_dice` or `NerdDice.total_dice` along with allowing the advantage/disadvantage mechanic or bonuses to be parsed from the method name. Full documentation of the module can be found in the [Convenience Methods Mixin](README.md#convenience-methods-mixin) section of the README.
38
- * Add exensive specs to support the ConvenienceMethods module
39
- ### Changed
40
- * Replace `Benchmark.bmbm` with `Benchmark.bm` in the nerd_dice_benchmark
41
- * Add convenience_methods to nerd_dice_benchmark
42
- * Extend `NerdDice::ConvenienceMethods` into top-level module as class methods
43
- ### Fixed
44
- * Fix typos and horizontal scrolling in README
45
- * Fix CodeClimate Code Smell on harvest_totals
46
-
47
- ## 0.3.1 \(2023-02-23\)
48
- ### Added
49
- * Add Ruby 3.1 and 3.2 to GitHub actions
50
- ### Changed
51
- * Remove Ruby 2.7 from GitHub actions
52
- * Refactor RuboCop to enable new cops by default and delete redundant config
53
- * Update bundle for dependencies and development dependencies
54
- ### Fixed
55
- * Remove hardcoded link from README
56
- * Update expired gem signing certificate
57
-
58
- ## 0.3.0 \(2021-09-11\)
59
- ### Added
60
- * Add new options to `NerdDice::Configuration`
61
- - `ability_score_number_of_sides`
62
- - `ability_score_dice_rolled`
63
- - `ability_score_dice_kept`
64
- * Add `NerdDice.harvest_totals` method that takes in a collection and returns the results of calling `total` on each element
65
- * Add `NerdDice.roll_ability_scores` convenience method that returns an array of `DiceSet` objects based on options and/or configuration
66
- * Add `NerdDice.total_ability_scores` convenience method that returns an array of integers based on options and/or configuration
67
- * Add `NerdDice::Die` class that represents a single die object and mixes in the `Comparable` module
68
- * Add `NerdDice::DiceSet` class that represents a collection of `Die` objects and mixes in the `Enumerable` module
69
- * Add `NerdDice::SetsRandomizationTechnique` mixin module and include in the `DiceSet` and `Die` classes
70
- * Add `die_background_color` and `die_foreground_color` to `Configuration` class with defaults defined as constants
71
- * Add `NerdDice.roll_dice` method that behaves in a similar fashion to `total_dice` but returns a `DiceSet` object instead of an `Integer` and has additional optional arguments relating to the non-numeric attributes of the dice
72
- * Add `coveralls_reborn` to RSpec and GitHub actions
73
- * Add build badge to README
74
- * Add Code Climate maintainability integration and badge to README
75
- * Add `nerd_dice_benchmark` script to bin directory
76
- * Add GitHub Action CI build
77
- - Run RSpec test suite, fail if specs fail, report coverage via Coveralls
78
- - Run RuboCop and fail if violations
79
- - Run benchmark suite and fail if outside of allowed ratios
80
- ### Changed
81
- * Update RuboCop version and configuration
82
- * Break up the NerdDice source code file into several smaller files that are included by the module
83
- * Enforce that `NerdDice.configuration.ability_score_array_size` must be a positive duck-type integer
84
- ### Fixed
85
-
86
- ## 0.2.1 \(2023-02-23\)
87
- ### Added
88
- * Add Ruby 3.1 and 3.2 to GitHub actions
89
- ### Changed
90
- * Remove Ruby 2.7 from GitHub actions
91
- * Refactor RuboCop to enable new cops by default and delete redundant config
92
- * Update bundle for dependencies and development dependencies
93
- ### Fixed
94
- * Remove hardcoded link from README
95
- * Update expired gem signing certificate
96
-
97
- ## 0.2.0 \(2021-01-28\)
98
- ### Added
99
- * Add ability to configure with `NerdDice.configure` block or `NerdDice.configuration`
100
- - Configure `randomization_technique` as `:random_rand`, `:securerandom`, `:random_object`, or `randomized`
101
- - Configure `refresh_seed_interval` to allow a periodic refresh of the seed
102
- * Add `randomization_technique` option to `NerdDice.total_dice` method keyword arguments
103
- * Add a lower-level `execute_die_roll` method that allows you to roll a single die with a generator specified
104
- * Add ability to manually refresh or specify seed with `:refresh_seed!` method
105
- ### Changed
106
- * Change `opts = {}` final argument to use keyword args `**opts` in the `NerdDice.total_dice` method. Now the method can be called as follows:
107
- ```ruby
108
- # old
109
- NerdDice.total_dice(20, 1, {bonus: 5})
110
- NerdDice.total_dice(6, 3, {bonus: 1})
111
-
112
- # new
113
- NerdDice.total_dice(20, bonus: 5)
114
- NerdDice.total_dice(6, 3, bonus: 1)
115
- ```
116
- * Call `:to_i` on bonus instead of using `:is_a?` and raise ArgumentError in the `NerdDice.total_dice` method if it doesn't respond to `:to_i`
117
- * Added `securerandom` as an explicit dependency due to Ruby 3.x change to bundled gem
118
- * `total_dice` no longer calls unqualified `.rand` which improves performance on all generators except for `:securerandom`
119
- ### Fixed
120
-
121
- ## 0.1.2 \(2023-02-23\)
122
- ### Added
123
- ### Changed
124
- * Refactor RuboCop to enable new cops by default and delete redundant config
125
- * Update bundle for dependencies and development dependencies
126
- ### Fixed
127
- * Remove hardcoded link from README
128
- * Update expired gem signing certificate
129
-
130
- ## 0.1.1 \(2020-12-12\)
131
- ### Added
132
- ### Changed
133
- ### Fixed
134
- * Fix broken link to CHANGELOG in gemspec
135
- * Fix RuboCop offenses from 0.1.0 and refactor specs
136
-
137
- ## 0.1.0 \(2020-12-07\)
138
-
139
- ### Added
140
- * Add NerdDice.total_dice class method with the ability to roll multiple polyhedral dice and add a bonus
8
+ The [authoritative version of the CHANGELOG](https://github.com/statelesscode/nerd_dice/blob/master/CHANGELOG.md) is found on the master branch. All other release and maintenance branches are updated to point to master after being created.
data/Gemfile.lock CHANGED
@@ -1,65 +1,72 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- nerd_dice (0.5.0)
5
- securerandom (~> 0.2, >= 0.2.2)
4
+ nerd_dice (0.5.1)
5
+ securerandom (~> 0.3, >= 0.3.1)
6
6
 
7
7
  GEM
8
8
  remote: https://rubygems.org/
9
9
  specs:
10
10
  ast (2.4.2)
11
- coveralls_reborn (0.27.0)
11
+ coveralls_reborn (0.28.0)
12
12
  simplecov (~> 0.22.0)
13
13
  term-ansicolor (~> 1.7)
14
14
  thor (~> 1.2)
15
15
  tins (~> 1.32)
16
- diff-lcs (1.5.0)
16
+ diff-lcs (1.5.1)
17
17
  docile (1.4.0)
18
- json (2.6.3)
19
- parallel (1.22.1)
20
- parser (3.2.1.0)
18
+ json (2.7.1)
19
+ language_server-protocol (3.17.0.3)
20
+ parallel (1.24.0)
21
+ parser (3.3.0.5)
21
22
  ast (~> 2.4.1)
23
+ racc
24
+ racc (1.7.3)
22
25
  rainbow (3.1.1)
23
- rake (13.0.6)
24
- regexp_parser (2.7.0)
25
- rexml (3.2.5)
26
- rspec (3.12.0)
27
- rspec-core (~> 3.12.0)
28
- rspec-expectations (~> 3.12.0)
29
- rspec-mocks (~> 3.12.0)
30
- rspec-core (3.12.1)
31
- rspec-support (~> 3.12.0)
32
- rspec-expectations (3.12.2)
26
+ rake (13.1.0)
27
+ regexp_parser (2.9.0)
28
+ rexml (3.2.6)
29
+ rspec (3.13.0)
30
+ rspec-core (~> 3.13.0)
31
+ rspec-expectations (~> 3.13.0)
32
+ rspec-mocks (~> 3.13.0)
33
+ rspec-core (3.13.0)
34
+ rspec-support (~> 3.13.0)
35
+ rspec-expectations (3.13.0)
33
36
  diff-lcs (>= 1.2.0, < 2.0)
34
- rspec-support (~> 3.12.0)
35
- rspec-mocks (3.12.3)
37
+ rspec-support (~> 3.13.0)
38
+ rspec-mocks (3.13.0)
36
39
  diff-lcs (>= 1.2.0, < 2.0)
37
- rspec-support (~> 3.12.0)
38
- rspec-support (3.12.0)
39
- rubocop (1.46.0)
40
+ rspec-support (~> 3.13.0)
41
+ rspec-support (3.13.1)
42
+ rubocop (1.60.2)
40
43
  json (~> 2.3)
44
+ language_server-protocol (>= 3.17.0)
41
45
  parallel (~> 1.10)
42
- parser (>= 3.2.0.0)
46
+ parser (>= 3.3.0.2)
43
47
  rainbow (>= 2.2.2, < 4.0)
44
48
  regexp_parser (>= 1.8, < 3.0)
45
49
  rexml (>= 3.2.5, < 4.0)
46
- rubocop-ast (>= 1.26.0, < 2.0)
50
+ rubocop-ast (>= 1.30.0, < 2.0)
47
51
  ruby-progressbar (~> 1.7)
48
52
  unicode-display_width (>= 2.4.0, < 3.0)
49
- rubocop-ast (1.26.0)
53
+ rubocop-ast (1.30.0)
50
54
  parser (>= 3.2.1.0)
51
- rubocop-capybara (2.17.1)
55
+ rubocop-capybara (2.20.0)
52
56
  rubocop (~> 1.41)
53
- rubocop-performance (1.16.0)
54
- rubocop (>= 1.7.0, < 2.0)
55
- rubocop-ast (>= 0.4.0)
57
+ rubocop-factory_bot (2.25.1)
58
+ rubocop (~> 1.41)
59
+ rubocop-performance (1.20.2)
60
+ rubocop (>= 1.48.1, < 2.0)
61
+ rubocop-ast (>= 1.30.0, < 2.0)
56
62
  rubocop-rake (0.6.0)
57
63
  rubocop (~> 1.0)
58
- rubocop-rspec (2.18.1)
59
- rubocop (~> 1.33)
64
+ rubocop-rspec (2.26.1)
65
+ rubocop (~> 1.40)
60
66
  rubocop-capybara (~> 2.17)
61
- ruby-progressbar (1.11.0)
62
- securerandom (0.2.2)
67
+ rubocop-factory_bot (~> 2.22)
68
+ ruby-progressbar (1.13.0)
69
+ securerandom (0.3.1)
63
70
  simplecov (0.22.0)
64
71
  docile (~> 1.1)
65
72
  simplecov-html (~> 0.11)
@@ -70,23 +77,23 @@ GEM
70
77
  sync (0.5.0)
71
78
  term-ansicolor (1.7.1)
72
79
  tins (~> 1.0)
73
- thor (1.2.1)
80
+ thor (1.3.0)
74
81
  tins (1.32.1)
75
82
  sync
76
- unicode-display_width (2.4.2)
83
+ unicode-display_width (2.5.0)
77
84
 
78
85
  PLATFORMS
79
86
  ruby
80
87
 
81
88
  DEPENDENCIES
82
- coveralls_reborn (~> 0.27.0)
89
+ coveralls_reborn (~> 0.28.0)
83
90
  nerd_dice!
84
91
  rake (~> 13.0)
85
92
  rspec (~> 3.12)
86
- rubocop (~> 1.46, >= 1.46.0)
87
- rubocop-performance (~> 1.16, >= 1.16.0)
93
+ rubocop (~> 1.60, >= 1.60.2)
94
+ rubocop-performance (~> 1.20, >= 1.20.2)
88
95
  rubocop-rake (~> 0.6, >= 0.6.0)
89
- rubocop-rspec (~> 2.18, >= 2.18.1)
96
+ rubocop-rspec (~> 2.26, >= 2.26.1)
90
97
  simplecov-lcov (~> 0.8.0)
91
98
 
92
99
  BUNDLED WITH
@@ -1,27 +1,27 @@
1
1
  -----BEGIN CERTIFICATE-----
2
2
  MIIEhTCCAu2gAwIBAgIBATANBgkqhkiG9w0BAQsFADBEMRYwFAYDVQQDDA1zdGF0
3
3
  ZWxlc3Njb2RlMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
4
- FgNjb20wHhcNMjMwMjIzMjMyMTQwWhcNMjQwMjIzMjMyMTQwWjBEMRYwFAYDVQQD
4
+ FgNjb20wHhcNMjQwMjI1MDUwMjMyWhcNMjUwMjI0MDUwMjMyW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25
- /9HhtVbKLq34iQftF4oIH66bYDEyG5y4CLKQ8Nq0WDWq50OcaP9KpDiS21BC43SW
26
- t+NX7PDOWx4k
18
+ AQsFAAOCAYEAKA+iULYm39HmXoR9a5TC3BbvlZKX1GBx9BXG4ukR1URs453Jggsg
19
+ FMA/Y2QTG7UekkYs+Dj5KAf10rA9fhxRjqKCmvVXpRqLifF4eJDv1zkXOv4/0KVm
20
+ xUBMDFKxzYPyuIw3RrwiW2Zsv9C67cD108LIOJ2ieqDHmW/vSrysYcjf5iQuVz98
21
+ 7nKraLZJRukjFo01lYCLu2Wz6Ey+3WodcRmArrcWFaYnz2WsX1WMB4HTK9F1a4WA
22
+ HdOa8ywu3BeV9D6S7630G9AhIqK01NSGv7v7/BLj8dkIovGU3ZGOS/dt1C+SIGPU
23
+ eqrWOdAE4uMEoaV4Wg/99C5Wh492EMkfc21e94txLrjwsrpCmQ/rJ3C9m9sNJc2x
24
+ 9K9Wl/3ET4PcRcOkctsJGKWRMW+KY5LEUSxMg0jURQIR0cKDfv/zGmvBAkvG6ULq
25
+ XSkYcMWowop72jQqf0edJiaEIypupYqx/DPoKRyroiNl3LXwfjZzjd1wZSrM2A+s
26
+ iOVXSt3E06vw
27
27
  -----END CERTIFICATE-----
@@ -90,11 +90,11 @@ module NerdDice
90
90
  # * Subsequent calls to the same method name will not hit method_missing
91
91
  # * If the method name does not match the regular expression pattern, the default
92
92
  # implementation of method_missing is called by invoking super
93
- def method_missing(method_name, *args, **kwargs, &block)
93
+ def method_missing(method_name, ...)
94
94
  # returns false if no match
95
- if match_pattern_and_delegate(method_name, *args, **kwargs, &block)
95
+ if match_pattern_and_delegate(method_name, ...)
96
96
  # send the method after defining it
97
- send(method_name, *args, **kwargs, &block)
97
+ send(method_name, ...)
98
98
  else
99
99
  super
100
100
  end
@@ -111,12 +111,10 @@ module NerdDice
111
111
  # Compares the method name to the regular expression patterns for the module
112
112
  # * If the pattern matches the convenience method is defined and a truthy value is returned
113
113
  # * If the pattern does not match then the method returns false and method_missing invokes `super`
114
- def match_pattern_and_delegate(method_name, *args, **kwargs, &block)
114
+ def match_pattern_and_delegate(method_name, ...)
115
115
  case method_name.to_s
116
- when /\Aroll_\d*d\d+((#{ADV}|#{DIS})\d*)?#{MOD}?\z/o then define_roll_nndnn(method_name, *args, **kwargs,
117
- &block)
118
- when /\Atotal_\d*d\d+((#{ADV}|#{DIS})\d*)?#{MOD}?\z/o then define_total_nndnn(method_name, *args, **kwargs,
119
- &block)
116
+ when /\Aroll_\d*d\d+((#{ADV}|#{DIS})\d*)?#{MOD}?\z/o then define_roll_nndnn(method_name, ...)
117
+ when /\Atotal_\d*d\d+((#{ADV}|#{DIS})\d*)?#{MOD}?\z/o then define_total_nndnn(method_name, ...)
120
118
  else
121
119
  false
122
120
  end
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module NerdDice
4
- VERSION = "0.5.0"
4
+ VERSION = "0.5.1"
5
5
  end
data/nerd_dice.gemspec CHANGED
@@ -44,13 +44,13 @@ Gem::Specification.new do |spec|
44
44
  spec.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $PROGRAM_NAME.end_with?("gem")
45
45
 
46
46
  # Dependencies
47
- spec.add_dependency "securerandom", "~> 0.2", ">= 0.2.2"
47
+ spec.add_dependency "securerandom", "~> 0.3", ">= 0.3.1"
48
48
 
49
49
  # Development Dependencies
50
- spec.add_development_dependency "coveralls_reborn", "~> 0.27.0"
51
- spec.add_development_dependency "rubocop", "~> 1.46", ">= 1.46.0"
52
- spec.add_development_dependency "rubocop-performance", "~> 1.16", ">= 1.16.0"
50
+ spec.add_development_dependency "coveralls_reborn", "~> 0.28.0"
51
+ spec.add_development_dependency "rubocop", "~> 1.60", ">= 1.60.2"
52
+ spec.add_development_dependency "rubocop-performance", "~> 1.20", ">= 1.20.2"
53
53
  spec.add_development_dependency "rubocop-rake", "~> 0.6", ">= 0.6.0"
54
- spec.add_development_dependency "rubocop-rspec", "~> 2.18", ">= 2.18.1"
54
+ spec.add_development_dependency "rubocop-rspec", "~> 2.26", ">= 2.26.1"
55
55
  spec.add_development_dependency "simplecov-lcov", "~> 0.8.0"
56
56
  end
data.tar.gz.sig CHANGED
Binary file
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: nerd_dice
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.0
4
+ version: 0.5.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Michael Duchemin
@@ -12,31 +12,31 @@ cert_chain:
12
12
  -----BEGIN CERTIFICATE-----
13
13
  MIIEhTCCAu2gAwIBAgIBATANBgkqhkiG9w0BAQsFADBEMRYwFAYDVQQDDA1zdGF0
14
14
  ZWxlc3Njb2RlMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
15
- FgNjb20wHhcNMjMwMjIzMjMyMTQwWhcNMjQwMjIzMjMyMTQwWjBEMRYwFAYDVQQD
15
+ FgNjb20wHhcNMjQwMjI1MDUwMjMyWhcNMjUwMjI0MDUwMjMyWjBEMRYwFAYDVQQD
16
16
  DA1zdGF0ZWxlc3Njb2RlMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
17
- k/IsZAEZFgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQCxVzHS
18
- gYszan//tjTSO0z59UO1rUiT5G0//iyhiaYIiuwxhYFbfD+wOCou4M18pQtEb4qx
19
- o67tPfGimBAVak6fGfo8fo1ByHiKCvx3jgOjxNifT9pRFlBSr6ZvyXeu7zA0ddLr
20
- slw92DNqeRlZXqB0mxDtpKWONGc1XhAqEjEP3VL7g7x0xPQShcpXg/OyRPR5vyv8
21
- 66pXdFrXYZGrySfIB6ZOWFV6wGBj603rPdXOeYVeks6hKvw3wb4G1s7tvwTA5MWI
22
- otw6Mp9TaMdms9zTc5A3N58pueKfBJfwkICkdAGJDWC6sIXECoaTDRqVK96RSH/1
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C9m9sNJc2x
35
+ 9K9Wl/3ET4PcRcOkctsJGKWRMW+KY5LEUSxMg0jURQIR0cKDfv/zGmvBAkvG6ULq
36
+ XSkYcMWowop72jQqf0edJiaEIypupYqx/DPoKRyroiNl3LXwfjZzjd1wZSrM2A+s
37
+ iOVXSt3E06vw
38
38
  -----END CERTIFICATE-----
39
- date: 2023-02-24 00:00:00.000000000 Z
39
+ date: 2024-02-25 00:00:00.000000000 Z
40
40
  dependencies:
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: securerandom
@@ -44,74 +44,74 @@ dependencies:
44
44
  requirements:
45
45
  - - "~>"
46
46
  - !ruby/object:Gem::Version
47
- version: '0.2'
47
+ version: '0.3'
48
48
  - - ">="
49
49
  - !ruby/object:Gem::Version
50
- version: 0.2.2
50
+ version: 0.3.1
51
51
  type: :runtime
52
52
  prerelease: false
53
53
  version_requirements: !ruby/object:Gem::Requirement
54
54
  requirements:
55
55
  - - "~>"
56
56
  - !ruby/object:Gem::Version
57
- version: '0.2'
57
+ version: '0.3'
58
58
  - - ">="
59
59
  - !ruby/object:Gem::Version
60
- version: 0.2.2
60
+ version: 0.3.1
61
61
  - !ruby/object:Gem::Dependency
62
62
  name: coveralls_reborn
63
63
  requirement: !ruby/object:Gem::Requirement
64
64
  requirements:
65
65
  - - "~>"
66
66
  - !ruby/object:Gem::Version
67
- version: 0.27.0
67
+ version: 0.28.0
68
68
  type: :development
69
69
  prerelease: false
70
70
  version_requirements: !ruby/object:Gem::Requirement
71
71
  requirements:
72
72
  - - "~>"
73
73
  - !ruby/object:Gem::Version
74
- version: 0.27.0
74
+ version: 0.28.0
75
75
  - !ruby/object:Gem::Dependency
76
76
  name: rubocop
77
77
  requirement: !ruby/object:Gem::Requirement
78
78
  requirements:
79
79
  - - "~>"
80
80
  - !ruby/object:Gem::Version
81
- version: '1.46'
81
+ version: '1.60'
82
82
  - - ">="
83
83
  - !ruby/object:Gem::Version
84
- version: 1.46.0
84
+ version: 1.60.2
85
85
  type: :development
86
86
  prerelease: false
87
87
  version_requirements: !ruby/object:Gem::Requirement
88
88
  requirements:
89
89
  - - "~>"
90
90
  - !ruby/object:Gem::Version
91
- version: '1.46'
91
+ version: '1.60'
92
92
  - - ">="
93
93
  - !ruby/object:Gem::Version
94
- version: 1.46.0
94
+ version: 1.60.2
95
95
  - !ruby/object:Gem::Dependency
96
96
  name: rubocop-performance
97
97
  requirement: !ruby/object:Gem::Requirement
98
98
  requirements:
99
99
  - - "~>"
100
100
  - !ruby/object:Gem::Version
101
- version: '1.16'
101
+ version: '1.20'
102
102
  - - ">="
103
103
  - !ruby/object:Gem::Version
104
- version: 1.16.0
104
+ version: 1.20.2
105
105
  type: :development
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
109
  - - "~>"
110
110
  - !ruby/object:Gem::Version
111
- version: '1.16'
111
+ version: '1.20'
112
112
  - - ">="
113
113
  - !ruby/object:Gem::Version
114
- version: 1.16.0
114
+ version: 1.20.2
115
115
  - !ruby/object:Gem::Dependency
116
116
  name: rubocop-rake
117
117
  requirement: !ruby/object:Gem::Requirement
@@ -138,20 +138,20 @@ dependencies:
138
138
  requirements:
139
139
  - - "~>"
140
140
  - !ruby/object:Gem::Version
141
- version: '2.18'
141
+ version: '2.26'
142
142
  - - ">="
143
143
  - !ruby/object:Gem::Version
144
- version: 2.18.1
144
+ version: 2.26.1
145
145
  type: :development
146
146
  prerelease: false
147
147
  version_requirements: !ruby/object:Gem::Requirement
148
148
  requirements:
149
149
  - - "~>"
150
150
  - !ruby/object:Gem::Version
151
- version: '2.18'
151
+ version: '2.26'
152
152
  - - ">="
153
153
  - !ruby/object:Gem::Version
154
- version: 2.18.1
154
+ version: 2.26.1
155
155
  - !ruby/object:Gem::Dependency
156
156
  name: simplecov-lcov
157
157
  requirement: !ruby/object:Gem::Requirement
@@ -256,7 +256,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
256
256
  - !ruby/object:Gem::Version
257
257
  version: '0'
258
258
  requirements: []
259
- rubygems_version: 3.4.7
259
+ rubygems_version: 3.5.6
260
260
  signing_key:
261
261
  specification_version: 4
262
262
  summary: A Ruby Gem for rolling polyhedral dice.
metadata.gz.sig CHANGED
Binary file