Skip to content

Commit

Permalink
Added rack-flash gem
Browse files Browse the repository at this point in the history
  • Loading branch information
lisahamm committed Feb 26, 2015
1 parent bd513c7 commit af668e9
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,5 @@ source 'https://rubygems.org'
gem 'sinatra', require: 'sinatra/base'
gem 'rspec'
gem 'tic_tac_toe', :github => 'lisahamm/tic_tac_toe'
gem 'rack-test'
gem 'rack-test'
gem 'rack-flash3'
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,8 @@ GEM
specs:
diff-lcs (1.2.5)
rack (1.6.0)
rack-flash3 (1.0.5)
rack
rack-protection (1.5.3)
rack
rack-test (0.6.3)
Expand Down Expand Up @@ -36,6 +38,7 @@ PLATFORMS
ruby

DEPENDENCIES
rack-flash3
rack-test
rspec
sinatra
Expand Down
3 changes: 3 additions & 0 deletions tic_tac_toe_controller.rb
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require 'sinatra/base'
require 'rack-flash'
require 'tic_tac_toe'
require './lib/game_setup'

class TicTacToeController < Sinatra::Base
enable :sessions
use Rack::Flash

get '/' do
session.clear
Expand All @@ -13,6 +15,7 @@ class TicTacToeController < Sinatra::Base
post '/setup' do
@setup = GameSetup.new(params)
if @setup.invalid?
@
erb :index
else
session[:mark] = params[:player_mark]
Expand Down

0 comments on commit af668e9

Please sign in to comment.