nerd_dice 0.5.2 → 0.5.3
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 +4 -4
- checksums.yaml.gz.sig +0 -0
- data/.github/workflows/main.yml +6 -6
- data/.gitignore +1 -0
- data/.rubocop.yml +0 -3
- data/CONTRIBUTING.md +4 -104
- data/Gemfile +10 -1
- data/SECURITY.md +4 -17
- data/certs/msducheminjr.pem +21 -21
- data/lib/nerd_dice/convenience_methods.rb +4 -0
- data/lib/nerd_dice/version.rb +1 -1
- data/nerd_dice.gemspec +0 -8
- data.tar.gz.sig +0 -0
- metadata +24 -120
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 1fcf1cbd38f0cd6e1649cbf0b6a10a841cadac90fdb14cc0f51dfa742072bdf3
|
|
4
|
+
data.tar.gz: 5925e8457c4cb0f25f5d9bd51f1c40eae40e524d750c325dc4d793d24fb285be
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f0a2a8bd50acdaed8963360c2e9d2c1aa7871dd2e6be5f723d79a71cf7dd2eb9eef18a96412cdb5636703ea3434947578688a96540e7b9db51dbda2765706dde
|
|
7
|
+
data.tar.gz: 525952946c43eba4d4b2b1858bdfc88c9f2145b250ff5ed195c4f92944e42cf119ece1a8054cf8bf36526072b2c35764f2cdac2928d0b7628cdc0a3a7475c245
|
checksums.yaml.gz.sig
CHANGED
|
Binary file
|
data/.github/workflows/main.yml
CHANGED
|
@@ -14,10 +14,10 @@ jobs:
|
|
|
14
14
|
runs-on: ubuntu-latest
|
|
15
15
|
strategy:
|
|
16
16
|
matrix:
|
|
17
|
-
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4']
|
|
17
|
+
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', '4.0']
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
|
-
- uses: actions/checkout@
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
21
|
- name: Set up Ruby
|
|
22
22
|
uses: ruby/setup-ruby@v1
|
|
23
23
|
with:
|
|
@@ -35,11 +35,11 @@ jobs:
|
|
|
35
35
|
rubocop:
|
|
36
36
|
runs-on: ubuntu-latest
|
|
37
37
|
steps:
|
|
38
|
-
- uses: actions/checkout@
|
|
38
|
+
- uses: actions/checkout@v6
|
|
39
39
|
- name: Set up Ruby
|
|
40
40
|
uses: ruby/setup-ruby@v1
|
|
41
41
|
with:
|
|
42
|
-
ruby-version: '
|
|
42
|
+
ruby-version: '4.0'
|
|
43
43
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
44
44
|
- name: Run rubocop
|
|
45
45
|
run: bundle exec rubocop --parallel
|
|
@@ -47,11 +47,11 @@ jobs:
|
|
|
47
47
|
benchmark:
|
|
48
48
|
runs-on: ubuntu-latest
|
|
49
49
|
steps:
|
|
50
|
-
- uses: actions/checkout@
|
|
50
|
+
- uses: actions/checkout@v6
|
|
51
51
|
- name: Set up Ruby
|
|
52
52
|
uses: ruby/setup-ruby@v1
|
|
53
53
|
with:
|
|
54
|
-
ruby-version: '
|
|
54
|
+
ruby-version: '4.0'
|
|
55
55
|
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
|
|
56
56
|
- name: Run benchmark script
|
|
57
57
|
run: bin/nerd_dice_benchmark
|
data/.gitignore
CHANGED
data/.rubocop.yml
CHANGED
data/CONTRIBUTING.md
CHANGED
|
@@ -1,108 +1,8 @@
|
|
|
1
1
|
# Contributing to the NerdDice Project
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://i.kym-cdn.com/photos/images/newsfeed/000/186/610/thankyou.png?1318726198" alt="Our Contributing Guidelines are in another castle" />
|
|
4
4
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
Everything in this repository is intended to be made freely available via the [UNLICENSE](UNLICENSE.txt) and the [Creative Commons](https://creativecommons.org) [CC0 Public Domain Dedication](https://creativecommons.org/publicdomain/zero/1.0/). You can obviously submit feature requests and issues and participate in the discussions, but we can\'t accept anything into this repository and project unless you agree to make it available under the terms above. See the [legal](README.md#legal) section in the README for more information.
|
|
5
|
+
## Legacy Branch: See master
|
|
6
|
+
This is a legacy maintenance branch.
|
|
8
7
|
|
|
9
|
-
|
|
10
|
-
We make [coding videos](https://youtube.com/playlist?list=PL9kkbu1kLUeOnUtMpAnJOCtHdThx1Efkt) on our [YouTube channel](https://www.youtube.com/statelesscode) for the end-to-end of this project. If you collaborate on this project, you are consenting to potentially have the interaction featured in our videos. There is no guarantee or obligation to include your contribution or interaction in our videos, and we reserve the right to moderate inappropriate content at our own discretion.
|
|
11
|
-
|
|
12
|
-
## Ways to Contribute
|
|
13
|
-
There are numerous ways to contribute to this project, irrespective of your level of technical expertise. We\'ll flesh out the details and guidelines for each way to contribute below
|
|
14
|
-
|
|
15
|
-
- **[Feature requests](#feature-requests)**
|
|
16
|
-
- **[Bug reports](#bug-reports)**
|
|
17
|
-
- **[Code contributions](#code-contributions)**
|
|
18
|
-
- **[Documentation contributions](#documentation-contributions)**
|
|
19
|
-
- **[Art, design and creative input](#art-design-creative-input)**
|
|
20
|
-
|
|
21
|
-
<a name="feature-requests"></a>
|
|
22
|
-
### Feature requests
|
|
23
|
-
If you have an idea for a feature you would like to see in the NerdDice gem, feel free to [open an issue](https://github.com/statelesscode/nerd_dice/issues) in this GitHub repository. As an agile project, we strive to provide value. The better you can articulate your idea and the value it would bring to you as a user of the gem or including in your own project, it will help us determine whether or how to prioritize the idea.
|
|
24
|
-
|
|
25
|
-
Once an issue is submitted, we will likely need to discuss and clarify the feature request via comments to refine and clarify the intent, scope, and value of the feature. Precisely articulating your original feature request will help reduce the back-and-forth necessary to evaluate the story for implementation.
|
|
26
|
-
|
|
27
|
-
We can\'t guarantee that your feature request will be implemented or featured in a video, but truly welcome the collaboration and feedback of all who take interest.
|
|
28
|
-
|
|
29
|
-
<a name="bug-reports"></a>
|
|
30
|
-
### Bug reports
|
|
31
|
-
The distinction between a feature and a bug can sometimes be murky. While a feature generally refers to a request for new functionality, a bug is related to existing functionality that is not working as intended. In order to better evaluate the bug for a fix, it is extremely helpful to follow the following format:
|
|
32
|
-
#### Expected behavior
|
|
33
|
-
How you as a user or a technical evaluator would expect the application to behave. Expectation is obviously subjective, but defining your expectations as a user can help to expose usability problems with the application. If you discover a bug, we warmly welcome you to [open an issue](https://github.com/statelesscode/nerd_dice/issues) in this GitHub repository unless it is a [security bug](#security-bugs) that could be exploited and is not suitable for public collaboration.
|
|
34
|
-
|
|
35
|
-
**Examples:**
|
|
36
|
-
- When I use the `roll_` convenience method with `plus` and `minus` I expect it to error out.
|
|
37
|
-
- When I configure a randomization technique I expect that the configuration will persist until I change it or stop the Ruby interpreter
|
|
38
|
-
- When I roll a 6-sided die, I expect to get a number between 1 and 6, inclusive
|
|
39
|
-
|
|
40
|
-
#### Actual behavior
|
|
41
|
-
The actual behavior is what really happens when you try to use your feature in a way that defies your expectations. Using the same examples listed above, you can see how this might work.
|
|
42
|
-
|
|
43
|
-
**Examples:**
|
|
44
|
-
- The method doesn't error out and uses the plus but not the minus
|
|
45
|
-
- The configuration always reverts the randomization technique to `:secure_random`
|
|
46
|
-
- I sometimes get a 0 and I never get a 6
|
|
47
|
-
|
|
48
|
-
#### Steps to reproduce
|
|
49
|
-
In order to properly fix the bug, it needs to be reproducible. The more detailed and precise your steps to reproduce are, the more likely it will be that we come to the right solution in fixing the bug. Sometimes a bug will only manifest if an exact sequence of events takes place. The more complex an application gets, the harder it becomes to isolate and diagnose the root cause. An example of steps to reproduce the first problem can look something like this.
|
|
50
|
-
- Include the gem in the `Gemfile` and run `bundle install`
|
|
51
|
-
- Open the `Pry` console
|
|
52
|
-
- Execute the following commands
|
|
53
|
-
```ruby
|
|
54
|
-
o = Object.new
|
|
55
|
-
o.roll_2d8.harvest_totals
|
|
56
|
-
```
|
|
57
|
-
- A `NoMethodError` is raised
|
|
58
|
-
|
|
59
|
-
In this case the `NoMethodError` is caused by improper usage of the `harvest_totals` method, but providing specifics about what you are trying to do and what you expect to have happen can result in better clarity of documentation or a new feature.
|
|
60
|
-
|
|
61
|
-
<a name="security-bugs"></a>
|
|
62
|
-
#### Security bugs
|
|
63
|
-
If you discover a security vulnerability in the application that can be exploited, please follow our [security reporting process](SECURITY.md) instead of submitting a public issue.
|
|
64
|
-
|
|
65
|
-
<a name="code-contributions"></a>
|
|
66
|
-
### Code contributions
|
|
67
|
-
At Stateless Code our motto is \"Code Along\" and we mean it. If you have a feature that you want to implement yourself and contribute to the project, or you see an item in the [project backlog](https://github.com/statelesscode/nerd_dice/projects/1) that you want to try and tackle yourself, you are encouraged to do so.
|
|
68
|
-
#### Open an issue, if applicable
|
|
69
|
-
If there's a brand new feature you want to propose, or you want to work on a backlog item that is not yet converted into an issue, you can [open an issue](https://github.com/statelesscode/nerd_dice/issues) in this GitHub repository as you would in the sections above.
|
|
70
|
-
#### Fork the repository
|
|
71
|
-
To work on your changes, you will want to [fork this repository](https://github.com/statelesscode/nerd_dice/fork) into a repo on your own account so you can work and iterate on your feature.
|
|
72
|
-
#### Develop the feature
|
|
73
|
-
After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
|
|
74
|
-
|
|
75
|
-
To install this gem onto your local machine, run `bundle exec rake install`.
|
|
76
|
-
|
|
77
|
-
Once you have forked the repo, you can work to develop the contribution on your account. As you are working on your contribution you can commit as frequently as you'd like. \(We'll likely squash the commit down if and when it becomes time to merge the feature.\) In order to avoid rework, be sure to follow the [coding standards](#coding-standards) below. If the pull request is a candidate for merging, we will review the code and iterate on any feedback as needed.
|
|
78
|
-
<a name="coding-standards"></a>
|
|
79
|
-
#### Coding standards
|
|
80
|
-
Just like [Ruby on Rails](https://rubyonrails.org/) is able to increase programmer happiness by using convention over configuration, it\'s important to follow a consistent set of conventions throughout the code base to make it more consistent and maintainable. Some of these standards are just preferences while others \(like writing good tests\) are indispensable. If you feel strongly that one of these conventions should be modified and have good reasons to back it up, cordial conversation in an [issue](https://github.com/statelesscode/nerd_dice/issues) can be productive. I don\'t have all the answers and am constantly learning and evolving as a programmer myself. Just don\'t be a jerk about it.
|
|
81
|
-
##### Always cover your code with good tests!
|
|
82
|
-
Whenever it\'s possible and feasible, we recommend using a test-driven development approach \(red, green, refactor\) . We have a video on [Why Test Driven Development](https://youtu.be/AGXfZP-EhKo) on our [YouTube channel](https://www.youtube.com/statelesscode) if you\'d like to learn more.
|
|
83
|
-
- Write your failing test
|
|
84
|
-
- Implement your change in the application code to make the test pass
|
|
85
|
-
- Refactor your code
|
|
86
|
-
|
|
87
|
-
Tests should be meaningful, failing without your code and passing only with your code. And the assertions you make about your code should be meaningful. **Covering code with a test that doesn\'t make meaningful assertions is worse than not covering your code at all.**
|
|
88
|
-
|
|
89
|
-
##### Make sure the build will pass
|
|
90
|
-
Before your pull request can be merged, we need to make sure the GitHub Actions build will not fail. The following criteria must be met:
|
|
91
|
-
- `rubocop` needs to run without violations. If there is no way around a RuboCop violation, we can add disable-enable magic comments, but this should be seen as a last resort
|
|
92
|
-
- The test suite needs to pass. Running `rspec spec` from the root of the project will run the unit tests
|
|
93
|
-
- The code coverage can\'t decrease. This will cause the Coveralls check on the code to fail.
|
|
94
|
-
##### Avoid cognitive complexity and giant methods
|
|
95
|
-
One of the common mottoes in the Ruby ecosystem is Don\'t Repeat Yourself \(DRY\). You want to write small, reusable methods for your code instead of giant thousand line monstrosities with if-else ladders and nested loops with more if-else ladders. Breaking your code down into bite sized chunks makes it more maintainable and less bug prone. It also allows you to write smaller, more-targeted unit tests. \"Working, but ugly\" is a common early iteration condition of a feature, but before we merge it to the main branch, we want our end goal to be elegant, expressive, concise code.
|
|
96
|
-
##### Write a good commit message
|
|
97
|
-
When you\'re incrementally working on a story, it's fine to use the one-line `git commit -m "My commit message"` method of committing your code. When you squash it down at the end of the pull request, you want a good commit message for your contribution. There are many great resources on the internet about writing quality commit messages. [This one from cbeams](https://cbea.ms/git-commit/) is one of my favorites.
|
|
98
|
-
<a name="documentation-contributions"></a>
|
|
99
|
-
### Documentation contributions
|
|
100
|
-
You don\'t need to be a programmer to contribute to the project! If you have suggestions for clarity on documentation for the project \(as small as fixing a typo or as big as setting up a Wiki category\) you are welcome to contribute. If you aren\'t interested in learning about GitHub, git, or the version control process, you can still [open an issue](https://github.com/statelesscode/nerd_dice/issues) in this GitHub repository and provide your content contributions there. Of course, if you are comfortable with the pull request process from the [code contributions](#code-contributions) section, you are welcome to do so. We just don\'t want that to be a barrier to entry.
|
|
101
|
-
|
|
102
|
-
<a name="art-design-creative-input"></a>
|
|
103
|
-
### Art, design and creative input
|
|
104
|
-
If you have art, design, or other forms of creative input on the project that don\'t fit the above criteria, you can [open an issue](https://github.com/statelesscode/nerd_dice/issues) in this GitHub repository for that as well. As noted in the [Before you start...](#before-you-start) section, we can\'t accept any contributions unless you agree to match them to the repository standards of CC0 and/or the UNLICENSE.
|
|
105
|
-
|
|
106
|
-
<a name="guidelines-for-etiquette"></a>
|
|
107
|
-
## Guidelines for etiquette
|
|
108
|
-
See the [Conduct](README.md#conduct) section in the README for more information.
|
|
8
|
+
The [authoritative version of the CONTRIBUTING.md](https://github.com/statelesscode/nerd_dice/blob/master/CONTRIBUTING.md) is found on the master branch. All other release and maintenance branches are updated to point to master after being created.
|
data/Gemfile
CHANGED
|
@@ -5,5 +5,14 @@ source "https://rubygems.org"
|
|
|
5
5
|
# Specify your gem's dependencies in nerd_dice.gemspec
|
|
6
6
|
gemspec
|
|
7
7
|
|
|
8
|
-
|
|
8
|
+
# Development Dependencies
|
|
9
|
+
gem "benchmark", "~> 0.5.0"
|
|
10
|
+
gem "coveralls_reborn", "~> 0.29.0"
|
|
11
|
+
gem "irb"
|
|
12
|
+
gem "rake", "~> 13.3", ">= 13.3.1"
|
|
9
13
|
gem "rspec", "~> 3.13"
|
|
14
|
+
gem "rubocop", "~> 1.85.1"
|
|
15
|
+
gem "rubocop-performance", "~> 1.26.1"
|
|
16
|
+
gem "rubocop-rake", "~> 0.7.1"
|
|
17
|
+
gem "rubocop-rspec", "~> 3.9.0"
|
|
18
|
+
gem "simplecov-lcov", "~> 0.9.0"
|
data/SECURITY.md
CHANGED
|
@@ -1,21 +1,8 @@
|
|
|
1
1
|
# Security Policy
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
<img src="https://i.kym-cdn.com/photos/images/newsfeed/000/186/610/thankyou.png?1318726198" alt="Our Security Policy is in another castle" />
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
## Legacy Branch: See master
|
|
6
|
+
This is a legacy maintenance branch.
|
|
6
7
|
|
|
7
|
-
|
|
8
|
-
| ------- | -------------------------- | ----------- |
|
|
9
|
-
| 0.5.x | :white_check_mark: Current | |
|
|
10
|
-
| 0.4.x | :warning: Deprecated | 2024-02-23 |
|
|
11
|
-
| 0.3.x | :warning: Deprecated | 2024-02-23 |
|
|
12
|
-
| 0.2.x | :warning: Deprecated | 2024-02-23 |
|
|
13
|
-
| 0.1.x | :warning: Deprecated | 2024-02-23 |
|
|
14
|
-
|
|
15
|
-
## Certificate Signing and Checksums
|
|
16
|
-
|
|
17
|
-
The gem is currently released with a certificate so it can be installed with the `HighSecurity` policy. The SHA-256 and SHA-512 of each released version of the gem is kept in the `checksum` directory of the GitHub repository.
|
|
18
|
-
|
|
19
|
-
## Reporting a Vulnerability
|
|
20
|
-
|
|
21
|
-
Please report (suspected) security vulnerabilities to security@statelesscode.com. We make no guarantees related to turnaround time. If the issue is confirmed, we will release a patch as soon as possible depending on complexity and severity.
|
|
8
|
+
The [authoritative version of the SECURITY.md](https://github.com/statelesscode/nerd_dice/blob/master/SECURITY.md) is found on the master branch. All other release and maintenance branches are updated to point to master after being created.
|
data/certs/msducheminjr.pem
CHANGED
|
@@ -1,27 +1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+272,9 @@ module NerdDice
|
|
|
272
272
|
# * Raises a NerdDice::Error if there is a mismatch
|
|
273
273
|
# * Returns true if no keyword argument bonus
|
|
274
274
|
# * Returns true if keyword argument bonus and method name modifier are consistent
|
|
275
|
+
|
|
276
|
+
# disabling because it is a false positive
|
|
277
|
+
# rubocop:disable Naming/PredicateMethod
|
|
275
278
|
def check_bonus_integrity!(kwargs, bonus)
|
|
276
279
|
bonus_error_message = "Bonus integrity failure: "
|
|
277
280
|
bonus_error_message += "Modifier specified in keyword arguments was #{kwargs[:bonus]}. "
|
|
@@ -280,6 +283,7 @@ module NerdDice
|
|
|
280
283
|
|
|
281
284
|
true
|
|
282
285
|
end
|
|
286
|
+
# rubocop:enable Naming/PredicateMethod
|
|
283
287
|
|
|
284
288
|
# Parses number to keep on a NerdDice::DiceSet
|
|
285
289
|
# * If number_to_keep falsey, just return the DiceSet object
|
data/lib/nerd_dice/version.rb
CHANGED
data/nerd_dice.gemspec
CHANGED
|
@@ -45,12 +45,4 @@ Gem::Specification.new do |spec|
|
|
|
45
45
|
|
|
46
46
|
# Dependencies
|
|
47
47
|
spec.add_dependency "securerandom", "~> 0.3", ">= 0.3.1"
|
|
48
|
-
|
|
49
|
-
# Development Dependencies
|
|
50
|
-
spec.add_development_dependency "coveralls_reborn", "~> 0.28.0"
|
|
51
|
-
spec.add_development_dependency "rubocop", "~> 1.73", ">= 1.73.2"
|
|
52
|
-
spec.add_development_dependency "rubocop-performance", "~> 1.24"
|
|
53
|
-
spec.add_development_dependency "rubocop-rake", "~> 0.7", ">= 0.7.1"
|
|
54
|
-
spec.add_development_dependency "rubocop-rspec", "~> 3.5"
|
|
55
|
-
spec.add_development_dependency "simplecov-lcov", "~> 0.8.0"
|
|
56
48
|
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.
|
|
4
|
+
version: 0.5.3
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Michael Duchemin
|
|
@@ -11,31 +11,31 @@ cert_chain:
|
|
|
11
11
|
-----BEGIN CERTIFICATE-----
|
|
12
12
|
MIIEhTCCAu2gAwIBAgIBATANBgkqhkiG9w0BAQsFADBEMRYwFAYDVQQDDA1zdGF0
|
|
13
13
|
ZWxlc3Njb2RlMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJk/IsZAEZ
|
|
14
|
-
|
|
14
|
+
FgNjb20wHhcNMjYwMzEzMjMyOTM2WhcNMjcwMzEzMjMyOTM2WjBEMRYwFAYDVQQD
|
|
15
15
|
DA1zdGF0ZWxlc3Njb2RlMRUwEwYKCZImiZPyLGQBGRYFZ21haWwxEzARBgoJkiaJ
|
|
16
|
-
k/
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
AaOBgTB/
|
|
26
|
-
|
|
16
|
+
k/IsZAEZFgNjb20wggGiMA0GCSqGSIb3DQEBAQUAA4IBjwAwggGKAoIBgQDZ5mM8
|
|
17
|
+
2FOF+wszAmvmx8GrSBYsvuibXtqLHHlZ5Bgq70ru3awGoN+pILZvbGRPLzm79Mpp
|
|
18
|
+
V2NgshEdHX/5Sn/VMgEzZsVDO2ZI1d+86QLEoZYwyHcdhadDIp4yFJGYcGTVrqm7
|
|
19
|
+
dwyPyGQpVhLdbDT3xbRJEZnxQSFxngaM6X47DYx7QmFo5dTq3IdVF196VgOAzDbq
|
|
20
|
+
bi++8bvfqPDLRoPSp1IKFuKV3wch0s27fHkyeKlJR2i5AllDR7REveEoj7abJWIp
|
|
21
|
+
ntex/8pJfz91x1/SdcsIgphJOWDKlRp6aajNtktBbOSd4YY+UBIpzb64rvegDnkX
|
|
22
|
+
WBeNhnrIvMQnK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OiK5QaVmt2Y6U2T/hqH02hLFRC9pzvFbA+Xzrs2apFRqyPq59dpEHaC
|
|
36
|
+
4z1RsypHX1dn
|
|
37
37
|
-----END CERTIFICATE-----
|
|
38
|
-
date:
|
|
38
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
|
39
39
|
dependencies:
|
|
40
40
|
- !ruby/object:Gem::Dependency
|
|
41
41
|
name: securerandom
|
|
@@ -57,102 +57,6 @@ dependencies:
|
|
|
57
57
|
- - ">="
|
|
58
58
|
- !ruby/object:Gem::Version
|
|
59
59
|
version: 0.3.1
|
|
60
|
-
- !ruby/object:Gem::Dependency
|
|
61
|
-
name: coveralls_reborn
|
|
62
|
-
requirement: !ruby/object:Gem::Requirement
|
|
63
|
-
requirements:
|
|
64
|
-
- - "~>"
|
|
65
|
-
- !ruby/object:Gem::Version
|
|
66
|
-
version: 0.28.0
|
|
67
|
-
type: :development
|
|
68
|
-
prerelease: false
|
|
69
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
70
|
-
requirements:
|
|
71
|
-
- - "~>"
|
|
72
|
-
- !ruby/object:Gem::Version
|
|
73
|
-
version: 0.28.0
|
|
74
|
-
- !ruby/object:Gem::Dependency
|
|
75
|
-
name: rubocop
|
|
76
|
-
requirement: !ruby/object:Gem::Requirement
|
|
77
|
-
requirements:
|
|
78
|
-
- - "~>"
|
|
79
|
-
- !ruby/object:Gem::Version
|
|
80
|
-
version: '1.73'
|
|
81
|
-
- - ">="
|
|
82
|
-
- !ruby/object:Gem::Version
|
|
83
|
-
version: 1.73.2
|
|
84
|
-
type: :development
|
|
85
|
-
prerelease: false
|
|
86
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
87
|
-
requirements:
|
|
88
|
-
- - "~>"
|
|
89
|
-
- !ruby/object:Gem::Version
|
|
90
|
-
version: '1.73'
|
|
91
|
-
- - ">="
|
|
92
|
-
- !ruby/object:Gem::Version
|
|
93
|
-
version: 1.73.2
|
|
94
|
-
- !ruby/object:Gem::Dependency
|
|
95
|
-
name: rubocop-performance
|
|
96
|
-
requirement: !ruby/object:Gem::Requirement
|
|
97
|
-
requirements:
|
|
98
|
-
- - "~>"
|
|
99
|
-
- !ruby/object:Gem::Version
|
|
100
|
-
version: '1.24'
|
|
101
|
-
type: :development
|
|
102
|
-
prerelease: false
|
|
103
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
104
|
-
requirements:
|
|
105
|
-
- - "~>"
|
|
106
|
-
- !ruby/object:Gem::Version
|
|
107
|
-
version: '1.24'
|
|
108
|
-
- !ruby/object:Gem::Dependency
|
|
109
|
-
name: rubocop-rake
|
|
110
|
-
requirement: !ruby/object:Gem::Requirement
|
|
111
|
-
requirements:
|
|
112
|
-
- - "~>"
|
|
113
|
-
- !ruby/object:Gem::Version
|
|
114
|
-
version: '0.7'
|
|
115
|
-
- - ">="
|
|
116
|
-
- !ruby/object:Gem::Version
|
|
117
|
-
version: 0.7.1
|
|
118
|
-
type: :development
|
|
119
|
-
prerelease: false
|
|
120
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
121
|
-
requirements:
|
|
122
|
-
- - "~>"
|
|
123
|
-
- !ruby/object:Gem::Version
|
|
124
|
-
version: '0.7'
|
|
125
|
-
- - ">="
|
|
126
|
-
- !ruby/object:Gem::Version
|
|
127
|
-
version: 0.7.1
|
|
128
|
-
- !ruby/object:Gem::Dependency
|
|
129
|
-
name: rubocop-rspec
|
|
130
|
-
requirement: !ruby/object:Gem::Requirement
|
|
131
|
-
requirements:
|
|
132
|
-
- - "~>"
|
|
133
|
-
- !ruby/object:Gem::Version
|
|
134
|
-
version: '3.5'
|
|
135
|
-
type: :development
|
|
136
|
-
prerelease: false
|
|
137
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
138
|
-
requirements:
|
|
139
|
-
- - "~>"
|
|
140
|
-
- !ruby/object:Gem::Version
|
|
141
|
-
version: '3.5'
|
|
142
|
-
- !ruby/object:Gem::Dependency
|
|
143
|
-
name: simplecov-lcov
|
|
144
|
-
requirement: !ruby/object:Gem::Requirement
|
|
145
|
-
requirements:
|
|
146
|
-
- - "~>"
|
|
147
|
-
- !ruby/object:Gem::Version
|
|
148
|
-
version: 0.8.0
|
|
149
|
-
type: :development
|
|
150
|
-
prerelease: false
|
|
151
|
-
version_requirements: !ruby/object:Gem::Requirement
|
|
152
|
-
requirements:
|
|
153
|
-
- - "~>"
|
|
154
|
-
- !ruby/object:Gem::Version
|
|
155
|
-
version: 0.8.0
|
|
156
60
|
description: |2
|
|
157
61
|
Nerd dice allows you to roll polyhedral dice and add bonuses as you would in
|
|
158
62
|
a tabletop roleplaying game. You can choose to roll multiple dice and keep a
|
|
@@ -241,7 +145,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
241
145
|
- !ruby/object:Gem::Version
|
|
242
146
|
version: '0'
|
|
243
147
|
requirements: []
|
|
244
|
-
rubygems_version:
|
|
148
|
+
rubygems_version: 4.0.3
|
|
245
149
|
specification_version: 4
|
|
246
150
|
summary: A Ruby Gem for rolling polyhedral dice.
|
|
247
151
|
test_files: []
|
metadata.gz.sig
CHANGED
|
Binary file
|