dicey 0.0.1 → 0.13.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.
metadata CHANGED
@@ -1,71 +1,73 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: dicey
3
- version: !ruby/object:Gem::Version
4
- prerelease: false
5
- segments:
6
- - 0
7
- - 0
8
- - 1
9
- version: 0.0.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.13.1
10
5
  platform: ruby
11
- authors:
12
- - Adam Rogers
13
- autorequire:
14
- bindir: bin
6
+ authors:
7
+ - Alexandr Bulancov
8
+ bindir: exe
15
9
  cert_chain: []
16
-
17
- date: 2010-12-29 00:00:00 +00:00
18
- default_executable:
10
+ date: 1980-01-02 00:00:00.000000000 Z
19
11
  dependencies: []
20
-
21
- description: Create dice for use in games such as Yahtzee.
22
- email:
23
- - adam@rodreegez.com
24
- executables: []
25
-
12
+ executables:
13
+ - dicey
14
+ - dicey-to-gnuplot
26
15
  extensions: []
27
-
28
- extra_rdoc_files: []
29
-
30
- files:
31
- - Rakefile
32
- - Readme.md
16
+ extra_rdoc_files:
17
+ - README.md
18
+ files:
19
+ - README.md
20
+ - exe/dicey
21
+ - exe/dicey-to-gnuplot
33
22
  - lib/dicey.rb
34
- - lib/dicey/dice.rb
35
- - test/dice_test.rb
36
- - test/die_test.rb
37
- - test/test_helper.rb
38
- has_rdoc: true
39
- homepage: http://github.com/Rodreegez/dicey
40
- licenses: []
41
-
42
- post_install_message:
43
- rdoc_options: []
44
-
45
- require_paths:
23
+ - lib/dicey/abstract_die.rb
24
+ - lib/dicey/cli/blender.rb
25
+ - lib/dicey/cli/options.rb
26
+ - lib/dicey/die_foundry.rb
27
+ - lib/dicey/numeric_die.rb
28
+ - lib/dicey/output_formatters/gnuplot_formatter.rb
29
+ - lib/dicey/output_formatters/hash_formatter.rb
30
+ - lib/dicey/output_formatters/json_formatter.rb
31
+ - lib/dicey/output_formatters/key_value_formatter.rb
32
+ - lib/dicey/output_formatters/list_formatter.rb
33
+ - lib/dicey/output_formatters/yaml_formatter.rb
34
+ - lib/dicey/regular_die.rb
35
+ - lib/dicey/roller.rb
36
+ - lib/dicey/sum_frequency_calculators/base_calculator.rb
37
+ - lib/dicey/sum_frequency_calculators/brute_force.rb
38
+ - lib/dicey/sum_frequency_calculators/kronecker_substitution.rb
39
+ - lib/dicey/sum_frequency_calculators/multinomial_coefficients.rb
40
+ - lib/dicey/sum_frequency_calculators/runner.rb
41
+ - lib/dicey/sum_frequency_calculators/test_runner.rb
42
+ - lib/dicey/version.rb
43
+ - sig/dicey.rbs
44
+ homepage: https://github.com/trinistr/dicey
45
+ licenses:
46
+ - MIT
47
+ metadata:
48
+ homepage_uri: https://github.com/trinistr/dicey
49
+ bug_tracker_uri: https://github.com/trinistr/dicey/issues
50
+ documentation_uri: https://rubydoc.info/gems/dicey/0.13.1
51
+ source_code_uri: https://github.com/trinistr/dicey/tree/v0.13.1
52
+ changelog_uri: https://github.com/trinistr/dicey/blob/v0.13.1/CHANGELOG.md
53
+ rubygems_mfa_required: 'true'
54
+ rdoc_options:
55
+ - "--main"
56
+ - README.md
57
+ require_paths:
46
58
  - lib
47
- required_ruby_version: !ruby/object:Gem::Requirement
48
- none: false
49
- requirements:
59
+ required_ruby_version: !ruby/object:Gem::Requirement
60
+ requirements:
50
61
  - - ">="
51
- - !ruby/object:Gem::Version
52
- segments:
53
- - 0
54
- version: "0"
55
- required_rubygems_version: !ruby/object:Gem::Requirement
56
- none: false
57
- requirements:
62
+ - !ruby/object:Gem::Version
63
+ version: 3.1.0
64
+ required_rubygems_version: !ruby/object:Gem::Requirement
65
+ requirements:
58
66
  - - ">="
59
- - !ruby/object:Gem::Version
60
- segments:
61
- - 0
62
- version: "0"
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
63
69
  requirements: []
64
-
65
- rubyforge_project: dicey
66
- rubygems_version: 1.3.7
67
- signing_key:
68
- specification_version: 3
69
- summary: Dice for playing games with.
70
+ rubygems_version: 3.7.1
71
+ specification_version: 4
72
+ summary: Calculator of dice roll frequencies/probabilities. Also rolls dice.
70
73
  test_files: []
71
-
data/Rakefile DELETED
@@ -1,7 +0,0 @@
1
- require 'rake/testtask'
2
- Rake::TestTask.new(:test) do |t|
3
- t.libs = ['lib', 'test']
4
- t.pattern = 'test/**/*_test.rb'
5
- t.verbose = true
6
- end
7
- task :default => :test
data/Readme.md DELETED
@@ -1,21 +0,0 @@
1
- Dice for playing games with.
2
-
3
- ## Why? ##
4
-
5
- It's Christmas, I had some time on the train home and I've been playing Monopoly all week.
6
-
7
- ## How? ##
8
-
9
- d = Dice.new # 1 dice
10
- d.roll
11
- => [1]
12
-
13
- d = Dice.new(2) # 2 dice
14
- d.roll
15
- => [2, 1]
16
-
17
- ## Bacon? ##
18
-
19
- Dice inherits from Array, populates it with the required number of (dubious grammar) Die and adds the `roll` method.
20
- `roll` collects all the Die in the Dice Array and calls roll on each Die.
21
- The `roll` method on `Die` returns a random number between 1 and 6 (as you'd expect).
data/lib/dicey/dice.rb DELETED
@@ -1,14 +0,0 @@
1
- class Dice < Array
2
- def initialize(n=1)
3
- n.times { |d| d = Die.new ; self << d }
4
- end
5
- def roll
6
- self.collect { |d| d.roll }
7
- end
8
- end
9
-
10
- class Die
11
- def roll
12
- (rand(6) + 1)
13
- end
14
- end
data/test/dice_test.rb DELETED
@@ -1,17 +0,0 @@
1
- require 'test_helper'
2
-
3
- class DiceTest < Test::Unit::TestCase
4
- def test_dice_is_a_collection_of_die
5
- d = Dice.new(2)
6
- assert_equal 2, d.length
7
- assert_instance_of Die, d.first
8
- end
9
- def test_dice_can_be_rolled
10
- d = Dice.new(5)
11
- result = d.roll
12
- assert_instance_of Array, result
13
- assert_equal 5, result.length
14
- assert !result.include?(0)
15
- assert !result.include?(7)
16
- end
17
- end
data/test/die_test.rb DELETED
@@ -1,13 +0,0 @@
1
- require 'test_helper'
2
- class DieTest < Test::Unit::TestCase
3
- def test_die_is_a_die
4
- d = Die.new
5
- assert_instance_of Die, d
6
- end
7
- def test_die_returns_valid_result
8
- d = Die.new
9
- result = d.roll
10
- assert_not_equal 0, result
11
- assert_not_equal 7, result
12
- end
13
- end
data/test/test_helper.rb DELETED
@@ -1,2 +0,0 @@
1
- require 'test/unit'
2
- require './lib/dicey'