rpsg 0.2.4 → 0.2.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +1 -1
- data/README.md +2 -0
- data/Rakefile +6 -2
- data/doc/created.rid +2 -2
- data/doc/js/search_index.js.gz +0 -0
- data/docs/Gemfile +4 -0
- data/docs/LICENSE +116 -0
- data/docs/README.md +44 -0
- data/docs/_config.yml +37 -0
- data/docs/_includes/footer.html +16 -0
- data/docs/_includes/header.html +19 -0
- data/docs/_layouts/default.html +50 -0
- data/docs/_sass/jekyll-theme-cayman.scss +346 -0
- data/docs/_sass/normalize.scss +424 -0
- data/docs/_sass/pace.sass +278 -0
- data/docs/_sass/rouge-github.scss +209 -0
- data/docs/_sass/variables.scss +23 -0
- data/docs/_site/assets/css/style.css +1 -0
- data/docs/_site/assets/favicons/android-chrome-192x192.png +0 -0
- data/docs/_site/assets/favicons/android-chrome-256x256.png +0 -0
- data/docs/_site/assets/favicons/apple-touch-icon.png +0 -0
- data/docs/_site/assets/favicons/browserconfig.xml +9 -0
- data/docs/_site/assets/favicons/favicon-16x16.png +0 -0
- data/docs/_site/assets/favicons/favicon-32x32.png +0 -0
- data/docs/_site/assets/favicons/favicon.ico +0 -0
- data/docs/_site/assets/favicons/manifest.json +18 -0
- data/docs/_site/assets/favicons/mstile-150x150.png +0 -0
- data/docs/_site/assets/favicons/safari-pinned-tab.svg +17 -0
- data/docs/_site/assets/js/pace.min.js +2 -0
- data/docs/_site/code.html +227 -0
- data/docs/_site/index.html +72 -0
- data/docs/_site/readme.html +112 -0
- data/docs/_site/simple.html +99 -0
- data/docs/assets/css/style.scss +4 -0
- data/docs/assets/favicons/android-chrome-192x192.png +0 -0
- data/docs/assets/favicons/android-chrome-256x256.png +0 -0
- data/docs/assets/favicons/apple-touch-icon.png +0 -0
- data/docs/assets/favicons/browserconfig.xml +9 -0
- data/docs/assets/favicons/favicon-16x16.png +0 -0
- data/docs/assets/favicons/favicon-32x32.png +0 -0
- data/docs/assets/favicons/favicon.ico +0 -0
- data/docs/assets/favicons/manifest.json +18 -0
- data/docs/assets/favicons/mstile-150x150.png +0 -0
- data/docs/assets/favicons/safari-pinned-tab.svg +17 -0
- data/docs/assets/js/pace.min.js +2 -0
- data/docs/code.md +164 -0
- data/docs/index.md +12 -0
- data/docs/jekyll-theme-cayman.gemspec +18 -0
- data/docs/script/bootstrap +6 -0
- data/docs/script/cibuild +6 -0
- data/docs/script/release +42 -0
- data/docs/script/server +3 -0
- data/docs/simple.md +38 -0
- data/docs/thumbnail.png +0 -0
- data/lib/Main.rb +1 -1
- data/lib/rpsg/version.rb +1 -1
- data/rpsg.gemspec +8 -7
- data/test/test_rpsg.rb +6 -0
- metadata +77 -27
- data/test/rpsg.rb +0 -2
data/docs/index.md
ADDED
@@ -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
|
data/docs/script/cibuild
ADDED
data/docs/script/release
ADDED
@@ -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"
|
data/docs/script/server
ADDED
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
|
+
|
data/docs/thumbnail.png
ADDED
Binary file
|
data/lib/Main.rb
CHANGED
data/lib/rpsg/version.rb
CHANGED
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.
|
3
|
+
spec.version = "0.2.5"
|
4
4
|
spec.date = "2017-10-13"
|
5
|
-
spec.summary = "A Rock Paper Scissors Game
|
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.
|
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
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
|
+
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:
|
14
|
+
name: bundler
|
15
15
|
requirement: !ruby/object:Gem::Requirement
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: '
|
19
|
+
version: '1.14'
|
20
20
|
- - ">="
|
21
21
|
- !ruby/object:Gem::Version
|
22
|
-
version:
|
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: '
|
29
|
+
version: '1.14'
|
30
30
|
- - ">="
|
31
31
|
- !ruby/object:Gem::Version
|
32
|
-
version:
|
32
|
+
version: 1.14.6
|
33
33
|
- !ruby/object:Gem::Dependency
|
34
|
-
name:
|
34
|
+
name: rake
|
35
35
|
requirement: !ruby/object:Gem::Requirement
|
36
36
|
requirements:
|
37
37
|
- - "~>"
|
38
38
|
- !ruby/object:Gem::Version
|
39
|
-
version: '
|
39
|
+
version: '12.0'
|
40
40
|
- - ">="
|
41
41
|
- !ruby/object:Gem::Version
|
42
|
-
version:
|
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: '
|
49
|
+
version: '12.0'
|
50
50
|
- - ">="
|
51
51
|
- !ruby/object:Gem::Version
|
52
|
-
version:
|
52
|
+
version: 12.0.0
|
53
53
|
- !ruby/object:Gem::Dependency
|
54
|
-
name:
|
54
|
+
name: rdoc
|
55
55
|
requirement: !ruby/object:Gem::Requirement
|
56
56
|
requirements:
|
57
57
|
- - "~>"
|
58
58
|
- !ruby/object:Gem::Version
|
59
|
-
version: '1
|
59
|
+
version: '5.1'
|
60
60
|
- - ">="
|
61
61
|
- !ruby/object:Gem::Version
|
62
|
-
version: 1.
|
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
|
69
|
+
version: '5.1'
|
70
70
|
- - ">="
|
71
71
|
- !ruby/object:Gem::Version
|
72
|
-
version: 1.
|
72
|
+
version: 5.1.0
|
73
73
|
- !ruby/object:Gem::Dependency
|
74
|
-
name:
|
74
|
+
name: rvm
|
75
75
|
requirement: !ruby/object:Gem::Requirement
|
76
76
|
requirements:
|
77
77
|
- - "~>"
|
78
78
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
79
|
+
version: '1.11'
|
80
80
|
- - ">="
|
81
81
|
- !ruby/object:Gem::Version
|
82
|
-
version:
|
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: '
|
89
|
+
version: '1.11'
|
90
90
|
- - ">="
|
91
91
|
- !ruby/object:Gem::Version
|
92
|
-
version:
|
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/
|
163
|
-
homepage: https://github.
|
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
|
-
|
169
|
-
|
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
|
239
|
+
summary: A Rock Paper Scissors Game RubyGem
|
190
240
|
test_files: []
|
data/test/rpsg.rb
DELETED