slight_assets 0.2.0 → 0.3.0
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/slight_assets/util.rb +1 -0
- data/templates/install/config/assets.yml +3 -0
- metadata +5 -5
data/lib/slight_assets/util.rb
CHANGED
@@ -192,6 +192,7 @@ module SlightAssets
|
|
192
192
|
module_function :is_rake?
|
193
193
|
|
194
194
|
def async_write_static_compressed_file(file_path, &block)
|
195
|
+
return if is_runtime? && (Cfg.runtime_compression?.nil? || !Cfg.runtime_compression?)
|
195
196
|
lock_file_path = "#{file_path}.locked"
|
196
197
|
return if File.exists?(lock_file_path) && File.mtime(lock_file_path) > (Time.now - 120)
|
197
198
|
File.open(lock_file_path, "w"){} # touch
|
@@ -5,6 +5,9 @@ slight_asset: &slight_asset
|
|
5
5
|
# Must be less than or equal to "32kB"
|
6
6
|
maximum_embedded_file_size: "32kB"
|
7
7
|
|
8
|
+
# Enable minification at runtime
|
9
|
+
runtime_compression: false
|
10
|
+
|
8
11
|
# Scope of assets to minify in batch process (rake).
|
9
12
|
# The prefix "-" indicates the files to exclude from minifying.
|
10
13
|
# Keep in mind that the sequence matters.
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: slight_assets
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 19
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
|
-
-
|
8
|
+
- 3
|
9
9
|
- 0
|
10
|
-
version: 0.
|
10
|
+
version: 0.3.0
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Marcelo Manzan
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-07-
|
18
|
+
date: 2011-07-22 00:00:00 -03:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -115,7 +115,7 @@ files:
|
|
115
115
|
- templates/install/config/assets.yml
|
116
116
|
- templates/install/config/initializers/assets.rb
|
117
117
|
has_rdoc: true
|
118
|
-
homepage:
|
118
|
+
homepage: http://kawamanza.github.com/slight_assets
|
119
119
|
licenses: []
|
120
120
|
|
121
121
|
post_install_message:
|