bomberstudios-fluby 0.6.1 → 0.6.3

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.
Files changed (4) hide show
  1. data/Rakefile +7 -0
  2. data/lib/fluby.rb +3 -6
  3. data/lib/templates/Rakefile +23 -1
  4. metadata +1 -1
data/Rakefile CHANGED
@@ -68,4 +68,11 @@ task :test do
68
68
  %x(ruby test/test_fluby.rb)
69
69
  end
70
70
 
71
+ task :rcov do
72
+ rm_f "coverage"
73
+ rm_f "coverage.data"
74
+ rcov = "rcov --exclude gem --aggregate coverage.data --text-summary -Ilib"
75
+ sh "#{rcov} --no-html test/*", :verbose => false
76
+ end
77
+
71
78
  task :default => [ :test ]
data/lib/fluby.rb CHANGED
@@ -3,7 +3,7 @@ require "fileutils"
3
3
 
4
4
  module Fluby
5
5
  NAME = 'fluby'
6
- VERSION = '0.6.1'
6
+ VERSION = '0.6.3'
7
7
 
8
8
  COLORS = {
9
9
  :black => "\033[0;30m",
@@ -32,7 +32,7 @@ module Fluby
32
32
  if File.exist? @project_folder
33
33
  puts "#{COLORS[:red]}Folder #{@project_name} already exists,"
34
34
  puts "#{COLORS[:red]}please choose a different name for your project"
35
- exit
35
+ raise RuntimeError
36
36
  end
37
37
  FileUtils.mkdir [@project_folder,"#{@project_folder}/deploy","#{@project_folder}/assets","#{@project_folder}/script"]
38
38
 
@@ -53,9 +53,6 @@ module Fluby
53
53
  render_template "generate", "script/generate"
54
54
  %x(chmod 755 "#{@project_folder}/script/generate")
55
55
 
56
- if in_textmate?
57
- puts "Oh, my, what a nice editor you're using"
58
- end
59
56
  end
60
57
 
61
58
  def self.copy_template source, destination=nil
@@ -109,7 +106,7 @@ module Fluby
109
106
  target_file = name.split(".").join("/") + ".as".to_s
110
107
  if File.exist?(target_file)
111
108
  log "alert", "File #{target_file} already exists!"
112
- return
109
+ raise RuntimeError
113
110
  end
114
111
  FileUtils.mkdir_p target_path unless File.exist? target_path
115
112
  @classpath = target_path.split("/").join(".")
@@ -68,6 +68,28 @@ task :nodebug do
68
68
  @nodebug = true
69
69
  end
70
70
 
71
+ task :monitor do
72
+ command = "rake"
73
+ files = {}
74
+
75
+ Dir["*.as","*.rxml","*.rhtml","Rakefile"].each { |file|
76
+ files[file] = File.mtime(file)
77
+ }
78
+
79
+ loop do
80
+ sleep 1
81
+ changed_file, last_changed = files.find { |file, last_changed|
82
+ File.mtime(file) > last_changed
83
+ }
84
+ if changed_file
85
+ files[changed_file] = File.mtime(changed_file)
86
+ puts "=> #{changed_file} changed, running #{command}"
87
+ system(command)
88
+ puts "=> done"
89
+ end
90
+ end
91
+ end
92
+
71
93
  <% if Fluby.is_mac? %>
72
94
  desc "Test the SWF file in your default browser"
73
95
  task :test => [:compile] do
@@ -84,5 +106,5 @@ task :default => [:compile,:notify,:test]
84
106
  desc "Build a release version of <%= @project_name %> (with trace() disabled)"
85
107
  task :release => [:nodebug,:compile]
86
108
 
87
- task :default => [:compile,:test]
109
+ task :default => [:compile]
88
110
  <% end %>
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bomberstudios-fluby
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.1
4
+ version: 0.6.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - "Ale Mu\xC3\xB1oz"