asproject 0.1.44 → 0.1.60

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.
@@ -28,8 +28,8 @@ class SimpleResolver
28
28
  end
29
29
 
30
30
  def finish
31
- if(@ignored_files.size > 0)
32
- puts '>> SimpleResolver ignored the following files because their names were invalid:'
31
+ if(@ignored_files.size > 0)
32
+ Logger.puts '>> SimpleResolver ignored the following files because their names were invalid:'
33
33
  @ignored_files.each do |file|
34
34
  puts file
35
35
  end
@@ -50,7 +50,7 @@ module AsProject
50
50
 
51
51
  def write_xml(file, files, base_dir)
52
52
  SWFMillInputResolver.new(template, file, files, base_dir)
53
- puts 'Created file at: ' + file
53
+ Logger.puts 'Created file at: ' + file
54
54
  end
55
55
  end
56
56
  end
@@ -46,11 +46,10 @@ module AsProject
46
46
 
47
47
  def copy_file(from, to, render=false)
48
48
  if(write_file?(to))
49
- content = File.open(from, 'r').read
50
- parts = to.split(File::SEPARATOR)
51
- parts.pop
52
- File.makedirs(parts.join(File::SEPARATOR))
53
- target = File.open(to, 'w')
49
+ content = nil
50
+ File.open(from, 'r') do |f|
51
+ content = f.read
52
+ end
54
53
  if(render && should_render?(from))
55
54
  begin
56
55
  content = ERB.new(content, nil, '>').result(binding)
@@ -59,12 +58,43 @@ module AsProject
59
58
  raise e
60
59
  end
61
60
  end
62
- target.write(content)
63
- target.close
61
+ FileUtils.makedirs(File.dirname(to))
62
+ File.open(to, 'w') do |f|
63
+ f.write(content)
64
+ end
64
65
  return to
65
66
  end
66
67
  return nil
67
68
  end
69
+
70
+
71
+
72
+
73
+ =begin
74
+ content = nil
75
+ # content_mode = nil
76
+ File.open(from, 'r') do |f|
77
+ # content_mode = f.stat.mode
78
+ content = f.read
79
+ end
80
+ parts = to.split(File::SEPARATOR)
81
+ parts.pop
82
+ if(render && should_render?(from))
83
+ begin
84
+ content = ERB.new(content, nil, '>').result(binding)
85
+ rescue NameError => e
86
+ puts '>> Template ' + from + ' references a value that is not defined'
87
+ raise e
88
+ end
89
+ end
90
+ File.makedirs(parts.join(File::SEPARATOR))
91
+ File.open(to, 'w') do |f|
92
+ f.write(content)
93
+ end
94
+ # FileUtils.chmod(content_mode, to)
95
+ return to
96
+ return nil
97
+ =end
68
98
 
69
99
  def should_render?(file)
70
100
  if(is_binary?(file) || @@RENDER_IGNORE_FILES.index(File.basename(file)))
@@ -16,9 +16,9 @@ module AsProject
16
16
  end
17
17
 
18
18
  def finish
19
- puts ''
20
- puts '>> TestSuites rebuilt from: '
21
- puts Dir.pwd
19
+ Logger.puts ''
20
+ Logger.puts '>> TestSuites rebuilt from: '
21
+ Logger.puts Dir.pwd
22
22
  end
23
23
 
24
24
  def remove_test_suites(dir)
@@ -48,7 +48,7 @@ PKG_LIST.each do |file|
48
48
  task :package => file
49
49
  end
50
50
 
51
- task :package => :add_crap_files
51
+ task :package => [:add_crap_files, :increment_revision]
52
52
 
53
53
  spec = Gem::Specification.new do |s|
54
54
  s.name = 'asproject'
@@ -100,7 +100,7 @@ EOF
100
100
  end
101
101
 
102
102
  desc "Publish and release files to RubyForge."
103
- task :release => [:release_confirmation, :package, :increment_revision] do
103
+ task :release => [:release_confirmation, :package] do
104
104
  system('rubyforge login')
105
105
  for ext in RELEASE_TYPES
106
106
  release_command = "rubyforge add_release #{RUBYFORGE_PROJECT} #{NAME} 'pre-alpha #{VERS}' pkg/#{NAME}-#{VERS}.#{ext}"
@@ -43,9 +43,9 @@ AsProject::MTASC.new(:compile_main) do |t|
43
43
  t.main = true
44
44
  t.version = 8
45
45
  t.frame = 2
46
- t.input_swf = 'bin/<%= project_name %>Skin.swf'
47
- t.output = 'bin/<%= project_name %>.swf'
48
- t.class_path << 'src'
46
+ t.swf = 'bin/<%= project_name %>Skin.swf'
47
+ t.out = 'bin/<%= project_name %>.swf'
48
+ t.cp << 'src'
49
49
  end
50
50
 
51
51
  ############################################
@@ -56,11 +56,11 @@ AsProject::MTASC.new(:compile_tests) do |t|
56
56
  t.version = 8
57
57
  t.frame = 2
58
58
  t.main = true
59
- t.input_swf = 'bin/<%= project_name %>Skin.swf'
60
- t.output = 'bin/<%= project_name %>Runner.swf'
61
- t.class_path << 'src'
62
- t.class_path << 'test'
63
- t.class_path << 'lib/asunit'
59
+ t.swf = 'bin/<%= project_name %>Skin.swf'
60
+ t.out = 'bin/<%= project_name %>Runner.swf'
61
+ t.cp << 'src'
62
+ t.cp << 'test'
63
+ t.cp << 'lib/asunit'
64
64
  end
65
65
 
66
66
  ############################################
@@ -1,18 +1,18 @@
1
- #! rake
2
- #
3
- # Rakefile for MXMLC development
4
- # execute rake -T anywhere forward of this directory to see available tasks
5
- # Tasks are executed from the command prompt like:
6
- # rake deploy
7
- # rake clean
8
-
9
- # The test task accepts additional optional arguments as follows:
10
- #
11
- # rake test / Create TestSuites and run AllTests
12
- # rake test SomeClass / Run only the specified TestCase
13
- # rake test SomeClass.testSomeMethod / Run only the specified TestCase and test method
14
-
15
- #require_gem 'asproject'
16
- #load 'asproject'
17
-
18
- #load_rake_tasks
1
+ #! rake
2
+ #
3
+ # Rakefile for MXMLC development
4
+ # execute rake -T anywhere forward of this directory to see available tasks
5
+ # Tasks are executed from the command prompt like:
6
+ # rake deploy
7
+ # rake clean
8
+
9
+ # The test task accepts additional optional arguments as follows:
10
+ #
11
+ # rake test / Create TestSuites and run AllTests
12
+ # rake test SomeClass / Run only the specified TestCase
13
+ # rake test SomeClass.testSomeMethod / Run only the specified TestCase and test method
14
+
15
+ #require_gem 'asproject'
16
+ #load 'asproject'
17
+
18
+ #load_rake_tasks
metadata CHANGED
@@ -3,8 +3,8 @@ 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.44
7
- date: 2007-03-05 00:00:00 -08:00
6
+ version: 0.1.60
7
+ date: 2007-03-11 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:
10
10
  - lib
@@ -35,7 +35,6 @@ files:
35
35
  - lib
36
36
  - Manifest.txt
37
37
  - MIT-LICENSE.txt
38
- - pkg
39
38
  - rakefile.rb
40
39
  - README.txt
41
40
  - setup.rb
@@ -254,23 +253,12 @@ files:
254
253
  - templates/ide/mate/Create Class.tmCommand
255
254
  - templates/ide/mate/Rebuild Test Suites.tmCommand
256
255
  - templates/ide/mate/Run Rake Task.tmCommand
257
- - templates/asclass/mxml/.crap_file
258
- - templates/asproject/as2/art/.crap_file
259
- - templates/asproject/as2/doc/.crap_file
260
- - templates/asproject/as2/project/bin/.crap_file
261
- - templates/asproject/as2/project/lib/.crap_file
262
- - templates/asproject/as3/art/.crap_file
263
- - templates/asproject/as3/doc/.crap_file
264
- - templates/asproject/as3/project/bin/.crap_file
265
- - templates/asproject/as3/project/lib/.crap_file
266
- - templates/asproject/as3/project/test/.crap_file
267
256
  - templates/asproject/fb2as/project/.actionScriptProperties
268
257
  - templates/asproject/fb2as/project/.project
269
258
  - templates/asproject/fb2as/project/.settings
270
259
  - templates/asproject/fdt/project/.as2_classpath
271
260
  - templates/asproject/fdt/project/.project
272
261
  - templates/asproject/fdt/project/.settings
273
- - templates/asproject/mxml/.crap_file
274
262
  test_files: []
275
263
 
276
264
  rdoc_options:
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-
@@ -1,10 +0,0 @@
1
-
2
- This file has been created because I can't figure out how to bundle
3
- Empty directories in the gem package.
4
-
5
- If you know how to do this, please contact me...
6
-
7
- Thanks,
8
-
9
- lbayes@patternpark.com
10
-