smart_asset 0.4.3 → 0.4.4

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -104,6 +104,8 @@ Migrating from AssetPackager
104
104
  Other Options
105
105
  -------------
106
106
 
107
+ ### config/assets.yml
108
+
107
109
  You may add extra options to your <code>config/assets.yml</code> file.
108
110
 
109
111
  All the values below are the default values, excluding <code>append\_random</code> and <code>asset\_host</code>:
@@ -131,4 +133,19 @@ destination:
131
133
  sources:
132
134
  javascripts: javascripts
133
135
  stylesheets: stylesheets
134
- </pre>
136
+ </pre>
137
+
138
+ ### smart\_asset
139
+
140
+ You use different environment variables with the <code>smart\_asset</code> command.
141
+
142
+ Example:
143
+
144
+ <pre>
145
+ WARN=1 smart_asset
146
+ </pre>
147
+
148
+ * <code>DEBUG=1</code> - Output commands that are running, leave the tmp file around for inspection
149
+ * <code>PACKAGE=package\_1</code> - Only compress a specific package
150
+ * <code>MODIFIED='12/1/2010 12:00'</code> - Use a default modified time other than Time.now for non-version controlled files
151
+ * <code>WARN=1</code> - Get compression warnings from Closure Compiler and YUI Compressor
@@ -1,3 +1,3 @@
1
1
  class SmartAsset
2
- VERSION = "0.4.3" unless defined?(::SmartAsset::VERSION)
2
+ VERSION = "0.4.4" unless defined?(::SmartAsset::VERSION)
3
3
  end
data/lib/smart_asset.rb CHANGED
@@ -85,7 +85,8 @@ class SmartAsset
85
85
  warning = ENV['WARN'] ? nil : " --warning_level QUIET"
86
86
  cmd = "java -jar #{CLOSURE_COMPILER} --js #{tmp} --js_output_file #{output}#{warning}"
87
87
  elsif ext == 'css'
88
- cmd = "java -jar #{YUI_COMPRESSOR} #{tmp} -o #{output}"
88
+ warning = ENV['WARN'] ? " -v" : nil
89
+ cmd = "java -jar #{YUI_COMPRESSOR} #{tmp} -o #{output}#{warning}"
89
90
  end
90
91
  puts cmd if ENV['DEBUG']
91
92
  `#{cmd}`
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 4
8
- - 3
9
- version: 0.4.3
8
+ - 4
9
+ version: 0.4.4
10
10
  platform: ruby
11
11
  authors:
12
12
  - Winton Welsh
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-12-13 00:00:00 -08:00
17
+ date: 2010-12-14 00:00:00 -08:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency