cyborg 0.4.6 → 0.4.7
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/cyborg.rb +4 -0
- data/lib/cyborg/helpers/asset_helpers.rb +2 -2
- data/lib/cyborg/plugin.rb +5 -0
- data/lib/cyborg/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: fcb6cfc1ed5a818503a94a5b7fef6fb0ad4486a7
|
4
|
+
data.tar.gz: c8d676709ec57add85191063867c6032b1594f92
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 02844216991140690fb61a15488de0486ea50e48991fd0c1b4f118e6c494ff57c692e5663a2dcafeea730daf56385c748a7afa0c32f2e88c5bc3a9c6fceeb5c1
|
7
|
+
data.tar.gz: ec49d9b1570cc577410e80068987476aef18907c1397aca573a7e768cafeb8eded653b35ee4333b4583625e56e19f3a481d8213fda1a56e3044dd1ae398f9eeb
|
data/lib/cyborg.rb
CHANGED
@@ -12,7 +12,7 @@ module Cyborg
|
|
12
12
|
|
13
13
|
stylesheet_url(args).each do |url|
|
14
14
|
tag = stylesheet_link_tag url, options
|
15
|
-
tag.gsub(/\.css/i, ".css.gz") if
|
15
|
+
tag = tag.gsub(/\.css/i, ".css.gz") if request.accept_encoding =~ /gzip/i && Cyborg.gzip_assets?
|
16
16
|
tags += tag
|
17
17
|
end
|
18
18
|
|
@@ -26,7 +26,7 @@ module Cyborg
|
|
26
26
|
puts "searching for: #{javascript_url(args)}"
|
27
27
|
javascript_url(args).each do |url|
|
28
28
|
tag = javascript_include_tag url, options
|
29
|
-
tag.gsub(/\.js/i, ".js.gz") if
|
29
|
+
tag = tag.gsub(/\.js/i, ".js.gz") if request.accept_encoding =~ /gzip/i && Cyborg.gzip_assets?
|
30
30
|
tags += tag
|
31
31
|
end
|
32
32
|
|
data/lib/cyborg/plugin.rb
CHANGED
@@ -89,6 +89,7 @@ module Cyborg
|
|
89
89
|
root: @gem.full_gem_path,
|
90
90
|
version: @gem.version.to_s,
|
91
91
|
gem_name: @gem.name,
|
92
|
+
gzip_in_production: true,
|
92
93
|
paths: {
|
93
94
|
stylesheets: "app/assets/stylesheets/#{name}",
|
94
95
|
javascripts: "app/assets/javascripts/#{name}",
|
@@ -101,6 +102,10 @@ module Cyborg
|
|
101
102
|
end
|
102
103
|
end
|
103
104
|
|
105
|
+
def gzip_in_production?
|
106
|
+
@gzip_in_production
|
107
|
+
end
|
108
|
+
|
104
109
|
def expand_asset_paths
|
105
110
|
@paths.each do |type, path|
|
106
111
|
@paths[type] = File.join(root, path)
|
data/lib/cyborg/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cyborg
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.4.
|
4
|
+
version: 0.4.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Brandon Mathis
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-19 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: sass
|