PlayRo2kPaperScissorsGame 2.0.2

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.
Files changed (54) hide show
  1. checksums.yaml +7 -0
  2. checksums.yaml.gz.sig +2 -0
  3. data.tar.gz.sig +0 -0
  4. data/.gitignore +7 -0
  5. data/Gemfile +11 -0
  6. data/LICENSE +21 -0
  7. data/README.md +38 -0
  8. data/Rakefile +17 -0
  9. data/bin/PlayRockPaperScissorsGame +101 -0
  10. data/bin/rps +101 -0
  11. data/certs/gem-public_cert.pem +21 -0
  12. data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/jekyll-theme-cayman.scssc +0 -0
  13. data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/normalize.scssc +0 -0
  14. data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/rouge-github.scssc +0 -0
  15. data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/variables.scssc +0 -0
  16. data/docs/CODE_OF_CONDUCT.md +84 -0
  17. data/docs/CONTRIBUTING.md +43 -0
  18. data/docs/Gemfile +4 -0
  19. data/docs/LICENSE +116 -0
  20. data/docs/Testing.md +24 -0
  21. data/docs/_config.yml +11 -0
  22. data/docs/_layouts/default.html +48 -0
  23. data/docs/_sass/jekyll-theme-cayman.scss +345 -0
  24. data/docs/_sass/normalize.scss +424 -0
  25. data/docs/_sass/rouge-github.scss +209 -0
  26. data/docs/_sass/variables.scss +23 -0
  27. data/docs/_site/CODE_OF_CONDUCT.html +127 -0
  28. data/docs/_site/CONTRIBUTING.html +86 -0
  29. data/docs/_site/Testing.html +68 -0
  30. data/docs/_site/assets/css/style.css +318 -0
  31. data/docs/_site/index.html +126 -0
  32. data/docs/_site/script/bootstrap +6 -0
  33. data/docs/_site/script/cibuild +6 -0
  34. data/docs/_site/script/release +42 -0
  35. data/docs/_site/script/server +3 -0
  36. data/docs/assets/css/style.scss +4 -0
  37. data/docs/index.md +59 -0
  38. data/docs/jekyll-theme-cayman.gemspec +18 -0
  39. data/docs/script/bootstrap +6 -0
  40. data/docs/script/cibuild +6 -0
  41. data/docs/script/release +42 -0
  42. data/docs/script/server +3 -0
  43. data/docs/thumbnail.png +0 -0
  44. data/exec/rps.bash +73 -0
  45. data/exec/run.bat +26 -0
  46. data/exec/uninstall.sh +32 -0
  47. data/lib/ref/Constants.rb +24 -0
  48. data/lib/ref/PrivateMethods.rb +30 -0
  49. data/lib/rps.rb +66 -0
  50. data/lib/rps/version.rb +3 -0
  51. data/rps.gemspec +38 -0
  52. data/test/test_rps.rb +97 -0
  53. metadata +188 -0
  54. metadata.gz.sig +0 -0
@@ -0,0 +1,126 @@
1
+ <!DOCTYPE html>
2
+ <html lang="en-us">
3
+ <head>
4
+ <meta charset="UTF-8">
5
+ <title>Play Rock Paper Scissors Game</title>
6
+ <meta name="description" content="A Ruby Programmed Rock Paper Scissors Game"/>
7
+ <meta name="viewport" content="width=device-width, initial-scale=1">
8
+ <meta name="theme-color" content="#157878">
9
+ <link href='https://fonts.googleapis.com/css?family=Open+Sans:400,700' rel='stylesheet' type='text/css'>
10
+ <link rel="stylesheet" href="/assets/css/style.css?v=bbe67e9ac21febb5e381433f7ab666a7485cb6a8">
11
+ </head>
12
+ <body>
13
+ <section class="page-header">
14
+ <h1 class="project-name">Play Rock Paper Scissors Game</h1>
15
+ <h2 class="project-tagline">A Ruby Programmed Rock Paper Scissors Game</h2>
16
+
17
+ <a href="http://github.com/bag3318/RockPaperScissors" class="btn">View on GitHub</a>
18
+ <a href="https://github.com/bag3318/RockPaperScissors/issues" class="btn">Report a Bug</a>
19
+
20
+
21
+ <a href="http://github.com/bag3318/RockPaperScissors/zipball/gh-pages" class="btn">Download .zip</a>
22
+ <a href="http://github.com/bag3318/RockPaperScissors/tarball/gh-pages" class="btn">Download .tar.gz</a>
23
+
24
+ </section>
25
+
26
+ <section class="main-content">
27
+
28
+ <h1 id="rock-paper-scissors">Rock Paper Scissors</h1>
29
+
30
+ <p><strong>Table of Contents</strong></p>
31
+
32
+ <ul>
33
+ <li><a href="#rock-paper-scissors">Rock Paper Scissors</a>
34
+ <ul>
35
+ <li><a href="#how-to-run-and-install">How to Run and Install</a>
36
+ <ul>
37
+ <li><a href="#install-and-run-on-mac">Install and Run on Mac</a>
38
+ <ul>
39
+ <li><a href="#running">Running</a></li>
40
+ <li><a href="#uninstalling">Uninstalling</a></li>
41
+ </ul>
42
+ </li>
43
+ <li><a href="#install-and-run-on-windows">Install and Run on Windows</a>
44
+ <ul>
45
+ <li><a href="#running-1">Running</a></li>
46
+ </ul>
47
+ </li>
48
+ </ul>
49
+ </li>
50
+ <li><a href="#links">Links</a></li>
51
+ </ul>
52
+ </li>
53
+ </ul>
54
+
55
+ <h2 id="how-to-run-and-install">How to Run and Install</h2>
56
+
57
+ <h3 id="install-and-run-on-mac">Install and Run on Mac</h3>
58
+
59
+ <ol>
60
+ <li>Run the <code class="highlighter-rouge">rps.bash</code> file (located in the <code class="highlighter-rouge">exec</code> folder) with the <code class="highlighter-rouge">Terminal</code></li>
61
+ </ol>
62
+
63
+ <h4 id="running">Running</h4>
64
+
65
+ <ol>
66
+ <li>Open the <code class="highlighter-rouge">Terminal</code></li>
67
+ <li>Type in: <code class="highlighter-rouge">rps</code>, or <code class="highlighter-rouge">PlayRockPaperScissorsGame</code></li>
68
+ <li>Hit <kbd>return</kbd></li>
69
+ </ol>
70
+
71
+ <h4 id="uninstalling">Uninstalling</h4>
72
+
73
+ <ol>
74
+ <li>Run the <code class="highlighter-rouge">uninstaller.sh</code> file (located in the <code class="highlighter-rouge">exec</code> folder) with the <code class="highlighter-rouge">Terminal</code></li>
75
+ </ol>
76
+
77
+ <h3 id="install-and-run-on-windows">Install and Run on Windows</h3>
78
+
79
+ <ol>
80
+ <li>Download and install Ruby for Windows (if not already installed); download <a href="https://rubyinstaller.org/downloads/">here</a></li>
81
+ <li>Open <code class="highlighter-rouge">cmd</code> and type in: <code class="highlighter-rouge">gem install PlayRockPaperScissorsGame</code>; hit <kbd>enter</kbd></li>
82
+ <li>Run the <code class="highlighter-rouge">rps.bat</code> file (located in the <code class="highlighter-rouge">exec</code> folder)</li>
83
+ </ol>
84
+
85
+ <h4 id="running-1">Running</h4>
86
+
87
+ <ol>
88
+ <li>Open the <code class="highlighter-rouge">rps.bat</code> file (located in the <code class="highlighter-rouge">exec</code> folder)
89
+ <ul>
90
+ <li>Another option: type in <code class="highlighter-rouge">rps</code> or <code class="highlighter-rouge">PlayRockPaperScissorsGame</code> in the <code class="highlighter-rouge">Command Prompt</code>; hit <kbd>enter</kbd></li>
91
+ </ul>
92
+ </li>
93
+ </ol>
94
+
95
+ <h2 id="links">Links</h2>
96
+
97
+ <ul>
98
+ <li><a href="https://rubygems.org/gems/PlayRockPaperScissorsGame">Ruby Gems Page</a></li>
99
+ </ul>
100
+
101
+ <hr />
102
+
103
+ <h2 id="site-nav">Site Nav</h2>
104
+
105
+ <table>
106
+ <tbody>
107
+ <tr>
108
+ <td><a href="Testing">How to Test</a></td>
109
+ <td><a href="CONTRIBUTING">Contributing</a></td>
110
+ <td><a href="CODE_OF_CONDUCT">Code of Conduct</a></td>
111
+ </tr>
112
+ </tbody>
113
+ </table>
114
+
115
+
116
+
117
+ <footer class="site-footer">
118
+
119
+ <span class="site-footer-owner"><a href="http://github.com/bag3318/RockPaperScissors">RockPaperScissors</a> is maintained by <a href="http://github.com/bag3318">bag3318</a>.</span>
120
+
121
+ </footer>
122
+ </section>
123
+
124
+
125
+ </body>
126
+ </html>
@@ -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
@@ -0,0 +1,4 @@
1
+ ---
2
+ ---
3
+
4
+ @import 'jekyll-theme-cayman';
@@ -0,0 +1,59 @@
1
+ ---
2
+ layout: default
3
+ ---
4
+
5
+ [//]: # (start)
6
+
7
+ Rock Paper Scissors
8
+ ===================
9
+
10
+ **Table of Contents**
11
+
12
+ - [Rock Paper Scissors](#rock-paper-scissors)
13
+ - [How to Run and Install](#how-to-run-and-install)
14
+ - [Install and Run on Mac](#install-and-run-on-mac)
15
+ - [Running](#running)
16
+ - [Uninstalling](#uninstalling)
17
+ - [Install and Run on Windows](#install-and-run-on-windows)
18
+ - [Running](#running-1)
19
+ - [Links](#links)
20
+
21
+ How to Run and Install
22
+ ----------------------
23
+
24
+ ### Install and Run on Mac
25
+
26
+ 1. Run the `rps.bash` file (located in the `exec` folder) with the `Terminal`
27
+
28
+ #### Running
29
+
30
+ 1. Open the `Terminal`
31
+ 2. Type in: `rps`, or `PlayRockPaperScissorsGame`
32
+ 3. Hit <kbd>return</kbd>
33
+
34
+ #### Uninstalling
35
+
36
+ 1. Run the `uninstaller.sh` file (located in the `exec` folder) with the `Terminal`
37
+
38
+ ### Install and Run on Windows
39
+
40
+ 1. Download and install Ruby for Windows (if not already installed); download [here](https://rubyinstaller.org/downloads/)
41
+ 2. Open `cmd` and type in: `gem install PlayRockPaperScissorsGame`; hit <kbd>enter</kbd>
42
+ 3. Run the `rps.bat` file (located in the `exec` folder)
43
+
44
+ #### Running
45
+
46
+ 1. Open the `rps.bat` file (located in the `exec` folder)
47
+ * Another option: type in `rps` or `PlayRockPaperScissorsGame` in the `Command Prompt`; hit <kbd>enter</kbd>
48
+
49
+ ## Links
50
+
51
+ * [Ruby Gems Page](https://rubygems.org/gems/PlayRockPaperScissorsGame)
52
+
53
+ ----------
54
+
55
+ ## Site Nav
56
+
57
+ [How to Test](Testing) | [Contributing](CONTRIBUTING) | [Code of Conduct](CODE_OF_CONDUCT)
58
+
59
+ [//]: # (end)
@@ -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
Binary file
@@ -0,0 +1,73 @@
1
+ #!/bin/bash
2
+
3
+ master() {
4
+
5
+ normal=$(tput sgr0); # Select normal mode
6
+ bold=`tput bold`; # Select bold mode
7
+ nonbold=`tput sgr0` # Select non-bold mode
8
+ underline=`tput smul`; # Select underline mode
9
+ nonunderline=`tput rmul`; # Select non-underline mode
10
+
11
+ echo "${bold}Would you like to install the RPS gem and what is needed for it?${nonbold}";
12
+ processes() {
13
+ process() {
14
+ sudo xcode-select --install;
15
+ }
16
+ process1() {
17
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)";
18
+ \curl -sSL https://get.rvm.io | bash -s stable --ruby;
19
+ osascript -e "
20
+ tell application \"Terminal\"
21
+ do script \"gem install PlayRockPaperScissorsGame; $1\"
22
+ end tell";
23
+ echo 'Finished!';
24
+ }
25
+ }
26
+ processes;
27
+ confirmations() {
28
+ confirm() {
29
+ echo "${bold}Press Y to install, or press N to cancel${nonbold}";
30
+ while read -r -n 1 -s answer; do
31
+ if [[ $answer = [YyNn] ]]; then
32
+ [[ $answer = [Yy] ]] && retval=0;
33
+ [[ $answer = [Nn] ]] && retval=1;
34
+ break;
35
+ fi;
36
+ done;
37
+ return $retval;
38
+ }
39
+ confirm1() {
40
+ echo "${bold}PLEASE WAIT UNTIL XCODE COMMAND LINE TOOLS ARE DONE INSTALLING!";
41
+ echo "If you get an error that says you already installed it, then please continue.";
42
+ echo "Press C to continue...${nonbold}"
43
+ while read -r -n 1 -s answer; do
44
+ if [[ $answer = [Cc] ]]; then
45
+ [[ $answer = [Cc] ]] && retval=0;
46
+ break;
47
+ fi;
48
+ done;
49
+ return $retval;
50
+ }
51
+ }
52
+ confirmations;
53
+ initFunctions() {
54
+ init() {
55
+ if confirm; then
56
+ process;
57
+ else
58
+ exit;
59
+ fi;
60
+ }
61
+ init;
62
+ init1() {
63
+ if confirm1; then
64
+ process1;
65
+ else
66
+ exit;
67
+ fi;
68
+ }
69
+ init1
70
+ }
71
+ initFunctions;
72
+ }
73
+ master;
@@ -0,0 +1,26 @@
1
+ @ECHO OFF
2
+
3
+ :master
4
+
5
+ :confirm
6
+ CHOICE /C YN "Would you like to play Rock Paper Scissors?"
7
+ if "%ERRORLEVEL%"=="1" CALL:process
8
+ if "%ERRORLEVEL%"=="2" CALL:exiting
9
+ GOTO:EOF
10
+
11
+ REM start process
12
+ :process
13
+ START cmd.exe /K PlayRockPaperScissorsGame
14
+ IF %ERRORLEVEL% EQU 9009 (
15
+ ECHO error - cmd.exe file not found in your PATH
16
+ )
17
+ GOTO:EOF
18
+ REM end process
19
+
20
+ :exiting
21
+ EXIT
22
+ GOTO:EOF
23
+
24
+ GOTO:EOF
25
+
26
+ CALL:master
@@ -0,0 +1,32 @@
1
+ #!/bin/sh
2
+
3
+ master() {
4
+ echo "Would you like to Uninstall the RPS gem, Ruby Gems, Ruby, and xcode command line tools?";
5
+ process() {
6
+ sudo rm -rf /Library/Developer/CommandLineTools;
7
+ /usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/uninstall)";
8
+ rvm implode;
9
+ gem uninstall PlayRockPaperScissorsGame;
10
+ echo "Finished!";
11
+ }
12
+ confirm() {
13
+ echo "Press Y to uninstall, or press N to cancel";
14
+ while read -r -n 1 -s answer; do
15
+ if [[ $answer = [YyNn] ]]; then
16
+ [[ $answer = [Yy] ]] && retval=0;
17
+ [[ $answer = [Nn] ]] && retval=1;
18
+ break;
19
+ fi;
20
+ done;
21
+ return $retval;
22
+ }
23
+ init() {
24
+ if confirm; then
25
+ process;
26
+ else
27
+ exit;
28
+ fi;
29
+ }
30
+ init;
31
+ }
32
+ master;