fluby 0.7.1 → 0.7.2
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/README.mdown +9 -1
- data/VERSION +1 -1
- data/bin/fluby +1 -1
- data/lib/fluby.rb +12 -19
- data/lib/templates/Rakefile +1 -0
- metadata +1 -1
data/README.mdown
CHANGED
@@ -15,7 +15,7 @@ Fluby requires the 'mtasc' and 'swfmill' executables somewhere on your path.
|
|
15
15
|
|
16
16
|
To create a new project:
|
17
17
|
|
18
|
-
fluby ProjectName
|
18
|
+
fluby create ProjectName
|
19
19
|
|
20
20
|
|
21
21
|
### Compilation
|
@@ -37,3 +37,11 @@ There are other rake tasks available:
|
|
37
37
|
rake package # Creates a ZIP file containing your SWF file on the 'pkg' folder
|
38
38
|
rake test # Opens a HTML file with your SWF for testing on your default browser (available on Mac only)
|
39
39
|
|
40
|
+
|
41
|
+
### Updating from old fluby versions
|
42
|
+
|
43
|
+
If you have an existing project that uses fluby, you can update the code by running:
|
44
|
+
|
45
|
+
fluby update
|
46
|
+
|
47
|
+
inside your project folder.
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.7.
|
1
|
+
0.7.2
|
data/bin/fluby
CHANGED
data/lib/fluby.rb
CHANGED
@@ -118,25 +118,6 @@ EOF
|
|
118
118
|
%x(touch "$HOME/Library/Preferences/Macromedia/Flash\ Player/Logs/flashlog.txt")
|
119
119
|
end
|
120
120
|
|
121
|
-
# these functions are used by script/generate
|
122
|
-
# def self.generate(type, name, options={})
|
123
|
-
# target_path = File.dirname(name.split(".").join("/").to_s)
|
124
|
-
# target_file = name.split(".").join("/") + ".as".to_s
|
125
|
-
# if File.exist?(target_file)
|
126
|
-
# log "alert", "File #{target_file} already exists!"
|
127
|
-
# raise RuntimeError
|
128
|
-
# end
|
129
|
-
# FileUtils.mkdir_p target_path unless File.exist? target_path
|
130
|
-
# @classpath = target_path.split("/").join(".")
|
131
|
-
# @classname = name.split(".").last
|
132
|
-
# options = options.map { |i| i = i.split(":") } unless options == {}
|
133
|
-
# @opts = options
|
134
|
-
# File.open(target_file,"w") do |file|
|
135
|
-
# file << ERB.new(File.read("#{template_path}/generators/#{type}")).result(binding)
|
136
|
-
# end
|
137
|
-
# log "create", "#{target_path}/#{@classname}.as"
|
138
|
-
# end
|
139
|
-
|
140
121
|
def self.available_templates
|
141
122
|
return Dir["#{template_path}/generators/**"]
|
142
123
|
end
|
@@ -225,6 +206,18 @@ EOF
|
|
225
206
|
|
226
207
|
end
|
227
208
|
|
209
|
+
# Migration
|
210
|
+
def self.update
|
211
|
+
@project_name = current_path.split('/').last
|
212
|
+
render_template "#{template_path}/config.yml", "#{current_path}/config.yml" unless File.exist?("#{current_path}/config.yml")
|
213
|
+
FileUtils.mv "#{current_path}/Rakefile", "#{current_path}/Rakefile.old"
|
214
|
+
render_template "#{template_path}/Rakefile", "#{current_path}/Rakefile"
|
215
|
+
FileUtils.mv "#{current_path}/index.rhtml", "#{current_path}/index.rhtml.old"
|
216
|
+
copy_template "#{template_path}/index.rhtml", "#{current_path}/index.rhtml"
|
217
|
+
FileUtils.mv "#{current_path}/#{@project_name}.rxml", "#{current_path}/#{@project_name}.rxml.old"
|
218
|
+
copy_template "#{template_path}/project.rxml", "#{current_path}/#{@project_name}.rxml"
|
219
|
+
end
|
220
|
+
|
228
221
|
def self.method_missing name
|
229
222
|
options[name.to_s]
|
230
223
|
end
|
data/lib/templates/Rakefile
CHANGED
@@ -5,6 +5,7 @@ Rake::PackageTask.new("<%= @project_name %>", :noversion) do |p|
|
|
5
5
|
p.need_zip = true
|
6
6
|
p.name = Time.now.strftime("%Y%m%d") + "-" + "<%= @project_name %>"
|
7
7
|
p.package_files.include("README",Dir["deploy/*"])
|
8
|
+
p.package_files.exclude(".DS_Store")
|
8
9
|
end
|
9
10
|
|
10
11
|
task :monitor do
|