distil 0.11.5 → 0.11.6
Sign up to get free protection for your applications and to get access to all the features.
- data/VERSION +1 -1
- data/distil.gemspec +3 -2
- data/lib/distil/browser.rb +34 -0
- data/lib/distil/project/distil-project.rb +23 -0
- data/lib/distil/target.rb +4 -0
- data/lib/distil.rb +1 -0
- metadata +4 -3
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.11.
|
1
|
+
0.11.6
|
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.11.
|
8
|
+
s.version = "0.11.6"
|
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-06-
|
12
|
+
s.date = %q{2010-06-18}
|
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"]
|
@@ -21,6 +21,7 @@ Gem::Specification.new do |s|
|
|
21
21
|
"bin/distil",
|
22
22
|
"distil.gemspec",
|
23
23
|
"lib/distil.rb",
|
24
|
+
"lib/distil/browser.rb",
|
24
25
|
"lib/distil/configurable.rb",
|
25
26
|
"lib/distil/configurable/file-set.rb",
|
26
27
|
"lib/distil/configurable/interpolated.rb",
|
@@ -0,0 +1,34 @@
|
|
1
|
+
class Browser
|
2
|
+
def supported?; true; end
|
3
|
+
def setup ; end
|
4
|
+
def open(url) ; end
|
5
|
+
def teardown ; end
|
6
|
+
|
7
|
+
def host
|
8
|
+
require 'rbconfig'
|
9
|
+
Config::CONFIG['host']
|
10
|
+
end
|
11
|
+
|
12
|
+
def macos?
|
13
|
+
host.include?('darwin')
|
14
|
+
end
|
15
|
+
|
16
|
+
def windows?
|
17
|
+
host.include?('mswin')
|
18
|
+
end
|
19
|
+
|
20
|
+
def linux?
|
21
|
+
host.include?('linux')
|
22
|
+
end
|
23
|
+
|
24
|
+
def open(url)
|
25
|
+
case
|
26
|
+
when macos?
|
27
|
+
`open #{url}`
|
28
|
+
when windows?
|
29
|
+
`start #{url}`
|
30
|
+
else
|
31
|
+
puts "I don't know how to open a browser for #{url} on your system"
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
@@ -63,6 +63,25 @@ module Distil
|
|
63
63
|
@projects_by_name[name]
|
64
64
|
end
|
65
65
|
|
66
|
+
def launch
|
67
|
+
build if !up_to_date
|
68
|
+
|
69
|
+
require 'webrick'
|
70
|
+
config= {
|
71
|
+
:Port => 8888
|
72
|
+
}
|
73
|
+
|
74
|
+
server= WEBrick::HTTPServer.new(config)
|
75
|
+
server.mount("/", WEBrick::HTTPServlet::FileHandler, output_folder)
|
76
|
+
|
77
|
+
['INT', 'TERM'].each { |signal|
|
78
|
+
trap(signal){ server.shutdown}
|
79
|
+
}
|
80
|
+
b= Browser.new
|
81
|
+
b.open("http://localhost:8888/")
|
82
|
+
server.start
|
83
|
+
end
|
84
|
+
|
66
85
|
def build
|
67
86
|
FileUtils.mkdir_p(output_folder)
|
68
87
|
load_distileries
|
@@ -93,6 +112,10 @@ module Distil
|
|
93
112
|
}
|
94
113
|
end
|
95
114
|
|
115
|
+
def up_to_date
|
116
|
+
targets.all? { |target| target.up_to_date }
|
117
|
+
end
|
118
|
+
|
96
119
|
def build_targets
|
97
120
|
targets.each { |target|
|
98
121
|
target.build
|
data/lib/distil/target.rb
CHANGED
data/lib/distil.rb
CHANGED
metadata
CHANGED
@@ -5,8 +5,8 @@ version: !ruby/object:Gem::Version
|
|
5
5
|
segments:
|
6
6
|
- 0
|
7
7
|
- 11
|
8
|
-
-
|
9
|
-
version: 0.11.
|
8
|
+
- 6
|
9
|
+
version: 0.11.6
|
10
10
|
platform: ruby
|
11
11
|
authors:
|
12
12
|
- Jeff Watkins
|
@@ -14,7 +14,7 @@ autorequire:
|
|
14
14
|
bindir: bin
|
15
15
|
cert_chain: []
|
16
16
|
|
17
|
-
date: 2010-06-
|
17
|
+
date: 2010-06-18 00:00:00 -07:00
|
18
18
|
default_executable: distil
|
19
19
|
dependencies:
|
20
20
|
- !ruby/object:Gem::Dependency
|
@@ -46,6 +46,7 @@ files:
|
|
46
46
|
- bin/distil
|
47
47
|
- distil.gemspec
|
48
48
|
- lib/distil.rb
|
49
|
+
- lib/distil/browser.rb
|
49
50
|
- lib/distil/configurable.rb
|
50
51
|
- lib/distil/configurable/file-set.rb
|
51
52
|
- lib/distil/configurable/interpolated.rb
|