Added Gemfile #1

Merged
merged 8 commits into from Feb 29, 2012

Projects

None yet

2 participants

@icarovts

In order to run specs for the first time, I added a Gemfile file to the project, simplifyng my way.
There is a questionable sdl rubygem (rubysdl). Please, modify this gem, so we can avoid the follow error:

private method `load' called for SDL::Surface:Class

@mauricioszabo mauricioszabo and 1 other commented on an outdated diff Feb 29, 2012
@@ -0,0 +1,5 @@
+source 'http://rubygems.org'
+
+gem "rubysdl"
+gem "rspec"
+gem "simplecov"
@mauricioszabo
mauricioszabo Feb 29, 2012

Good, but RSpec and SimpleCov should be namespaced for "test".

Furthermore, all "require sdl" should be converted to bundler, and spec_helper must change too.

@icarovts
icarovts Feb 29, 2012

With Gemfile like this:

source 'http://rubygems.org'

gem "rubysdl"

group :test do
  gem "rspec"
  gem "simplecov"
end

I tried to convert all "require sdl" to bundler:

require 'bundler'
Bundler.require(:default)

And changed spec_helper:

require 'bundler'
Bundler.require(:default, :test)

But it didn't work, I got the follow error:

NameError: uninitialized constant Screen::SDL

Is "rubysdl" the correct gem I have to use?

thx

@icarovts
icarovts Feb 29, 2012

It works if I keep require 'sdl' in the ar_sdl.rb file:

require 'bundler'
Bundler.require(:default)
require 'sdl'

Is it appropriate ?

Ps.: I pushed it working to my repo...

@mauricioszabo mauricioszabo commented on an outdated diff Feb 29, 2012
@@ -1,2 +1,5 @@
It's an asteroids-like ship game, to use as a base
to "coding arena".
+
+=== Dependencies
+* Dev SDL Library (libsdl-ttf2.0-dev - Debian/Ubuntu)
@mauricioszabo
mauricioszabo Feb 29, 2012

Another dependencies:

SDL
SDL-TTF (the one you put above)
SDL-Image (the one it's missing).

@mauricioszabo mauricioszabo merged commit 6cfdab3 into mauricioszabo:master Feb 29, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment