Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,6 @@ source 'http://rubygems.org'

gem 'rake'
gem 'rspec'
gem 'superfight', github: "RubyoffRails/superfight"
gem 'sinatra'
gem 'shotgun'
gem 'about_jason', '~> 0.1.0', github: "jperezish/about_jason"
20 changes: 16 additions & 4 deletions Gemfile.lock
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
GIT
remote: git://github.com/RubyoffRails/superfight.git
revision: 75a5c4f724284ade4132f0a84acf3b2a8e126fcd
remote: git://github.com/jperezish/about_jason.git
revision: 2680921f5cce8a9ecd3b27260051a1ca1768098f
specs:
superfight (0.0.1)
about_jason (0.1.0)

GEM
remote: http://rubygems.org/
specs:
diff-lcs (1.1.3)
rack (1.5.2)
rack-protection (1.5.1)
rack
rake (0.9.2.2)
rspec (2.10.0)
rspec-core (~> 2.10.0)
Expand All @@ -17,11 +20,20 @@ GEM
rspec-expectations (2.10.0)
diff-lcs (~> 1.1.3)
rspec-mocks (2.10.1)
shotgun (0.9)
rack (>= 1.0)
sinatra (1.4.4)
rack (~> 1.4)
rack-protection (~> 1.4)
tilt (~> 1.3, >= 1.3.4)
tilt (1.4.1)

PLATFORMS
ruby

DEPENDENCIES
about_jason (~> 0.1.0)!
rake
rspec
superfight!
shotgun
sinatra
2 changes: 2 additions & 0 deletions config.ru
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
require "./niner"
run Sinatra::Application
20 changes: 6 additions & 14 deletions niner.rb
Original file line number Diff line number Diff line change
@@ -1,20 +1,12 @@
require 'rubygems'
require 'bundler/setup'
require 'sinatra'

Bundler.require

puts "--------------------------------"
puts "welcome to the superfight"
puts "--------------------------------"
puts ""
puts ""
puts ""

puts "What is your first fighter's name?"
fighter_a = $stdin.gets
puts "What is your second fighter's name?"
fighter_b = $stdin.gets

match = Match.new(Fighter.new(fighter_a), Fighter.new(fighter_b))

puts "The winner of match is ....... #{match.winner.name}"
get '/about' do
@title = Jason.title
@subject = Jason.subject
erb :about
end
2 changes: 2 additions & 0 deletions views/about.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<h1><%= @title %></h1>
<p><%= @subject %></p>