tdog_mega_lotto 3.9

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ SHA256:
3
+ metadata.gz: 91273d2f258a328836110d750efc27f8782d77def0abdebf888be9c53fb66e9c
4
+ data.tar.gz: 13570bee59d9243b728833eee4a6ffa6b2544dda908e381a3529519124eb5646
5
+ SHA512:
6
+ metadata.gz: dde2efe510c30c5c9a8d46844bf684bfb9c47d8ddc4fba4f5883c7bfcb46f97243c39c26e6dac49592a57018fa9527d0a72514db887ef1b98b860f9bb566c34d
7
+ data.tar.gz: 97b3b63915ff6f1b3ad2f5925ce8425b7f960939bfaa00bfbf1fc113860daeef5808cec3985654ba36bdfec4327968cf4ebd9ca2dd4f4a1f090d64fac58650ca
data/.gitignore ADDED
@@ -0,0 +1,11 @@
1
+ /.bundle/
2
+ /.yardoc
3
+ /_yardoc/
4
+ /coverage/
5
+ /doc/
6
+ /pkg/
7
+ /spec/reports/
8
+ /tmp/
9
+
10
+ # rspec failure tracking
11
+ .rspec_status
data/.rspec ADDED
@@ -0,0 +1,3 @@
1
+ --format documentation
2
+ --color
3
+ --require spec_helper
data/.travis.yml ADDED
@@ -0,0 +1,7 @@
1
+ ---
2
+ sudo: false
3
+ language: ruby
4
+ cache: bundler
5
+ rvm:
6
+ - 2.6.3
7
+ before_install: gem install bundler -v 1.17.3
data/Gemfile ADDED
@@ -0,0 +1,6 @@
1
+ source "https://rubygems.org"
2
+
3
+ git_source(:github) {|repo_name| "https://github.com/#{repo_name}" }
4
+
5
+ # Specify your gem's dependencies in mega_lotto.gemspec
6
+ gemspec
data/Gemfile.lock ADDED
@@ -0,0 +1,163 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ tdog_mega_lotto (3.9)
5
+ rails
6
+
7
+ GEM
8
+ remote: https://rubygems.org/
9
+ specs:
10
+ actioncable (6.0.0)
11
+ actionpack (= 6.0.0)
12
+ nio4r (~> 2.0)
13
+ websocket-driver (>= 0.6.1)
14
+ actionmailbox (6.0.0)
15
+ actionpack (= 6.0.0)
16
+ activejob (= 6.0.0)
17
+ activerecord (= 6.0.0)
18
+ activestorage (= 6.0.0)
19
+ activesupport (= 6.0.0)
20
+ mail (>= 2.7.1)
21
+ actionmailer (6.0.0)
22
+ actionpack (= 6.0.0)
23
+ actionview (= 6.0.0)
24
+ activejob (= 6.0.0)
25
+ mail (~> 2.5, >= 2.5.4)
26
+ rails-dom-testing (~> 2.0)
27
+ actionpack (6.0.0)
28
+ actionview (= 6.0.0)
29
+ activesupport (= 6.0.0)
30
+ rack (~> 2.0)
31
+ rack-test (>= 0.6.3)
32
+ rails-dom-testing (~> 2.0)
33
+ rails-html-sanitizer (~> 1.0, >= 1.2.0)
34
+ actiontext (6.0.0)
35
+ actionpack (= 6.0.0)
36
+ activerecord (= 6.0.0)
37
+ activestorage (= 6.0.0)
38
+ activesupport (= 6.0.0)
39
+ nokogiri (>= 1.8.5)
40
+ actionview (6.0.0)
41
+ activesupport (= 6.0.0)
42
+ builder (~> 3.1)
43
+ erubi (~> 1.4)
44
+ rails-dom-testing (~> 2.0)
45
+ rails-html-sanitizer (~> 1.1, >= 1.2.0)
46
+ activejob (6.0.0)
47
+ activesupport (= 6.0.0)
48
+ globalid (>= 0.3.6)
49
+ activemodel (6.0.0)
50
+ activesupport (= 6.0.0)
51
+ activerecord (6.0.0)
52
+ activemodel (= 6.0.0)
53
+ activesupport (= 6.0.0)
54
+ activestorage (6.0.0)
55
+ actionpack (= 6.0.0)
56
+ activejob (= 6.0.0)
57
+ activerecord (= 6.0.0)
58
+ marcel (~> 0.3.1)
59
+ activesupport (6.0.0)
60
+ concurrent-ruby (~> 1.0, >= 1.0.2)
61
+ i18n (>= 0.7, < 2)
62
+ minitest (~> 5.1)
63
+ tzinfo (~> 1.1)
64
+ zeitwerk (~> 2.1, >= 2.1.8)
65
+ builder (3.2.3)
66
+ coderay (1.1.2)
67
+ concurrent-ruby (1.1.5)
68
+ crass (1.0.4)
69
+ diff-lcs (1.3)
70
+ erubi (1.8.0)
71
+ globalid (0.4.2)
72
+ activesupport (>= 4.2.0)
73
+ i18n (1.6.0)
74
+ concurrent-ruby (~> 1.0)
75
+ loofah (2.2.3)
76
+ crass (~> 1.0.2)
77
+ nokogiri (>= 1.5.9)
78
+ mail (2.7.1)
79
+ mini_mime (>= 0.1.1)
80
+ marcel (0.3.3)
81
+ mimemagic (~> 0.3.2)
82
+ method_source (0.9.2)
83
+ mimemagic (0.3.3)
84
+ mini_mime (1.0.2)
85
+ mini_portile2 (2.4.0)
86
+ minitest (5.11.3)
87
+ nio4r (2.5.1)
88
+ nokogiri (1.10.4)
89
+ mini_portile2 (~> 2.4.0)
90
+ pry (0.12.2)
91
+ coderay (~> 1.1.0)
92
+ method_source (~> 0.9.0)
93
+ rack (2.0.7)
94
+ rack-test (1.1.0)
95
+ rack (>= 1.0, < 3)
96
+ rails (6.0.0)
97
+ actioncable (= 6.0.0)
98
+ actionmailbox (= 6.0.0)
99
+ actionmailer (= 6.0.0)
100
+ actionpack (= 6.0.0)
101
+ actiontext (= 6.0.0)
102
+ actionview (= 6.0.0)
103
+ activejob (= 6.0.0)
104
+ activemodel (= 6.0.0)
105
+ activerecord (= 6.0.0)
106
+ activestorage (= 6.0.0)
107
+ activesupport (= 6.0.0)
108
+ bundler (>= 1.3.0)
109
+ railties (= 6.0.0)
110
+ sprockets-rails (>= 2.0.0)
111
+ rails-dom-testing (2.0.3)
112
+ activesupport (>= 4.2.0)
113
+ nokogiri (>= 1.6)
114
+ rails-html-sanitizer (1.2.0)
115
+ loofah (~> 2.2, >= 2.2.2)
116
+ railties (6.0.0)
117
+ actionpack (= 6.0.0)
118
+ activesupport (= 6.0.0)
119
+ method_source
120
+ rake (>= 0.8.7)
121
+ thor (>= 0.20.3, < 2.0)
122
+ rake (10.5.0)
123
+ rspec (3.8.0)
124
+ rspec-core (~> 3.8.0)
125
+ rspec-expectations (~> 3.8.0)
126
+ rspec-mocks (~> 3.8.0)
127
+ rspec-core (3.8.2)
128
+ rspec-support (~> 3.8.0)
129
+ rspec-expectations (3.8.4)
130
+ diff-lcs (>= 1.2.0, < 2.0)
131
+ rspec-support (~> 3.8.0)
132
+ rspec-mocks (3.8.1)
133
+ diff-lcs (>= 1.2.0, < 2.0)
134
+ rspec-support (~> 3.8.0)
135
+ rspec-support (3.8.2)
136
+ sprockets (3.7.2)
137
+ concurrent-ruby (~> 1.0)
138
+ rack (> 1, < 3)
139
+ sprockets-rails (3.2.1)
140
+ actionpack (>= 4.0)
141
+ activesupport (>= 4.0)
142
+ sprockets (>= 3.0.0)
143
+ thor (0.20.3)
144
+ thread_safe (0.3.6)
145
+ tzinfo (1.2.5)
146
+ thread_safe (~> 0.1)
147
+ websocket-driver (0.7.1)
148
+ websocket-extensions (>= 0.1.0)
149
+ websocket-extensions (0.1.4)
150
+ zeitwerk (2.1.10)
151
+
152
+ PLATFORMS
153
+ ruby
154
+
155
+ DEPENDENCIES
156
+ bundler (~> 1.17)
157
+ pry
158
+ rake (~> 10.0)
159
+ rspec (~> 3.0)
160
+ tdog_mega_lotto!
161
+
162
+ BUNDLED WITH
163
+ 1.17.3
data/LICENSE.txt ADDED
@@ -0,0 +1,21 @@
1
+ The MIT License (MIT)
2
+
3
+ Copyright (c) 2019 Tom Spencer
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in
13
+ all copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
21
+ THE SOFTWARE.
data/README.md ADDED
@@ -0,0 +1,39 @@
1
+ # MegaLotto
2
+
3
+ A practice MegaLotto gem for drawing lottery numbers.
4
+
5
+ ## Installation
6
+
7
+ Add this line to your application's Gemfile:
8
+
9
+ ```ruby
10
+ gem 'mega_lotto'
11
+ ```
12
+
13
+ And then execute:
14
+
15
+ $ bundle
16
+
17
+ Or install it yourself as:
18
+
19
+ $ gem install mega_lotto
20
+
21
+ ## Usage
22
+
23
+ ```ruby
24
+ MegaLotto::Drawing.new.draw #=> [24, 54, 34, 12, 43]
25
+ ```
26
+
27
+ ## Development
28
+
29
+ After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
30
+
31
+ 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 tags, and push the `.gem` file to [rubygems.org](https://rubygems.org).
32
+
33
+ ## Contributing
34
+
35
+ Bug reports and pull requests are welcome on GitHub at https://github.com/[USERNAME]/mega_lotto.
36
+
37
+ ## License
38
+
39
+ The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
data/Rakefile ADDED
@@ -0,0 +1,10 @@
1
+ require "bundler/gem_tasks"
2
+ require "rspec/core/rake_task"
3
+
4
+ RSpec::Core::RakeTask.new(:spec)
5
+
6
+ task :default => :spec
7
+
8
+ task :console do
9
+ exec "irb -r mega_lotto -I ./lib"
10
+ end
data/bin/console ADDED
@@ -0,0 +1,14 @@
1
+ #!/usr/bin/env ruby
2
+
3
+ require "bundler/setup"
4
+ require "mega_lotto"
5
+
6
+ # You can add fixtures and/or initialization code here to make experimenting
7
+ # with your gem easier. You can also use a different console, if you like.
8
+
9
+ # (If you use this, don't forget to add pry to your Gemfile!)
10
+ # require "pry"
11
+ # Pry.start
12
+
13
+ require "irb"
14
+ IRB.start(__FILE__)
data/bin/setup ADDED
@@ -0,0 +1,8 @@
1
+ #!/usr/bin/env bash
2
+ set -euo pipefail
3
+ IFS=$'\n\t'
4
+ set -vx
5
+
6
+ bundle install
7
+
8
+ # Do any other automated setup that you need to do here
@@ -0,0 +1,15 @@
1
+ module MegaLotto
2
+ class Drawing
3
+ def draw
4
+ 5.times.map do
5
+ single_draw
6
+ end
7
+ end
8
+
9
+ private
10
+
11
+ def single_draw
12
+ rand(0...60)
13
+ end
14
+ end
15
+ end
@@ -0,0 +1,3 @@
1
+ module MegaLotto
2
+ VERSION = "3.9"
3
+ end
data/lib/mega_lotto.rb ADDED
@@ -0,0 +1,12 @@
1
+ require "mega_lotto/version"
2
+ require "mega_lotto/drawing"
3
+
4
+ begin
5
+ require "pry"
6
+ rescue LoadError
7
+ end
8
+
9
+ module MegaLotto
10
+ class Error < StandardError; end
11
+ # Your code goes here...
12
+ end
@@ -0,0 +1,45 @@
1
+
2
+ lib = File.expand_path("../lib", __FILE__)
3
+ $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
4
+ require "mega_lotto/version"
5
+
6
+ Gem::Specification.new do |spec|
7
+ spec.name = "tdog_mega_lotto"
8
+ spec.version = MegaLotto::VERSION
9
+ spec.authors = ["Tom Spencer"]
10
+ spec.email = ["tomspencerlondon@gmail.com"]
11
+
12
+ spec.summary = %q{ A practice MegaLotto gem for drawing lottery numbers. }
13
+ spec.description = %q{ A practice MegaLotto gem for drawing lottery numbers. }
14
+ spec.homepage = "https://github.com/TomSpencerLondon/mega_lotto"
15
+ spec.license = "MIT"
16
+
17
+ # Prevent pushing this gem to RubyGems.org. To allow pushes either set the 'allowed_push_host'
18
+ # to allow pushing to a single host or delete this section to allow pushing to any host.
19
+ if spec.respond_to?(:metadata)
20
+ spec.metadata["allowed_push_host"] = "https://rubygems.org"
21
+
22
+ spec.metadata["homepage_uri"] = spec.homepage
23
+ spec.metadata["source_code_uri"] = "https://github.com/TomSpencerLondon/mega_lotto"
24
+ spec.metadata["changelog_uri"] = "https://github.com/TomSpencerLondon/mega_lotto"
25
+ else
26
+ raise "RubyGems 2.0 or newer is required to protect against " \
27
+ "public gem pushes."
28
+ end
29
+
30
+ # Specify which files should be added to the gem when it is released.
31
+ # The `git ls-files -z` loads the files in the RubyGem that have been added into git.
32
+ spec.files = Dir.chdir(File.expand_path('..', __FILE__)) do
33
+ `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
34
+ end
35
+ spec.bindir = "exe"
36
+ spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
37
+ spec.require_paths = ["lib"]
38
+
39
+ spec.add_development_dependency "bundler", "~> 1.17"
40
+ spec.add_development_dependency "rake", "~> 10.0"
41
+ spec.add_development_dependency "rspec", "~> 3.0"
42
+ spec.add_development_dependency "pry"
43
+
44
+ spec.add_dependency "rails"
45
+ end
metadata ADDED
@@ -0,0 +1,131 @@
1
+ --- !ruby/object:Gem::Specification
2
+ name: tdog_mega_lotto
3
+ version: !ruby/object:Gem::Version
4
+ version: '3.9'
5
+ platform: ruby
6
+ authors:
7
+ - Tom Spencer
8
+ autorequire:
9
+ bindir: exe
10
+ cert_chain: []
11
+ date: 2019-09-06 00:00:00.000000000 Z
12
+ dependencies:
13
+ - !ruby/object:Gem::Dependency
14
+ name: bundler
15
+ requirement: !ruby/object:Gem::Requirement
16
+ requirements:
17
+ - - "~>"
18
+ - !ruby/object:Gem::Version
19
+ version: '1.17'
20
+ type: :development
21
+ prerelease: false
22
+ version_requirements: !ruby/object:Gem::Requirement
23
+ requirements:
24
+ - - "~>"
25
+ - !ruby/object:Gem::Version
26
+ version: '1.17'
27
+ - !ruby/object:Gem::Dependency
28
+ name: rake
29
+ requirement: !ruby/object:Gem::Requirement
30
+ requirements:
31
+ - - "~>"
32
+ - !ruby/object:Gem::Version
33
+ version: '10.0'
34
+ type: :development
35
+ prerelease: false
36
+ version_requirements: !ruby/object:Gem::Requirement
37
+ requirements:
38
+ - - "~>"
39
+ - !ruby/object:Gem::Version
40
+ version: '10.0'
41
+ - !ruby/object:Gem::Dependency
42
+ name: rspec
43
+ requirement: !ruby/object:Gem::Requirement
44
+ requirements:
45
+ - - "~>"
46
+ - !ruby/object:Gem::Version
47
+ version: '3.0'
48
+ type: :development
49
+ prerelease: false
50
+ version_requirements: !ruby/object:Gem::Requirement
51
+ requirements:
52
+ - - "~>"
53
+ - !ruby/object:Gem::Version
54
+ version: '3.0'
55
+ - !ruby/object:Gem::Dependency
56
+ name: pry
57
+ requirement: !ruby/object:Gem::Requirement
58
+ requirements:
59
+ - - ">="
60
+ - !ruby/object:Gem::Version
61
+ version: '0'
62
+ type: :development
63
+ prerelease: false
64
+ version_requirements: !ruby/object:Gem::Requirement
65
+ requirements:
66
+ - - ">="
67
+ - !ruby/object:Gem::Version
68
+ version: '0'
69
+ - !ruby/object:Gem::Dependency
70
+ name: rails
71
+ requirement: !ruby/object:Gem::Requirement
72
+ requirements:
73
+ - - ">="
74
+ - !ruby/object:Gem::Version
75
+ version: '0'
76
+ type: :runtime
77
+ prerelease: false
78
+ version_requirements: !ruby/object:Gem::Requirement
79
+ requirements:
80
+ - - ">="
81
+ - !ruby/object:Gem::Version
82
+ version: '0'
83
+ description: " A practice MegaLotto gem for drawing lottery numbers. "
84
+ email:
85
+ - tomspencerlondon@gmail.com
86
+ executables: []
87
+ extensions: []
88
+ extra_rdoc_files: []
89
+ files:
90
+ - ".gitignore"
91
+ - ".rspec"
92
+ - ".travis.yml"
93
+ - Gemfile
94
+ - Gemfile.lock
95
+ - LICENSE.txt
96
+ - README.md
97
+ - Rakefile
98
+ - bin/console
99
+ - bin/setup
100
+ - lib/mega_lotto.rb
101
+ - lib/mega_lotto/drawing.rb
102
+ - lib/mega_lotto/version.rb
103
+ - mega_lotto.gemspec
104
+ homepage: https://github.com/TomSpencerLondon/mega_lotto
105
+ licenses:
106
+ - MIT
107
+ metadata:
108
+ allowed_push_host: https://rubygems.org
109
+ homepage_uri: https://github.com/TomSpencerLondon/mega_lotto
110
+ source_code_uri: https://github.com/TomSpencerLondon/mega_lotto
111
+ changelog_uri: https://github.com/TomSpencerLondon/mega_lotto
112
+ post_install_message:
113
+ rdoc_options: []
114
+ require_paths:
115
+ - lib
116
+ required_ruby_version: !ruby/object:Gem::Requirement
117
+ requirements:
118
+ - - ">="
119
+ - !ruby/object:Gem::Version
120
+ version: '0'
121
+ required_rubygems_version: !ruby/object:Gem::Requirement
122
+ requirements:
123
+ - - ">="
124
+ - !ruby/object:Gem::Version
125
+ version: '0'
126
+ requirements: []
127
+ rubygems_version: 3.0.6
128
+ signing_key:
129
+ specification_version: 4
130
+ summary: A practice MegaLotto gem for drawing lottery numbers.
131
+ test_files: []