randumbizer 0.1.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.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: e2b560f921f43b11c810552a43a8a1bbd799cff743b17a4af2d5e0fabc7dc007
4
+ data.tar.gz: 36efdcceadae8ed453af9ab50911b0ca63321fb0b82dd4c9ea6a68d3e573a978
5
+ SHA512:
6
+ metadata.gz: 5fa2b4ff1f0d69837ba1b0f52965a3d98760ee3607f18c2b0d8812940492bc444896e4a25be30c963683e7d8c0cd54ef33fafc3b739ef5cb39669f3be72cca18
7
+ data.tar.gz: 29b0c496691ffafcac5b54d18a030d76ec0f6c15a67d8918fd4451d3315e528f35b1f6596d8740071b176f6ff88ba2d16d411c6307997e142c4fec3594fe7623
data/.rubocop.yml ADDED
@@ -0,0 +1,13 @@
1
+ AllCops:
2
+ TargetRubyVersion: 2.6
3
+
4
+ Style/StringLiterals:
5
+ Enabled: true
6
+ EnforcedStyle: double_quotes
7
+
8
+ Style/StringLiteralsInInterpolation:
9
+ Enabled: true
10
+ EnforcedStyle: double_quotes
11
+
12
+ Layout/LineLength:
13
+ Max: 120
data/CHANGELOG.md ADDED
@@ -0,0 +1,5 @@
1
+ ## [Unreleased]
2
+
3
+ ## [0.1.0] - 2022-07-11
4
+
5
+ - Initial release
data/Gemfile ADDED
@@ -0,0 +1,10 @@
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
4
+
5
+ # Specify your gem's dependencies in randumbizer.gemspec
6
+ gemspec
7
+
8
+ gem "rake", "~> 13.0"
9
+
10
+ gem "rubocop", "~> 1.21"
data/Gemfile.lock ADDED
@@ -0,0 +1,40 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ randumbizer (0.1.0)
5
+
6
+ GEM
7
+ remote: https://rubygems.org/
8
+ specs:
9
+ ast (2.4.2)
10
+ parallel (1.22.1)
11
+ parser (3.1.2.0)
12
+ ast (~> 2.4.1)
13
+ rainbow (3.1.1)
14
+ rake (13.0.6)
15
+ regexp_parser (2.5.0)
16
+ rexml (3.2.5)
17
+ rubocop (1.30.1)
18
+ parallel (~> 1.10)
19
+ parser (>= 3.1.0.0)
20
+ rainbow (>= 2.2.2, < 4.0)
21
+ regexp_parser (>= 1.8, < 3.0)
22
+ rexml (>= 3.2.5, < 4.0)
23
+ rubocop-ast (>= 1.18.0, < 2.0)
24
+ ruby-progressbar (~> 1.7)
25
+ unicode-display_width (>= 1.4.0, < 3.0)
26
+ rubocop-ast (1.18.0)
27
+ parser (>= 3.1.1.0)
28
+ ruby-progressbar (1.11.0)
29
+ unicode-display_width (2.1.0)
30
+
31
+ PLATFORMS
32
+ x86_64-darwin-20
33
+
34
+ DEPENDENCIES
35
+ rake (~> 13.0)
36
+ randumbizer!
37
+ rubocop (~> 1.21)
38
+
39
+ BUNDLED WITH
40
+ 2.3.17
data/README.md ADDED
@@ -0,0 +1,29 @@
1
+ # Randumbizer
2
+
3
+ Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/randumbizer`. To experiment with that code, run `bin/console` for an interactive prompt.
4
+
5
+ TODO: Delete this and the text above, and describe your gem
6
+
7
+ ## Installation
8
+
9
+ Install the gem and add to the application's Gemfile by executing:
10
+
11
+ $ bundle add randumbizer
12
+
13
+ If bundler is not being used to manage dependencies, install the gem by executing:
14
+
15
+ $ gem install randumbizer
16
+
17
+ ## Usage
18
+
19
+ TODO: Write usage instructions here
20
+
21
+ ## Development
22
+
23
+ After checking out the repo, run `bin/setup` to install dependencies. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
24
+
25
+ To install this gem onto your local machine, run `bundle exec rake install`. To release a new version, update the version number in `version.rb`, and then run `bundle exec rake release`, which will create a git tag for the version, push git commits and the created tag, and push the `.gem` file to [rubygems.org](https://rubygems.org).
26
+
27
+ ## Contributing
28
+
29
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/randumbizer.
data/Rakefile ADDED
@@ -0,0 +1,8 @@
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rubocop/rake_task"
5
+
6
+ RuboCop::RakeTask.new
7
+
8
+ task default: :rubocop
@@ -0,0 +1,8 @@
1
+ module Randumbizer
2
+ class Coin
3
+ def self.flip
4
+ coin = ["heads", "tails"]
5
+ coin.sample
6
+ end
7
+ end
8
+ end
@@ -0,0 +1,13 @@
1
+ module Randumbizer
2
+ class Dice
3
+
4
+ def self.roll(number)
5
+ array = []
6
+ dice = [1, 2, 3, 4, 5, 6]
7
+ number.times do
8
+ array << dice.sample
9
+ end
10
+ return array
11
+ end
12
+ end
13
+ end
@@ -0,0 +1,12 @@
1
+ module Randumbizer
2
+ class Lotto
3
+ def self.draw(draws, max_number)
4
+ numbers = []
5
+ while numbers.size < draws
6
+ number = rand(1..max_number)
7
+ numbers.push(number) unless numbers.include? (number)
8
+ end
9
+ return numbers.sort
10
+ end
11
+ end
12
+ end
@@ -0,0 +1,16 @@
1
+ module Randumbizer
2
+ class PlayingCard
3
+
4
+ def self.draw
5
+ cards = []
6
+ suits = ["Clubs", "Diamonds", "Hearts", "Spades"]
7
+ values = ["Ace", "2", "3", "4", "5", "6", "7", "8", "9", "10", "Jack", "Queen", "King"]
8
+ suits.each do |suit|
9
+ values.each do |value|
10
+ cards << value + " of " + suit
11
+ end
12
+ end
13
+ cards.sample
14
+ end
15
+ end
16
+ end
@@ -0,0 +1,5 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Randumbizer
4
+ VERSION = "0.1.1"
5
+ end
@@ -0,0 +1,13 @@
1
+ # frozen_string_literal: true
2
+
3
+ require_relative "randumbizer/version"
4
+ require_relative "randumbizer/coin"
5
+ require_relative "randumbizer/dice"
6
+ require_relative "randumbizer/lotto"
7
+ require_relative "randumbizer/playingcard"
8
+
9
+ module Randumbizer
10
+ class Error < StandardError; end
11
+ # Your code goes here...
12
+
13
+ end
Binary file
@@ -0,0 +1,4 @@
1
+ module Randumbizer
2
+ VERSION: String
3
+ # See the writing guide of rbs: https://github.com/ruby/rbs#guides
4
+ end
metadata ADDED
@@ -0,0 +1,57 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: randumbizer
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.1.1
5
+ platform: ruby
6
+ authors:
7
+ - Chris Taylor
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2022-07-12 00:00:00.000000000 Z
12
+ dependencies: []
13
+ description:
14
+ email:
15
+ - ctaylor534@gmail.com
16
+ executables: []
17
+ extensions: []
18
+ extra_rdoc_files: []
19
+ files:
20
+ - ".rubocop.yml"
21
+ - CHANGELOG.md
22
+ - Gemfile
23
+ - Gemfile.lock
24
+ - README.md
25
+ - Rakefile
26
+ - lib/randumbizer.rb
27
+ - lib/randumbizer/coin.rb
28
+ - lib/randumbizer/dice.rb
29
+ - lib/randumbizer/lotto.rb
30
+ - lib/randumbizer/playingcard.rb
31
+ - lib/randumbizer/version.rb
32
+ - randumbizer-0.1.0.gem
33
+ - sig/randumbizer.rbs
34
+ homepage: https://github.com/TaylorChrisL/randumbizer
35
+ licenses:
36
+ - MIT
37
+ metadata: {}
38
+ post_install_message:
39
+ rdoc_options: []
40
+ require_paths:
41
+ - lib
42
+ required_ruby_version: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - ">="
45
+ - !ruby/object:Gem::Version
46
+ version: '0'
47
+ required_rubygems_version: !ruby/object:Gem::Requirement
48
+ requirements:
49
+ - - ">="
50
+ - !ruby/object:Gem::Version
51
+ version: '0'
52
+ requirements: []
53
+ rubygems_version: 3.3.7
54
+ signing_key:
55
+ specification_version: 4
56
+ summary: Randomizes simple things for games
57
+ test_files: []