combinatorics 0.4.3 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (66) hide show
  1. checksums.yaml +7 -0
  2. data/.github/workflows/ruby.yml +28 -0
  3. data/.gitignore +5 -5
  4. data/ChangeLog.md +11 -0
  5. data/Gemfile +16 -0
  6. data/LICENSE.txt +1 -1
  7. data/README.md +144 -107
  8. data/Rakefile +6 -32
  9. data/combinatorics.gemspec +2 -4
  10. data/gemspec.yml +8 -4
  11. data/lib/combinatorics/cartesian_product/cardinality.rb +2 -0
  12. data/lib/combinatorics/cartesian_product/extensions/array.rb +3 -1
  13. data/lib/combinatorics/cartesian_product/extensions/set.rb +3 -1
  14. data/lib/combinatorics/cartesian_product/extensions.rb +4 -2
  15. data/lib/combinatorics/cartesian_product/mixin.rb +3 -1
  16. data/lib/combinatorics/cartesian_product.rb +5 -3
  17. data/lib/combinatorics/choose/cardinality.rb +4 -2
  18. data/lib/combinatorics/choose/extensions/array.rb +3 -1
  19. data/lib/combinatorics/choose/extensions/set.rb +4 -1
  20. data/lib/combinatorics/choose/extensions.rb +4 -2
  21. data/lib/combinatorics/choose/mixin.rb +2 -0
  22. data/lib/combinatorics/choose.rb +5 -3
  23. data/lib/combinatorics/derange/cardinality.rb +3 -1
  24. data/lib/combinatorics/derange/extensions/array.rb +3 -1
  25. data/lib/combinatorics/derange/extensions.rb +3 -1
  26. data/lib/combinatorics/derange/mixin.rb +2 -0
  27. data/lib/combinatorics/derange.rb +5 -3
  28. data/lib/combinatorics/enumerator.rb +2 -0
  29. data/lib/combinatorics/extensions/math.rb +2 -0
  30. data/lib/combinatorics/extensions/range.rb +2 -0
  31. data/lib/combinatorics/extensions.rb +3 -1
  32. data/lib/combinatorics/generator.rb +3 -1
  33. data/lib/combinatorics/list_comprehension.rb +3 -1
  34. data/lib/combinatorics/permute/cardinality.rb +3 -1
  35. data/lib/combinatorics/permute/extensions/array.rb +3 -1
  36. data/lib/combinatorics/permute/extensions/set.rb +3 -1
  37. data/lib/combinatorics/permute/extensions.rb +4 -2
  38. data/lib/combinatorics/permute/mixin.rb +2 -0
  39. data/lib/combinatorics/permute.rb +5 -3
  40. data/lib/combinatorics/power_set/cardinality.rb +3 -1
  41. data/lib/combinatorics/power_set/extensions/array.rb +3 -1
  42. data/lib/combinatorics/power_set/extensions/set.rb +3 -1
  43. data/lib/combinatorics/power_set/extensions.rb +4 -2
  44. data/lib/combinatorics/power_set/mixin.rb +2 -0
  45. data/lib/combinatorics/power_set.rb +5 -3
  46. data/lib/combinatorics/version.rb +3 -1
  47. data/lib/combinatorics.rb +12 -10
  48. data/spec/cartesian_product/cardinality_spec.rb +14 -16
  49. data/spec/cartesian_product/mixin_examples.rb +14 -14
  50. data/spec/choose/cardinality_spec.rb +32 -34
  51. data/spec/choose/mixin_examples.rb +6 -6
  52. data/spec/combinatorics_spec.rb +1 -1
  53. data/spec/derange/cardinality_spec.rb +1 -3
  54. data/spec/derange/mixin_examples.rb +6 -6
  55. data/spec/enumerator_spec.rb +1 -1
  56. data/spec/extensions/math_spec.rb +19 -19
  57. data/spec/extensions/range_spec.rb +12 -12
  58. data/spec/generator_spec.rb +1 -1
  59. data/spec/list_comprehension_spec.rb +10 -10
  60. data/spec/permute/cardinality_spec.rb +29 -31
  61. data/spec/permute/mixin_examples.rb +5 -5
  62. data/spec/power_set/cardinality_spec.rb +1 -3
  63. data/spec/power_set/mixin_examples.rb +4 -4
  64. data/spec/spec_helper.rb +2 -5
  65. metadata +26 -58
  66. data/.gemtest +0 -0
@@ -12,89 +12,89 @@ describe Math do
12
12
 
13
13
  describe "sigma" do
14
14
  it "should return 6 for sigma(1..3)" do
15
- subject.sigma(1..3).should == 6
15
+ expect(subject.sigma(1..3)).to eq(6)
16
16
  end
17
17
 
18
18
  it "should return 60 for sigma(3..5)" do
19
- subject.sigma(3..5).should == 12
19
+ expect(subject.sigma(3..5)).to eq(12)
20
20
  end
21
21
 
22
22
  it "should take an optional block argument" do
23
23
  result = subject.sigma(1..5) { |i| i * 2 }
24
24
 
25
- result.should == (1 * 2) + (2 * 2) + (3 * 2) + (4 * 2) + (5 * 2)
25
+ expect(result).to eq((1 * 2) + (2 * 2) + (3 * 2) + (4 * 2) + (5 * 2))
26
26
  end
27
27
  end
28
28
 
29
29
  describe "pi" do
30
30
  it "should return 24 for pi(1..4)" do
31
- subject.pi(1..4).should == 24
31
+ expect(subject.pi(1..4)).to eq(24)
32
32
  end
33
33
 
34
34
  it "should return 30 for pi(5..6)" do
35
- subject.pi(5..6).should == 30
35
+ expect(subject.pi(5..6)).to eq(30)
36
36
  end
37
37
 
38
38
  it "should take an optional block argument" do
39
39
  result = subject.pi(1..3) { |i| i * 2 }
40
40
 
41
- result.should == (1 * 2) * (2 * 2) * (3 * 2)
41
+ expect(result).to eq((1 * 2) * (2 * 2) * (3 * 2))
42
42
  end
43
43
  end
44
44
 
45
45
  describe "factorial" do
46
46
  it "should return 1 for factorial(0)" do
47
- subject.factorial(0).should == 1
47
+ expect(subject.factorial(0)).to eq(1)
48
48
  end
49
49
 
50
50
  it "should return 1 for factorial(1)" do
51
- subject.factorial(1).should == 1
51
+ expect(subject.factorial(1)).to eq(1)
52
52
  end
53
53
 
54
54
  it "should return 2 for factorial(2)" do
55
- subject.factorial(2).should == 2
55
+ expect(subject.factorial(2)).to eq(2)
56
56
  end
57
57
 
58
58
  it "should return 6 for factorial(3)" do
59
- subject.factorial(3).should == 6
59
+ expect(subject.factorial(3)).to eq(6)
60
60
  end
61
61
 
62
62
  it "should return 3628800 for factorial(10)" do
63
- subject.factorial(10).should == 3628800
63
+ expect(subject.factorial(10)).to eq(3628800)
64
64
  end
65
65
 
66
66
  it "should raise RangeError for factorial(-1)" do
67
- lambda { subject.factorial(-1) }.should raise_error(RangeError)
67
+ expect { subject.factorial(-1) }.to raise_error(RangeError)
68
68
  end
69
69
  end
70
70
 
71
71
  describe "subfactorial" do
72
72
  it "should return 1 for subfactorial(0)" do
73
- subject.subfactorial(0).should == 1
73
+ expect(subject.subfactorial(0)).to eq(1)
74
74
  end
75
75
 
76
76
  it "should return 0 for subfactorial(1)" do
77
- subject.subfactorial(1).should == 0
77
+ expect(subject.subfactorial(1)).to eq(0)
78
78
  end
79
79
 
80
80
  it "should return 1 for subfactorial(2)" do
81
- subject.subfactorial(2).should == 1
81
+ expect(subject.subfactorial(2)).to eq(1)
82
82
  end
83
83
 
84
84
  it "should return 2 for subfactorial(3)" do
85
- subject.subfactorial(3).should == 2
85
+ expect(subject.subfactorial(3)).to eq(2)
86
86
  end
87
87
 
88
88
  it "should return 9 for subfactorial(4)" do
89
- subject.subfactorial(4).should == 9
89
+ expect(subject.subfactorial(4)).to eq(9)
90
90
  end
91
91
 
92
92
  it "should return 44 for subfactorial(5)" do
93
- subject.subfactorial(5).should == 44
93
+ expect(subject.subfactorial(5)).to eq(44)
94
94
  end
95
95
 
96
96
  it "should raise RangeError for subfactorial(-1)" do
97
- lambda { subject.subfactorial(-1) }.should raise_error(RangeError)
97
+ expect { subject.subfactorial(-1) }.to raise_error(RangeError)
98
98
  end
99
99
  end
100
100
  end
@@ -4,11 +4,11 @@ require 'combinatorics/extensions/range'
4
4
  describe Range do
5
5
  describe "&" do
6
6
  it "should pick the maximum beginning value" do
7
- ((100..200) & (150..200)).first.should == 150
7
+ expect(((100..200) & (150..200)).first).to eq(150)
8
8
  end
9
9
 
10
10
  it "should pick the minimum ending value" do
11
- ((100..150) & (100..200)).last.should == 150
11
+ expect(((100..150) & (100..200)).last).to eq(150)
12
12
  end
13
13
  end
14
14
 
@@ -16,28 +16,28 @@ describe Range do
16
16
  subject { 1..10 }
17
17
 
18
18
  it "should iterate over every beginning value" do
19
- subject.upto(5..10).to_a.should == [
19
+ expect(subject.upto(5..10).to_a).to eq([
20
20
  (1..10),
21
21
  (2..10),
22
22
  (3..10),
23
23
  (4..10),
24
24
  (5..10)
25
- ]
25
+ ])
26
26
  end
27
27
 
28
28
  it "should iterate over every ending value" do
29
- subject.upto(1..15).to_a.should == [
29
+ expect(subject.upto(1..15).to_a).to eq([
30
30
  (1..10),
31
31
  (1..11),
32
32
  (1..12),
33
33
  (1..13),
34
34
  (1..14),
35
35
  (1..15)
36
- ]
36
+ ])
37
37
  end
38
38
 
39
39
  it "should not iterate up to lower bounding ranges" do
40
- subject.upto(0..5).to_a.should be_empty
40
+ expect(subject.upto(0..5).to_a).to be_empty
41
41
  end
42
42
  end
43
43
 
@@ -45,28 +45,28 @@ describe Range do
45
45
  subject { 5..15 }
46
46
 
47
47
  it "should iterate over every beginning value" do
48
- subject.downto(1..15).to_a.should == [
48
+ expect(subject.downto(1..15).to_a).to eq([
49
49
  (5..15),
50
50
  (4..15),
51
51
  (3..15),
52
52
  (2..15),
53
53
  (1..15)
54
- ]
54
+ ])
55
55
  end
56
56
 
57
57
  it "should iterate over every ending value" do
58
- subject.downto(5..10).to_a.should == [
58
+ expect(subject.downto(5..10).to_a).to eq([
59
59
  (5..15),
60
60
  (5..14),
61
61
  (5..13),
62
62
  (5..12),
63
63
  (5..11),
64
64
  (5..10)
65
- ]
65
+ ])
66
66
  end
67
67
 
68
68
  it "should not iterate down to upward bounding ranges" do
69
- subject.downto(10..20).to_a.should be_empty
69
+ expect(subject.downto(10..20).to_a).to be_empty
70
70
  end
71
71
  end
72
72
  end
@@ -3,6 +3,6 @@ require 'combinatorics/generator'
3
3
 
4
4
  describe Combinatorics::Generator do
5
5
  it "should auto-detect the Generator class" do
6
- Combinatorics::Generator.should_not be_nil
6
+ expect(Combinatorics::Generator).not_to be_nil
7
7
  end
8
8
  end
@@ -6,46 +6,46 @@ describe "Array#comprehension" do
6
6
  it "should return an Enumerator object if no block is given" do
7
7
  a = [1..5]
8
8
 
9
- a.comprehension.should_not be_kind_of(Array)
9
+ expect(a.comprehension).not_to be_kind_of(Array)
10
10
  end
11
11
 
12
12
  it "should yield iterations to the given block" do
13
13
  range = (1..5)
14
14
  a = [range]
15
15
 
16
- a.comprehension.to_a.should == [[1],[2],[3],[4],[5]]
16
+ expect(a.comprehension.to_a).to eq([[1],[2],[3],[4],[5]])
17
17
  end
18
18
 
19
19
  it "should do nothing an Array of all non-enumerable objects" do
20
20
  a = [1,2,3]
21
21
 
22
- a.comprehension.to_a.should == [a]
22
+ expect(a.comprehension.to_a).to eq([a])
23
23
  end
24
24
 
25
25
  it "should pass through an empty Array" do
26
26
  a = []
27
27
 
28
- a.comprehension.to_a.should == [a]
28
+ expect(a.comprehension.to_a).to eq([a])
29
29
  end
30
30
 
31
31
  it "should iterate over the values within an enumerable value" do
32
32
  range = (1..5)
33
33
  a = [range]
34
34
 
35
- a.comprehension.to_a.should == [[1],[2],[3],[4],[5]]
35
+ expect(a.comprehension.to_a).to eq([[1],[2],[3],[4],[5]])
36
36
  end
37
37
 
38
38
  it "should iterate over repeating values" do
39
39
  range = [1,2,3,1,2,4]
40
40
  a = [range]
41
41
 
42
- a.comprehension.to_a.should == [[1],[2],[3],[1],[2],[4]]
42
+ expect(a.comprehension.to_a).to eq([[1],[2],[3],[1],[2],[4]])
43
43
  end
44
44
 
45
45
  it "should iterate over values from a generator" do
46
46
  a = [Combinatorics::Generator.new { |g| 5.times { |i| g.yield i } }]
47
47
 
48
- a.comprehension.to_a.should == [[0],[1],[2],[3],[4]]
48
+ expect(a.comprehension.to_a).to eq([[0],[1],[2],[3],[4]])
49
49
  end
50
50
 
51
51
  it "should iterate over values from a non-repeating generator" do
@@ -58,16 +58,16 @@ describe "Array#comprehension" do
58
58
  }
59
59
  ]
60
60
 
61
- a.comprehension.to_a.should == [
61
+ expect(a.comprehension.to_a).to eq([
62
62
  [1,0],[1,1],[1,2],[1,3],[1,4],
63
63
  [2,0],[2,2],[2,4],[2,6],[2,8]
64
- ]
64
+ ])
65
65
  end
66
66
 
67
67
  it "should ignore non-enumerable values" do
68
68
  range = (1..5)
69
69
  a = [1,range]
70
70
 
71
- a.comprehension.to_a.should == [[1,1],[1,2],[1,3],[1,4],[1,5]]
71
+ expect(a.comprehension.to_a).to eq([[1,1],[1,2],[1,3],[1,4],[1,5]])
72
72
  end
73
73
  end
@@ -1,122 +1,120 @@
1
1
  require 'spec_helper'
2
2
  require 'combinatorics/permute'
3
3
 
4
- describe Permute do
5
- subject { Permute }
6
-
4
+ describe Combinatorics::Permute do
7
5
  describe "cardinality" do
8
6
  it "should raise RangeError if n is negative without passing r" do
9
- lambda { subject.cardinality(-1) }.should raise_error(RangeError)
7
+ expect { subject.cardinality(-1) }.to raise_error(RangeError)
10
8
  end
11
9
 
12
10
  it "should raise RangeError if n is negative when r is provided" do
13
- lambda { subject.cardinality(-1, 1) }.should raise_error(RangeError)
11
+ expect { subject.cardinality(-1, 1) }.to raise_error(RangeError)
14
12
  end
15
13
 
16
14
  it "should raise RangeError if r is negative" do
17
- lambda { subject.cardinality(1, -1) }.should raise_error(RangeError)
15
+ expect { subject.cardinality(1, -1) }.to raise_error(RangeError)
18
16
  end
19
17
 
20
18
  it "should raise RangeError if r is greater than n" do
21
- lambda { subject.cardinality(2, 3) }.should raise_error(RangeError)
19
+ expect { subject.cardinality(2, 3) }.to raise_error(RangeError)
22
20
  end
23
21
 
24
22
  it "should return 1 for subject.cardinality(0)" do
25
- subject.cardinality(0).should == 1
23
+ expect(subject.cardinality(0)).to eq(1)
26
24
  end
27
25
 
28
26
  it "should return 1 for subject.cardinality(1)" do
29
- subject.cardinality(1).should == 1
27
+ expect(subject.cardinality(1)).to eq(1)
30
28
  end
31
29
 
32
30
  it "should return 2 for subject.cardinality(2)" do
33
- subject.cardinality(2).should == 2
31
+ expect(subject.cardinality(2)).to eq(2)
34
32
  end
35
33
 
36
34
  it "should return 6 for subject.cardinality(3)" do
37
- subject.cardinality(3).should == 6
35
+ expect(subject.cardinality(3)).to eq(6)
38
36
  end
39
37
 
40
38
  it "should return 24 for subject.cardinality(4)" do
41
- subject.cardinality(4).should == 24
39
+ expect(subject.cardinality(4)).to eq(24)
42
40
  end
43
41
 
44
42
  it "should return 0 for subject.cardinality(1, 0)" do
45
- subject.cardinality(1, 0).should == 0
43
+ expect(subject.cardinality(1, 0)).to eq(0)
46
44
  end
47
45
 
48
46
  it "should return 1 for subject.cardinality(1, 1)" do
49
- subject.cardinality(1, 1).should == 1
47
+ expect(subject.cardinality(1, 1)).to eq(1)
50
48
  end
51
49
 
52
50
  it "should return 2 for subject.cardinality(2, 1)" do
53
- subject.cardinality(2, 1).should == 2
51
+ expect(subject.cardinality(2, 1)).to eq(2)
54
52
  end
55
53
 
56
54
  it "should return 1 for subject.cardinality(2, 2)" do
57
- subject.cardinality(2, 2).should == 2
55
+ expect(subject.cardinality(2, 2)).to eq(2)
58
56
  end
59
57
 
60
58
  it "should return 3 for subject.cardinality(3, 1)" do
61
- subject.cardinality(3, 1).should == 3
59
+ expect(subject.cardinality(3, 1)).to eq(3)
62
60
  end
63
61
 
64
62
  it "should return 3 for subject.cardinality(3, 2)" do
65
- subject.cardinality(3, 2).should == 6
63
+ expect(subject.cardinality(3, 2)).to eq(6)
66
64
  end
67
65
 
68
66
  it "should return 1 for subject.cardinality(3, 3)" do
69
- subject.cardinality(3, 3).should == 6
67
+ expect(subject.cardinality(3, 3)).to eq(6)
70
68
  end
71
69
 
72
70
  it "should return 4 for subject.cardinality(4, 1)" do
73
- subject.cardinality(4, 1).should == 4
71
+ expect(subject.cardinality(4, 1)).to eq(4)
74
72
  end
75
73
 
76
74
  it "should return 12 for subject.cardinality(4, 2)" do
77
- subject.cardinality(4, 2).should == 12
75
+ expect(subject.cardinality(4, 2)).to eq(12)
78
76
  end
79
77
 
80
78
  it "should return 24 for subject.cardinality(4, 3)" do
81
- subject.cardinality(4, 3).should == 24
79
+ expect(subject.cardinality(4, 3)).to eq(24)
82
80
  end
83
81
 
84
82
  it "should return 1 for subject.cardinality(4, 4)" do
85
- subject.cardinality(4, 4).should == 24
83
+ expect(subject.cardinality(4, 4)).to eq(24)
86
84
  end
87
85
 
88
86
  it "should return 360 for subject.cardinality(6, 4)" do
89
- subject.cardinality(6, 4).should == 360
87
+ expect(subject.cardinality(6, 4)).to eq(360)
90
88
  end
91
89
 
92
90
  it "should return 3628800 for subject.cardinality(10)" do
93
- subject.cardinality(10).should == 3628800
91
+ expect(subject.cardinality(10)).to eq(3628800)
94
92
  end
95
93
  end
96
94
 
97
95
  describe "cardinality_all" do
98
96
  it "should return [] for cardinality_all(0)" do
99
- subject.cardinality_all(0).should be_empty
97
+ expect(subject.cardinality_all(0)).to be_empty
100
98
  end
101
99
 
102
100
  it "should return [1] for cardinality_all(1)" do
103
- subject.cardinality_all(1).should == [1]
101
+ expect(subject.cardinality_all(1)).to eq([1])
104
102
  end
105
103
 
106
104
  it "should return [2, 1] for cardinality_all(2)" do
107
- subject.cardinality_all(2).should == [2, 2]
105
+ expect(subject.cardinality_all(2)).to eq([2, 2])
108
106
  end
109
107
 
110
108
  it "should return [3, 6, 1] for cardinality_all(3)" do
111
- subject.cardinality_all(3).should == [3, 6, 6]
109
+ expect(subject.cardinality_all(3)).to eq([3, 6, 6])
112
110
  end
113
111
 
114
112
  it "should return [4, 12, 24, 1] for cardinality_all(4)" do
115
- subject.cardinality_all(4).should == [4, 12, 24, 24]
113
+ expect(subject.cardinality_all(4)).to eq([4, 12, 24, 24])
116
114
  end
117
115
 
118
116
  it "should raise RangeError for cardinality_all(-1)" do
119
- lambda { subject.cardinality_all(-1) }.should raise_error(RangeError)
117
+ expect { subject.cardinality_all(-1) }.to raise_error(RangeError)
120
118
  end
121
119
 
122
120
  it "should wrap cardinality with Permute.N" do
@@ -8,35 +8,35 @@ shared_examples_for "Permute::Mixin" do
8
8
  set = subject[]
9
9
  results = set.permute(0).to_a
10
10
 
11
- results.should == [[]]
11
+ expect(results).to eq([[]])
12
12
  end
13
13
 
14
14
  it "should return [[]] for [1].permute(0).to_a" do
15
15
  set = subject[1]
16
16
  results = set.permute(0).to_a
17
17
 
18
- results.should == [[]]
18
+ expect(results).to eq([[]])
19
19
  end
20
20
 
21
21
  it "should return [[1]] for [1].permute(1).to_a" do
22
22
  set = subject[1]
23
23
  results = set.permute(1).to_a
24
24
 
25
- results.should == [[1]]
25
+ expect(results).to eq([[1]])
26
26
  end
27
27
 
28
28
  it "should return [[1], [2]] for [1, 2].permute(1).to_a" do
29
29
  set = subject[1, 2]
30
30
  results = set.permute(1).to_a
31
31
 
32
- results.should =~ [[1], [2]]
32
+ expect(results).to match_array([[1], [2]])
33
33
  end
34
34
 
35
35
  it "should return [[1, 2]] for [1, 2].permute(2).to_a" do
36
36
  set = subject[1, 2]
37
37
  results = set.permute(2).to_a
38
38
 
39
- results.should =~ [[1, 2], [2, 1]]
39
+ expect(results).to match_array([[1, 2], [2, 1]])
40
40
  end
41
41
  end
42
42
  end
@@ -1,9 +1,7 @@
1
1
  require 'spec_helper'
2
2
  require 'combinatorics/power_set'
3
3
 
4
- describe PowerSet do
5
- subject { PowerSet }
6
-
4
+ describe Combinatorics::PowerSet do
7
5
  describe "cardinality" do
8
6
  it "should return 1 for cardinality(0)" do
9
7
  subject.cardinality(0) == 1
@@ -8,13 +8,13 @@ shared_examples_for "PowerSet::Mixin" do
8
8
  it "the powerset of an empty Set should only contain the empty Set" do
9
9
  set = subject[]
10
10
 
11
- set.powerset.to_a.should == [empty_set]
11
+ expect(set.powerset.to_a).to eq([empty_set])
12
12
  end
13
13
 
14
14
  it "the powerset of a single Set should contain that Set" do
15
15
  set = subject[1]
16
16
 
17
- set.powerset.to_a.should == [empty_set, Set[*set]]
17
+ expect(set.powerset.to_a).to eq([empty_set, Set[*set]])
18
18
  end
19
19
 
20
20
  it "the powerset of a Set should all be subsets" do
@@ -23,12 +23,12 @@ shared_examples_for "PowerSet::Mixin" do
23
23
 
24
24
  set.powerset { |subset| superset += subset }
25
25
 
26
- superset.should == Set[*set]
26
+ expect(superset).to eq(Set[*set])
27
27
  end
28
28
 
29
29
  it "should alias powerset to power_set" do
30
30
  set = subject[1]
31
31
 
32
- set.should respond_to(:power_set)
32
+ expect(set).to respond_to(:power_set)
33
33
  end
34
34
  end
data/spec/spec_helper.rb CHANGED
@@ -1,6 +1,3 @@
1
- gem 'rspec', '~> 2.4'
2
1
  require 'rspec'
3
-
4
- require 'combinatorics/version'
5
-
6
- include Combinatorics
2
+ require 'simplecov'
3
+ SimpleCov.start
metadata CHANGED
@@ -1,65 +1,30 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: combinatorics
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.4.3
5
- prerelease:
4
+ version: 0.5.0
6
5
  platform: ruby
7
6
  authors:
8
7
  - Postmodern
9
8
  - Duper
10
- autorequire:
9
+ autorequire:
11
10
  bindir: bin
12
11
  cert_chain: []
13
- date: 2012-05-28 00:00:00.000000000 Z
12
+ date: 2024-01-25 00:00:00.000000000 Z
14
13
  dependencies:
15
14
  - !ruby/object:Gem::Dependency
16
- name: rubygems-tasks
15
+ name: bundler
17
16
  requirement: !ruby/object:Gem::Requirement
18
- none: false
19
17
  requirements:
20
- - - ~>
18
+ - - "~>"
21
19
  - !ruby/object:Gem::Version
22
- version: '0.1'
20
+ version: '2.0'
23
21
  type: :development
24
22
  prerelease: false
25
23
  version_requirements: !ruby/object:Gem::Requirement
26
- none: false
27
24
  requirements:
28
- - - ~>
25
+ - - "~>"
29
26
  - !ruby/object:Gem::Version
30
- version: '0.1'
31
- - !ruby/object:Gem::Dependency
32
- name: rspec
33
- requirement: !ruby/object:Gem::Requirement
34
- none: false
35
- requirements:
36
- - - ~>
37
- - !ruby/object:Gem::Version
38
- version: '2.4'
39
- type: :development
40
- prerelease: false
41
- version_requirements: !ruby/object:Gem::Requirement
42
- none: false
43
- requirements:
44
- - - ~>
45
- - !ruby/object:Gem::Version
46
- version: '2.4'
47
- - !ruby/object:Gem::Dependency
48
- name: yard
49
- requirement: !ruby/object:Gem::Requirement
50
- none: false
51
- requirements:
52
- - - ~>
53
- - !ruby/object:Gem::Version
54
- version: '0.7'
55
- type: :development
56
- prerelease: false
57
- version_requirements: !ruby/object:Gem::Requirement
58
- none: false
59
- requirements:
60
- - - ~>
61
- - !ruby/object:Gem::Version
62
- version: '0.7'
27
+ version: '2.0'
63
28
  description: A collection of modules and methods for performing Combinatoric calculations.
64
29
  email:
65
30
  - postmodern.mod3@gmail.com
@@ -72,13 +37,14 @@ extra_rdoc_files:
72
37
  - LICENSE.txt
73
38
  - README.md
74
39
  files:
75
- - .document
76
- - .gemtest
77
- - .gitignore
78
- - .rspec
79
- - .yardopts
40
+ - ".document"
41
+ - ".github/workflows/ruby.yml"
42
+ - ".gitignore"
43
+ - ".rspec"
44
+ - ".yardopts"
80
45
  - Benchmarks.md
81
46
  - ChangeLog.md
47
+ - Gemfile
82
48
  - LICENSE.txt
83
49
  - README.md
84
50
  - Rakefile
@@ -157,26 +123,28 @@ files:
157
123
  homepage: https://github.com/postmodern/combinatorics#readme
158
124
  licenses:
159
125
  - MIT
160
- post_install_message:
126
+ metadata:
127
+ documentation_uri: https://rubydoc.info/gems/combinatorics
128
+ source_code_uri: https://github.com/postmodern/combinatorics.rb
129
+ bug_tracker_uri: https://github.com/postmodern/combinatorics.rb/issues
130
+ changelog_uri: https://github.com/postmodern/combinatorics.rb/blob/master/ChangeLog.md
131
+ post_install_message:
161
132
  rdoc_options: []
162
133
  require_paths:
163
134
  - lib
164
135
  required_ruby_version: !ruby/object:Gem::Requirement
165
- none: false
166
136
  requirements:
167
- - - ! '>='
137
+ - - ">="
168
138
  - !ruby/object:Gem::Version
169
- version: 1.8.7
139
+ version: 2.0.0
170
140
  required_rubygems_version: !ruby/object:Gem::Requirement
171
- none: false
172
141
  requirements:
173
- - - ! '>='
142
+ - - ">="
174
143
  - !ruby/object:Gem::Version
175
144
  version: '0'
176
145
  requirements: []
177
- rubyforge_project:
178
- rubygems_version: 1.8.24
179
- signing_key:
180
- specification_version: 3
146
+ rubygems_version: 3.4.10
147
+ signing_key:
148
+ specification_version: 4
181
149
  summary: Bringing (more) Combinatorics to Ruby
182
150
  test_files: []
data/.gemtest DELETED
File without changes