nakor 0.0.1
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/.gitignore +4 -0
- data/.gitmodules +3 -0
- data/Gemfile +4 -0
- data/Rakefile +1 -0
- data/bin/nakor +4 -0
- data/features/generate.feature +12 -0
- data/features/support/setup.rb +1 -0
- data/lib/nakor.rb +5 -0
- data/lib/nakor/app.rb +11 -0
- data/lib/nakor/cli.rb +11 -0
- data/lib/nakor/generators/app.rb +65 -0
- data/lib/nakor/version.rb +3 -0
- data/nakor.gemspec +36 -0
- data/spec/app_spec.rb +11 -0
- metadata +136 -0
data/.gitignore
ADDED
data/.gitmodules
ADDED
data/Gemfile
ADDED
data/Rakefile
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
require "bundler/gem_tasks"
|
data/bin/nakor
ADDED
@@ -0,0 +1,12 @@
|
|
1
|
+
Feature: Generate
|
2
|
+
In order to make the world a better place
|
3
|
+
As a CLI
|
4
|
+
I want to be able to generate new apps
|
5
|
+
|
6
|
+
Scenario: Generate a new app in a non-existing folder
|
7
|
+
When I run `../../bin/nakor generate awesome_game`
|
8
|
+
Then the output should contain "Successfully generated 'awesome_game'"
|
9
|
+
And the following files should exist:
|
10
|
+
| awesome_game/main.lua |
|
11
|
+
|
12
|
+
Scenario: Warn the user when generating an app will overwrite an existing folder
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'aruba/cucumber'
|
data/lib/nakor.rb
ADDED
data/lib/nakor/app.rb
ADDED
data/lib/nakor/cli.rb
ADDED
@@ -0,0 +1,65 @@
|
|
1
|
+
require 'thor/group'
|
2
|
+
module Nakor
|
3
|
+
module Generators
|
4
|
+
class App < Thor::Group
|
5
|
+
ASSET_FILES = %W{
|
6
|
+
bk_default.png
|
7
|
+
btn_about.png
|
8
|
+
btn_about_over.png
|
9
|
+
btn_help.png
|
10
|
+
btn_help_over.png
|
11
|
+
btn_play.png
|
12
|
+
btn_play_over.png
|
13
|
+
btn_settings.png
|
14
|
+
btn_settings_over.png
|
15
|
+
splash_screen.png
|
16
|
+
}
|
17
|
+
|
18
|
+
TEMPLATE_FILES = %W{
|
19
|
+
about.lua
|
20
|
+
build.settings
|
21
|
+
config.lua
|
22
|
+
director.lua
|
23
|
+
help.lua
|
24
|
+
init_buttons.lua
|
25
|
+
loadmenu.lua
|
26
|
+
main.lua
|
27
|
+
menu.lua
|
28
|
+
play.lua
|
29
|
+
radlib.lua
|
30
|
+
README
|
31
|
+
settings.lua
|
32
|
+
ui.lua
|
33
|
+
}
|
34
|
+
|
35
|
+
include Thor::Actions
|
36
|
+
|
37
|
+
argument :app_name, :type => :string
|
38
|
+
|
39
|
+
def self.source_root
|
40
|
+
File.dirname(__FILE__) + "/corona-game-template"
|
41
|
+
end
|
42
|
+
|
43
|
+
def create_group
|
44
|
+
empty_directory(app_name)
|
45
|
+
end
|
46
|
+
|
47
|
+
def copy_source_files
|
48
|
+
TEMPLATE_FILES.each do |f|
|
49
|
+
template f, "#{app_name}/#{f}"
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
53
|
+
def copy_asset_files
|
54
|
+
ASSET_FILES.each do |f|
|
55
|
+
copy_file f, "#{app_name}/#{f}"
|
56
|
+
end
|
57
|
+
end
|
58
|
+
|
59
|
+
def done
|
60
|
+
puts "Successfully generated '#{app_name}'"
|
61
|
+
end
|
62
|
+
end
|
63
|
+
end
|
64
|
+
end
|
65
|
+
|
data/nakor.gemspec
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "nakor/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "nakor"
|
7
|
+
s.version = Nakor::VERSION
|
8
|
+
s.authors = ["Radamanthus Batnag"]
|
9
|
+
s.email = ["rad@batnag.org"]
|
10
|
+
s.homepage = ""
|
11
|
+
s.summary = %q{Nakor is a gem that encapsulates the corona-game-template project.}
|
12
|
+
s.description = %q{
|
13
|
+
To create a new Corona SDK game using nakor, just run:
|
14
|
+
|
15
|
+
nakor generate awesome_game
|
16
|
+
|
17
|
+
This will create an awesome_game directory in the current directory, and copy all corona game template files into it.
|
18
|
+
|
19
|
+
To run the generated game, type:
|
20
|
+
|
21
|
+
/Applications/CoronaSDK/simulator awesome_game
|
22
|
+
}
|
23
|
+
|
24
|
+
s.rubyforge_project = "nakor"
|
25
|
+
|
26
|
+
s.files = `git ls-files`.split("\n")
|
27
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
28
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
29
|
+
s.require_paths = ["lib"]
|
30
|
+
|
31
|
+
s.add_dependency "thor"
|
32
|
+
|
33
|
+
s.add_development_dependency "aruba"
|
34
|
+
s.add_development_dependency "cucumber"
|
35
|
+
s.add_development_dependency "rspec"
|
36
|
+
end
|
data/spec/app_spec.rb
ADDED
metadata
ADDED
@@ -0,0 +1,136 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: nakor
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
hash: 29
|
5
|
+
prerelease:
|
6
|
+
segments:
|
7
|
+
- 0
|
8
|
+
- 0
|
9
|
+
- 1
|
10
|
+
version: 0.0.1
|
11
|
+
platform: ruby
|
12
|
+
authors:
|
13
|
+
- Radamanthus Batnag
|
14
|
+
autorequire:
|
15
|
+
bindir: bin
|
16
|
+
cert_chain: []
|
17
|
+
|
18
|
+
date: 2011-09-30 00:00:00 Z
|
19
|
+
dependencies:
|
20
|
+
- !ruby/object:Gem::Dependency
|
21
|
+
name: thor
|
22
|
+
prerelease: false
|
23
|
+
requirement: &id001 !ruby/object:Gem::Requirement
|
24
|
+
none: false
|
25
|
+
requirements:
|
26
|
+
- - ">="
|
27
|
+
- !ruby/object:Gem::Version
|
28
|
+
hash: 3
|
29
|
+
segments:
|
30
|
+
- 0
|
31
|
+
version: "0"
|
32
|
+
type: :runtime
|
33
|
+
version_requirements: *id001
|
34
|
+
- !ruby/object:Gem::Dependency
|
35
|
+
name: aruba
|
36
|
+
prerelease: false
|
37
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
38
|
+
none: false
|
39
|
+
requirements:
|
40
|
+
- - ">="
|
41
|
+
- !ruby/object:Gem::Version
|
42
|
+
hash: 3
|
43
|
+
segments:
|
44
|
+
- 0
|
45
|
+
version: "0"
|
46
|
+
type: :development
|
47
|
+
version_requirements: *id002
|
48
|
+
- !ruby/object:Gem::Dependency
|
49
|
+
name: cucumber
|
50
|
+
prerelease: false
|
51
|
+
requirement: &id003 !ruby/object:Gem::Requirement
|
52
|
+
none: false
|
53
|
+
requirements:
|
54
|
+
- - ">="
|
55
|
+
- !ruby/object:Gem::Version
|
56
|
+
hash: 3
|
57
|
+
segments:
|
58
|
+
- 0
|
59
|
+
version: "0"
|
60
|
+
type: :development
|
61
|
+
version_requirements: *id003
|
62
|
+
- !ruby/object:Gem::Dependency
|
63
|
+
name: rspec
|
64
|
+
prerelease: false
|
65
|
+
requirement: &id004 !ruby/object:Gem::Requirement
|
66
|
+
none: false
|
67
|
+
requirements:
|
68
|
+
- - ">="
|
69
|
+
- !ruby/object:Gem::Version
|
70
|
+
hash: 3
|
71
|
+
segments:
|
72
|
+
- 0
|
73
|
+
version: "0"
|
74
|
+
type: :development
|
75
|
+
version_requirements: *id004
|
76
|
+
description: "\n To create a new Corona SDK game using nakor, just run:\n\n nakor generate awesome_game\n\n This will create an awesome_game directory in the current directory, and copy all corona game template files into it.\n\n To run the generated game, type:\n\n /Applications/CoronaSDK/simulator awesome_game\n "
|
77
|
+
email:
|
78
|
+
- rad@batnag.org
|
79
|
+
executables:
|
80
|
+
- nakor
|
81
|
+
extensions: []
|
82
|
+
|
83
|
+
extra_rdoc_files: []
|
84
|
+
|
85
|
+
files:
|
86
|
+
- .gitignore
|
87
|
+
- .gitmodules
|
88
|
+
- Gemfile
|
89
|
+
- Rakefile
|
90
|
+
- bin/nakor
|
91
|
+
- features/generate.feature
|
92
|
+
- features/support/setup.rb
|
93
|
+
- lib/nakor.rb
|
94
|
+
- lib/nakor/app.rb
|
95
|
+
- lib/nakor/cli.rb
|
96
|
+
- lib/nakor/generators/app.rb
|
97
|
+
- lib/nakor/version.rb
|
98
|
+
- nakor.gemspec
|
99
|
+
- spec/app_spec.rb
|
100
|
+
homepage: ""
|
101
|
+
licenses: []
|
102
|
+
|
103
|
+
post_install_message:
|
104
|
+
rdoc_options: []
|
105
|
+
|
106
|
+
require_paths:
|
107
|
+
- lib
|
108
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
109
|
+
none: false
|
110
|
+
requirements:
|
111
|
+
- - ">="
|
112
|
+
- !ruby/object:Gem::Version
|
113
|
+
hash: 3
|
114
|
+
segments:
|
115
|
+
- 0
|
116
|
+
version: "0"
|
117
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
118
|
+
none: false
|
119
|
+
requirements:
|
120
|
+
- - ">="
|
121
|
+
- !ruby/object:Gem::Version
|
122
|
+
hash: 3
|
123
|
+
segments:
|
124
|
+
- 0
|
125
|
+
version: "0"
|
126
|
+
requirements: []
|
127
|
+
|
128
|
+
rubyforge_project: nakor
|
129
|
+
rubygems_version: 1.8.10
|
130
|
+
signing_key:
|
131
|
+
specification_version: 3
|
132
|
+
summary: Nakor is a gem that encapsulates the corona-game-template project.
|
133
|
+
test_files:
|
134
|
+
- features/generate.feature
|
135
|
+
- features/support/setup.rb
|
136
|
+
- spec/app_spec.rb
|