fluby 0.7.1 → 0.7.2

Sign up to get free protection for your applications and to get access to all the features.
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
1
+ 0.7.2
data/bin/fluby CHANGED
@@ -3,7 +3,7 @@
3
3
  # Handcrafted with love by bomberstudios & mamuso
4
4
  # 2008-03-16
5
5
 
6
- actions = ['build','release','create','generate']
6
+ actions = ['build','release','create','generate','update']
7
7
 
8
8
  require File.dirname(__FILE__) + '/../lib/fluby.rb'
9
9
 
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
@@ -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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fluby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.1
4
+ version: 0.7.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Ale Mu\xC3\xB1oz"