haphazardly_gem 0.1.1 → 0.1.4

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: c03e871f4dc956e8e412c5dec5c3e7e16ee3e62d8276b8ecdc4feb65cc22f5cf
4
- data.tar.gz: bfb01954e38d2ead50f2e550ef4df8d3f3f222ee8b7d130287bfe19332e477e1
3
+ metadata.gz: e20c7238cb8177ebeabaa03275d94fec90ff0daa2aabc1f11bbec724bdfece25
4
+ data.tar.gz: 218a695f7ba9d430e0d4f35cc786b77891ab4defed9c2d52789a877ad3933065
5
5
  SHA512:
6
- metadata.gz: 9d2dc1d23d60bdd376a3b5789cd3c29be88114d03815e97d4ae90ef518f049a279eb5480f6b2f57568b6715d043df1364f69ad0b808d531b677fcde1117b9a0f
7
- data.tar.gz: 4059499f4dcc88ea8135b4beeb39752269569c4b18a5673bf446389574728cdba1ffa527de2200758b238e09c70bf36ae1587dd16adae3625c89f2f1a56b3065
6
+ metadata.gz: 384ca71d41a4ed1b21462fb65db975563b9713df09959378639be9b984a98586ebe3926f0a338ff429e1e30ae90e532f260a82aff6890581e0dcb1a261992d56
7
+ data.tar.gz: 46cb281e6a79fe5e8707a4e34ad87422f298132ae55b5d659f768a19d84958360efc338bca5ca5a818fb83d6d244c1392b723857ba64796c387719ec7b98ff9f
data/CHANGELOG.md CHANGED
@@ -1,6 +1,9 @@
1
- ## [0.1.1] - 2022-07-12
1
+ ## [0.1.1] & [0.1.2] & [0.1.3] & [0.1.4] - 2022-07-12
2
2
 
3
3
  - removed extend feature which caused a crash.
4
+ - bug fixes due to namespacing
5
+ - Fixed logic error in lotto.draw
6
+ - possible fix to ci/cd
4
7
 
5
8
  ## [0.1.0] - 2022-07-11
6
9
 
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- haphazardly_gem (0.1.1)
4
+ haphazardly_gem (0.1.4)
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 <= 5
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.1"
4
+ VERSION = "0.1.4"
5
5
  end
@@ -13,8 +13,8 @@ module HaphazardlyGem
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.1
4
+ version: 0.1.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - John Rogers