gosu_extensions 0.2.8 → 0.2.9

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.2.8
1
+ 0.2.9
@@ -0,0 +1,34 @@
1
+ require File.join(File.dirname(__FILE__), '/../../spec_helper')
2
+
3
+ describe Background do
4
+
5
+ context 'color config' do
6
+ before(:each) do
7
+ @window = stub :window,
8
+ :background_options => Gosu::Color::WHITE
9
+ @background = Background.new @window
10
+ end
11
+ it "should draw correctly" do
12
+ @window.stub! :width => :some_width, :height => :some_height
13
+ @window.should_receive(:draw_quad).once.with 0, 0, Gosu::Color::WHITE, :some_width, 0, Gosu::Color::WHITE, :some_width, :some_height, Gosu::Color::WHITE, 0, :some_height, Gosu::Color::WHITE, 0, :default
14
+
15
+ @background.draw
16
+ end
17
+ end
18
+
19
+ context 'image config' do
20
+ before(:each) do
21
+ Resources.stub! :root => 'some/root'
22
+ @window = stub :window, :background_options => 'some/path.png'
23
+ @image = stub :image
24
+ Gosu::Image.stub! :new => @image
25
+ @background = Background.new @window
26
+ end
27
+ it "should draw correctly" do
28
+ @image.should_receive(:draw).once.with 0, 0, Layer::Background, 1.0, 1.0
29
+
30
+ @background.draw
31
+ end
32
+ end
33
+
34
+ end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 2
8
- - 8
9
- version: 0.2.8
8
+ - 9
9
+ version: 0.2.9
10
10
  platform: ruby
11
11
  authors:
12
12
  - Florian Hanke
@@ -16,7 +16,7 @@ bindir: bin
16
16
  cert_chain: []
17
17
 
18
18
  date: 2010-04-13 00:00:00 +02:00
19
- default_executable: gogogosu
19
+ default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency
22
22
  name: gosu
@@ -44,8 +44,8 @@ dependencies:
44
44
  version_requirements: *id002
45
45
  description: ""
46
46
  email: florian.hanke@gmail.com
47
- executables:
48
- - gogogosu
47
+ executables: []
48
+
49
49
  extensions: []
50
50
 
51
51
  extra_rdoc_files: []
@@ -128,6 +128,7 @@ signing_key:
128
128
  specification_version: 3
129
129
  summary: Default extensions built onto the popular Gosu Framework. Uses Chipmunk for game physics. That's it for now. I'm working on them. Anyway, GAME ON!
130
130
  test_files:
131
+ - spec/lib/core/background_spec.rb
131
132
  - spec/lib/core/collision_spec.rb
132
133
  - spec/lib/core/control_spec.rb
133
134
  - spec/lib/core/controls_spec.rb
data/bin/gogogosu DELETED
@@ -1,33 +0,0 @@
1
- #!/usr/local/bin/ruby
2
- # TODO remove
3
-
4
- Signal.trap("INT") { puts; exit } # CTRL-C
5
-
6
- File.open(File.join(File.dirname(__FILE__), '../VERSION')) do |f|
7
- puts "Gosu Extensions #{f.read}"
8
- end
9
-
10
- application = ARGV.first
11
-
12
- puts "Usage: gogogosu <application_name>" and exit(1) unless application
13
-
14
- require File.dirname(__FILE__) + '/../generator/gogogosu'
15
-
16
- generator = Generator::Gogogosu.new
17
-
18
- generator.dir application do
19
- generator.dir 'lib' do
20
-
21
- end
22
- generator.dir 'media' do
23
-
24
- end
25
- end
26
-
27
- puts <<-START
28
- Great!
29
-
30
- Now proceed as follows:
31
- 1. cd #{application}
32
- 2.
33
- START