rascut 0.1.1 → 0.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,8 @@
1
+ == 0.1.2 / 2007-09-27
2
+ * Append commandline --version option
3
+ * Fix file observer for win32(winXP). thx ameema
4
+ * Fix httpd compileoption bug
5
+
1
6
  == 0.1.0 / 2007-09-02
2
7
 
3
8
  * 1st Release.
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Rascut
3
- VERSION = '0.1.1'
3
+ VERSION = '0.1.2'
4
4
  end
5
5
 
6
6
  require 'rascut/logger'
@@ -25,7 +25,7 @@ module Rascut
25
25
  @config.merge_config home.join('.rascutrc')
26
26
  end
27
27
 
28
- if File.readable?('.rascut')
28
+ if File.readable?('.rascut') && File.file?('.rascut')
29
29
  @config.merge_config('.rascut')
30
30
  end
31
31
 
@@ -53,6 +53,7 @@ module Rascut
53
53
  @params[:observe_files] << '.'
54
54
  end
55
55
 
56
+ op.on('-h', '--help', 'show this message') { puts op; Kernel::exit 1 }
56
57
  op.on('-i=VAL', '--interval=VAL', 'interval time(min)') {|v| @params[:interval] = v.to_i }
57
58
  op.on('-l=VAL', '--log=VAL', 'showing flashlog.txt') {|v| @params[:flashlog] = v }
58
59
  op.on('-m=VAL', '--mapping=VAL', 'server mapping path :example) -m "../assets=assets" -m "../images/=img"') {|v|
@@ -70,7 +71,10 @@ module Rascut
70
71
  }
71
72
  op.on('-t=VAL', '--template=VAL', 'server use template file') {|v| @params[:template] = v }
72
73
  op.on('-v', '--verbose', 'detail messages') {|v| @params[:logger].level = Logger::DEBUG }
73
- op.on('--help', 'show this message') { puts op; Kernel::exit 1 }
74
+ op.on('--version', 'show version') {|v|
75
+ puts "rascut #{Rascut::VERSION}"
76
+ exit 0
77
+ }
74
78
  op.parse! argv
75
79
  @params[:logger].debug 'config' + @params.inspect
76
80
  end
@@ -13,6 +13,8 @@ module Rascut
13
13
  :ext => nil
14
14
  }
15
15
 
16
+ MSWIN32 = !!RUBY_PLATFORM.include?('mswin32')
17
+
16
18
  def initialize(files, options)
17
19
  @files = {}
18
20
  @dirs = {}
@@ -112,7 +114,14 @@ module Rascut
112
114
  def check_dirs
113
115
  dfiles = []
114
116
  @dirs.each do |dir, mtime|
115
- next if @options[:ignore_dirs].include?(dir.realpath)
117
+ begin
118
+ rp = dir.realpath.to_s
119
+ rescue Errno::EINVAL
120
+ rp = dir.realpath(false).to_s
121
+ rp.sub!(/^\//, '') if mswin32? # XXX for mswin32 ruby 1.8.4
122
+ end
123
+
124
+ next if @options[:ignore_dirs].include?(rp)
116
125
 
117
126
  if !dir.directory?
118
127
  @dirs.delete dir
@@ -152,9 +161,14 @@ module Rascut
152
161
  Find::find(dir.to_s) do |file|
153
162
  if File.directory?(file)
154
163
  dir = Pathname.new(file)
155
- @dirs[dir] ||= dir.mtime
164
+ #@dirs[dir] ||= dir.mtie
165
+ @dirs[dir] ||= Time.at(0) # XXX for win32 ruby(filesystem?)?
156
166
  end
157
167
  end
158
168
  end
169
+
170
+ def mswin32?
171
+ MSWIN32
172
+ end
159
173
  end
160
174
  end
@@ -206,10 +206,10 @@ module Rascut
206
206
  end
207
207
 
208
208
  def bg_parse(opt)
209
- if m = opt.to_s.match(/-default-background-color=0x([a-fA-F0-9]{3,6})/)
209
+ if m = opt.to_s.match(/-default-background-color=(?:(?:0x)|#)([a-fA-F0-9]{3,6})/)
210
210
  '#' + m[1]
211
211
  else
212
- '#ffffff'
212
+ ''
213
213
  end
214
214
  end
215
215
 
@@ -246,14 +246,15 @@ module Rascut
246
246
  <!--__RELOAD__-->
247
247
  </head>
248
248
  <body>
249
- <div id="content">
250
- </div>
249
+ <div id="content"></div>
251
250
 
252
251
  <script type="text/javascript">
253
252
  var so = __SWFOBJECT__;
254
- __SWF_VARS__
255
- so.addVariable('rascut', 'true');
256
- so.write("content");
253
+ window.onload = function() {
254
+ __SWF_VARS__
255
+ so.addVariable('rascut', 'true');
256
+ so.write("content");
257
+ }
257
258
  </script>
258
259
  </body>
259
260
  </html>
@@ -297,6 +298,10 @@ module Rascut
297
298
  x.send(null);
298
299
  }
299
300
 
301
+ Rascut.swf = function() {
302
+ return document.getElementById('idswf');
303
+ }
304
+
300
305
  Rascut.reloadObserver();
301
306
  </script>
302
307
  EOF
metadata CHANGED
@@ -3,8 +3,8 @@ rubygems_version: 0.9.1
3
3
  specification_version: 1
4
4
  name: rascut
5
5
  version: !ruby/object:Gem::Version
6
- version: 0.1.1
7
- date: 2007-09-03 00:00:00 +09:00
6
+ version: 0.1.2
7
+ date: 2007-09-29 00:00:00 +09:00
8
8
  summary: Ruby ActionSCript UTility
9
9
  require_paths:
10
10
  - lib