assette 0.0.12 → 0.0.13

Sign up to get free protection for your applications and to get access to all the features.
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.0.12
1
+ 0.0.13
data/assette.gemspec CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{assette}
8
- s.version = "0.0.12"
8
+ s.version = "0.0.13"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = [%q{Tal Atlas}]
@@ -17,7 +17,8 @@ module Assette
17
17
  class Config
18
18
  MULTIPLES = %w{file_path asset_host}.freeze
19
19
  SINGLES = %w{asset_dir templates_path template_format cache_method
20
- template_preloader template_partial asset_version_file uglifier}.freeze
20
+ template_preloader template_partial asset_version_file uglifier
21
+ minify}.freeze
21
22
  BLOCKS = %w{after_compile}.freeze
22
23
 
23
24
  OPTIONS = begin
@@ -40,7 +41,8 @@ module Assette
40
41
  :templates_path => 'app/templates',
41
42
  :template_format => 'AT.t[{*path*}] = {*template*};',
42
43
  :after_compile => Proc.new {},
43
- :uglifier => {:copyright => false, :mangle => false}
44
+ :uglifier => {:copyright => false, :mangle => false},
45
+ :minify => true
44
46
  }.freeze
45
47
 
46
48
  def initialize args = {}
@@ -104,6 +106,10 @@ module Assette
104
106
  def compiling?
105
107
  !!compiling
106
108
  end
109
+
110
+ def minify?
111
+ !!minify
112
+ end
107
113
 
108
114
  def asset_host i
109
115
  return '' unless asset_hosts?
@@ -28,7 +28,7 @@ module Assette
28
28
  class PostProcessor::JSMin < Assette::PostProcessor(:js)
29
29
 
30
30
  def should_process?
31
- Assette.config.compiling?
31
+ Assette.config.compiling? && Assette.config.minify?
32
32
  end
33
33
 
34
34
  def processor
@@ -36,4 +36,4 @@ module Assette
36
36
  end
37
37
 
38
38
  end
39
- end
39
+ end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: assette
3
3
  version: !ruby/object:Gem::Version
4
- hash: 7
4
+ hash: 5
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 12
10
- version: 0.0.12
9
+ - 13
10
+ version: 0.0.13
11
11
  platform: ruby
12
12
  authors:
13
13
  - Tal Atlas