pario 0.5.1 → 0.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/README.rdoc +1 -0
- data/lib/pario/cli.rb +8 -5
- data/lib/pario/version.rb +1 -1
- metadata +2 -20
data/README.rdoc
CHANGED
@@ -36,6 +36,7 @@ Pario is a Gosu Game framework that helps to give you structure and a start for
|
|
36
36
|
* Ruby4kids: [link:http://www.ruby4kids.com] - links to game examples and videos.
|
37
37
|
* HacketyHack: [link:http://hackety-hack.com] - A program that teaches Ruby :-)
|
38
38
|
* Learn to Program: [link:http://pine.fm/LearnToProgram] - Great online book for learning Ruby.
|
39
|
+
* Gosu Library: [link:http://libgosu.org] - Gosu resource site.
|
39
40
|
|
40
41
|
These resources will bring you up to speed on the Ruby language and also on
|
41
42
|
programming in general.
|
data/lib/pario/cli.rb
CHANGED
@@ -58,11 +58,11 @@ module Pario
|
|
58
58
|
|
59
59
|
# Set game name
|
60
60
|
def game_name
|
61
|
-
@game_name ||= @arguments.delete_at(0)
|
61
|
+
@game_name ||= @arguments.delete_at(0).gsub(/-/, "_")
|
62
62
|
end
|
63
63
|
|
64
64
|
def game_name_camelcase
|
65
|
-
game_name.gsub(/(.)([A-Z])/,'\1_\2').downcase
|
65
|
+
game_name.gsub(/(.)([A-Z])/,'\1_\2').gsub(/-/, "_").downcase
|
66
66
|
end
|
67
67
|
|
68
68
|
def create_base_files
|
@@ -93,7 +93,7 @@ module Pario
|
|
93
93
|
def build_extra_classes
|
94
94
|
Dir.chdir("game")
|
95
95
|
@arguments.each do |new_class|
|
96
|
-
class_file = File.open("#{
|
96
|
+
class_file = File.open("#{game_name_camelcase}.rb", "w+")
|
97
97
|
class_file.puts class_template(new_class)
|
98
98
|
end
|
99
99
|
end
|
@@ -118,11 +118,14 @@ template.result(binding)
|
|
118
118
|
|
119
119
|
def main_class
|
120
120
|
main_template = ERB.new <<-EOF
|
121
|
+
$:.unshift(File.expand_path("../game", __FILE__))
|
122
|
+
$:.unshift(File.expand_path("../lib", __FILE__))
|
123
|
+
|
121
124
|
require 'rubygems'
|
122
125
|
require 'gosu'
|
123
126
|
require 'yaml'
|
124
127
|
|
125
|
-
Dir['{game,lib}/*.rb'].each { |f| require f }
|
128
|
+
Dir['{game,lib}/*.rb'].each { |f| require File.basename(f[0..-4]) }
|
126
129
|
|
127
130
|
config = YAML::load(File.open("config/config.yml"))
|
128
131
|
|
@@ -158,7 +161,7 @@ game_template.result(binding)
|
|
158
161
|
end
|
159
162
|
|
160
163
|
def create_directories
|
161
|
-
folder_name = game_name.gsub(/(.)([A-Z])/,'\1_\2').downcase
|
164
|
+
folder_name = game_name.gsub(/(.)([A-Z])/,'\1_\2').gsub(/-/, "_").downcase
|
162
165
|
Dir.mkdir(folder_name) unless File.directory?(folder_name)
|
163
166
|
Dir.chdir(folder_name)
|
164
167
|
Directories.each do |sub_folder|
|
data/lib/pario/version.rb
CHANGED
metadata
CHANGED
@@ -1,13 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pario
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash: 9
|
5
4
|
prerelease:
|
6
|
-
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
- 1
|
10
|
-
version: 0.5.1
|
5
|
+
version: 0.5.2
|
11
6
|
platform: ruby
|
12
7
|
authors:
|
13
8
|
- Bill Davenport
|
@@ -16,7 +11,7 @@ autorequire:
|
|
16
11
|
bindir: bin
|
17
12
|
cert_chain: []
|
18
13
|
|
19
|
-
date: 2011-
|
14
|
+
date: 2011-03-09 00:00:00 -05:00
|
20
15
|
default_executable: pario
|
21
16
|
dependencies:
|
22
17
|
- !ruby/object:Gem::Dependency
|
@@ -27,11 +22,6 @@ dependencies:
|
|
27
22
|
requirements:
|
28
23
|
- - ~>
|
29
24
|
- !ruby/object:Gem::Version
|
30
|
-
hash: 55
|
31
|
-
segments:
|
32
|
-
- 0
|
33
|
-
- 7
|
34
|
-
- 26
|
35
25
|
version: 0.7.26
|
36
26
|
type: :runtime
|
37
27
|
version_requirements: *id001
|
@@ -71,20 +61,12 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
71
61
|
requirements:
|
72
62
|
- - ">="
|
73
63
|
- !ruby/object:Gem::Version
|
74
|
-
hash: 3
|
75
|
-
segments:
|
76
|
-
- 0
|
77
64
|
version: "0"
|
78
65
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
66
|
none: false
|
80
67
|
requirements:
|
81
68
|
- - ">="
|
82
69
|
- !ruby/object:Gem::Version
|
83
|
-
hash: 21
|
84
|
-
segments:
|
85
|
-
- 1
|
86
|
-
- 3
|
87
|
-
- 7
|
88
70
|
version: 1.3.7
|
89
71
|
requirements: []
|
90
72
|
|