rpsg 0.2.4 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (61) hide show
  1. checksums.yaml +4 -4
  2. data/.gitignore +1 -1
  3. data/README.md +2 -0
  4. data/Rakefile +6 -2
  5. data/doc/created.rid +2 -2
  6. data/doc/js/search_index.js.gz +0 -0
  7. data/docs/Gemfile +4 -0
  8. data/docs/LICENSE +116 -0
  9. data/docs/README.md +44 -0
  10. data/docs/_config.yml +37 -0
  11. data/docs/_includes/footer.html +16 -0
  12. data/docs/_includes/header.html +19 -0
  13. data/docs/_layouts/default.html +50 -0
  14. data/docs/_sass/jekyll-theme-cayman.scss +346 -0
  15. data/docs/_sass/normalize.scss +424 -0
  16. data/docs/_sass/pace.sass +278 -0
  17. data/docs/_sass/rouge-github.scss +209 -0
  18. data/docs/_sass/variables.scss +23 -0
  19. data/docs/_site/assets/css/style.css +1 -0
  20. data/docs/_site/assets/favicons/android-chrome-192x192.png +0 -0
  21. data/docs/_site/assets/favicons/android-chrome-256x256.png +0 -0
  22. data/docs/_site/assets/favicons/apple-touch-icon.png +0 -0
  23. data/docs/_site/assets/favicons/browserconfig.xml +9 -0
  24. data/docs/_site/assets/favicons/favicon-16x16.png +0 -0
  25. data/docs/_site/assets/favicons/favicon-32x32.png +0 -0
  26. data/docs/_site/assets/favicons/favicon.ico +0 -0
  27. data/docs/_site/assets/favicons/manifest.json +18 -0
  28. data/docs/_site/assets/favicons/mstile-150x150.png +0 -0
  29. data/docs/_site/assets/favicons/safari-pinned-tab.svg +17 -0
  30. data/docs/_site/assets/js/pace.min.js +2 -0
  31. data/docs/_site/code.html +227 -0
  32. data/docs/_site/index.html +72 -0
  33. data/docs/_site/readme.html +112 -0
  34. data/docs/_site/simple.html +99 -0
  35. data/docs/assets/css/style.scss +4 -0
  36. data/docs/assets/favicons/android-chrome-192x192.png +0 -0
  37. data/docs/assets/favicons/android-chrome-256x256.png +0 -0
  38. data/docs/assets/favicons/apple-touch-icon.png +0 -0
  39. data/docs/assets/favicons/browserconfig.xml +9 -0
  40. data/docs/assets/favicons/favicon-16x16.png +0 -0
  41. data/docs/assets/favicons/favicon-32x32.png +0 -0
  42. data/docs/assets/favicons/favicon.ico +0 -0
  43. data/docs/assets/favicons/manifest.json +18 -0
  44. data/docs/assets/favicons/mstile-150x150.png +0 -0
  45. data/docs/assets/favicons/safari-pinned-tab.svg +17 -0
  46. data/docs/assets/js/pace.min.js +2 -0
  47. data/docs/code.md +164 -0
  48. data/docs/index.md +12 -0
  49. data/docs/jekyll-theme-cayman.gemspec +18 -0
  50. data/docs/script/bootstrap +6 -0
  51. data/docs/script/cibuild +6 -0
  52. data/docs/script/release +42 -0
  53. data/docs/script/server +3 -0
  54. data/docs/simple.md +38 -0
  55. data/docs/thumbnail.png +0 -0
  56. data/lib/Main.rb +1 -1
  57. data/lib/rpsg/version.rb +1 -1
  58. data/rpsg.gemspec +8 -7
  59. data/test/test_rpsg.rb +6 -0
  60. metadata +77 -27
  61. data/test/rpsg.rb +0 -2
data/docs/index.md ADDED
@@ -0,0 +1,12 @@
1
+ ---
2
+ layout: default
3
+ title: RPSG
4
+ permalink: /index.html
5
+ ---
6
+
7
+ # Rock Paper Scissors Game
8
+
9
+ Welcome to my **RPSG** home site. I created my `RPSG` gem with __Ruby__, the programming language.
10
+ Please Enjoy! :)
11
+
12
+
@@ -0,0 +1,18 @@
1
+ # encoding: utf-8
2
+
3
+ Gem::Specification.new do |s|
4
+ s.name = "jekyll-theme-cayman"
5
+ s.version = "0.0.4"
6
+ s.license = "CC0-1.0"
7
+ s.authors = ["Jason Long", "GitHub, Inc."]
8
+ s.email = ["opensource+jekyll-theme-cayman@github.com"]
9
+ s.homepage = "https://github.com/pages-themes/cayman"
10
+ s.summary = "Cayman is a Jekyll theme for GitHub Pages"
11
+
12
+ s.files = `git ls-files -z`.split("\x0").select do |f|
13
+ f.match(%r{^((_includes|_layouts|_sass|assets)/|(LICENSE|README)((\.(txt|md|markdown)|$)))}i)
14
+ end
15
+
16
+ s.platform = Gem::Platform::RUBY
17
+ s.add_runtime_dependency "jekyll", "~> 3.3"
18
+ end
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ gem install bundler
6
+ bundle install
@@ -0,0 +1,6 @@
1
+ #!/bin/sh
2
+
3
+ set -e
4
+
5
+ bundle exec jekyll build
6
+ gem build jekyll-theme-cayman.gemspec
@@ -0,0 +1,42 @@
1
+ #!/bin/sh
2
+ # Tag and push a release.
3
+
4
+ set -e
5
+
6
+ # Make sure we're in the project root.
7
+
8
+ cd $(dirname "$0")/..
9
+
10
+ # Make sure the darn thing works
11
+
12
+ bundle update
13
+
14
+ # Build a new gem archive.
15
+
16
+ rm -rf jekyll-theme-cayman-*.gem
17
+ gem build -q jekyll-theme-cayman.gemspec
18
+
19
+ # Make sure we're on the master branch.
20
+
21
+ (git branch | grep -q 'master') || {
22
+ echo "Only release from the master branch."
23
+ exit 1
24
+ }
25
+
26
+ # Figure out what version we're releasing.
27
+
28
+ tag=v`ls jekyll-theme-cayman-*.gem | sed 's/^jekyll-theme-cayman-\(.*\)\.gem$/\1/'`
29
+
30
+ # Make sure we haven't released this version before.
31
+
32
+ git fetch -t origin
33
+
34
+ (git tag -l | grep -q "$tag") && {
35
+ echo "Whoops, there's already a '${tag}' tag."
36
+ exit 1
37
+ }
38
+
39
+ # Tag it and bag it.
40
+
41
+ gem push jekyll-theme-cayman-*.gem && git tag "$tag" &&
42
+ git push origin master && git push origin "$tag"
@@ -0,0 +1,3 @@
1
+ #!/bin/sh
2
+
3
+ bundle exec jekyll serve
data/docs/simple.md ADDED
@@ -0,0 +1,38 @@
1
+ ---
2
+ layout: default
3
+ title: "Simple Code"
4
+ permalink: /simple.html
5
+ ---
6
+
7
+ > This is what a beginner's RPS code might look like
8
+
9
+ {% highlight ruby %}
10
+ options = ["rock", "paper", "scissors"]
11
+ computer_choice = options[rand(options.length)]
12
+ puts "What's your choice?"
13
+ puts "rock, paper, or scissors"
14
+ user_input = gets.chomp.downcase # read user input and convert to lower case
15
+ loop do
16
+ if (user_input == "rock" || user_input == "paper" || user_input == "scissors")
17
+ if (user_input == computer_choice)
18
+ puts "We got the same, let's keep playing!"
19
+ elsif (user_input == "rock" && computer_choice == "scissors")
20
+ puts "computer choice is: " + computer_choice + ", you win! :)"
21
+ elsif (user_input == "rock" && computer_choice == "paper")
22
+ puts "computer choice is: " + computer_choice + ", computer wins :("
23
+ elsif (user_input == "paper" && computer_choice == "scissors")
24
+ puts "computer choice is: " + computer_choice + ", computer wins :("
25
+ elsif (user_input == "paper" && computer_choice == "rock")
26
+ puts "computer choice is: " + computer_choice + ", you win! :)"
27
+ elsif (user_input == "scissors" && computer_choice == "rock")
28
+ puts "computer choice is: " + computer_choice + ", computer wins :("
29
+ elsif (user_input == "scissors" && computer_choice == "paper")
30
+ puts "computer choice is: " + computer_choice + ", you win! :)"
31
+ end
32
+ else
33
+ puts "Invalid choice, enter Rock, Paper, or Scissors"
34
+ end
35
+ break
36
+ end
37
+ {% endhighlight %}
38
+
Binary file
data/lib/Main.rb CHANGED
@@ -67,4 +67,4 @@ class RockPaperScissorsGame
67
67
 
68
68
  end
69
69
 
70
- RockPaperScissorsGame.new.play(2) # best of 3
70
+ RockPaperScissorsGame.new.play(2) # best out of 3
data/lib/rpsg/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # specify the version for the rubygem
2
2
  module RPSG
3
3
  # create version constant for the rubygem
4
- VERSION = "0.2.4"
4
+ VERSION = "0.2.5"
5
5
  end
data/rpsg.gemspec CHANGED
@@ -1,20 +1,20 @@
1
1
  Gem::Specification.new do |spec|
2
2
  spec.name = "rpsg"
3
- spec.version = "0.2.4"
3
+ spec.version = "0.2.5"
4
4
  spec.date = "2017-10-13"
5
- spec.summary = "A Rock Paper Scissors Game Ruby Gem"
5
+ spec.summary = "A Rock Paper Scissors Game RubyGem"
6
6
  spec.description = <<-EOF
7
7
  A Ruby-programmed rock paper scissors game.
8
8
  Now you can play rock paper scissors on your computer whenever you'd like! :)
9
9
  EOF
10
10
  spec.author = "bag3318"
11
11
  spec.email = "disclosed"
12
- spec.homepage = "https://github.com/bag3318/RPSG"
12
+ spec.homepage = "https://bag3318.github.io/RPSG"
13
13
  spec.platform = Gem::Platform::RUBY
14
14
  spec.require_paths = ["lib"]
15
15
  spec.files = `git ls-files -z`.split("\x0")
16
16
  spec.post_install_message = <<-EOF
17
- Thanks for installing!
17
+ Thanks for installing my RPSG gem!
18
18
  I hope you will have fun playing rock paper scissors! :)
19
19
  EOF
20
20
  spec.license = "MIT"
@@ -23,15 +23,16 @@ Gem::Specification.new do |spec|
23
23
  spec.extra_rdoc_files = ["README.md"]
24
24
  spec.bindir = "bin"
25
25
  spec.metadata = {
26
- "issue_tracker" => "https://github.com/bag3318/RPSG/issues/",
26
+ "issue_tracker" => "https://github.com/bag3318/RPSG/issues",
27
+ "source_code" => "https://github.com/bag3318/RPSG"
27
28
  }
28
29
  spec.executables << "rpsg"
29
30
  spec.requirements << "A Windows or Mac computer"
30
31
  # spec.rdoc_options << '--title' << 'Rake -- Ruby Make' <<
31
32
  # '--main' << 'README' <<
32
33
  # '--line-numbers'
33
- spec.add_runtime_dependency 'rake' , '~> 12.0', '>= 12.0.0'
34
- spec.add_runtime_dependency 'rvm' , '~> 1.11', '>= 1.11.3.9'
35
34
  spec.add_runtime_dependency 'bundler' , '~> 1.14', '>= 1.14.6'
35
+ spec.add_runtime_dependency 'rake' , '~> 12.0', '>= 12.0.0'
36
36
  spec.add_runtime_dependency 'rdoc' , '~> 5.1' , '>= 5.1.0'
37
+ spec.add_runtime_dependency 'rvm' , '~> 1.11', '>= 1.11.3.9'
37
38
  end
data/test/test_rpsg.rb ADDED
@@ -0,0 +1,6 @@
1
+ bin = File.expand_path("../../bin", __FILE__)
2
+
3
+ $:.unshift(bin)
4
+
5
+ # load from bin directory
6
+ load "rpsg"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: rpsg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.4
4
+ version: 0.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - bag3318
@@ -11,85 +11,85 @@ cert_chain: []
11
11
  date: 2017-10-13 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
- name: rake
14
+ name: bundler
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
17
  - - "~>"
18
18
  - !ruby/object:Gem::Version
19
- version: '12.0'
19
+ version: '1.14'
20
20
  - - ">="
21
21
  - !ruby/object:Gem::Version
22
- version: 12.0.0
22
+ version: 1.14.6
23
23
  type: :runtime
24
24
  prerelease: false
25
25
  version_requirements: !ruby/object:Gem::Requirement
26
26
  requirements:
27
27
  - - "~>"
28
28
  - !ruby/object:Gem::Version
29
- version: '12.0'
29
+ version: '1.14'
30
30
  - - ">="
31
31
  - !ruby/object:Gem::Version
32
- version: 12.0.0
32
+ version: 1.14.6
33
33
  - !ruby/object:Gem::Dependency
34
- name: rvm
34
+ name: rake
35
35
  requirement: !ruby/object:Gem::Requirement
36
36
  requirements:
37
37
  - - "~>"
38
38
  - !ruby/object:Gem::Version
39
- version: '1.11'
39
+ version: '12.0'
40
40
  - - ">="
41
41
  - !ruby/object:Gem::Version
42
- version: 1.11.3.9
42
+ version: 12.0.0
43
43
  type: :runtime
44
44
  prerelease: false
45
45
  version_requirements: !ruby/object:Gem::Requirement
46
46
  requirements:
47
47
  - - "~>"
48
48
  - !ruby/object:Gem::Version
49
- version: '1.11'
49
+ version: '12.0'
50
50
  - - ">="
51
51
  - !ruby/object:Gem::Version
52
- version: 1.11.3.9
52
+ version: 12.0.0
53
53
  - !ruby/object:Gem::Dependency
54
- name: bundler
54
+ name: rdoc
55
55
  requirement: !ruby/object:Gem::Requirement
56
56
  requirements:
57
57
  - - "~>"
58
58
  - !ruby/object:Gem::Version
59
- version: '1.14'
59
+ version: '5.1'
60
60
  - - ">="
61
61
  - !ruby/object:Gem::Version
62
- version: 1.14.6
62
+ version: 5.1.0
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
67
  - - "~>"
68
68
  - !ruby/object:Gem::Version
69
- version: '1.14'
69
+ version: '5.1'
70
70
  - - ">="
71
71
  - !ruby/object:Gem::Version
72
- version: 1.14.6
72
+ version: 5.1.0
73
73
  - !ruby/object:Gem::Dependency
74
- name: rdoc
74
+ name: rvm
75
75
  requirement: !ruby/object:Gem::Requirement
76
76
  requirements:
77
77
  - - "~>"
78
78
  - !ruby/object:Gem::Version
79
- version: '5.1'
79
+ version: '1.11'
80
80
  - - ">="
81
81
  - !ruby/object:Gem::Version
82
- version: 5.1.0
82
+ version: 1.11.3.9
83
83
  type: :runtime
84
84
  prerelease: false
85
85
  version_requirements: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - "~>"
88
88
  - !ruby/object:Gem::Version
89
- version: '5.1'
89
+ version: '1.11'
90
90
  - - ">="
91
91
  - !ruby/object:Gem::Version
92
- version: 5.1.0
92
+ version: 1.11.3.9
93
93
  description: " A Ruby-programmed rock paper scissors game. \n Now you can play
94
94
  rock paper scissors on your computer whenever you'd like! :)\n"
95
95
  email: disclosed
@@ -154,19 +154,69 @@ files:
154
154
  - doc/js/searcher.js
155
155
  - doc/js/searcher.js.gz
156
156
  - doc/table_of_contents.html
157
+ - docs/Gemfile
158
+ - docs/LICENSE
159
+ - docs/README.md
160
+ - docs/_config.yml
161
+ - docs/_includes/footer.html
162
+ - docs/_includes/header.html
163
+ - docs/_layouts/default.html
164
+ - docs/_sass/jekyll-theme-cayman.scss
165
+ - docs/_sass/normalize.scss
166
+ - docs/_sass/pace.sass
167
+ - docs/_sass/rouge-github.scss
168
+ - docs/_sass/variables.scss
169
+ - docs/_site/assets/css/style.css
170
+ - docs/_site/assets/favicons/android-chrome-192x192.png
171
+ - docs/_site/assets/favicons/android-chrome-256x256.png
172
+ - docs/_site/assets/favicons/apple-touch-icon.png
173
+ - docs/_site/assets/favicons/browserconfig.xml
174
+ - docs/_site/assets/favicons/favicon-16x16.png
175
+ - docs/_site/assets/favicons/favicon-32x32.png
176
+ - docs/_site/assets/favicons/favicon.ico
177
+ - docs/_site/assets/favicons/manifest.json
178
+ - docs/_site/assets/favicons/mstile-150x150.png
179
+ - docs/_site/assets/favicons/safari-pinned-tab.svg
180
+ - docs/_site/assets/js/pace.min.js
181
+ - docs/_site/code.html
182
+ - docs/_site/index.html
183
+ - docs/_site/readme.html
184
+ - docs/_site/simple.html
185
+ - docs/assets/css/style.scss
186
+ - docs/assets/favicons/android-chrome-192x192.png
187
+ - docs/assets/favicons/android-chrome-256x256.png
188
+ - docs/assets/favicons/apple-touch-icon.png
189
+ - docs/assets/favicons/browserconfig.xml
190
+ - docs/assets/favicons/favicon-16x16.png
191
+ - docs/assets/favicons/favicon-32x32.png
192
+ - docs/assets/favicons/favicon.ico
193
+ - docs/assets/favicons/manifest.json
194
+ - docs/assets/favicons/mstile-150x150.png
195
+ - docs/assets/favicons/safari-pinned-tab.svg
196
+ - docs/assets/js/pace.min.js
197
+ - docs/code.md
198
+ - docs/index.md
199
+ - docs/jekyll-theme-cayman.gemspec
200
+ - docs/script/bootstrap
201
+ - docs/script/cibuild
202
+ - docs/script/release
203
+ - docs/script/server
204
+ - docs/simple.md
205
+ - docs/thumbnail.png
157
206
  - lib/Constants.rb
158
207
  - lib/Main.rb
159
208
  - lib/PrivateMethods.rb
160
209
  - lib/rpsg/version.rb
161
210
  - rpsg.gemspec
162
- - test/rpsg.rb
163
- homepage: https://github.com/bag3318/RPSG
211
+ - test/test_rpsg.rb
212
+ homepage: https://bag3318.github.io/RPSG
164
213
  licenses:
165
214
  - MIT
166
215
  metadata:
167
- issue_tracker: https://github.com/bag3318/RPSG/issues/
168
- post_install_message: " Thanks for installing! \n I hope you will have fun playing
169
- rock paper scissors! :)\n"
216
+ issue_tracker: https://github.com/bag3318/RPSG/issues
217
+ source_code: https://github.com/bag3318/RPSG
218
+ post_install_message: " Thanks for installing my RPSG gem! \n I hope you will
219
+ have fun playing rock paper scissors! :)\n"
170
220
  rdoc_options: []
171
221
  require_paths:
172
222
  - lib
@@ -186,5 +236,5 @@ rubyforge_project:
186
236
  rubygems_version: 2.6.14
187
237
  signing_key:
188
238
  specification_version: 4
189
- summary: A Rock Paper Scissors Game Ruby Gem
239
+ summary: A Rock Paper Scissors Game RubyGem
190
240
  test_files: []
data/test/rpsg.rb DELETED
@@ -1,2 +0,0 @@
1
- # load from bin directory
2
- load "bin/rpsg"