dice_box 0.1.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA1:
3
+ metadata.gz: edf058b8c28a23ef4bb53a55a9580797bb633f9f
4
+ data.tar.gz: 2a7e287a785e8d5dc8590092a3bb3fc9b91ab345
5
+ SHA512:
6
+ metadata.gz: c6fd3e0c0486d889b73f4ab4d365631a4db5e87d5be9f06b43458303cb61f733871846cdef2b38165a792a329fdcad7b9838806527a964433fc3656569235f5c
7
+ data.tar.gz: 5fac7ec74f9d61bcd92a8fcc8299b1974880d597bce01b829e39f597cd037f731f9df7062c4a053ee662e6580cffbddccb2d7f5aeec04fe5a59097b3e8373998
data/.cane ADDED
@@ -0,0 +1,5 @@
1
+ --color
2
+ --abc-max 15
3
+ --no-style
4
+ --no-doc
5
+ --gte coverage/.last_run.json,99
data/.gitignore ADDED
@@ -0,0 +1,5 @@
1
+ .DS_Store
2
+ .yardoc
3
+ Gemfile.lock
4
+ coverage/
5
+ doc/
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --require spec_helper
2
+ --color
3
+ --order random
data/.rubocop.yml ADDED
@@ -0,0 +1,31 @@
1
+ AllCops:
2
+ Exclude:
3
+ - '*.gemspec'
4
+
5
+ Style/EmptyLineBetweenDefs:
6
+ Severity: error
7
+
8
+ Style/HashSyntax:
9
+ Severity: error
10
+
11
+ Style/LineLength:
12
+ Max: 120
13
+ Severity: error
14
+
15
+ Style/MethodLength:
16
+ Max: 25
17
+ Severity: error
18
+
19
+ Style/TrailingWhitespace:
20
+ Severity: error
21
+
22
+ Style/TrailingBlankLines:
23
+ Severity: error
24
+
25
+ ### Disabled checks
26
+
27
+ Documentation:
28
+ Enabled: false
29
+
30
+ Style/SelfAssignment:
31
+ Enabled: false
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ ruby-2.1.1
data/.travis.yml ADDED
@@ -0,0 +1,11 @@
1
+ language: ruby
2
+ rvm:
3
+ - 2.1.0
4
+ - 2.0.0
5
+ - 1.9.3
6
+
7
+ addons:
8
+ code_climate:
9
+ repo_token: eb81b5b2208352b78077fbe41f8c1602616905aaf83d922764b3fbbaec9417a1
10
+
11
+ script: 'bundle exec rake test'
data/Gemfile ADDED
@@ -0,0 +1,3 @@
1
+ source 'https://rubygems.org'
2
+
3
+ gemspec
data/LICENSE.txt ADDED
@@ -0,0 +1,22 @@
1
+ Copyright (c) 2014 Rafaël Gonzalez
2
+
3
+ MIT License
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining
6
+ a copy of this software and associated documentation files (the
7
+ "Software"), to deal in the Software without restriction, including
8
+ without limitation the rights to use, copy, modify, merge, publish,
9
+ distribute, sublicense, and/or sell copies of the Software, and to
10
+ permit persons to whom the Software is furnished to do so, subject to
11
+ the following conditions:
12
+
13
+ The above copyright notice and this permission notice shall be
14
+ included in all copies or substantial portions of the Software.
15
+
16
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
17
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
18
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
19
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
20
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
21
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
22
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,75 @@
1
+ # DiceBox
2
+
3
+ ![Dice Box](https://raw.githubusercontent.com/rafaelgonzalez/dice_box/master/dice.jpg)
4
+
5
+ [![Build Status](https://travis-ci.org/rafaelgonzalez/dice_box.svg?branch=master)](https://travis-ci.org/rafaelgonzalez/dice_box)
6
+ [![Code Climate](https://codeclimate.com/github/rafaelgonzalez/dice_box.png)](https://codeclimate.com/github/rafaelgonzalez/dice_box)
7
+ [![Test Coverage](https://codeclimate.com/github/rafaelgonzalez/dice_box/coverage.png)](https://codeclimate.com/github/rafaelgonzalez/dice_box)
8
+
9
+ A gem of dices, to get rolling with Ruby.
10
+
11
+ **Supported Ruby versions:**
12
+
13
+ - 2.1.0
14
+ - 2.0.0
15
+ - 1.9.3
16
+
17
+ ## Installation
18
+
19
+ Via RubyGems:
20
+
21
+ $ gem install dice_box
22
+
23
+ Or in a Gemfile:
24
+
25
+ gem 'dice_box'
26
+
27
+ ## Usage
28
+
29
+ Complete documentation available [here](http://rubydoc.info/github/rafaelgonzalez/dice_box/frames).
30
+
31
+ - [DiceBox::Dice](http://rubydoc.info/github/rafaelgonzalez/dice_box/DiceBox/Dice) (rolling dices)
32
+ ```ruby
33
+ # Roll a dice with 7 sides
34
+ DiceBox::Dice.roll(7) # => 4
35
+
36
+ # Roll 3 dices with 12 sides
37
+ DiceBox::Dice.roll(12, 3) # => 27
38
+
39
+ # Using an instance
40
+ dice = DiceBox::Dice.new(12)
41
+ dice.rolled # => nil
42
+ dice.roll # => 24
43
+ dice.rolled # => 24
44
+ ```
45
+
46
+ - [DiceBox::Dice::Sides](http://rubydoc.info/github/rafaelgonzalez/dice_box/DiceBox/Dice/Side) (cheating with sides weights)
47
+ ```ruby
48
+ dice = DiceBox::Dice.new(3)
49
+ dice.sides[0].weight = 0.0
50
+ dice.sides[1].weight = 2.0
51
+
52
+ dice.roll # => 2
53
+ dice.roll # => 3
54
+ dice.roll # => 2
55
+ dice.roll # => 2
56
+ dice.roll # => 2
57
+ ```
58
+
59
+ ## Versioning
60
+
61
+ DiceBox follows the principles of [semantic versioning](http://semver.org).
62
+
63
+ > Given a version number MAJOR.MINOR.PATCH, increment the:
64
+
65
+ > - MAJOR version when you make incompatible API changes,
66
+ > - MINOR version when you add functionality in a backwards-compatible manner, and
67
+ > - PATCH version when you make backwards-compatible bug fixes.
68
+
69
+ > Additional labels for pre-release and build metadata are available as extensions to the MAJOR.MINOR.PATCH format.
70
+
71
+ ## License
72
+
73
+ Copyright :copyright: 2014 Rafaël Gonzalez
74
+
75
+ Released under the terms of the MIT licence. See the [LICENSE](https://raw.githubusercontent.com/rafaelgonzalez/dice_box/master/LICENSE.txt) file for more details.
data/Rakefile ADDED
@@ -0,0 +1,36 @@
1
+ require 'bundler/gem_tasks'
2
+ require 'rspec/core/rake_task'
3
+
4
+ RSpec::Core::RakeTask.new('spec')
5
+
6
+ task default: :test
7
+
8
+ desc 'Run the test suite'
9
+ task test: :spec
10
+
11
+ begin
12
+ require 'cane/rake_task'
13
+
14
+ desc 'Run Cane to check quality metrics'
15
+ Cane::RakeTask.new(:quality) do |cane|
16
+ cane.canefile = '.cane'
17
+ end
18
+ rescue LoadError
19
+ warn 'Cane not available, :quality task not provided.'
20
+ end
21
+
22
+ begin
23
+ require 'rubocop/rake_task'
24
+
25
+ desc 'Run RuboCop'
26
+ RuboCop::RakeTask.new(:rubocop) do |task|
27
+ task.fail_on_error = false
28
+ end
29
+ rescue LoadError
30
+ warn 'RuboCop not available, :rubocop task not provided.'
31
+ end
32
+
33
+ Rake::Task[:test].enhance do
34
+ Rake::Task[:quality].invoke
35
+ Rake::Task[:rubocop].invoke
36
+ end
data/dice.jpg ADDED
Binary file
data/dice_box.gemspec ADDED
@@ -0,0 +1,29 @@
1
+ # coding: utf-8
2
+ lib = File.expand_path('../lib', __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require 'dice_box/version'
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = 'dice_box'
8
+ spec.version = DiceBox::VERSION
9
+ spec.authors = ['Rafaël Gonzalez']
10
+ spec.email = ['github@rafaelgonzalez.me']
11
+ spec.summary = %q{A gem with dices, to get rolling with Ruby.}
12
+ spec.description = %q{A gem with dices, to get rolling with Ruby.}
13
+ spec.homepage = 'https://github.com/rafaelgonzalez/dice_box'
14
+ spec.license = 'MIT'
15
+
16
+ spec.files = `git ls-files -z`.split("\x0")
17
+ spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
+ spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
+ spec.require_paths = ['lib']
20
+
21
+ spec.add_development_dependency 'bundler', '~> 1.5'
22
+ spec.add_development_dependency 'rake'
23
+ spec.add_development_dependency 'yard'
24
+ spec.add_development_dependency 'rspec', '~> 3.0'
25
+ spec.add_development_dependency 'simplecov', '~> 0.9.0'
26
+ spec.add_development_dependency 'codeclimate-test-reporter'
27
+ spec.add_development_dependency 'cane'
28
+ spec.add_development_dependency 'rubocop'
29
+ end
@@ -0,0 +1,21 @@
1
+ module DiceBox
2
+ class Dice
3
+ # Representation of the side of a dice
4
+ class Side
5
+ # @!attribute [r] value
6
+ # @return [Integer] the actual value of the Side
7
+ attr_reader :value
8
+
9
+ # @!attribute [rw] weight
10
+ # @return [Float] the weight of the Side
11
+ attr_accessor :weight
12
+
13
+ # @param value [Integer] the actual value of the Side
14
+ # @param weight [Float] the weight of the Side
15
+ def initialize(value, weight = 1.0)
16
+ @value = value
17
+ @weight = weight
18
+ end
19
+ end
20
+ end
21
+ end
@@ -0,0 +1,86 @@
1
+ module DiceBox
2
+ # Representation of a dice
3
+ class Dice
4
+ # @!attribute [r] sides
5
+ # @return [Array] the Array of Sides of the Dice
6
+ attr_reader :sides
7
+
8
+ # @!attribute [r] rolled_side
9
+ # @return [Array] the last rolled Side
10
+ attr_reader :rolled_side
11
+
12
+ # @param sides_number [Integer] the number of Sides this Dice should have
13
+ def initialize(sides_number)
14
+ @sides = build_sides(sides_number)
15
+ @rolled_side = nil
16
+ end
17
+
18
+ # Rolls multiple dices with the same number of sides
19
+ # @param sides_number [Integer] the number of sides of the dices
20
+ # @param amount [Integer] the number of dices rolled
21
+ # @return [Integer] the total roll result
22
+ def self.roll(sides_number, amount = 1)
23
+ return 0 if amount.nil? || amount <= 0
24
+
25
+ amount.times.map do
26
+ Random.new.rand(1..sides_number)
27
+ end.reduce(&:+)
28
+ end
29
+
30
+ # Rolls the dice
31
+ # @note Sets #rolled_side to the rolled Side
32
+ # @return [Integer] the value of the rolled Side
33
+ def roll
34
+ @rolled_side = balanced? ? sides.sample : weighted_roll
35
+ rolled_side.value
36
+ end
37
+
38
+ # Returns the last value rolled
39
+ # @return [Integer] the last rolled value.
40
+ def rolled
41
+ @rolled_side ? @rolled_side.value : nil
42
+ end
43
+
44
+ # Determines if all Sides of the Dice have the same weight
45
+ # @return [Boolean]
46
+ def balanced?
47
+ !crooked?
48
+ end
49
+
50
+ # Determines if at least one Side has a different weight than any other Side of the Dice
51
+ # @return [Boolean]
52
+ def crooked?
53
+ sides.map(&:weight).any? do |weight|
54
+ weight != sides.first.weight
55
+ end
56
+ end
57
+
58
+ # The weight of the Dice, sum of all Sides weights
59
+ # @return [Float] the weight of the Dice
60
+ def weight
61
+ sides.map(&:weight).reduce(&:+)
62
+ end
63
+
64
+ private
65
+
66
+ # Instanciates multiple Sides
67
+ # @param sides_number [Integer] the number of Sides to instanciate
68
+ # @return [Array] the Array of instanciated Sides
69
+ def build_sides(sides_number)
70
+ sides_number.times.map do |number|
71
+ Side.new(number + 1)
72
+ end
73
+ end
74
+
75
+ # Rolls the Dice taking Sides weights into account
76
+ # @return [Side] the rolled Side
77
+ def weighted_roll
78
+ num = rand(0..weight)
79
+
80
+ sides.each do |side|
81
+ return side if side.weight > num
82
+ num = num - side.weight
83
+ end
84
+ end
85
+ end
86
+ end
@@ -0,0 +1,4 @@
1
+ module DiceBox
2
+ # Current version number of the library
3
+ VERSION = '0.1.0'
4
+ end
data/lib/dice_box.rb ADDED
@@ -0,0 +1,7 @@
1
+ # Global namespace of the library
2
+ module DiceBox
3
+ end
4
+
5
+ require 'dice_box/version'
6
+ require 'dice_box/dice'
7
+ require 'dice_box/dice/side'
@@ -0,0 +1,15 @@
1
+ describe DiceBox::Dice::Side do
2
+ subject { described_class.new(12) }
3
+
4
+ describe '#value' do
5
+ it 'returns the value' do
6
+ expect(subject.value).to eql 12
7
+ end
8
+ end
9
+
10
+ describe '#weight' do
11
+ it 'returns the value' do
12
+ expect(subject.weight).to eql 1.0
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,163 @@
1
+ describe DiceBox::Dice do
2
+ subject { described_class.new(4) }
3
+
4
+ describe '#sides' do
5
+ it 'returns an Array of Sides' do
6
+ expect(subject.sides).to be_a(Array)
7
+
8
+ subject.sides.each do |side|
9
+ expect(side).to be_a(DiceBox::Dice::Side)
10
+ end
11
+ end
12
+
13
+ it 'has the correct number of sides' do
14
+ expect(subject.sides.length).to eql 4
15
+ end
16
+ end
17
+
18
+ describe '#rolled_side' do
19
+ context 'with a non-rolled Dice' do
20
+ it 'returns nil' do
21
+ expect(subject.rolled_side).to be_nil
22
+ end
23
+ end
24
+
25
+ context 'with a rolled Dice' do
26
+ it 'returns the last rolled side' do
27
+ rolled_value = subject.roll
28
+
29
+ expect(subject.rolled_side.value).to eql rolled_value
30
+ end
31
+ end
32
+ end
33
+
34
+ describe '.roll' do
35
+ context 'with 1 dice of 6 sides' do
36
+ it 'is always superior to 0' do
37
+ expect(described_class.roll(6, 1)).to be > 0
38
+ end
39
+
40
+ it 'is always inferior to 7' do
41
+ expect(described_class.roll(6, 1)).to be < 7
42
+ end
43
+ end
44
+
45
+ context 'with 5 dices of 3 sides' do
46
+ it 'is always superior to 5' do
47
+ expect(described_class.roll(3, 5)).to be > 4
48
+ end
49
+
50
+ it 'is always inferior to 16' do
51
+ expect(described_class.roll(3, 5)).to be < 16
52
+ end
53
+ end
54
+
55
+ context 'with 0 dice' do
56
+ it 'returns 0' do
57
+ expect(described_class.roll(6, 0)).to eql 0
58
+ end
59
+ end
60
+
61
+ context 'with a negative amount of dices' do
62
+ it 'returns 0' do
63
+ expect(described_class.roll(6, -1)).to eql 0
64
+ end
65
+ end
66
+ end
67
+
68
+ describe '#roll' do
69
+ it 'sets #rolled_side to the rolled value' do
70
+ rolled_value = subject.roll
71
+
72
+ expect(subject.rolled_side.value).to eql rolled_value
73
+ end
74
+
75
+ context 'with a dice of 6 sides' do
76
+ subject { described_class.new(6) }
77
+
78
+ it 'is always superior to 0' do
79
+ expect(subject.roll).to be > 0
80
+ end
81
+
82
+ it 'is always inferior to 7' do
83
+ expect(subject.roll).to be < 7
84
+ end
85
+ end
86
+
87
+ context 'with a crooked dice' do
88
+ subject { described_class.new(3) }
89
+
90
+ before do
91
+ subject.sides[0].weight = 0
92
+ subject.sides[1].weight = 0
93
+ end
94
+
95
+ it 'rolls the side with weight' do
96
+ expect(subject.roll).to eql 3
97
+ end
98
+ end
99
+ end
100
+
101
+ describe '#rolled' do
102
+ context 'with a non-rolled Dice' do
103
+ it 'returns nil' do
104
+ expect(subject.rolled).to be_nil
105
+ end
106
+ end
107
+
108
+ context 'with a rolled Dice' do
109
+ it 'returns the last rolled side' do
110
+ rolled_value = subject.roll
111
+
112
+ expect(subject.rolled).to eql rolled_value
113
+ end
114
+ end
115
+ end
116
+
117
+ describe '#balanced?' do
118
+ context 'with Sides of the same weight' do
119
+ it 'returns true' do
120
+ expect(subject).to be_balanced
121
+ end
122
+ end
123
+
124
+ context 'with Sides with different weight' do
125
+ before { subject.sides.first.weight = 2.0 }
126
+
127
+ it 'returns false' do
128
+ expect(subject).not_to be_balanced
129
+ end
130
+ end
131
+ end
132
+
133
+ describe '#crooked?' do
134
+ context 'with Sides of the same weight' do
135
+ it 'returns false' do
136
+ expect(subject).not_to be_crooked
137
+ end
138
+ end
139
+
140
+ context 'with Sides with different weight' do
141
+ before { subject.sides.first.weight = 2.0 }
142
+
143
+ it 'returns true' do
144
+ expect(subject).to be_crooked
145
+ end
146
+ end
147
+ end
148
+
149
+ describe '#weight' do
150
+ subject { described_class.new(4) }
151
+
152
+ before do
153
+ subject.sides[0].weight = 2.32
154
+ subject.sides[1].weight = 3.0
155
+ subject.sides[2].weight = 1.26
156
+ subject.sides[3].weight = 0.72
157
+ end
158
+
159
+ it 'returns the total of Sides weights' do
160
+ expect(subject.weight).to eql 7.3
161
+ end
162
+ end
163
+ end
@@ -0,0 +1,13 @@
1
+ require 'simplecov'
2
+ require 'codeclimate-test-reporter'
3
+
4
+ SimpleCov.start do
5
+ add_filter '/spec/'
6
+ end
7
+
8
+ CodeClimate::TestReporter.start
9
+
10
+ require 'dice_box'
11
+
12
+ RSpec.configure do
13
+ end
metadata ADDED
@@ -0,0 +1,179 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: dice_box
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.0
5
+ platform: ruby
6
+ authors:
7
+ - Rafaël Gonzalez
8
+ autorequire:
9
+ bindir: bin
10
+ cert_chain: []
11
+ date: 2014-07-27 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.5'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.5'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - ">="
32
+ - !ruby/object:Gem::Version
33
+ version: '0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - ">="
39
+ - !ruby/object:Gem::Version
40
+ version: '0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: yard
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - ">="
46
+ - !ruby/object:Gem::Version
47
+ version: '0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - ">="
53
+ - !ruby/object:Gem::Version
54
+ version: '0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: rspec
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - "~>"
60
+ - !ruby/object:Gem::Version
61
+ version: '3.0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - "~>"
67
+ - !ruby/object:Gem::Version
68
+ version: '3.0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: simplecov
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - "~>"
74
+ - !ruby/object:Gem::Version
75
+ version: 0.9.0
76
+ type: :development
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - "~>"
81
+ - !ruby/object:Gem::Version
82
+ version: 0.9.0
83
+ - !ruby/object:Gem::Dependency
84
+ name: codeclimate-test-reporter
85
+ requirement: !ruby/object:Gem::Requirement
86
+ requirements:
87
+ - - ">="
88
+ - !ruby/object:Gem::Version
89
+ version: '0'
90
+ type: :development
91
+ prerelease: false
92
+ version_requirements: !ruby/object:Gem::Requirement
93
+ requirements:
94
+ - - ">="
95
+ - !ruby/object:Gem::Version
96
+ version: '0'
97
+ - !ruby/object:Gem::Dependency
98
+ name: cane
99
+ requirement: !ruby/object:Gem::Requirement
100
+ requirements:
101
+ - - ">="
102
+ - !ruby/object:Gem::Version
103
+ version: '0'
104
+ type: :development
105
+ prerelease: false
106
+ version_requirements: !ruby/object:Gem::Requirement
107
+ requirements:
108
+ - - ">="
109
+ - !ruby/object:Gem::Version
110
+ version: '0'
111
+ - !ruby/object:Gem::Dependency
112
+ name: rubocop
113
+ requirement: !ruby/object:Gem::Requirement
114
+ requirements:
115
+ - - ">="
116
+ - !ruby/object:Gem::Version
117
+ version: '0'
118
+ type: :development
119
+ prerelease: false
120
+ version_requirements: !ruby/object:Gem::Requirement
121
+ requirements:
122
+ - - ">="
123
+ - !ruby/object:Gem::Version
124
+ version: '0'
125
+ description: A gem with dices, to get rolling with Ruby.
126
+ email:
127
+ - github@rafaelgonzalez.me
128
+ executables: []
129
+ extensions: []
130
+ extra_rdoc_files: []
131
+ files:
132
+ - ".cane"
133
+ - ".gitignore"
134
+ - ".rspec"
135
+ - ".rubocop.yml"
136
+ - ".ruby-version"
137
+ - ".travis.yml"
138
+ - Gemfile
139
+ - LICENSE.txt
140
+ - README.md
141
+ - Rakefile
142
+ - dice.jpg
143
+ - dice_box.gemspec
144
+ - lib/dice_box.rb
145
+ - lib/dice_box/dice.rb
146
+ - lib/dice_box/dice/side.rb
147
+ - lib/dice_box/version.rb
148
+ - spec/dice_box/dice/side_spec.rb
149
+ - spec/dice_box/dice_spec.rb
150
+ - spec/spec_helper.rb
151
+ homepage: https://github.com/rafaelgonzalez/dice_box
152
+ licenses:
153
+ - MIT
154
+ metadata: {}
155
+ post_install_message:
156
+ rdoc_options: []
157
+ require_paths:
158
+ - lib
159
+ required_ruby_version: !ruby/object:Gem::Requirement
160
+ requirements:
161
+ - - ">="
162
+ - !ruby/object:Gem::Version
163
+ version: '0'
164
+ required_rubygems_version: !ruby/object:Gem::Requirement
165
+ requirements:
166
+ - - ">="
167
+ - !ruby/object:Gem::Version
168
+ version: '0'
169
+ requirements: []
170
+ rubyforge_project:
171
+ rubygems_version: 2.2.2
172
+ signing_key:
173
+ specification_version: 4
174
+ summary: A gem with dices, to get rolling with Ruby.
175
+ test_files:
176
+ - spec/dice_box/dice/side_spec.rb
177
+ - spec/dice_box/dice_spec.rb
178
+ - spec/spec_helper.rb
179
+ has_rdoc: