Permalink
Browse files

adding in some windows support

  • Loading branch information...
1 parent 2a8d395 commit 2890c27cb897c08e34ae8fac802c601ea1e46751 @jwoertink committed May 31, 2012
Showing with 19 additions and 9 deletions.
  1. +9 −4 Gemfile
  2. +1 −2 Gemfile.lock
  3. +4 −1 README.rdoc
  4. +1 −1 bin/dopewars
  5. +2 −0 lib/application.rb
  6. +2 −1 lib/term.rb
View
13 Gemfile
@@ -1,7 +1,12 @@
source "http://rubygems.org"
-gem "rake"
gem "highline"
-gem "ruby-termios", :require => "termios"
-gem "bundler", "~> 1.0.0"
-gem "jeweler", "~> 1.6.0"
+gem "win32console", :platforms => [:mingw, :mswin]
+
+group :experimental do
+ gem "ruby-termios", :require => "termios"
+end
+
+group :development do
+ gem "jeweler", "~> 1.6.0"
+end
View
@@ -14,8 +14,7 @@ PLATFORMS
ruby
DEPENDENCIES
- bundler (~> 1.0.0)
highline
jeweler (~> 1.6.0)
- rake
ruby-termios
+ win32console
View
@@ -31,7 +31,10 @@ Options are normally numbers 1 through 5 or so.
$ cd dopewars
$ bundle
-* Requires Ruby 1.9+ and Rubygems 1.5+
+== Requirements
+* Ruby 1.9+
+* Rubygems 1.5+
+* bundler gem (gem install bundler)
== Current Issues
View
@@ -3,7 +3,7 @@
require 'rubygems'
require 'bundler'
-Bundler.require
+Bundler.setup
$:.unshift(File.join(File.dirname(__FILE__), "..", "lib"))
require 'application'
View
@@ -1,3 +1,4 @@
+require 'win32console' if RUBY_PLATFORM =~ /mingw/
require 'highline/import'
require 'utilities'
require 'game'
@@ -6,6 +7,7 @@
require 'bank'
require 'agent'
+
module Application
extend Utilities
View
@@ -1,5 +1,6 @@
require 'rubygems'
-require 'termios'
+require 'bundler'
+Bundler.require(:experimental)
# get the original settings and save a backup
term = Termios::getattr($stdin)

0 comments on commit 2890c27

Please sign in to comment.