compressor 0.0.3 → 0.0.4

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/compressor.rb +14 -2
  3. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 3b9e88b6987f1b08a32f163c2d5b434e7049b07a
4
- data.tar.gz: 249211f3d66c4196f2a2f391f35bcb03b2a5d51a
3
+ metadata.gz: 4fd93ca50a31e9390c82251c5b529ff035c49297
4
+ data.tar.gz: 264aaa3bd1d9ee32c6b4d9630ceea1706805798b
5
5
  SHA512:
6
- metadata.gz: d61305bad63b1aad29a7548fce3791aac215042efa39df8d830da3b1fe6fdc0dbf081d92f3e6239d35c2d4346a52beb8f692597d48251b8e4965e9774c6010f9
7
- data.tar.gz: a05c68c1efc3e2a66689b6fbed37d549015dcbf7adfaea264d1066a74ae28e153690add25921b2e823d135f6bb63e9fa894547aac9ad43bf6df013f3bcfc570a
6
+ metadata.gz: 508bbad057650654676ef4d8f3b60eeb4f9c7733629cab734b2f70ed10045256e75c0b1312dedde0838e44c403ef1bb7d87d15023bec781a4890ef7be76233bf
7
+ data.tar.gz: 097301dbec4c10c98bfca9f476d421e7d23d3da95fe05876d1b3aef97792a0695fbfc315016e34aa1a3dc1197f40c5edb8bb39a5248dc70d2bf3dc1d3026727b
@@ -8,7 +8,9 @@ end
8
8
  module Motion::Project
9
9
  class Config
10
10
  def concat_files(opts={})
11
- concatenate_files!(extract_concatenated_files(Array(opts[:exclude])), opts[:parallel] || 4)
11
+ opts[:exclude] ||= [ "/app/" ]
12
+ opts[:parallel] ||= 4
13
+ concatenate_files!(extract_concatenated_files(Array(opts[:exclude])), opts[:parallel])
12
14
  end
13
15
 
14
16
  private
@@ -16,9 +18,18 @@ module Motion::Project
16
18
  def extract_concatenated_files(excluded=[])
17
19
  @files.flatten!
18
20
  concatenated_files = @files.select { |f| excluded.none? { |excluded_match| !!f.match(excluded_match) } }
19
- old_dependencies = @dependencies
20
21
  @files = @files - concatenated_files
21
22
  @dependencies = Dependency.new(@files - @exclude_from_detect_dependencies, @dependencies).run
23
+
24
+ # TODO: Remove all concatenated files from the dependency hash
25
+ # @dependencies.each do |target, dependencies|
26
+ # if @files.include?(target)
27
+ # @dependencies[target] = dependencies - concatenated_files
28
+ # else
29
+ # @dependencies.delete(target)
30
+ # end
31
+ # end
32
+
22
33
  order_concatenated_files(concatenated_files)
23
34
  end
24
35
 
@@ -37,6 +48,7 @@ module Motion::Project
37
48
 
38
49
  # Prep the concat path for writing
39
50
  Dir.mkdir(File.dirname(concat_path)) unless File.exist?(File.dirname(concat_path))
51
+ File.new(concat_path, 'w') unless File.exist?(concat_path)
40
52
 
41
53
  # Concatenate this group of files
42
54
  File.open(temp_concat_path, 'a') do |concat|
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: compressor
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.3
4
+ version: 0.0.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Jamon Holmgren
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-04-19 00:00:00.000000000 Z
11
+ date: 2015-05-17 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake