igg 0.0.7 → 0.0.8

Sign up to get free protection for your applications and to get access to all the features.
Files changed (6) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +17 -3
  3. data/VERSION +1 -0
  4. data/bin/igg +2 -0
  5. data/lib/igg/cli.rb +15 -4
  6. metadata +2 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 2c4b02dc2158a0e842aea0bc8c0b9c608c620e52
4
- data.tar.gz: d9ef9188cd181d13bb8170f174d5f4067f79ceab
3
+ metadata.gz: 61c1a3b529eed00414558e19acb3f50bf5a34deb
4
+ data.tar.gz: b593eaeeeff99881c29ce3092ed8547ad951ab6c
5
5
  SHA512:
6
- metadata.gz: 9541872c8264cb14778287145e1f534aacdd5c03a02e16f69f8d41cf3c6cab74e4c8ec3ed03f64402d1dbaf6731540d85ec12253215e13ed57f6e7b889ea5ca4
7
- data.tar.gz: ece28bc8c04e9a28b82b748c94c943f17b23b5ee2d32efe9c9d42832bdc43856e39628e00c10b46f49cebef43d65416e7232455f6fe27b8f01f2bffdb94c1a04
6
+ metadata.gz: 8b3bc0ae7ce3483ff186dcfd402e10bb4af8febbb40b5975f58e759e7c835129bb2df957d6efa2066640fde01e6250378c28d9b0758fe9f2af5dca3c97981185
7
+ data.tar.gz: 4f399f36f13c4985e69498f248fb6489ab64ac5c88c3f24375faa2fcfb0623d70ad0ceeade8492234f84c96416359e80995ec8aa28fabfc37390600d33e5da7c
data/README.md CHANGED
@@ -1,10 +1,12 @@
1
- ## ImpactJS Game Gadget.
1
+ ## ImpactJS Game Gadget. (Current Version 0.0.7)
2
2
 
3
3
  Several tools for fast developing an ImpactJS Game, include generators and built-in server to run the game and weltmeister level editor right in the current project folder without requiring apache http server and PHP configuration.
4
4
 
5
5
  ### Requirement
6
6
 
7
- Ruby 1.9.x or later (tested)
7
+ 1: Ruby 1.9.x or later (tested)
8
+ 2: ImpactJS (buy your license 99$)
9
+
8
10
 
9
11
  ### Installation
10
12
 
@@ -21,7 +23,7 @@ Several tools for fast developing an ImpactJS Game, include generators and built
21
23
 
22
24
  ### Generate an ImpactJS Game project
23
25
 
24
- $ igg project pong # default width=320 height=240
26
+ $ igg project pong # default width=320 height=240
25
27
 
26
28
  ### Generate an ImpactJS Game Level
27
29
 
@@ -31,6 +33,18 @@ Several tools for fast developing an ImpactJS Game, include generators and built
31
33
 
32
34
  $ igg entity player # default width=16 height=16
33
35
 
36
+ ### How to run Igg Server
37
+
38
+ # you need 3 steps to run server
39
+ #
40
+ # 1: Copy 'impact' folder to current project's 'lib' subdirectory.
41
+ # 2: Copy 'weltmeister' folder to current project's 'lib' subdirectory.
42
+ # 3: Copy 'weltmeister.html' to current project's root.
43
+ #
44
+ # ImpactJS project directory should look like this
45
+ ![project directory usage](https://raw.github.com/eiffelqiu/igg/master/doc/screen6.png)
46
+
47
+
34
48
  ### Run Server mode to play the game
35
49
 
36
50
  $ igg server ## Must Run in an ImpactJS project folder
data/VERSION ADDED
@@ -0,0 +1 @@
1
+ 0.0.8
data/bin/igg CHANGED
@@ -5,9 +5,11 @@ Igg::CLI.start
5
5
 
6
6
  at_exit do
7
7
  if $!.nil? || $!.is_a?(SystemExit) && $!.success?
8
+ puts
8
9
  puts 'igg server successfully shut down'
9
10
  else
10
11
  code = $!.is_a?(SystemExit) ? $!.status : 1
12
+ puts
11
13
  puts "igg server shut down failure with code #{code}"
12
14
  end
13
15
  end
data/lib/igg/cli.rb CHANGED
@@ -8,6 +8,12 @@ require_relative 'server'
8
8
  require_relative 'ext/string_extention'
9
9
  %w[project entity level].each { |task| require_relative "builder/#{task}_builder" }
10
10
 
11
+ LIBDIR = File.expand_path(File.join(File.dirname(__FILE__), '../..', 'lib'))
12
+ ROOTDIR = File.expand_path(File.join(File.dirname(__FILE__), '../..'))
13
+ unless $LOAD_PATH.include?(LIBDIR)
14
+ $LOAD_PATH << LIBDIR
15
+ end
16
+
11
17
  class Igg::CLI < Thor
12
18
  include Thor::Actions
13
19
  Igg::Builder.constants.each { |b| include "Igg::Builder::#{b}".to_class }
@@ -35,17 +41,22 @@ class Igg::CLI < Thor
35
41
  def processing(*args)
36
42
  method = args[2][:current_command][:name] # default project name is app type name
37
43
  @name, @width, @height = args[0][0] || "#{method}", options[:width], options[:height]
38
- @name = "#{@name}".downcase
44
+ @name = "#{@name}".downcase
45
+ @version = File.open("#{ROOTDIR}/VERSION", "rb").read
39
46
  if method == 'server' then
40
47
  if File.exist?('lib/weltmeister/config.js')
41
48
  File.write("lib/weltmeister/config.js",File.open("lib/weltmeister/config.js",&:read).gsub(".php",""))
42
49
  puts
43
50
  puts "*" * 80
51
+ puts "Igg Server #{@version} Eiffel Q(eiffelqiu@qq.com)"
52
+ puts
44
53
  puts "Server automatically modified lib/weltmeister/config.js file"
45
54
  puts "and removed all '.php' suffix in API of this file"
46
55
  puts
47
56
  puts "Play your game : http://localhost:4567/"
48
57
  puts "Run weltmeister : http://localhost:4567/weltmeister"
58
+ puts
59
+ puts "Igg source code : https://github.com/eiffelqiu/igg"
49
60
  puts "*" * 80
50
61
  puts
51
62
  Server.run!
@@ -53,9 +64,9 @@ class Igg::CLI < Thor
53
64
  puts "*" * 80
54
65
  puts "Can't start server without impact and weltmeister, you must do as follow"
55
66
  puts
56
- puts "1: Copy 'impact' folder to current 'lib' subdirectory. "
57
- puts "2: Copy 'weltmeister' folder to current 'lib' subdirectory. "
58
- puts "3: Copy 'weltmeister.html' folder to current directory. "
67
+ puts "1: Copy 'impact' folder to current project's 'lib' subdirectory."
68
+ puts "2: Copy 'weltmeister' folder to current project's 'lib' subdirectory."
69
+ puts "3: Copy 'weltmeister.html' to current project's root."
59
70
  puts "*" * 80
60
71
  exit
61
72
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: igg
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7
4
+ version: 0.0.8
5
5
  platform: ruby
6
6
  authors:
7
7
  - eiffel qiu
@@ -121,6 +121,7 @@ extra_rdoc_files:
121
121
  files:
122
122
  - LICENSE
123
123
  - README.md
124
+ - VERSION
124
125
  - bin/igg
125
126
  - lib/igg.rb
126
127
  - lib/igg/builder/entity_builder.rb