ttt_web 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +12 -0
- data/.rspec +2 -0
- data/.travis.yml +5 -0
- data/CODE_OF_CONDUCT.md +74 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +41 -0
- data/Rakefile +6 -0
- data/bin/console +14 -0
- data/bin/setup +8 -0
- data/bin/ttt_web +3 -0
- data/config.ru +6 -0
- data/lib/app.rb +55 -0
- data/lib/public/css/main.css +65 -0
- data/lib/public/img/O.svg +7 -0
- data/lib/public/img/X.svg +7 -0
- data/lib/public/img/background.png +0 -0
- data/lib/ttt_web/version.rb +3 -0
- data/lib/ttt_web.rb +5 -0
- data/lib/views/index.erb +41 -0
- data/lib/views/layout.erb +4 -0
- data/lib/views/outcome.erb +20 -0
- data/lib/views/play.erb +18 -0
- data/lib/web_player.rb +14 -0
- data/ttt_web.gemspec +31 -0
- metadata +167 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 3a480b810282041835d649dcc2ea7ad3d8d5bc90
|
4
|
+
data.tar.gz: 86bbe6236cbba89dce0b4a5cf2a6588ae53ea1de
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: ef71230a7bfeea11541633e007846b734cf15c10b149ec7de429ca2cf32fa15b41ab6a81e9ed1493399328171882e6c595ca95591cb002df0706ba1f2f4eadf5
|
7
|
+
data.tar.gz: 0c854278ddcacd4c56bb2bcb0c01703ff5d10157c4b4e52ca8e4ba3ffb602baeeea5793badde0e1e6a451c7dd9e24106355bd4a3826aa5e265c4abbb336088fd
|
data/.gitignore
ADDED
data/.rspec
ADDED
data/.travis.yml
ADDED
data/CODE_OF_CONDUCT.md
ADDED
@@ -0,0 +1,74 @@
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
2
|
+
|
3
|
+
## Our Pledge
|
4
|
+
|
5
|
+
In the interest of fostering an open and welcoming environment, we as
|
6
|
+
contributors and maintainers pledge to making participation in our project and
|
7
|
+
our community a harassment-free experience for everyone, regardless of age, body
|
8
|
+
size, disability, ethnicity, gender identity and expression, level of experience,
|
9
|
+
nationality, personal appearance, race, religion, or sexual identity and
|
10
|
+
orientation.
|
11
|
+
|
12
|
+
## Our Standards
|
13
|
+
|
14
|
+
Examples of behavior that contributes to creating a positive environment
|
15
|
+
include:
|
16
|
+
|
17
|
+
* Using welcoming and inclusive language
|
18
|
+
* Being respectful of differing viewpoints and experiences
|
19
|
+
* Gracefully accepting constructive criticism
|
20
|
+
* Focusing on what is best for the community
|
21
|
+
* Showing empathy towards other community members
|
22
|
+
|
23
|
+
Examples of unacceptable behavior by participants include:
|
24
|
+
|
25
|
+
* The use of sexualized language or imagery and unwelcome sexual attention or
|
26
|
+
advances
|
27
|
+
* Trolling, insulting/derogatory comments, and personal or political attacks
|
28
|
+
* Public or private harassment
|
29
|
+
* Publishing others' private information, such as a physical or electronic
|
30
|
+
address, without explicit permission
|
31
|
+
* Other conduct which could reasonably be considered inappropriate in a
|
32
|
+
professional setting
|
33
|
+
|
34
|
+
## Our Responsibilities
|
35
|
+
|
36
|
+
Project maintainers are responsible for clarifying the standards of acceptable
|
37
|
+
behavior and are expected to take appropriate and fair corrective action in
|
38
|
+
response to any instances of unacceptable behavior.
|
39
|
+
|
40
|
+
Project maintainers have the right and responsibility to remove, edit, or
|
41
|
+
reject comments, commits, code, wiki edits, issues, and other contributions
|
42
|
+
that are not aligned to this Code of Conduct, or to ban temporarily or
|
43
|
+
permanently any contributor for other behaviors that they deem inappropriate,
|
44
|
+
threatening, offensive, or harmful.
|
45
|
+
|
46
|
+
## Scope
|
47
|
+
|
48
|
+
This Code of Conduct applies both within project spaces and in public spaces
|
49
|
+
when an individual is representing the project or its community. Examples of
|
50
|
+
representing a project or community include using an official project e-mail
|
51
|
+
address, posting via an official social media account, or acting as an appointed
|
52
|
+
representative at an online or offline event. Representation of a project may be
|
53
|
+
further defined and clarified by project maintainers.
|
54
|
+
|
55
|
+
## Enforcement
|
56
|
+
|
57
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be
|
58
|
+
reported by contacting the project team at dan@pelensky.com. All
|
59
|
+
complaints will be reviewed and investigated and will result in a response that
|
60
|
+
is deemed necessary and appropriate to the circumstances. The project team is
|
61
|
+
obligated to maintain confidentiality with regard to the reporter of an incident.
|
62
|
+
Further details of specific enforcement policies may be posted separately.
|
63
|
+
|
64
|
+
Project maintainers who do not follow or enforce the Code of Conduct in good
|
65
|
+
faith may face temporary or permanent repercussions as determined by other
|
66
|
+
members of the project's leadership.
|
67
|
+
|
68
|
+
## Attribution
|
69
|
+
|
70
|
+
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 1.4,
|
71
|
+
available at [http://contributor-covenant.org/version/1/4][version]
|
72
|
+
|
73
|
+
[homepage]: http://contributor-covenant.org
|
74
|
+
[version]: http://contributor-covenant.org/version/1/4/
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2017 Dan Pelensky
|
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,41 @@
|
|
1
|
+
# TttWeb
|
2
|
+
|
3
|
+
Welcome to your new gem! In this directory, you'll find the files you need to be able to package up your Ruby library into a gem. Put your Ruby code in the file `lib/ttt_web`. To experiment with that code, run `bin/console` for an interactive prompt.
|
4
|
+
|
5
|
+
TODO: Delete this and the text above, and describe your gem
|
6
|
+
|
7
|
+
## Installation
|
8
|
+
|
9
|
+
Add this line to your application's Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'ttt_web'
|
13
|
+
```
|
14
|
+
|
15
|
+
And then execute:
|
16
|
+
|
17
|
+
$ bundle
|
18
|
+
|
19
|
+
Or install it yourself as:
|
20
|
+
|
21
|
+
$ gem install ttt_web
|
22
|
+
|
23
|
+
## Usage
|
24
|
+
|
25
|
+
TODO: Write usage instructions here
|
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]/ttt_web. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
36
|
+
|
37
|
+
|
38
|
+
## License
|
39
|
+
|
40
|
+
The gem is available as open source under the terms of the [MIT License](http://opensource.org/licenses/MIT).
|
41
|
+
|
data/Rakefile
ADDED
data/bin/console
ADDED
@@ -0,0 +1,14 @@
|
|
1
|
+
#!/usr/bin/env ruby
|
2
|
+
|
3
|
+
require "bundler/setup"
|
4
|
+
require "ttt_web"
|
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
data/bin/ttt_web
ADDED
data/config.ru
ADDED
data/lib/app.rb
ADDED
@@ -0,0 +1,55 @@
|
|
1
|
+
$LOAD_PATH << File.join(File.dirname(__FILE__))
|
2
|
+
require 'sinatra/base'
|
3
|
+
require 'game'
|
4
|
+
require 'board'
|
5
|
+
require 'web_player'
|
6
|
+
require 'simple_computer'
|
7
|
+
require 'perfect_computer'
|
8
|
+
|
9
|
+
class Web < Sinatra::Base
|
10
|
+
enable :sessions
|
11
|
+
set :session_secret, 'super secret'
|
12
|
+
|
13
|
+
get '/' do
|
14
|
+
erb(:index)
|
15
|
+
end
|
16
|
+
|
17
|
+
post '/new-game' do
|
18
|
+
board = Board.new(Array.new(params[:board_size].to_i ** 2))
|
19
|
+
player_x = create_player(params[:player_x], "X", session[:move_queue] = [])
|
20
|
+
player_o = create_player(params[:player_o], "O", session[:move_queue])
|
21
|
+
session[:game] = Game.new(board, player_x, player_o)
|
22
|
+
redirect '/play'
|
23
|
+
end
|
24
|
+
|
25
|
+
get '/play' do
|
26
|
+
@game = session[:game]
|
27
|
+
take_turn_and_redirect if !@game.current_player.is_a? WebPlayer
|
28
|
+
erb(:play)
|
29
|
+
end
|
30
|
+
|
31
|
+
post '/play' do
|
32
|
+
@game = session[:game]
|
33
|
+
move = session[:move_queue]
|
34
|
+
move.push(params[:selection].to_i)
|
35
|
+
take_turn_and_redirect
|
36
|
+
end
|
37
|
+
|
38
|
+
get '/outcome' do
|
39
|
+
@game = session[:game]
|
40
|
+
erb(:outcome)
|
41
|
+
end
|
42
|
+
|
43
|
+
def create_player(selection, marker, move_queue)
|
44
|
+
return WebPlayer.new(marker, move_queue) if selection == "human"
|
45
|
+
return SimpleComputer.new(marker) if selection == "simple_computer"
|
46
|
+
return PerfectComputer.new(marker) if selection == "expert_computer"
|
47
|
+
end
|
48
|
+
|
49
|
+
def take_turn_and_redirect
|
50
|
+
@game.take_turn
|
51
|
+
redirect @game.game_over? ? '/outcome' : '/play'
|
52
|
+
end
|
53
|
+
|
54
|
+
run! if app_file == $0
|
55
|
+
end
|
@@ -0,0 +1,65 @@
|
|
1
|
+
@import url(https://fonts.googleapis.com/css?family=Roboto:500,700);
|
2
|
+
|
3
|
+
html {
|
4
|
+
color: #222;
|
5
|
+
font-size: 1em;
|
6
|
+
line-height: 1.4;
|
7
|
+
font-weight: 500;
|
8
|
+
height: 100%;
|
9
|
+
}
|
10
|
+
|
11
|
+
body {
|
12
|
+
text-align: center;
|
13
|
+
color: #222;
|
14
|
+
font-family: 'Roboto', sans-serif;
|
15
|
+
height: 100%;
|
16
|
+
background-image: url("/img/background.png");
|
17
|
+
font-size: 2em;
|
18
|
+
}
|
19
|
+
|
20
|
+
table {
|
21
|
+
margin-left:auto;
|
22
|
+
margin-right:auto;
|
23
|
+
margin-top: 1em;
|
24
|
+
margin-bottom: 1em;
|
25
|
+
}
|
26
|
+
|
27
|
+
td {
|
28
|
+
text-align: center;
|
29
|
+
border: 1px solid black;
|
30
|
+
height: 5em;
|
31
|
+
width: 5em;
|
32
|
+
}
|
33
|
+
|
34
|
+
table button {
|
35
|
+
background:none;
|
36
|
+
text-decoration:none;
|
37
|
+
padding:0;
|
38
|
+
border:none;
|
39
|
+
display: inline-block;
|
40
|
+
height:100%;
|
41
|
+
width:100%;
|
42
|
+
}
|
43
|
+
|
44
|
+
#td-X{
|
45
|
+
background-image: url("/img/X.svg");
|
46
|
+
background-size: 90%;
|
47
|
+
background-repeat:no-repeat;
|
48
|
+
background-position: center center;
|
49
|
+
}
|
50
|
+
|
51
|
+
#td-O{
|
52
|
+
background-image: url("/img/O.svg");
|
53
|
+
background-size: 90%;
|
54
|
+
background-repeat:no-repeat;
|
55
|
+
background-position: center center;
|
56
|
+
}
|
57
|
+
|
58
|
+
h1 {
|
59
|
+
font-size: 1.5em;
|
60
|
+
}
|
61
|
+
|
62
|
+
a {
|
63
|
+
text-decoration: none;
|
64
|
+
color: #222;
|
65
|
+
}
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
5
|
+
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
6
|
+
<g><path d="M932.4,493.1C932.4,842.1,702,990,494,990C253.3,990,67.6,809.5,67.6,506.9C67.6,187.1,267,10,506,10C762.2,10,932.4,206,932.4,493.1z M500.9,121.8c-202.9,0-287.1,199.4-287.1,380c0,208,115.2,376.5,283.7,376.5c170.2,0,288.8-168.5,288.8-380C786.3,331.5,705.5,121.8,500.9,121.8z"/></g>
|
7
|
+
</svg>
|
@@ -0,0 +1,7 @@
|
|
1
|
+
<?xml version="1.0" encoding="utf-8"?>
|
2
|
+
<!-- Svg Vector Icons : http://www.onlinewebfonts.com/icon -->
|
3
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
4
|
+
<svg version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px" viewBox="0 0 1000 1000" enable-background="new 0 0 1000 1000" xml:space="preserve">
|
5
|
+
<metadata> Svg Vector Icons : http://www.onlinewebfonts.com/icon </metadata>
|
6
|
+
<g><path d="M964.7,157.6L622.3,500l342.4,342.4l0,0c15.7,15.7,25.3,37.3,25.3,61.1c0,47.7-38.7,86.5-86.5,86.5c-23.9,0-45.5-9.7-61.1-25.3l0,0L500,622.3L157.6,964.7l0,0C142,980.3,120.3,990,96.5,990C48.7,990,10,951.3,10,903.5c0-23.9,9.7-45.5,25.3-61.1l0,0L377.7,500L35.3,157.6l0,0C19.7,142,10,120.3,10,96.5C10,48.7,48.7,10,96.5,10c23.9,0,45.5,9.7,61.1,25.3l0,0L500,377.7L842.4,35.3l0,0C858,19.7,879.7,10,903.5,10c47.8,0,86.5,38.7,86.5,86.5C990,120.3,980.3,142,964.7,157.6L964.7,157.6z"/></g>
|
7
|
+
</svg>
|
Binary file
|
data/lib/ttt_web.rb
ADDED
data/lib/views/index.erb
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
<form action="/new-game" method="post">
|
2
|
+
<label for="player_x"> Player 'X' is a: </label>
|
3
|
+
<select id="player_x" name="player_x">
|
4
|
+
<option value="human" selected="selected">Human</option>
|
5
|
+
<option value="simple_computer">Simple Computer</option>
|
6
|
+
<option value="expert_computer">Expert Computer</option>
|
7
|
+
</select>
|
8
|
+
<br>
|
9
|
+
<label for="player_o"> Player 'O' is a: </label>
|
10
|
+
<select id="player_o" name="player_o">
|
11
|
+
<option value="human" selected="selected">Human</option>
|
12
|
+
<option value="simple_computer">Simple Computer</option>
|
13
|
+
<option value="expert_computer">Expert Computer</option>
|
14
|
+
</select>
|
15
|
+
<br>
|
16
|
+
<label for="board_size"> The board is: </label>
|
17
|
+
<select id="board_size" name="board_size">
|
18
|
+
<option value="3" selected="selected">Normal</option>
|
19
|
+
<option value="4"> Large </option>
|
20
|
+
</select>
|
21
|
+
<br>
|
22
|
+
<input type="submit" id="submit" value="Start Game">
|
23
|
+
</form>
|
24
|
+
|
25
|
+
<table>
|
26
|
+
<tr>
|
27
|
+
<td id="0"></td>
|
28
|
+
<td id="1"></td>
|
29
|
+
<td id="2"></td>
|
30
|
+
</tr>
|
31
|
+
<tr>
|
32
|
+
<td id="3"></td>
|
33
|
+
<td id="4"></td>
|
34
|
+
<td id="5"></td>
|
35
|
+
</tr>
|
36
|
+
<tr>
|
37
|
+
<td id="6"></td>
|
38
|
+
<td id="7"></td>
|
39
|
+
<td id="8"></td>
|
40
|
+
</tr>
|
41
|
+
</table>
|
@@ -0,0 +1,20 @@
|
|
1
|
+
<% if @game.board.winner %>
|
2
|
+
<%= @game.board.winner %> is the winner
|
3
|
+
<% else %>
|
4
|
+
Tied Game
|
5
|
+
<% end %>
|
6
|
+
|
7
|
+
<% @updated_board = @game.board.spaces.each_with_index.map {|space, index| !space.nil? ? space : index } %>
|
8
|
+
<table>
|
9
|
+
<% split_board = @updated_board.each_slice(@game.board.number_of_rows) %>
|
10
|
+
<% split_board.each_with_index do |row, row_index| %>
|
11
|
+
<tr>
|
12
|
+
<% row.each do |space| %>
|
13
|
+
<td id="td-<%= space %>"> <button type ="submit" name="selection" id="btn-<%= space %>" value="<%= space %>"</td>
|
14
|
+
<% end %>
|
15
|
+
</tr>
|
16
|
+
<% end %>
|
17
|
+
</table>
|
18
|
+
|
19
|
+
<a href="/"> Play Again? </a>
|
20
|
+
|
data/lib/views/play.erb
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
<%= @game.current_player.marker %>, take your turn
|
2
|
+
<% @updated_board = @game.board.spaces.each_with_index.map {|space, index| !space.nil? ? space : index } %>
|
3
|
+
<% @board_hash = @updated_board.each_with_index.map { |space, index | { index => space } } %>
|
4
|
+
|
5
|
+
|
6
|
+
|
7
|
+
<form action="/play" method="post">
|
8
|
+
<table>
|
9
|
+
<% split_board = @board_hash.each_slice(@game.board.number_of_rows) %>
|
10
|
+
<% split_board.each_with_index do |row, row_index| %>
|
11
|
+
<tr>
|
12
|
+
<% row.each do |space| %>
|
13
|
+
<td id="td-<%= space.values[0] %>"> <button type ="submit" name="selection" id="btn-<%= space.values[0] %>" value="<%= space.keys[0] %>" </td>
|
14
|
+
<% end %>
|
15
|
+
</tr>
|
16
|
+
<% end %>
|
17
|
+
</table>
|
18
|
+
</form>
|
data/lib/web_player.rb
ADDED
data/ttt_web.gemspec
ADDED
@@ -0,0 +1,31 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'ttt_web/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.name = "ttt_web"
|
8
|
+
spec.version = TttWeb::VERSION
|
9
|
+
spec.authors = ["Dan Pelensky"]
|
10
|
+
spec.email = ["dan@pelensky.com"]
|
11
|
+
|
12
|
+
spec.summary = "A Tic Tac Toe game playable on the Web"
|
13
|
+
spec.description = "Can be run on localhost. Uses my Core gem"
|
14
|
+
spec.homepage = "https://github.com/pelensky/ttt_web"
|
15
|
+
spec.license = "MIT"
|
16
|
+
|
17
|
+
spec.files = `git ls-files -z`.split("\x0").reject do |f|
|
18
|
+
f.match(%r{^(test|spec|features)/})
|
19
|
+
end
|
20
|
+
spec.bindir = "exe"
|
21
|
+
spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
22
|
+
spec.require_paths = ["lib"]
|
23
|
+
|
24
|
+
spec.add_development_dependency "bundler", "~> 1.14"
|
25
|
+
spec.add_development_dependency "rake", "~> 10.0"
|
26
|
+
spec.add_development_dependency "rspec", "~> 3.0"
|
27
|
+
spec.add_development_dependency "capybara"
|
28
|
+
spec.add_dependency "ttt_core", "~> 0.5.0"
|
29
|
+
spec.add_dependency "sinatra"
|
30
|
+
spec.add_dependency "shotgun"
|
31
|
+
end
|
metadata
ADDED
@@ -0,0 +1,167 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: ttt_web
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Dan Pelensky
|
8
|
+
autorequire:
|
9
|
+
bindir: exe
|
10
|
+
cert_chain: []
|
11
|
+
date: 2017-07-07 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.14'
|
20
|
+
type: :development
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.14'
|
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: capybara
|
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: ttt_core
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - "~>"
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: 0.5.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.5.0
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: sinatra
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :runtime
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
- !ruby/object:Gem::Dependency
|
98
|
+
name: shotgun
|
99
|
+
requirement: !ruby/object:Gem::Requirement
|
100
|
+
requirements:
|
101
|
+
- - ">="
|
102
|
+
- !ruby/object:Gem::Version
|
103
|
+
version: '0'
|
104
|
+
type: :runtime
|
105
|
+
prerelease: false
|
106
|
+
version_requirements: !ruby/object:Gem::Requirement
|
107
|
+
requirements:
|
108
|
+
- - ">="
|
109
|
+
- !ruby/object:Gem::Version
|
110
|
+
version: '0'
|
111
|
+
description: Can be run on localhost. Uses my Core gem
|
112
|
+
email:
|
113
|
+
- dan@pelensky.com
|
114
|
+
executables: []
|
115
|
+
extensions: []
|
116
|
+
extra_rdoc_files: []
|
117
|
+
files:
|
118
|
+
- ".gitignore"
|
119
|
+
- ".rspec"
|
120
|
+
- ".travis.yml"
|
121
|
+
- CODE_OF_CONDUCT.md
|
122
|
+
- Gemfile
|
123
|
+
- LICENSE.txt
|
124
|
+
- README.md
|
125
|
+
- Rakefile
|
126
|
+
- bin/console
|
127
|
+
- bin/setup
|
128
|
+
- bin/ttt_web
|
129
|
+
- config.ru
|
130
|
+
- lib/app.rb
|
131
|
+
- lib/public/css/main.css
|
132
|
+
- lib/public/img/O.svg
|
133
|
+
- lib/public/img/X.svg
|
134
|
+
- lib/public/img/background.png
|
135
|
+
- lib/ttt_web.rb
|
136
|
+
- lib/ttt_web/version.rb
|
137
|
+
- lib/views/index.erb
|
138
|
+
- lib/views/layout.erb
|
139
|
+
- lib/views/outcome.erb
|
140
|
+
- lib/views/play.erb
|
141
|
+
- lib/web_player.rb
|
142
|
+
- ttt_web.gemspec
|
143
|
+
homepage: https://github.com/pelensky/ttt_web
|
144
|
+
licenses:
|
145
|
+
- MIT
|
146
|
+
metadata: {}
|
147
|
+
post_install_message:
|
148
|
+
rdoc_options: []
|
149
|
+
require_paths:
|
150
|
+
- lib
|
151
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
152
|
+
requirements:
|
153
|
+
- - ">="
|
154
|
+
- !ruby/object:Gem::Version
|
155
|
+
version: '0'
|
156
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
157
|
+
requirements:
|
158
|
+
- - ">="
|
159
|
+
- !ruby/object:Gem::Version
|
160
|
+
version: '0'
|
161
|
+
requirements: []
|
162
|
+
rubyforge_project:
|
163
|
+
rubygems_version: 2.6.10
|
164
|
+
signing_key:
|
165
|
+
specification_version: 4
|
166
|
+
summary: A Tic Tac Toe game playable on the Web
|
167
|
+
test_files: []
|