smurf 1.0.2 → 1.0.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. data/Rakefile +0 -3
  2. data/lib/smurf.rb +12 -32
  3. data/smurf.gemspec +1 -1
  4. metadata +2 -2
data/Rakefile CHANGED
@@ -20,6 +20,3 @@ Rake::RDocTask.new(:rdoc) do |rdoc|
20
20
  rdoc.rdoc_files.include('README')
21
21
  rdoc.rdoc_files.include('lib/**/*.rb')
22
22
  end
23
-
24
- task :console do
25
- end
data/lib/smurf.rb CHANGED
@@ -1,36 +1,16 @@
1
1
  require 'smurf/javascript'
2
2
  require 'smurf/stylesheet'
3
3
 
4
- if Rails.respond_to?(:version) && Rails.version == "2.2.1"
5
- # Support for Rails == 2.2.1
6
- module Smurf
7
-
8
- module JavaScriptSources
9
- private
10
- def joined_contents; Smurf::Javascript.new(super).minified; end
11
- end # JavaScriptSources
12
-
13
- module StylesheetSources
14
- private
15
- def joined_contents; Smurf::Stylesheet.new(super).minified; end
16
- end # StylesheetSources
17
-
18
- end # ActionView::Helpers::AssetTagHelper::AssetTag
19
- ActionView::Helpers::AssetTagHelper::JavaScriptSources.send(:include, Smurf::JavaScriptSources)
20
- ActionView::Helpers::AssetTagHelper::StylesheetSources.send(:include, Smurf::StylesheetSources)
21
- else
22
- # Support for everything else
23
- module ActionView::Helpers::AssetTagHelper
24
- private
25
- def join_asset_file_contents_with_minification(files)
26
- content = join_asset_file_contents_without_minification(files)
27
- if !files.grep(%r[/javascripts]).empty?
28
- content = Smurf::Javascript.new(content).minified
29
- elsif !files.grep(%r[/stylesheets]).empty?
30
- content = Smurf::Stylesheet.new(content).minified
31
- end
32
- content
4
+ module ActionView::Helpers::AssetTagHelper
5
+ private
6
+ def join_asset_file_contents_with_minification(files)
7
+ content = join_asset_file_contents_without_minification(files)
8
+ if !files.grep(%r[/javascripts]).empty?
9
+ content = Smurf::Javascript.new(content).minified
10
+ elsif !files.grep(%r[/stylesheets]).empty?
11
+ content = Smurf::Stylesheet.new(content).minified
33
12
  end
34
- alias_method_chain :join_asset_file_contents, :minification
35
- end # ActionView::Helpers::AssetTagHelper
36
- # end
13
+ content
14
+ end
15
+ alias_method_chain :join_asset_file_contents, :minification
16
+ end # ActionView::Helpers::AssetTagHelper
data/smurf.gemspec CHANGED
@@ -2,7 +2,7 @@ Gem::Specification.new do |s|
2
2
  s.name = "smurf"
3
3
  s.summary = "Rails plugin to automatically minify JS and CSS when their bundles get cached"
4
4
  s.description = "Rails plugin to automatically minify JS and CSS when their bundles get cached. Send in those patches!"
5
- s.version = "1.0.2"
5
+ s.version = "1.0.3"
6
6
  s.authors = ["Justin Knowlden"]
7
7
  s.email = %w[gus@thumblemonks.com]
8
8
  s.homepage = "http://github.com/thumblemonks/smurf"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: smurf
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.2
4
+ version: 1.0.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Justin Knowlden
@@ -9,7 +9,7 @@ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
11
 
12
- date: 2009-10-12 00:00:00 -05:00
12
+ date: 2009-10-13 00:00:00 -05:00
13
13
  default_executable:
14
14
  dependencies: []
15
15