asproject 0.1.31 → 0.1.32
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/lib/asproject/version.rb +1 -1
- data/lib/player_fetcher.rb +30 -14
- data/rakefile.rb +1 -1
- data/templates/asclass/mxml/.crap_file +10 -0
- data/templates/asproject/as2/art/.crap_file +10 -0
- data/templates/asproject/as2/doc/.crap_file +10 -0
- data/templates/asproject/as2/project/bin/.crap_file +10 -0
- data/templates/asproject/as2/project/lib/.crap_file +10 -0
- data/templates/asproject/as3/art/.crap_file +10 -0
- data/templates/asproject/as3/doc/.crap_file +10 -0
- data/templates/asproject/as3/project/bin/.crap_file +10 -0
- data/templates/asproject/as3/project/lib/.crap_file +10 -0
- data/templates/asproject/as3/project/test/.crap_file +10 -0
- data/templates/asproject/mxml/.crap_file +10 -0
- metadata +13 -2
data/lib/asproject/version.rb
CHANGED
data/lib/player_fetcher.rb
CHANGED
@@ -30,12 +30,22 @@ EOF
|
|
30
30
|
|
31
31
|
def fetch(url, target, zipped_file)
|
32
32
|
puts "Fetching: #{url} to: #{target} now!"
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
33
|
+
zip_name = url.split(File::SEPARATOR).pop
|
34
|
+
parts = target.split(File::SEPARATOR)
|
35
|
+
parts.pop
|
36
|
+
zip_dir = parts.join(File::SEPARATOR)
|
37
|
+
zip_file = File.join(zip_dir, zip_name)
|
38
|
+
|
39
|
+
puts 'zip_file: ' + zip_file
|
40
|
+
|
41
|
+
if(File.exists?(zip_file))
|
42
|
+
result = extract(zip_file, zipped_file, target)
|
43
|
+
write_file(target, result)
|
44
|
+
return
|
38
45
|
end
|
46
|
+
|
47
|
+
response = nil
|
48
|
+
host = 'download.macromedia.com'
|
39
49
|
|
40
50
|
t = Thread.new {
|
41
51
|
response = Net::HTTP.get_response(host, url)
|
@@ -47,10 +57,16 @@ EOF
|
|
47
57
|
sleep(0.3)
|
48
58
|
end
|
49
59
|
|
60
|
+
if(response.nil?)
|
61
|
+
msg1 = "Download failed for\n"
|
62
|
+
msg1 << "http://#{host}#{url}\n"
|
63
|
+
raise UsageError.new(msg1)
|
64
|
+
end
|
65
|
+
|
50
66
|
if(response.code != '200')
|
51
67
|
msg = "Download failed for\n"
|
52
68
|
msg <<"http://#{host}#{url}\n"
|
53
|
-
msg << "with HTTP Status code: #{response.code}\n"
|
69
|
+
msg << "with HTTP Status code: #{response.code.to_s}\n"
|
54
70
|
msg << response.message
|
55
71
|
raise UsageError.new(msg)
|
56
72
|
end
|
@@ -60,12 +76,8 @@ EOF
|
|
60
76
|
puts ""
|
61
77
|
|
62
78
|
|
79
|
+
result = ''
|
63
80
|
if(is_zip?(url))
|
64
|
-
zip_name = url.split(File::SEPARATOR).pop
|
65
|
-
parts = target.split(File::SEPARATOR)
|
66
|
-
parts.pop
|
67
|
-
zip_dir = parts.join(File::SEPARATOR)
|
68
|
-
zip_file = File.join(zip_dir, zip_name)
|
69
81
|
File.open(zip_file, 'w') do |f|
|
70
82
|
f.write(response.body)
|
71
83
|
end
|
@@ -74,11 +86,15 @@ EOF
|
|
74
86
|
result = response.body
|
75
87
|
end
|
76
88
|
|
77
|
-
|
78
|
-
|
89
|
+
write_file(target, result)
|
90
|
+
end
|
91
|
+
|
92
|
+
def write_file(file, content)
|
93
|
+
File.open(file, 'w') do |f|
|
94
|
+
f.write(content)
|
79
95
|
end
|
80
96
|
|
81
|
-
File.chmod(0755,
|
97
|
+
File.chmod(0755, file)
|
82
98
|
end
|
83
99
|
|
84
100
|
def extract(zip_file, zipped_file, unzipped_file)
|
data/rakefile.rb
CHANGED
@@ -100,7 +100,7 @@ desc "Publish and release files to RubyForge."
|
|
100
100
|
task :release => [:release_confirmation, :package, :increment_revision] do
|
101
101
|
system('rubyforge login')
|
102
102
|
for ext in RELEASE_TYPES
|
103
|
-
release_command = "rubyforge add_release #{RUBYFORGE_PROJECT} #{NAME} '
|
103
|
+
release_command = "rubyforge add_release #{RUBYFORGE_PROJECT} #{NAME} 'pre-alpha #{VERS}' pkg/#{NAME}-#{VERS}.#{ext}"
|
104
104
|
puts release_command
|
105
105
|
system(release_command)
|
106
106
|
end
|
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.
|
7
|
-
date: 2007-02-
|
6
|
+
version: 0.1.32
|
7
|
+
date: 2007-02-27 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
|
@@ -237,12 +237,23 @@ files:
|
|
237
237
|
- templates/ide/mate/Create Class.tmCommand
|
238
238
|
- templates/ide/mate/Rebuild Test Suites.tmCommand
|
239
239
|
- templates/ide/mate/Run Rake Task.tmCommand
|
240
|
+
- templates/asclass/mxml/.crap_file
|
241
|
+
- templates/asproject/as2/art/.crap_file
|
242
|
+
- templates/asproject/as2/doc/.crap_file
|
243
|
+
- templates/asproject/as2/project/bin/.crap_file
|
244
|
+
- templates/asproject/as2/project/lib/.crap_file
|
245
|
+
- templates/asproject/as3/art/.crap_file
|
246
|
+
- templates/asproject/as3/doc/.crap_file
|
247
|
+
- templates/asproject/as3/project/bin/.crap_file
|
248
|
+
- templates/asproject/as3/project/lib/.crap_file
|
249
|
+
- templates/asproject/as3/project/test/.crap_file
|
240
250
|
- templates/asproject/fb2as/project/.actionScriptProperties
|
241
251
|
- templates/asproject/fb2as/project/.project
|
242
252
|
- templates/asproject/fb2as/project/.settings
|
243
253
|
- templates/asproject/fdt/project/.as2_classpath
|
244
254
|
- templates/asproject/fdt/project/.project
|
245
255
|
- templates/asproject/fdt/project/.settings
|
256
|
+
- templates/asproject/mxml/.crap_file
|
246
257
|
test_files: []
|
247
258
|
|
248
259
|
rdoc_options:
|