rsence-pre 2.2.0.21 → 2.2.0.22
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/plugins/client_pkg/lib/client_pkg_build.rb +17 -2
- metadata +5 -5
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
2.2.0.
|
1
|
+
2.2.0.22.pre
|
@@ -147,8 +147,19 @@ class ClientPkgBuild
|
|
147
147
|
begin
|
148
148
|
coffee_start = Time.new.to_f
|
149
149
|
coffee_path = File.join( bundle_path, bundle_name+'.coffee' )
|
150
|
-
|
151
|
-
|
150
|
+
coffee_timestamp = File.stat( coffee_path ).mtime.to_i
|
151
|
+
has_cache_compiled = @coffee_cache[:path_compiled].has_key?( coffee_path )
|
152
|
+
has_cache_timestamp = @coffee_cache[:path_timestamp].has_key?( coffee_path )
|
153
|
+
has_cache_entry = has_cache_compiled and has_cache_timestamp
|
154
|
+
has_cached = ( has_cache_entry and ( @coffee_cache[:path_timestamp][coffee_path] == coffee_timestamp ) )
|
155
|
+
if has_cached
|
156
|
+
js_data = @coffee_cache[:path_compiled][coffee_path]
|
157
|
+
else
|
158
|
+
coffee_src = read_file( coffee_path )
|
159
|
+
js_data = CoffeeScript.compile( coffee_src, :bare => true )
|
160
|
+
@coffee_cache[:path_timestamp][coffee_path] = coffee_timestamp
|
161
|
+
@coffee_cache[:path_compiled][coffee_path] = js_data
|
162
|
+
end
|
152
163
|
@coffee_time += ( Time.new.to_f - coffee_start )
|
153
164
|
rescue CoffeeScript::CompilationError
|
154
165
|
if has_js
|
@@ -526,6 +537,10 @@ class ClientPkgBuild
|
|
526
537
|
def initialize( config, logger )
|
527
538
|
|
528
539
|
@coffee_supported = config[:coffee_supported]
|
540
|
+
@coffee_cache = {
|
541
|
+
:path_timestamp => {},
|
542
|
+
:path_compiled => {}
|
543
|
+
}
|
529
544
|
|
530
545
|
@logger = logger
|
531
546
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rsence-pre
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 83
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 2
|
8
8
|
- 2
|
9
9
|
- 0
|
10
|
-
-
|
11
|
-
version: 2.2.0.
|
10
|
+
- 22
|
11
|
+
version: 2.2.0.22
|
12
12
|
platform: ruby
|
13
13
|
authors:
|
14
14
|
- Riassence Inc.
|
@@ -17,7 +17,7 @@ autorequire:
|
|
17
17
|
bindir: bin
|
18
18
|
cert_chain: []
|
19
19
|
|
20
|
-
date: 2011-
|
20
|
+
date: 2011-09-07 00:00:00 Z
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|
23
23
|
name: rsence-deps
|
@@ -365,7 +365,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
365
365
|
requirements: []
|
366
366
|
|
367
367
|
rubyforge_project: rsence-
|
368
|
-
rubygems_version: 1.8.
|
368
|
+
rubygems_version: 1.8.10
|
369
369
|
signing_key:
|
370
370
|
specification_version: 3
|
371
371
|
summary: Pre-Release 2.2 version of RSence.
|