smart_asset 0.3.1 → 0.3.2

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.
@@ -1,3 +1,3 @@
1
1
  class SmartAsset
2
- VERSION = "0.3.1" unless defined?(::SmartAsset::VERSION)
2
+ VERSION = "0.3.2" unless defined?(::SmartAsset::VERSION)
3
3
  end
data/lib/smart_asset.rb CHANGED
@@ -32,6 +32,7 @@ class SmartAsset
32
32
  ext = ext_from_type type
33
33
  FileUtils.mkdir_p dest
34
34
  (@config[type] || {}).each do |package, files|
35
+ next if ENV['PACKAGE'] && ENV['PACKAGE'] != package
35
36
  if files
36
37
  # Retrieve list of Git modified timestamps
37
38
  modified = []
@@ -68,7 +69,7 @@ class SmartAsset
68
69
 
69
70
  # Compress joined files
70
71
  tmp = "#{dest}/tmp.#{ext}"
71
- File.open(tmp, 'w') { |f| f.write(data.join) }
72
+ File.open(tmp, 'w') { |f| f.write(data.join("\n")) }
72
73
  puts "\nCreating #{output}..."
73
74
  if ext == 'js'
74
75
  warning = ENV['WARN'] ? nil : " --warning_level QUIET"
@@ -78,7 +79,7 @@ class SmartAsset
78
79
  end
79
80
  puts cmd if ENV['DEBUG']
80
81
  `#{cmd}`
81
- FileUtils.rm tmp
82
+ FileUtils.rm(tmp) unless ENV['DEBUG']
82
83
  end
83
84
  end
84
85
  end
metadata CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
5
5
  segments:
6
6
  - 0
7
7
  - 3
8
- - 1
9
- version: 0.3.1
8
+ - 2
9
+ version: 0.3.2
10
10
  platform: ruby
11
11
  authors:
12
12
  - Winton Welsh