cyborg 0.5.11 → 0.5.12

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 4d859782b66a0531a5e0551a3db1be3dac560897
4
- data.tar.gz: 597a8e9bb2e86744a3fcf0cb2cd09563717d9322
3
+ metadata.gz: c0764bb89715d04149969b42d330c181be1eb58f
4
+ data.tar.gz: a1bfd24313e2766372a416b97ffb18e681941f31
5
5
  SHA512:
6
- metadata.gz: 2beffc93814a85fa8deee7a0e2da4a8e52c340cb62ec0629eda243c0b2902a996382dd8c2034d5ab0c83c1f4bb826254f3d28a3237c9f0c0c29d843f37810256
7
- data.tar.gz: 2249f70fc7d18ba23396187c6bd34158ab331887f6837dedb4096ed930942f1ec1c819ba6f0a923c180124fefeed84f1e5611d78af436d1f40516bfcbc801904
6
+ metadata.gz: d8863124a08327183fa799cda66a5de363fa51976726d7b30f27f6823fbcda518c0035fd44df90f41bef40520d94ddee3836f8d3e91e648e3aa9ca8733b45b0f
7
+ data.tar.gz: bef231283701d4b1bba317d823b0a7a3489cc3800cdb08e678574f45e7f14458ca968faa5f3f376060d6debe8d84759b4e53cf61905d0c577594c63703f44a24
@@ -110,6 +110,7 @@ module Cyborg
110
110
 
111
111
  def compress(file)
112
112
  return unless Cyborg.production?
113
+
113
114
  mtime = File.mtime(file)
114
115
  gz_file = "#{file}.gz"
115
116
  return if File.exist?(gz_file) && File.mtime(gz_file) >= mtime
@@ -19,16 +19,17 @@ module Cyborg
19
19
 
20
20
  files.each do |file|
21
21
 
22
- if File.extname(file).match(/\.css/)
23
- build_css(file)
24
- elsif File.extname(file).match(/\.s[ca]ss/)
25
- build_sass(file)
26
- end
22
+ begin
23
+ if File.extname(file).match(/\.css/)
24
+ build_css(file)
25
+ elsif File.extname(file).match(/\.s[ca]ss/)
26
+ build_sass(file)
27
+ end
27
28
 
28
- if File.exist? destination(file)
29
29
  puts build_msg(file)
30
- else
31
- puts "FAILED TO WRITE: #{file}"
30
+ rescue => bang
31
+ STDERR.puts "FAILED TO WRITE: #{destination(file).sub(plugin.root+'/','')}"
32
+ STDERR.puts bang
32
33
  end
33
34
  end
34
35
  end
@@ -42,7 +43,6 @@ module Cyborg
42
43
 
43
44
  def build_sass(file)
44
45
  style = Cyborg.production? ? "compressed" : 'nested'
45
-
46
46
  dest = destination(file)
47
47
 
48
48
  css = Sass.compile_file(file, style: style)
@@ -1,3 +1,3 @@
1
1
  module Cyborg
2
- VERSION = "0.5.11"
2
+ VERSION = "0.5.12"
3
3
  end
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.5.11
4
+ version: 0.5.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brandon Mathis
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-01-31 00:00:00.000000000 Z
11
+ date: 2017-03-06 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: sass