asproject 0.1.35 → 0.1.36

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.
@@ -2,7 +2,7 @@ module AsProject
2
2
  module VERSION
3
3
  MAJOR = 0
4
4
  MINOR = 1
5
- TINY = 35
5
+ TINY = 36
6
6
 
7
7
  STRING = [MAJOR, MINOR, TINY].join('.')
8
8
  end
@@ -45,13 +45,12 @@ module AsProject
45
45
  raise UsageError.new('RemoteFileTask created without a remote_task_name value...')
46
46
  end
47
47
  @user_task = PathFinder.new().remote_file_task(remote_task_name, self)
48
- task @name => remote_task_name
48
+ task name => remote_task_name
49
49
  end
50
50
  @user_task
51
51
  end
52
52
 
53
53
  def execute(params)
54
- puts 'REMOTE FILE TASK.execute'
55
54
  user_task.execute(params)
56
55
  end
57
56
 
@@ -85,7 +84,7 @@ module AsProject
85
84
 
86
85
  if(extracted_file_path != downloaded_file)
87
86
  if(!Rake::Task.task_defined?(extracted_file_path))
88
- file extracted_file_path => [downloaded_file] do |f|
87
+ file extracted_file_path => downloaded_file do |f|
89
88
  unpack_downloaded_file(downloaded_file, extracted_file_path)
90
89
  File.chmod(0755, extracted_file_path)
91
90
  end
@@ -226,7 +225,6 @@ module AsProject
226
225
  # Sometimes Cygwin wants a './' prefix
227
226
  # This method should be overridden in
228
227
  # subclasses
229
- puts 'executing user task: ' + 3.to_s
230
228
  sh %{#{clean_path(extracted_file_path)} #{params}}
231
229
  end
232
230
  end
@@ -249,7 +247,6 @@ module AsProject
249
247
  class CygwinRemoteFileTask < AbstractRemoteFileTask
250
248
 
251
249
  def execute(params)
252
- puts 'CYGWIN TASK EXECUTE with: ' + extracted_file_path
253
250
  sh %{#{clean_path(extracted_file_path)} #{params}}
254
251
  end
255
252
  end
@@ -6,6 +6,7 @@ module AsProject
6
6
  attr_accessor :replace_all, :ignore_all
7
7
  @@ASPROJECT_FILE_NAME = 'AsProject'
8
8
  @@RENDER_IGNORE_FILES = ['asclass_config.rb']
9
+ @@BINARY_EXTENSIONS = ['.jpg', '.png', '.gif', '.doc', '.xls', '.exe']
9
10
 
10
11
  def initialize
11
12
  @replace_all = false
@@ -66,7 +67,7 @@ module AsProject
66
67
  end
67
68
 
68
69
  def should_render?(file)
69
- if(@@RENDER_IGNORE_FILES.index(File.basename(file)))
70
+ if(is_binary?(file) || @@RENDER_IGNORE_FILES.index(File.basename(file)))
70
71
  return false
71
72
  end
72
73
  return true
@@ -137,7 +138,13 @@ EOF
137
138
  end
138
139
 
139
140
  #TODO: Figure out if the file is plain text or not... Possible?
140
- def file_is_binary? file
141
+ def is_binary? file
142
+ file_extension = File.extname(file).downcase
143
+ @@BINARY_EXTENSIONS.each do |ext|
144
+ if(file_extension == ext)
145
+ return true
146
+ end
147
+ end
141
148
  return false
142
149
  end
143
150
  end
@@ -0,0 +1,20 @@
1
+ <?xml version="1.0" encoding="iso-8859-1" ?>
2
+ <!--
3
+ DO NOT EDIT THIS FILE!
4
+ This file was auto-generated from
5
+ an ERB template which can be
6
+ found at:
7
+ config/templates/wickyd/SWFMill.erb
8
+ -->
9
+
10
+ <movie width="600" height="450" framerate="24" version="8">
11
+ <background color="#ffffff"/>
12
+ <frame>
13
+ <library>
14
+ <clip id="PatternPark" import="assets/img/skins/default/PatternPark.jpg" />
15
+ </library>
16
+ </frame>
17
+ <frame>
18
+ <stop />
19
+ </frame>
20
+ </movie>
@@ -1,10 +1,68 @@
1
- #! rake
2
-
3
1
  require 'rubygems'
4
- require 'rake'
5
- require 'rake/clean'
6
- require 'rake/tasklib'
7
2
  require 'tasks/mtasc'
8
3
  require 'tasks/hamtasc'
9
4
  require 'tasks/swfmill'
5
+ require 'tasks/flash_player'
6
+
7
+ ############################################
8
+ # Launch the Application using Flash Player 8
9
+
10
+ task :run => [:compile_main]
11
+
12
+ # Assign this to the default task
13
+ task :default => [:run]
14
+
15
+ AsProject::FlashPlayer.new(:run) do |t|
16
+ t.version = 8
17
+ t.swf = 'bin/<%= project_name %>.swf'
18
+ end
19
+
20
+ ############################################
21
+ # Launch the Test Suites using Flash Player 8
22
+
23
+ task :test => [:compile_tests]
24
+
25
+ AsProject::FlashPlayer.new(:test) do |t|
26
+ t.version = 8
27
+ t.swf = 'bin/<%= project_name %>Runner.swf'
28
+ end
29
+
30
+ ############################################
31
+ # Compile your library using SWFMill
32
+
33
+ AsProject::SWFMill.new(:compile_skin) do |t|
34
+ t.input = 'assets/img/skins/Default.xml'
35
+ t.output = 'bin/<%= project_name %>Skin.swf'
36
+ end
37
+
38
+ ############################################
39
+ # Compile your Application using HAMTASC
40
+
41
+ task :compile_main => [:compile_skin]
42
+
43
+ AsProject::HAMTASC.new(:compile_main) do |t|
44
+ t.input = '<%= project_name %>'
45
+ t.rb_entry = '<%= project_name %>.main'
46
+ t.version = 8
47
+ t.frame = 2
48
+ t.input_swf = 'bin/<%= project_name %>Skin.swf'
49
+ t.output = 'bin/<%= project_name %>.swf'
50
+ t.class_path << 'src'
51
+ end
52
+
53
+ ############################################
54
+ # Compile your Application using HAMTASC
55
+
56
+ AsProject::HAMTASC.new(:compile_tests) do |t|
57
+ t.input = '<%= project_name %>Runner'
58
+ t.version = 8
59
+ t.frame = 2
60
+ t.rb_entry = '<%= project_name %>Runner.main'
61
+ t.input_swf = 'bin/<%= project_name %>Skin.swf'
62
+ t.output = 'bin/<%= project_name %>Runner.swf'
63
+ t.class_path << 'src'
64
+ t.class_path << 'test'
65
+ t.class_path << 'lib/asunit'
66
+ end
10
67
 
68
+ ############################################
@@ -1,13 +1,20 @@
1
1
 
2
2
  class <%=project_name%> extends MovieClip {
3
- private static var instance:<%=project_name%>
3
+ public static var linkageId:String = "__Packages.<%=project_name%>";
4
+ public static var classRef:Function = <%=project_name%>;
5
+ private static var instance:<%=project_name%>;
6
+
7
+ private var image:MovieClip;
4
8
 
5
9
  public function <%=project_name%>() {
6
10
  trace("<%=project_name%> Instantiated");
11
+ image = attachMovie("PatternPark", "image", 1);
7
12
  }
8
13
 
9
14
  public static function main():Void {
10
- instance = _root.attachMovie('<%=project_name%>', '<%=instance_name%>', 1);
15
+ instance = <%=project_name%>(_root.attachMovie(<%=project_name%>.linkageId, '<%=instance_name%>', 1));
11
16
  }
17
+
18
+ public static var serializable:Boolean = Object.registerClass(linkageId, classRef);
12
19
  }
13
20
 
metadata CHANGED
@@ -3,7 +3,7 @@ rubygems_version: 0.9.0
3
3
  specification_version: 1
4
4
  name: asproject
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.35
6
+ version: 0.1.36
7
7
  date: 2007-03-04 00:00:00 -08:00
8
8
  summary: AsProject is a tool set that simplifies the process of beginning and growing a new ActionScript project.
9
9
  require_paths:
@@ -95,11 +95,17 @@ files:
95
95
  - templates/asproject/as2/art
96
96
  - templates/asproject/as2/doc
97
97
  - templates/asproject/as2/project
98
+ - templates/asproject/as2/project/assets
98
99
  - templates/asproject/as2/project/bin
99
100
  - templates/asproject/as2/project/lib
100
101
  - templates/asproject/as2/project/rakefile.rb
101
102
  - templates/asproject/as2/project/src
102
103
  - templates/asproject/as2/project/test
104
+ - templates/asproject/as2/project/assets/img
105
+ - templates/asproject/as2/project/assets/img/skins
106
+ - templates/asproject/as2/project/assets/img/skins/default
107
+ - templates/asproject/as2/project/assets/img/skins/Default.xml
108
+ - templates/asproject/as2/project/assets/img/skins/default/PatternPark.jpg
103
109
  - templates/asproject/as2/project/src/AsProject.as
104
110
  - templates/asproject/as2/project/test/AsProjectRunner.as
105
111
  - templates/asproject/as3/art