pario 0.3.1 → 0.3.2
Sign up to get free protection for your applications and to get access to all the features.
- data/README.rdoc +8 -20
- data/lib/pario.rb +18 -23
- data/lib/pario/version.rb +2 -2
- data/pario.gemspec +1 -1
- metadata +5 -5
data/README.rdoc
CHANGED
@@ -1,43 +1,31 @@
|
|
1
1
|
== Welcome to Pario
|
2
2
|
|
3
|
-
Pario is a Gosu Game framework that helps to give you structure and a start for creating games.
|
3
|
+
Pario is a Gosu Game framework that helps to give you structure and a start for creating games. Inspired by Rails [https://github.com/rails/rails].
|
4
4
|
|
5
5
|
== Installation
|
6
6
|
|
7
7
|
sudo gem install pario
|
8
8
|
|
9
9
|
* Windows users: gem install pario
|
10
|
+
* ALSO: Gosu will automatically be installed when you install pario
|
10
11
|
|
11
12
|
== Getting Started
|
12
13
|
|
13
14
|
1. At the command prompt, create a new Pario application:
|
14
15
|
|
15
|
-
pario
|
16
|
+
pario create my_game
|
16
17
|
|
17
|
-
where
|
18
|
+
where my_game is the game name.
|
18
19
|
|
19
|
-
2. Change the directory to
|
20
|
+
2. Change the directory to my_game and start the game:
|
20
21
|
|
21
22
|
pario play
|
22
23
|
|
23
|
-
3. To create more classes for your game (which will appear in the game folder):
|
24
|
-
|
25
|
-
pario create my_class
|
26
|
-
|
27
|
-
where my_class is the name of your class.
|
28
|
-
|
29
|
-
4. ADVANCED: You may also want to create many classes(files) and relate them.
|
30
|
-
Pario will not create subfolders, rather, it will auto-generate the code inside and properly relate them.
|
31
|
-
** NOTE: This can be done manually, which means you'll need to create the files and add
|
32
|
-
the appropriate 'require' statements. Pario simplifies this for you.
|
33
|
-
|
34
|
-
pario create my_class menu background
|
35
|
-
|
36
24
|
== Learning Ruby
|
37
25
|
|
38
|
-
*
|
39
|
-
*
|
40
|
-
*
|
26
|
+
* Ruby4kids: [link:http://www.ruby4kids.com] - links to game examples and videos.
|
27
|
+
* HacketyHack: [link:http://hackety-hack.com] - A program that teaches Ruby :-)
|
28
|
+
* Learn to Program: [link:http://pine.fm/LearnToProgram] - Great online book for learning Ruby.
|
41
29
|
|
42
30
|
These resources will bring you up to speed on the Ruby language and also on
|
43
31
|
programming in general.
|
data/lib/pario.rb
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
require 'optparse'
|
2
2
|
require 'rdoc/usage'
|
3
3
|
require 'ostruct'
|
4
|
-
require 'date'
|
5
4
|
require 'erb'
|
6
5
|
|
7
6
|
class Pario
|
8
|
-
|
7
|
+
Version = '0.3.2'
|
9
8
|
Directories = %w{game lib media config}
|
10
9
|
|
11
10
|
attr_reader :options, :command, :game_name, :arguments
|
12
11
|
|
13
12
|
def initialize(arguments, stdin)
|
14
|
-
@command =
|
13
|
+
@command = arguments[0]
|
15
14
|
@arguments = arguments
|
16
15
|
@stdin = stdin
|
17
16
|
|
@@ -23,21 +22,21 @@ class Pario
|
|
23
22
|
|
24
23
|
# Parse options, check arguments, then process the command
|
25
24
|
def run
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
25
|
+
|
26
|
+
if parsed_options? && arguments_valid?
|
27
|
+
#TODO
|
28
|
+
elsif valid_command?
|
29
|
+
@command = arguments.delete_at(0)
|
30
|
+
process_command
|
31
|
+
else
|
32
|
+
output_usage
|
33
|
+
end
|
34
34
|
|
35
35
|
end
|
36
36
|
|
37
37
|
protected
|
38
38
|
|
39
39
|
def parsed_options?
|
40
|
-
|
41
40
|
# Specify options
|
42
41
|
opts = OptionParser.new
|
43
42
|
opts.on('-v', '--version') { output_version ; exit 0 }
|
@@ -85,16 +84,11 @@ class Pario
|
|
85
84
|
end
|
86
85
|
|
87
86
|
def output_version
|
88
|
-
puts "#{File.basename(__FILE__)} version #{
|
87
|
+
puts "#{File.basename(__FILE__)} version #{Version}"
|
89
88
|
end
|
90
89
|
|
91
|
-
def
|
92
|
-
|
93
|
-
if commands.include? arg
|
94
|
-
arg
|
95
|
-
else
|
96
|
-
raise "That command is not supported"
|
97
|
-
end
|
90
|
+
def valid_command?
|
91
|
+
%w{create add play}.include? @command
|
98
92
|
end
|
99
93
|
|
100
94
|
def process_command
|
@@ -102,7 +96,8 @@ class Pario
|
|
102
96
|
#process_standard_input # [Optional]
|
103
97
|
end
|
104
98
|
|
105
|
-
|
99
|
+
# Create a game
|
100
|
+
def create
|
106
101
|
create_directories
|
107
102
|
create_base_files
|
108
103
|
# create_readme
|
@@ -115,7 +110,7 @@ class Pario
|
|
115
110
|
end
|
116
111
|
|
117
112
|
def game_name_downcase
|
118
|
-
game_name.split(/(?=[A-Z])/).join('_').downcase
|
113
|
+
game_name.split(/(?=[A-Z]+_)/).join('_').downcase
|
119
114
|
end
|
120
115
|
|
121
116
|
def game_name_upcase
|
@@ -174,7 +169,7 @@ game_template.result(binding)
|
|
174
169
|
end
|
175
170
|
end
|
176
171
|
|
177
|
-
def
|
172
|
+
def add
|
178
173
|
puts "Feature to come soon, I'm working on it!"
|
179
174
|
end
|
180
175
|
|
data/lib/pario/version.rb
CHANGED
@@ -1,3 +1,3 @@
|
|
1
|
-
module Pario
|
2
|
-
VERSION = "0.3.
|
1
|
+
module Pario #:nodoc:
|
2
|
+
VERSION = "0.3.2"
|
3
3
|
end
|
data/pario.gemspec
CHANGED
@@ -6,7 +6,7 @@ require 'pario/version'
|
|
6
6
|
|
7
7
|
Gem::Specification.new do |s|
|
8
8
|
s.name = 'pario'
|
9
|
-
s.version =
|
9
|
+
s.version = '0.3.2'
|
10
10
|
s.platform = Gem::Platform::RUBY
|
11
11
|
s.authors = ['Bill Davenport', 'Anthony Burns']
|
12
12
|
s.email = ['bill@infoether.com', 'anthony@infoether.com']
|
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:
|
4
|
+
hash: 23
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 3
|
9
|
-
-
|
10
|
-
version: 0.3.
|
9
|
+
- 2
|
10
|
+
version: 0.3.2
|
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-
|
19
|
+
date: 2011-02-17 00:00:00 -05:00
|
20
20
|
default_executable: pario
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
@@ -84,7 +84,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
84
84
|
requirements: []
|
85
85
|
|
86
86
|
rubyforge_project: pario
|
87
|
-
rubygems_version: 1.
|
87
|
+
rubygems_version: 1.5.2
|
88
88
|
signing_key:
|
89
89
|
specification_version: 3
|
90
90
|
summary: A Gosu game framework
|