pario 0.5.0 → 0.5.1

Sign up to get free protection for your applications and to get access to all the features.
@@ -4,7 +4,7 @@ Pario is a Gosu Game framework that helps to give you structure and a start for
4
4
 
5
5
  == Installation
6
6
 
7
- sudo gem install pario
7
+ sudo gem install pario
8
8
 
9
9
  * Windows users: gem install pario
10
10
  * ALSO: Gosu will automatically be installed when you install pario
@@ -29,7 +29,7 @@ Pario is a Gosu Game framework that helps to give you structure and a start for
29
29
 
30
30
  pario add my_class
31
31
 
32
- * Pario will create more than one class of you have more: pario add star background player
32
+ * Pario will create more than one class if you have more: pario add star background player
33
33
 
34
34
  == Learning Ruby
35
35
 
@@ -41,7 +41,7 @@ config
41
41
  A basic configuration file is created for you. Configuration is a place where game setup information goes (like window size or fonts). Feel free to add to it. COMING SOON.
42
42
 
43
43
  game
44
- Holds all of the code that's deals with your particular game.
44
+ Holds all of the code that deals with your particular game.
45
45
 
46
46
  lib
47
47
  Contains any library or module you want to use to extend your game. Any files in here will be auto-loaded when your game starts.
@@ -65,10 +65,6 @@ module Pario
65
65
  game_name.gsub(/(.)([A-Z])/,'\1_\2').downcase
66
66
  end
67
67
 
68
- def game_name_capitalize
69
- game_name.to_s.gsub(/\b\w/){$&.upcase}
70
- end
71
-
72
68
  def create_base_files
73
69
  build_main
74
70
  build_extra_classes unless @arguments.empty?
@@ -95,7 +91,7 @@ module Pario
95
91
  end
96
92
 
97
93
  def build_extra_classes
98
- Dir.chdir("game") unless Dir.getwd.split("/").last == "game"
94
+ Dir.chdir("game")
99
95
  @arguments.each do |new_class|
100
96
  class_file = File.open("#{new_class.gsub(/(.)([A-Z])/,'\1_\2').downcase}.rb", "w+")
101
97
  class_file.puts class_template(new_class)
@@ -104,8 +100,8 @@ module Pario
104
100
 
105
101
  def config_yaml
106
102
  template = ERB.new <<-EOF
107
- screen_width: 600
108
- screen_height: 800
103
+ :screen_width: 600
104
+ :screen_height: 800
109
105
  EOF
110
106
  template.result(binding)
111
107
  end
@@ -126,15 +122,14 @@ require 'rubygems'
126
122
  require 'gosu'
127
123
  require 'yaml'
128
124
 
129
- Dir.glob(File.join("game", "*.rb")).each {|file| require file }
130
- Dir.glob(File.join("lib", "*.rb")).each {|file| require file }
125
+ Dir['{game,lib}/*.rb'].each { |f| require f }
131
126
 
132
127
  config = YAML::load(File.open("config/config.yml"))
133
128
 
134
129
  #Add lib includes here
135
130
  include Util
136
131
 
137
- game = #{game_name_capitalize}.new(config["screen_height"], config["screen_width"])
132
+ game = #{game_name.capitalize}.new(config[:screen_height], config[:screen_width])
138
133
  game.show
139
134
  EOF
140
135
  main_template.result(binding)
@@ -142,7 +137,7 @@ main_template.result(binding)
142
137
 
143
138
  def game_class
144
139
  game_template = ERB.new <<-EOF
145
- class #{game_name_capitalize} < Gosu::Window
140
+ class #{game_name.capitalize} < Gosu::Window
146
141
  def initialize(window_width, window_height)
147
142
  super(window_width,window_height,0)
148
143
  @background_image = background_image "media/pario_background.png"
@@ -2,7 +2,7 @@ module Pario #:nodoc:
2
2
  module Version
3
3
  MAJOR = '0'
4
4
  MINOR = '5'
5
- MICRO = '0'
5
+ MICRO = '1'
6
6
 
7
7
  STRING = [MAJOR, MINOR, MICRO].compact.join('.')
8
8
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pario
3
3
  version: !ruby/object:Gem::Version
4
- hash: 11
4
+ hash: 9
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 5
9
- - 0
10
- version: 0.5.0
9
+ - 1
10
+ version: 0.5.1
11
11
  platform: ruby
12
12
  authors:
13
13
  - Bill Davenport
@@ -16,7 +16,7 @@ autorequire:
16
16
  bindir: bin
17
17
  cert_chain: []
18
18
 
19
- date: 2011-02-23 00:00:00 -05:00
19
+ date: 2011-02-24 00:00:00 -05:00
20
20
  default_executable: pario
21
21
  dependencies:
22
22
  - !ruby/object:Gem::Dependency