PlayRo2kPaperScissorsGame 2.0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- checksums.yaml.gz.sig +2 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +7 -0
- data/Gemfile +11 -0
- data/LICENSE +21 -0
- data/README.md +38 -0
- data/Rakefile +17 -0
- data/bin/PlayRockPaperScissorsGame +101 -0
- data/bin/rps +101 -0
- data/certs/gem-public_cert.pem +21 -0
- data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/jekyll-theme-cayman.scssc +0 -0
- data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/normalize.scssc +0 -0
- data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/rouge-github.scssc +0 -0
- data/docs/.sass-cache/0bc0c5468b7b8503d88d58cb41833a568e45e28c/variables.scssc +0 -0
- data/docs/CODE_OF_CONDUCT.md +84 -0
- data/docs/CONTRIBUTING.md +43 -0
- data/docs/Gemfile +4 -0
- data/docs/LICENSE +116 -0
- data/docs/Testing.md +24 -0
- data/docs/_config.yml +11 -0
- data/docs/_layouts/default.html +48 -0
- data/docs/_sass/jekyll-theme-cayman.scss +345 -0
- data/docs/_sass/normalize.scss +424 -0
- data/docs/_sass/rouge-github.scss +209 -0
- data/docs/_sass/variables.scss +23 -0
- data/docs/_site/CODE_OF_CONDUCT.html +127 -0
- data/docs/_site/CONTRIBUTING.html +86 -0
- data/docs/_site/Testing.html +68 -0
- data/docs/_site/assets/css/style.css +318 -0
- data/docs/_site/index.html +126 -0
- data/docs/_site/script/bootstrap +6 -0
- data/docs/_site/script/cibuild +6 -0
- data/docs/_site/script/release +42 -0
- data/docs/_site/script/server +3 -0
- data/docs/assets/css/style.scss +4 -0
- data/docs/index.md +59 -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/thumbnail.png +0 -0
- data/exec/rps.bash +73 -0
- data/exec/run.bat +26 -0
- data/exec/uninstall.sh +32 -0
- data/lib/ref/Constants.rb +24 -0
- data/lib/ref/PrivateMethods.rb +30 -0
- data/lib/rps.rb +66 -0
- data/lib/rps/version.rb +3 -0
- data/rps.gemspec +38 -0
- data/test/test_rps.rb +97 -0
- metadata +188 -0
- metadata.gz.sig +0 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 784e30ad68bac81791ecec003a8f96b499afa52a
|
4
|
+
data.tar.gz: 0e0733c3c4df0ac76ea7f018a0d11bb4349eb1a1
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: de063fb992a1a1f75bb3277abec0f2d9ebd4887e7772e24bd152c0174331e84f76ba48e89748d27ece3cfed773ad1cbed2590b69c58c8cec237332f63403df96
|
7
|
+
data.tar.gz: 301451c98fc5e291abf3491da4a08e5b7097b2b1a3e299e3f6fb663daacbde448e16fb1495f03cbc79b06352313f5f616186cd41820ea89cf373025bce18498b
|
checksums.yaml.gz.sig
ADDED
data.tar.gz.sig
ADDED
Binary file
|
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,11 @@
|
|
1
|
+
source 'https://rubygems.org'
|
2
|
+
ruby '>= 2.0.0'
|
3
|
+
platform :ruby do
|
4
|
+
gemspec
|
5
|
+
group :test do
|
6
|
+
gem 'bundler' , '~> 1.14.6' , :require => true
|
7
|
+
gem 'colorize', '~> 0.8.1' , :require => true
|
8
|
+
gem 'rake' , '~> 12.0.0' , :require => true
|
9
|
+
gem 'rvm' , '~> 1.11.3.9', :require => true
|
10
|
+
end
|
11
|
+
end
|
data/LICENSE
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License
|
2
|
+
|
3
|
+
Copyright (c) 2010-2017 Google, Inc. http://angularjs.org
|
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,38 @@
|
|
1
|
+
[//]: # (start)
|
2
|
+
|
3
|
+
Rock Paper Scissors
|
4
|
+
===================
|
5
|
+
|
6
|
+
How to Run and Install
|
7
|
+
----------------------
|
8
|
+
|
9
|
+
### Install and Run on Mac
|
10
|
+
|
11
|
+
1. Run the `rps.bash` file (located in the `exec` folder) with the `Terminal`
|
12
|
+
|
13
|
+
#### Running
|
14
|
+
|
15
|
+
1. Open the `Terminal`
|
16
|
+
2. Type in: `rps`, or `PlayRockPaperScissorsGame`
|
17
|
+
3. Hit <kbd>return</kbd>
|
18
|
+
|
19
|
+
#### Uninstalling
|
20
|
+
|
21
|
+
1. Run the `uninstaller.sh` file (located in the `exec` folder) with the `Terminal`
|
22
|
+
|
23
|
+
### Install and Run on Windows
|
24
|
+
|
25
|
+
1. Download and install Ruby for Windows (if not already installed); download [here](https://rubyinstaller.org/downloads/)
|
26
|
+
2. Open `cmd` and type in: `gem install PlayRockPaperScissorsGame`; hit <kbd>enter</kbd>
|
27
|
+
3. Run the `rps.bat` file (located in the `exec` folder)
|
28
|
+
|
29
|
+
#### Running
|
30
|
+
|
31
|
+
1. Open the `rps.bat` file (located in the `exec` folder)
|
32
|
+
* Another option: type in `rps` or `PlayRockPaperScissorsGame` in the `Command Prompt`
|
33
|
+
|
34
|
+
## Links
|
35
|
+
|
36
|
+
* [Ruby Gems Page](https://rubygems.org/gems/PlayRockPaperScissorsGame)
|
37
|
+
|
38
|
+
[//]: # (end)
|
data/Rakefile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
task :default => [:test, :PlayRockPaperScissorsGame, :rps]
|
2
|
+
|
3
|
+
file_path = "./test/test_rps.rb"
|
4
|
+
|
5
|
+
# rps = Regexp.new(/\A((PlayRockPaperScissorsGame)(\-)(\d\.\d\.\d)(\.gem))\z/)
|
6
|
+
|
7
|
+
task :test do
|
8
|
+
ruby file_path
|
9
|
+
end
|
10
|
+
|
11
|
+
task :PlayRockPaperScissorsGame do
|
12
|
+
ruby file_path
|
13
|
+
end
|
14
|
+
|
15
|
+
task :rps do
|
16
|
+
ruby file_path
|
17
|
+
end
|
@@ -0,0 +1,101 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
=begin
|
4
|
+
|====================================|
|
5
|
+
| Req Ruby Ver | Req Ruby Gems Ver |
|
6
|
+
|--------------|---------------------|
|
7
|
+
| >= v2.0.0 | >= v2.6.10 |
|
8
|
+
|====================================|
|
9
|
+
=end
|
10
|
+
|
11
|
+
|
12
|
+
class PlayRockPaperScissorsGame
|
13
|
+
|
14
|
+
require "colorized_string"
|
15
|
+
ColorizedString.colors
|
16
|
+
ColorizedString.modes
|
17
|
+
|
18
|
+
module Constants
|
19
|
+
protected
|
20
|
+
NTRY_TO_SYM = { 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS }
|
21
|
+
VALID_ENTRIES = NTRY_TO_SYM.keys
|
22
|
+
COMPUTER_CHOICES = NTRY_TO_SYM.values
|
23
|
+
WINNERS = [[:SCISSORS, :PAPER], [:PAPER, :ROCK], [:ROCK, :SCISSORS]] # format: player choice, computer choice
|
24
|
+
LOSERS = WINNERS.map { |i,j| [j,i] } # this will take the original WINNERS array and flip the symbols, thus returning a loss for the user/player
|
25
|
+
INIT_STRINGS = ["You are about to enter a rock-paper-scissors best of 3 match.", "Press the return/enter key to continue...", ""]
|
26
|
+
end
|
27
|
+
|
28
|
+
class << self
|
29
|
+
def continue(str1, str2, str3)
|
30
|
+
puts ColorizedString[str1].colorize(:color => :green)
|
31
|
+
print ColorizedString[str2].colorize(:color => :green)
|
32
|
+
gets
|
33
|
+
puts ColorizedString[str3].colorize(:color => :green)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
continue(Constants::INIT_STRINGS[0], Constants::INIT_STRINGS[1], Constants::INIT_STRINGS[2])
|
37
|
+
def initialize
|
38
|
+
@player_score = @computer_score = @ties = 0
|
39
|
+
end
|
40
|
+
def play(winning_score)
|
41
|
+
while @player_score < winning_score && @computer_score < winning_score
|
42
|
+
puts ColorizedString["Player score: #{@player_score}, "].colorize(:blue) +
|
43
|
+
ColorizedString["Computer score: #{@computer_score}, Ties: #{@ties}"].colorize(:blue)
|
44
|
+
player = PrivateMethods.player_choice
|
45
|
+
computer = Constants::COMPUTER_CHOICES.sample
|
46
|
+
puts ColorizedString["\nPlayer chooses #{player.to_s.downcase}"].colorize(:blue)
|
47
|
+
puts ColorizedString["Computer chooses #{computer.to_s.downcase}"].colorize(:blue)
|
48
|
+
case PrivateMethods.player_outcome [player, computer]
|
49
|
+
when :WIN
|
50
|
+
puts ColorizedString["#{player.to_s.capitalize} beats #{computer.to_s.downcase}, player wins the round"].colorize(:red)
|
51
|
+
@player_score += 1
|
52
|
+
when :LOSE
|
53
|
+
puts ColorizedString["#{computer.to_s.capitalize} beats #{player.to_s.downcase}, computer wins the round"].colorize(:red)
|
54
|
+
@computer_score += 1
|
55
|
+
else
|
56
|
+
puts ColorizedString["Tie, choose again"].colorize(:red)
|
57
|
+
@ties += 1
|
58
|
+
end
|
59
|
+
end
|
60
|
+
puts ColorizedString["\nFinal score: player: #{@player_score}, "].colorize(:blue) +
|
61
|
+
ColorizedString["computer: #{@computer_score} (ties: #{@ties})"].colorize(:blue)
|
62
|
+
case PrivateMethods.final_outcome(@player_score, @computer_score)
|
63
|
+
when :WIN
|
64
|
+
puts ColorizedString["Player wins!"].colorize(:red)
|
65
|
+
when :LOSE
|
66
|
+
puts ColorizedString["Computer wins!"].colorize(:red)
|
67
|
+
else
|
68
|
+
puts ColorizedString["It's a tie!"].colorize(:red)
|
69
|
+
end
|
70
|
+
gets
|
71
|
+
end
|
72
|
+
module PrivateMethods
|
73
|
+
private
|
74
|
+
class << self
|
75
|
+
def player_choice
|
76
|
+
loop do
|
77
|
+
print ColorizedString["Choose rock (r), paper (p) or scissors (s): "].colorize(:green)
|
78
|
+
choice = gets.chomp.downcase
|
79
|
+
if Constants::NTRY_TO_SYM.key?(choice)
|
80
|
+
return Constants::NTRY_TO_SYM[choice]
|
81
|
+
elsif choice != Constants::VALID_ENTRIES
|
82
|
+
puts ColorizedString["That entry is invalid. Please re-enter."].colorize(:green)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
def player_outcome(plays)
|
87
|
+
return :WIN if Constants::WINNERS.include?(plays)
|
88
|
+
return :LOSE if Constants::LOSERS.include?(plays)
|
89
|
+
return :TIE if !:WIN | !:LOSE
|
90
|
+
end
|
91
|
+
def final_outcome(pl, co)
|
92
|
+
return :WIN if pl > co
|
93
|
+
return :LOSE if pl < co
|
94
|
+
return :TIE if pl = co
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
PlayRockPaperScissorsGame.new.play(2) # best of 3
|
101
|
+
|
data/bin/rps
ADDED
@@ -0,0 +1,101 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
=begin
|
4
|
+
|====================================|
|
5
|
+
| Req Ruby Ver | Req Ruby Gems Ver |
|
6
|
+
|--------------|---------------------|
|
7
|
+
| >= v2.0.0 | >= v2.6.10 |
|
8
|
+
|====================================|
|
9
|
+
=end
|
10
|
+
|
11
|
+
|
12
|
+
class PlayRockPaperScissorsGame
|
13
|
+
|
14
|
+
require "colorized_string"
|
15
|
+
ColorizedString.colors
|
16
|
+
ColorizedString.modes
|
17
|
+
|
18
|
+
module Constants
|
19
|
+
protected
|
20
|
+
NTRY_TO_SYM = { 'p' => :PAPER, 'r' => :ROCK, 's' => :SCISSORS }
|
21
|
+
VALID_ENTRIES = NTRY_TO_SYM.keys
|
22
|
+
COMPUTER_CHOICES = NTRY_TO_SYM.values
|
23
|
+
WINNERS = [[:SCISSORS, :PAPER], [:PAPER, :ROCK], [:ROCK, :SCISSORS]] # format: player choice, computer choice
|
24
|
+
LOSERS = WINNERS.map { |i,j| [j,i] } # this will take the original WINNERS array and flip the symbols, thus returning a loss for the user/player
|
25
|
+
INIT_STRINGS = ["You are about to enter a rock-paper-scissors best of 3 match.", "Press the return/enter key to continue...", ""]
|
26
|
+
end
|
27
|
+
|
28
|
+
class << self
|
29
|
+
def continue(str1, str2, str3)
|
30
|
+
puts ColorizedString[str1].colorize(:color => :green)
|
31
|
+
print ColorizedString[str2].colorize(:color => :green)
|
32
|
+
gets
|
33
|
+
puts ColorizedString[str3].colorize(:color => :green)
|
34
|
+
end
|
35
|
+
end
|
36
|
+
continue(Constants::INIT_STRINGS[0], Constants::INIT_STRINGS[1], Constants::INIT_STRINGS[2])
|
37
|
+
def initialize
|
38
|
+
@player_score = @computer_score = @ties = 0
|
39
|
+
end
|
40
|
+
def play(winning_score)
|
41
|
+
while @player_score < winning_score && @computer_score < winning_score
|
42
|
+
puts ColorizedString["Player score: #{@player_score}, "].colorize(:blue) +
|
43
|
+
ColorizedString["Computer score: #{@computer_score}, Ties: #{@ties}"].colorize(:blue)
|
44
|
+
player = PrivateMethods.player_choice
|
45
|
+
computer = Constants::COMPUTER_CHOICES.sample
|
46
|
+
puts ColorizedString["\nPlayer chooses #{player.to_s.downcase}"].colorize(:blue)
|
47
|
+
puts ColorizedString["Computer chooses #{computer.to_s.downcase}"].colorize(:blue)
|
48
|
+
case PrivateMethods.player_outcome [player, computer]
|
49
|
+
when :WIN
|
50
|
+
puts ColorizedString["#{player.to_s.capitalize} beats #{computer.to_s.downcase}, player wins the round"].colorize(:red)
|
51
|
+
@player_score += 1
|
52
|
+
when :LOSE
|
53
|
+
puts ColorizedString["#{computer.to_s.capitalize} beats #{player.to_s.downcase}, computer wins the round"].colorize(:red)
|
54
|
+
@computer_score += 1
|
55
|
+
else
|
56
|
+
puts ColorizedString["Tie, choose again"].colorize(:red)
|
57
|
+
@ties += 1
|
58
|
+
end
|
59
|
+
end
|
60
|
+
puts ColorizedString["\nFinal score: player: #{@player_score}, "].colorize(:blue) +
|
61
|
+
ColorizedString["computer: #{@computer_score} (ties: #{@ties})"].colorize(:blue)
|
62
|
+
case PrivateMethods.final_outcome(@player_score, @computer_score)
|
63
|
+
when :WIN
|
64
|
+
puts ColorizedString["Player wins!"].colorize(:red)
|
65
|
+
when :LOSE
|
66
|
+
puts ColorizedString["Computer wins!"].colorize(:red)
|
67
|
+
else
|
68
|
+
puts ColorizedString["It's a tie!"].colorize(:red)
|
69
|
+
end
|
70
|
+
gets
|
71
|
+
end
|
72
|
+
module PrivateMethods
|
73
|
+
private
|
74
|
+
class << self
|
75
|
+
def player_choice
|
76
|
+
loop do
|
77
|
+
print ColorizedString["Choose rock (r), paper (p) or scissors (s): "].colorize(:green)
|
78
|
+
choice = gets.chomp.downcase
|
79
|
+
if Constants::NTRY_TO_SYM.key?(choice)
|
80
|
+
return Constants::NTRY_TO_SYM[choice]
|
81
|
+
elsif choice != Constants::VALID_ENTRIES
|
82
|
+
puts ColorizedString["That entry is invalid. Please re-enter."].colorize(:green)
|
83
|
+
end
|
84
|
+
end
|
85
|
+
end
|
86
|
+
def player_outcome(plays)
|
87
|
+
return :WIN if Constants::WINNERS.include?(plays)
|
88
|
+
return :LOSE if Constants::LOSERS.include?(plays)
|
89
|
+
return :TIE if !:WIN | !:LOSE
|
90
|
+
end
|
91
|
+
def final_outcome(pl, co)
|
92
|
+
return :WIN if pl > co
|
93
|
+
return :LOSE if pl < co
|
94
|
+
return :TIE if pl = co
|
95
|
+
end
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
|
100
|
+
PlayRockPaperScissorsGame.new.play(2) # best of 3
|
101
|
+
|
@@ -0,0 +1,21 @@
|
|
1
|
+
-----BEGIN CERTIFICATE-----
|
2
|
+
MIIDeDCCAmCgAwIBAgIBATANBgkqhkiG9w0BAQUFADBBMREwDwYDVQQDDAhiZ2xh
|
3
|
+
dG1hbjEXMBUGCgmSJomT8ixkARkWB291dGxvb2sxEzARBgoJkiaJk/IsZAEZFgNj
|
4
|
+
b20wHhcNMTcwNDAyMDEyOTQwWhcNMTgwNDAyMDEyOTQwWjBBMREwDwYDVQQDDAhi
|
5
|
+
Z2xhdG1hbjEXMBUGCgmSJomT8ixkARkWB291dGxvb2sxEzARBgoJkiaJk/IsZAEZ
|
6
|
+
FgNjb20wggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIBAQCobCcJo3TCvHRH
|
7
|
+
2AoBeTsbqbBq520yXYGvRvqdswtk9t2cg5hTuidnAJiNJZbNeuOZl3CvZOJ0U+tw
|
8
|
+
E2oTD+8tGiAE8Ho8Umki1zUIgW8g8+ilU2qeitC0/7Xh4rPwyOtdGr5xjEOtj64l
|
9
|
+
e2E6WHQQg6hmmk55ctVZSrHVMzqARsV6TTZ6/zoSE1dzryT37OFMb7/EBhOYOb3s
|
10
|
+
lTaWY+jkNKBgWXdsr2oxIePkiXwJFkifLR/uUr56sXIImuF1nBlRvuGbXxuKvkly
|
11
|
+
Qh6gsRdxtH7umkUHpmac4FTGqEWRitqJ7zTwEz4vshjxzJvno1J8D1+qePPk3vGo
|
12
|
+
qMoi8q3TAgMBAAGjezB5MAkGA1UdEwQCMAAwCwYDVR0PBAQDAgSwMB0GA1UdDgQW
|
13
|
+
BBRv+mG+p3ADhNgDHyv6stgPd1h4wTAfBgNVHREEGDAWgRRiZ2xhdG1hbkBvdXRs
|
14
|
+
b29rLmNvbTAfBgNVHRIEGDAWgRRiZ2xhdG1hbkBvdXRsb29rLmNvbTANBgkqhkiG
|
15
|
+
9w0BAQUFAAOCAQEAo25ZtSEJTez3RKoRItilWNzRDZYpPp6spZ6Bufs3KvL20RwN
|
16
|
+
eb8NLJ4G3fCU9Drr1g7GHBHHNBXXxCezXZDjDswUBZipU8QCvAQVZvbekFweJFWE
|
17
|
+
U+vgOznS1S0ZrPxUvhLaTiUlglZMctFtH6dkKyLKw6V/pz59KYxSynhkhhTt8b+R
|
18
|
+
Sc46qCgDGIB20M+iZ9E4jqsnfPywKcp022Lh7dK4NDUccQPHeb/LCJC/3OBotZhL
|
19
|
+
ft+uhriUZSVDBJRLSlrQEH2f0866a9dA4oUmvvFU46Mh6pozDjOcLJIp/tCnbVOc
|
20
|
+
HSdXPrjfOoDbhBPH/4wUd5P0rDoNKN1hxH4SzA==
|
21
|
+
-----END CERTIFICATE-----
|
Binary file
|
@@ -0,0 +1,84 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
# Contributor Covenant Code of Conduct
|
6
|
+
|
7
|
+
## Our Pledge
|
8
|
+
|
9
|
+
In the interest of fostering an open and welcoming environment, we as
|
10
|
+
contributors and maintainers pledge to making participation in our project and
|
11
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
12
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
13
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
14
|
+
orientation.
|
15
|
+
|
16
|
+
## Our Standards
|
17
|
+
|
18
|
+
Examples of behavior that contributes to creating a positive environment
|
19
|
+
include:
|
20
|
+
|
21
|
+
* Using welcoming and inclusive language
|
22
|
+
* Being respectful of differing viewpoints and experiences
|
23
|
+
* Gracefully accepting constructive criticism
|
24
|
+
* Focusing on what is best for the community
|
25
|
+
* Showing empathy towards other community members
|
26
|
+
|
27
|
+
Examples of unacceptable behavior by participants include:
|
28
|
+
|
29
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
30
|
+
advances
|
31
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
32
|
+
* Public or private harassment
|
33
|
+
* Publishing others' private information, such as a physical or electronic
|
34
|
+
address, without explicit permission
|
35
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
36
|
+
professional setting
|
37
|
+
|
38
|
+
## Our Responsibilities
|
39
|
+
|
40
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
41
|
+
behavior and are expected to take appropriate and fair corrective action in
|
42
|
+
response to any instances of unacceptable behavior.
|
43
|
+
|
44
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
45
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
46
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
47
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
48
|
+
threatening, offensive, or harmful.
|
49
|
+
|
50
|
+
## Scope
|
51
|
+
|
52
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
53
|
+
when an individual is representing the project or its community. Examples of
|
54
|
+
representing a project or community include using an official project e-mail
|
55
|
+
address, posting via an official social media account, or acting as an appointed
|
56
|
+
representative at an online or offline event. Representation of a project may be
|
57
|
+
further defined and clarified by project maintainers.
|
58
|
+
|
59
|
+
## Enforcement
|
60
|
+
|
61
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
62
|
+
reported by contacting the project team at https://github.com/contact/report-abuse. All
|
63
|
+
complaints will be reviewed and investigated and will result in a response that
|
64
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
65
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
66
|
+
Further details of specific enforcement policies may be posted separately.
|
67
|
+
|
68
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
69
|
+
faith may face temporary or permanent repercussions as determined by other
|
70
|
+
members of the project's leadership.
|
71
|
+
|
72
|
+
## Attribution
|
73
|
+
|
74
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
75
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
76
|
+
|
77
|
+
[homepage]: http://contributor-covenant.org
|
78
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
79
|
+
|
80
|
+
------------
|
81
|
+
|
82
|
+
## Site Nav
|
83
|
+
|
84
|
+
[Home](./) | [Contributing](CONTRIBUTING) | [How to Test](Testing)
|
@@ -0,0 +1,43 @@
|
|
1
|
+
---
|
2
|
+
layout: default
|
3
|
+
---
|
4
|
+
|
5
|
+
## Contributing
|
6
|
+
|
7
|
+
Hi there! We're thrilled that you'd like to contribute to this project. Your help is essential for keeping it great.
|
8
|
+
|
9
|
+
Please note that this project is released with a [Contributor Code of Conduct][code-of-conduct]. By participating in this project you agree to abide by its terms.
|
10
|
+
|
11
|
+
## Submitting a pull request
|
12
|
+
|
13
|
+
0. [Fork][fork] and clone the repository
|
14
|
+
0. Configure and install the dependencies: `script/bootstrap`
|
15
|
+
0. Make sure the tests pass on your machine: `script/cibuild`
|
16
|
+
0. Create a new branch: `git checkout -b my-branch-name`
|
17
|
+
0. Make your change, add tests, and make sure the tests still pass
|
18
|
+
0. Push to your fork and [submit a pull request][pr]
|
19
|
+
0. Pat your self on the back and wait for your pull request to be reviewed and merged.
|
20
|
+
|
21
|
+
Here are a few things you can do that will increase the likelihood of your pull request being accepted:
|
22
|
+
|
23
|
+
- Follow the [style guide][style].
|
24
|
+
- Write tests.
|
25
|
+
- Keep your change as focused as possible. If there are multiple changes you would like to make that are not dependent upon each other, consider submitting them as separate pull requests.
|
26
|
+
- Write a [good commit message](http://tbaggery.com/2008/04/19/a-note-about-git-commit-messages.html).
|
27
|
+
|
28
|
+
## Resources
|
29
|
+
|
30
|
+
- [Contributing to Open Source on GitHub](https://guides.github.com/activities/contributing-to-open-source/)
|
31
|
+
- [Using Pull Requests](https://help.github.com/articles/using-pull-requests/)
|
32
|
+
- [GitHub Help](https://help.github.com)
|
33
|
+
|
34
|
+
[fork]: https://github.com/pages-themes/cayman/fork
|
35
|
+
[pr]: https://github.com/pages-themes/cayman/compare
|
36
|
+
[style]: http://ben.balter.com/jekyll-style-guide/
|
37
|
+
[code-of-conduct]: CODE_OF_CONDUCT.md
|
38
|
+
|
39
|
+
------------
|
40
|
+
|
41
|
+
## Site Nav
|
42
|
+
|
43
|
+
[Home](./) | [Code of Conduct](CODE_OF_CONDUCT) | [How to Test](Testing.md)
|