distil 0.12.3 → 0.12.4
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.
- data/Rakefile +1 -0
- data/VERSION +1 -1
- data/bin/distil +2 -0
- data/distil.gemspec +5 -2
- data/distil.tmproj +53 -23
- data/lib/distil/configurable/file-set.rb +1 -2
- data/lib/distil/error-reporter.rb +12 -0
- data/lib/distil/project/distil-project.rb +1 -1
- data/lib/distil/project/remote-project.rb +5 -1
- data/lib/distil/target.rb +4 -0
- data/lib/distil/task/validate-js-task.rb +7 -7
- metadata +20 -4
data/Rakefile
CHANGED
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.12.
|
1
|
+
0.12.4
|
data/bin/distil
CHANGED
data/distil.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{distil}
|
8
|
-
s.version = "0.12.
|
8
|
+
s.version = "0.12.4"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Jeff Watkins"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-29}
|
13
13
|
s.default_executable = %q{distil}
|
14
14
|
s.description = %q{A build tool for Javascript and CSS that takes advantage of best-of-breed helper applications Javascript Lint and JSDoc Toolkit}
|
15
15
|
s.executables = ["distil"]
|
@@ -750,11 +750,14 @@ Gem::Specification.new do |s|
|
|
750
750
|
|
751
751
|
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
|
752
752
|
s.add_runtime_dependency(%q<json>, [">= 1.4.3"])
|
753
|
+
s.add_runtime_dependency(%q<rubyzip>, [">= 0.9.4"])
|
753
754
|
else
|
754
755
|
s.add_dependency(%q<json>, [">= 1.4.3"])
|
756
|
+
s.add_dependency(%q<rubyzip>, [">= 0.9.4"])
|
755
757
|
end
|
756
758
|
else
|
757
759
|
s.add_dependency(%q<json>, [">= 1.4.3"])
|
760
|
+
s.add_dependency(%q<rubyzip>, [">= 0.9.4"])
|
758
761
|
end
|
759
762
|
end
|
760
763
|
|
data/distil.tmproj
CHANGED
@@ -3,7 +3,7 @@
|
|
3
3
|
<plist version="1.0">
|
4
4
|
<dict>
|
5
5
|
<key>currentDocument</key>
|
6
|
-
<string>lib/distil/
|
6
|
+
<string>lib/distil/project/remote-project.rb</string>
|
7
7
|
<key>documents</key>
|
8
8
|
<array>
|
9
9
|
<dict>
|
@@ -21,19 +21,19 @@
|
|
21
21
|
<integer>270</integer>
|
22
22
|
<key>metaData</key>
|
23
23
|
<dict>
|
24
|
-
<key>
|
24
|
+
<key>Rakefile</key>
|
25
25
|
<dict>
|
26
26
|
<key>caret</key>
|
27
27
|
<dict>
|
28
28
|
<key>column</key>
|
29
|
-
<integer>
|
29
|
+
<integer>48</integer>
|
30
30
|
<key>line</key>
|
31
|
-
<integer>
|
31
|
+
<integer>16</integer>
|
32
32
|
</dict>
|
33
33
|
<key>firstVisibleColumn</key>
|
34
34
|
<integer>0</integer>
|
35
35
|
<key>firstVisibleLine</key>
|
36
|
-
<integer>
|
36
|
+
<integer>0</integer>
|
37
37
|
</dict>
|
38
38
|
<key>lib/distil/product/concatenated.rb</key>
|
39
39
|
<dict>
|
@@ -49,42 +49,42 @@
|
|
49
49
|
<key>firstVisibleLine</key>
|
50
50
|
<integer>2</integer>
|
51
51
|
</dict>
|
52
|
-
<key>lib/distil/
|
52
|
+
<key>lib/distil/product/javascript-product.rb</key>
|
53
53
|
<dict>
|
54
54
|
<key>caret</key>
|
55
55
|
<dict>
|
56
56
|
<key>column</key>
|
57
|
-
<integer>
|
57
|
+
<integer>69</integer>
|
58
58
|
<key>line</key>
|
59
|
-
<integer>
|
59
|
+
<integer>118</integer>
|
60
60
|
</dict>
|
61
61
|
<key>firstVisibleColumn</key>
|
62
62
|
<integer>0</integer>
|
63
63
|
<key>firstVisibleLine</key>
|
64
|
-
<integer>
|
64
|
+
<integer>75</integer>
|
65
65
|
</dict>
|
66
|
-
<key>lib/distil/project/
|
66
|
+
<key>lib/distil/project/external-project.rb</key>
|
67
67
|
<dict>
|
68
68
|
<key>caret</key>
|
69
69
|
<dict>
|
70
70
|
<key>column</key>
|
71
|
-
<integer>
|
71
|
+
<integer>0</integer>
|
72
72
|
<key>line</key>
|
73
|
-
<integer>
|
73
|
+
<integer>35</integer>
|
74
74
|
</dict>
|
75
75
|
<key>firstVisibleColumn</key>
|
76
76
|
<integer>0</integer>
|
77
77
|
<key>firstVisibleLine</key>
|
78
|
-
<integer>
|
78
|
+
<integer>0</integer>
|
79
79
|
</dict>
|
80
|
-
<key>lib/distil/project/
|
80
|
+
<key>lib/distil/project/remote-project.rb</key>
|
81
81
|
<dict>
|
82
82
|
<key>caret</key>
|
83
83
|
<dict>
|
84
84
|
<key>column</key>
|
85
85
|
<integer>0</integer>
|
86
86
|
<key>line</key>
|
87
|
-
<integer>
|
87
|
+
<integer>26</integer>
|
88
88
|
</dict>
|
89
89
|
<key>firstVisibleColumn</key>
|
90
90
|
<integer>0</integer>
|
@@ -98,26 +98,56 @@
|
|
98
98
|
<key>column</key>
|
99
99
|
<integer>0</integer>
|
100
100
|
<key>line</key>
|
101
|
-
<integer>
|
101
|
+
<integer>0</integer>
|
102
102
|
</dict>
|
103
|
+
<key>columnSelection</key>
|
104
|
+
<false/>
|
103
105
|
<key>firstVisibleColumn</key>
|
104
106
|
<integer>0</integer>
|
105
107
|
<key>firstVisibleLine</key>
|
106
|
-
<integer>
|
108
|
+
<integer>0</integer>
|
109
|
+
<key>selectFrom</key>
|
110
|
+
<dict>
|
111
|
+
<key>column</key>
|
112
|
+
<integer>0</integer>
|
113
|
+
<key>line</key>
|
114
|
+
<integer>0</integer>
|
115
|
+
</dict>
|
116
|
+
<key>selectTo</key>
|
117
|
+
<dict>
|
118
|
+
<key>column</key>
|
119
|
+
<integer>6</integer>
|
120
|
+
<key>line</key>
|
121
|
+
<integer>0</integer>
|
122
|
+
</dict>
|
123
|
+
</dict>
|
124
|
+
<key>lib/distil/task/validate-js-task.rb</key>
|
125
|
+
<dict>
|
126
|
+
<key>caret</key>
|
127
|
+
<dict>
|
128
|
+
<key>column</key>
|
129
|
+
<integer>32</integer>
|
130
|
+
<key>line</key>
|
131
|
+
<integer>48</integer>
|
132
|
+
</dict>
|
133
|
+
<key>firstVisibleColumn</key>
|
134
|
+
<integer>0</integer>
|
135
|
+
<key>firstVisibleLine</key>
|
136
|
+
<integer>23</integer>
|
107
137
|
</dict>
|
108
138
|
</dict>
|
109
139
|
<key>openDocuments</key>
|
110
140
|
<array>
|
111
|
-
<string>lib/distil/product.rb</string>
|
112
|
-
<string>lib/distil/product/concatenated.rb</string>
|
113
|
-
<string>lib/distil/project.rb</string>
|
114
|
-
<string>lib/distil/project/distil-project.rb</string>
|
115
141
|
<string>lib/distil/target.rb</string>
|
116
|
-
<string>lib/distil/
|
142
|
+
<string>lib/distil/product/concatenated.rb</string>
|
143
|
+
<string>lib/distil/product/javascript-product.rb</string>
|
144
|
+
<string>lib/distil/task/validate-js-task.rb</string>
|
145
|
+
<string>lib/distil/project/remote-project.rb</string>
|
146
|
+
<string>Rakefile</string>
|
117
147
|
</array>
|
118
148
|
<key>showFileHierarchyDrawer</key>
|
119
149
|
<false/>
|
120
150
|
<key>windowFrame</key>
|
121
|
-
<string>{{
|
151
|
+
<string>{{350, 0}, {1090, 878}}</string>
|
122
152
|
</dict>
|
123
153
|
</plist>
|
@@ -69,8 +69,7 @@ module Distil
|
|
69
69
|
# file not found by globbing (would also find explicit reference)
|
70
70
|
source_file= @owner.find_file(file) if @owner
|
71
71
|
if !source_file
|
72
|
-
|
73
|
-
error("Unable to locate file: #{file}")
|
72
|
+
error("File not found: #{file}")
|
74
73
|
return
|
75
74
|
end
|
76
75
|
return if (@files.include?(source_file))
|
@@ -4,6 +4,8 @@ module Distil
|
|
4
4
|
@@warning_count=0
|
5
5
|
@@error_count=0
|
6
6
|
@@ignore_warnings= false
|
7
|
+
@@total_warning_count=0
|
8
|
+
@@total_error_count=0
|
7
9
|
|
8
10
|
def ignore_warnings
|
9
11
|
@@ignore_warnings
|
@@ -13,6 +15,14 @@ module Distil
|
|
13
15
|
@@ignore_warnings=ignore
|
14
16
|
end
|
15
17
|
|
18
|
+
def total_error_count
|
19
|
+
@@total_error_count
|
20
|
+
end
|
21
|
+
|
22
|
+
def total_warning_count
|
23
|
+
@@total_warning_count
|
24
|
+
end
|
25
|
+
|
16
26
|
def self.error(message, file=nil, line_number=nil)
|
17
27
|
@@error_count+=1
|
18
28
|
if (file && line_number)
|
@@ -54,6 +64,8 @@ module Distil
|
|
54
64
|
def report
|
55
65
|
puts "\n" if (@@error_count>0 || @@warning_count>0)
|
56
66
|
puts "#{@@error_count} error(s), #{@@warning_count} warning(s)#{ignore_warnings ? " ignored" : ""}"
|
67
|
+
@@total_error_count += @@error_count
|
68
|
+
@@total_warning_count += @@warning_count
|
57
69
|
@@error_count=0
|
58
70
|
@@warning_count=0
|
59
71
|
end
|
@@ -5,7 +5,7 @@ module Distil
|
|
5
5
|
attr_reader :project_file, :targets
|
6
6
|
|
7
7
|
option :ignore_warnings, false
|
8
|
-
|
8
|
+
option :warnings_are_errors, false
|
9
9
|
option :external_projects, [], :aliases=>['external']
|
10
10
|
option :distileries, Array, :aliases=>['distilleries', 'distilery', 'distillery']
|
11
11
|
|
@@ -19,7 +19,11 @@ module Distil
|
|
19
19
|
|
20
20
|
if !File.exist?(@source_path)
|
21
21
|
FileUtils.mkdir_p(source_folder)
|
22
|
-
|
22
|
+
begin
|
23
|
+
text= href.read
|
24
|
+
rescue OpenURI::HTTPError => http_error
|
25
|
+
raise ValidationError, "Unable to fetch remote project: status=#{http_error.io.status[0]} url=#{href}"
|
26
|
+
end
|
23
27
|
File.open(@source_path, "w") { |output|
|
24
28
|
output.write text
|
25
29
|
}
|
data/lib/distil/target.rb
CHANGED
@@ -36,9 +36,9 @@ module Distil
|
|
36
36
|
tmp << "+define #{global_export}\n"
|
37
37
|
end
|
38
38
|
|
39
|
-
|
40
|
-
|
41
|
-
|
39
|
+
additional_globals.each { |g|
|
40
|
+
tmp << "+define #{g}\n"
|
41
|
+
}
|
42
42
|
|
43
43
|
target.file_aliases.each { |original, full_path|
|
44
44
|
next if !File.exist?(full_path)
|
@@ -64,15 +64,15 @@ module Distil
|
|
64
64
|
summary= output.pop
|
65
65
|
match= summary.match(/(\d+)\s+error\(s\), (\d+)\s+warning\(s\)/)
|
66
66
|
if (match)
|
67
|
-
|
68
|
-
|
67
|
+
@@error_count+= match[1].to_i
|
68
|
+
@@warning_count+= match[2].to_i
|
69
69
|
end
|
70
70
|
|
71
71
|
output= output.join("\n")
|
72
72
|
|
73
73
|
if (!output.empty?)
|
74
|
-
|
75
|
-
|
74
|
+
puts output
|
75
|
+
puts
|
76
76
|
end
|
77
77
|
|
78
78
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: distil
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 39
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 12
|
9
|
-
-
|
10
|
-
version: 0.12.
|
9
|
+
- 4
|
10
|
+
version: 0.12.4
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Jeff Watkins
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2010-07-
|
18
|
+
date: 2010-07-29 00:00:00 -07:00
|
19
19
|
default_executable: distil
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|
@@ -34,6 +34,22 @@ dependencies:
|
|
34
34
|
version: 1.4.3
|
35
35
|
type: :runtime
|
36
36
|
version_requirements: *id001
|
37
|
+
- !ruby/object:Gem::Dependency
|
38
|
+
name: rubyzip
|
39
|
+
prerelease: false
|
40
|
+
requirement: &id002 !ruby/object:Gem::Requirement
|
41
|
+
none: false
|
42
|
+
requirements:
|
43
|
+
- - ">="
|
44
|
+
- !ruby/object:Gem::Version
|
45
|
+
hash: 51
|
46
|
+
segments:
|
47
|
+
- 0
|
48
|
+
- 9
|
49
|
+
- 4
|
50
|
+
version: 0.9.4
|
51
|
+
type: :runtime
|
52
|
+
version_requirements: *id002
|
37
53
|
description: A build tool for Javascript and CSS that takes advantage of best-of-breed helper applications Javascript Lint and JSDoc Toolkit
|
38
54
|
email:
|
39
55
|
executables:
|