dxruby_sdl 0.0.6 → 0.0.7

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 02beb7103ebbde40ba0fe3b1461640d787c3732b
4
- data.tar.gz: b8324b05c450b7e9b76906c7e09389c2fe5777c0
3
+ metadata.gz: 82b99192a60bd7641748589be74167e21dba38c5
4
+ data.tar.gz: 9c2edce859d57617bca04d5d1a0bd7e2a419434f
5
5
  SHA512:
6
- metadata.gz: 7512f56bffa89bfe77a51eb32018bf115117a0c0b4f637ac072b22c683c453b492a80724f00c777534c7be65909d15670240b2bcf4a6f851450f71e5f34072a0
7
- data.tar.gz: bb6fca1612208632d3d94953fefa4f5aded63f76c497dc1ff97edb41ff3b46d7644647a6ddea81bace1caecbb681cc8114af2c43e740b7636c79c07fe6b23eea
6
+ metadata.gz: 7aeaea9c533d458178c3e0e0ba00d0b9a88a359fec6a80987624f358a0108a8c46e8748ecf7a012c2637d3d6f08fec29f2754d1bfbb1454b0ee60749fdf7aff7
7
+ data.tar.gz: e40aed3cf377772e55ec4cc3eade1052489c3e48931ced540a597c7a1a7c67f2803d6fec49a8d28c74b7918552aa982845b604c6053193d7264782610a89dcaa
data/Rakefile CHANGED
@@ -1,4 +1,4 @@
1
- require "bundler/gem_tasks"
1
+ require 'bundler/gem_helper'
2
2
  require "rspec/core/rake_task"
3
3
 
4
4
  if /darwin/ =~ RUBY_PLATFORM
@@ -34,4 +34,33 @@ task :rubocop do
34
34
  sh "rubocop #{files.split(/\s+/m).join(' ')}"
35
35
  end
36
36
 
37
+ namespace :gem do
38
+ Bundler::GemHelper.install_tasks
39
+ end
40
+
41
+ task :build do
42
+ Rake::Task['gem:build'].invoke
43
+ end
44
+
45
+ task :release do
46
+ Rake::Task['gem:release'].invoke
47
+
48
+ require 'dxruby_sdl/version'
49
+ next_version = DXRubySDL::VERSION.split('.').tap { |versions|
50
+ versions[-1] = (versions[-1].to_i + 1).to_s
51
+ }.join('.')
52
+ File.open('lib/dxruby_sdl/version.rb', 'r+') do |f|
53
+ lines = []
54
+ while line = f.gets
55
+ line = "#{$1} '#{next_version}'\n" if /(\s*VERSION = )/.match(line)
56
+ lines << line
57
+ end
58
+ f.rewind
59
+ f.write(lines.join)
60
+ end
61
+ sh 'git add lib/dxruby_sdl/version.rb'
62
+ sh "git commit -m #{next_version}"
63
+ sh 'git push'
64
+ end
65
+
37
66
  task :default => [:rubocop, :spec]
data/dxruby_sdl.gemspec CHANGED
@@ -23,10 +23,10 @@ Gem::Specification.new do |spec|
23
23
  spec.add_development_dependency 'rspec'
24
24
  spec.add_development_dependency 'coveralls'
25
25
  spec.add_development_dependency 'travis-lint'
26
- spec.add_development_dependency 'rubocop'
26
+ spec.add_development_dependency 'rubocop', '0.15.0'
27
27
  spec.add_development_dependency 'guard-rspec'
28
28
  spec.add_development_dependency 'guard-rubocop'
29
29
 
30
30
  spec.add_runtime_dependency 'rubysdl'
31
- spec.add_runtime_dependency 'rsdl' if /darwin/ =~ RUBY_PLATFORM
31
+ spec.add_runtime_dependency 'rsdl'
32
32
  end
@@ -1,5 +1,5 @@
1
1
  # -*- coding: utf-8 -*-
2
2
 
3
3
  module DXRubySDL
4
- VERSION = '0.0.6'
4
+ VERSION = '0.0.7'
5
5
  end
@@ -33,6 +33,14 @@ module DXRubySDL
33
33
  FPSTimer.instance.fps = val
34
34
  end
35
35
 
36
+ def bgcolor
37
+ @bgcolor ||= DEFAULTS[:background_color]
38
+ end
39
+
40
+ def bgcolor=(val)
41
+ @bgcolor = val
42
+ end
43
+
36
44
  def loop(&block)
37
45
  timer = FPSTimer.instance
38
46
  timer.reset
@@ -48,7 +56,7 @@ module DXRubySDL
48
56
  end
49
57
  end
50
58
 
51
- screen.fill_rect(0, 0, width, height, DEFAULTS[:background_color])
59
+ screen.fill_rect(0, 0, width, height, bgcolor)
52
60
 
53
61
  yield
54
62
 
data/samples/bgm.mid CHANGED
Binary file
data/samples/sound.wav CHANGED
Binary file
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dxruby_sdl
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.6
4
+ version: 0.0.7
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kouji Takao
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2013-12-02 00:00:00.000000000 Z
11
+ date: 2014-05-04 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler
@@ -84,16 +84,16 @@ dependencies:
84
84
  name: rubocop
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
- - - '>='
87
+ - - '='
88
88
  - !ruby/object:Gem::Version
89
- version: '0'
89
+ version: 0.15.0
90
90
  type: :development
91
91
  prerelease: false
92
92
  version_requirements: !ruby/object:Gem::Requirement
93
93
  requirements:
94
- - - '>='
94
+ - - '='
95
95
  - !ruby/object:Gem::Version
96
- version: '0'
96
+ version: 0.15.0
97
97
  - !ruby/object:Gem::Dependency
98
98
  name: guard-rspec
99
99
  requirement: !ruby/object:Gem::Requirement
@@ -136,6 +136,20 @@ dependencies:
136
136
  - - '>='
137
137
  - !ruby/object:Gem::Version
138
138
  version: '0'
139
+ - !ruby/object:Gem::Dependency
140
+ name: rsdl
141
+ requirement: !ruby/object:Gem::Requirement
142
+ requirements:
143
+ - - '>='
144
+ - !ruby/object:Gem::Version
145
+ version: '0'
146
+ type: :runtime
147
+ prerelease: false
148
+ version_requirements: !ruby/object:Gem::Requirement
149
+ requirements:
150
+ - - '>='
151
+ - !ruby/object:Gem::Version
152
+ version: '0'
139
153
  description: '`dxruby-sdl` is a ruby library for 2D graphics and game. It has same
140
154
  DXRuby API. It use SDL/Ruby.'
141
155
  email: