haphazardly_gem 0.1.0 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: c9a6c3edc31e55b335265d1f46cb36a8def3f4fb331cd63d84513fc71005a530
4
- data.tar.gz: b2dcb994da24e642c69b3372a4c5ffcf712fa7fe4bb3ec35e6f5821c43219c11
3
+ metadata.gz: 1149411e606cfcaa20b3447bdf616d4d9060ae874016f58f7362d26ffa0127fd
4
+ data.tar.gz: 03bbb77df620b3e4501dadb33765a50a3540fed112d24d16c7d4890be8e99cc7
5
5
  SHA512:
6
- metadata.gz: e27eff4e6b673ab8c62902b51c16680ebaf4afd5a1a3603325a5ba291183ec30817b5ab217a23794308fea4acfb6337620d11acf655eca6557cffb74cd0a87f4
7
- data.tar.gz: 11e6c941328737ef3d800469e6b6416c6b8d770a12107fd9bfd96e59f85b89f0a5f078fe8570fbe55bb5fc8abe89ffb63c36fb55fa7c86115ade7882d68b02d2
6
+ metadata.gz: 9740dcfadbaa78a864009671f2bee31fe4f4f84bd30cc36d7bd61eeb5ed065f22ccb1ec3328c9a48ac325c0dbcd855c6200394d78b74bb89f7f9f5d6fae6edc6
7
+ data.tar.gz: a8a043e0ce67e91cc90b66bf272d606db9efe448dbbd0bf382922fa3ea7a8be7f060d032c7d7407d5d34b5d46f4dab071b87480251143f6342a41712c363dae2
data/CHANGELOG.md CHANGED
@@ -1,4 +1,8 @@
1
- ## [Unreleased]
1
+ ## [0.1.1] & [0.1.2] & [0.1.3] - 2022-07-12
2
+
3
+ - removed extend feature which caused a crash.
4
+ - bug fixes due to namespacing
5
+ - Fixed logic error in lotto.draw
2
6
 
3
7
  ## [0.1.0] - 2022-07-11
4
8
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- haphazardly_gem (0.1.0)
4
+ haphazardly_gem (0.1.3)
5
5
  minitest (~> 5.0)
6
6
  rake (~> 13.0)
7
7
  rubocop (~> 1.21)
@@ -1,10 +1,8 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Haphazardly
4
- module Coin
5
- extend self
6
-
7
- def flip
3
+ module HaphazardlyGem
4
+ class Coin
5
+ def self.flip
8
6
  coin = ["heads", "tails"]
9
7
  coin.sample
10
8
  end
@@ -1,10 +1,9 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Haphazardly
4
- module Dice
5
- extend self
3
+ module HaphazardlyGem
4
+ class Dice
6
5
 
7
- def roll(number)
6
+ def self.roll(number)
8
7
  output = Array.new
9
8
  dice = [1, 2, 3, 4, 5, 6]
10
9
  number.times do
@@ -1,12 +1,10 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Haphazardly
4
- module Lotto
5
- extend self
6
-
7
- def pick
3
+ module HaphazardlyGem
4
+ class Lotto
5
+ def self.pick
8
6
  output = Array.new
9
- while output.size >= 6
7
+ while output.size <= 6
10
8
  number = rand(1..69)
11
9
  output.push(number) unless output.include? (number)
12
10
  end
@@ -1,9 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- module Haphazardly
4
- module PlayingCard
5
- extend self
6
-
3
+ module HaphazardlyGem
4
+ class PlayingCard
7
5
  def self.draw
8
6
  cards = []
9
7
  suits = ["Clubs", "Diamonds", "Hearts", "Spades"]
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module HaphazardlyGem
4
- VERSION = "0.1.0"
4
+ VERSION = "0.1.3"
5
5
  end
@@ -6,15 +6,15 @@ module HaphazardlyGem
6
6
  require_relative "haphazardly_gem/lotto"
7
7
  require_relative "haphazardly_gem/playing_card"
8
8
 
9
- extend Coin
10
- extend Dice
11
- extend Lotto
12
- extend PlayingCard
9
+ # extend Coin
10
+ # extend Dice
11
+ # extend Lotto
12
+ # extend PlayingCard
13
13
 
14
14
  class Error < StandardError; end
15
15
 
16
- autoload :Coin, "haphazardly_gem/coin_toss"
17
- autoload :Dice, "haphazardly_gem/dice"
18
- autoload :Lotto, "haphazardly_gem/lotto"
19
- autoload :PlayingCard, "haphazardly_gem/playing_card"
16
+ # autoload :Coin, "haphazardly_gem/coin_toss"
17
+ # autoload :Dice, "haphazardly_gem/dice"
18
+ # autoload :Lotto, "haphazardly_gem/lotto"
19
+ # autoload :PlayingCard, "haphazardly_gem/playing_card"
20
20
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: haphazardly_gem
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Rogers
@@ -98,7 +98,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
98
98
  - !ruby/object:Gem::Version
99
99
  version: '0'
100
100
  requirements: []
101
- rubygems_version: 3.3.7
101
+ rubygems_version: 3.3.17
102
102
  signing_key:
103
103
  specification_version: 4
104
104
  summary: This gem will generate random results for games, such as rolling dice and