pupu 0.0.5.1 → 0.0.5.2
Sign up to get free protection for your applications and to get access to all the features.
- data/lib/pupu/dsl.rb +12 -7
- data/lib/pupu/version.rb +1 -1
- metadata +2 -2
data/lib/pupu/dsl.rb
CHANGED
@@ -11,11 +11,16 @@ end
|
|
11
11
|
|
12
12
|
module Pupu
|
13
13
|
class DSL
|
14
|
-
attr_reader :output, :
|
14
|
+
attr_reader :output, :path
|
15
|
+
|
16
|
+
@@files ||= Array.new
|
17
|
+
def files
|
18
|
+
@@files
|
19
|
+
end
|
20
|
+
|
15
21
|
def initialize(pupu)
|
16
|
-
@pupu
|
22
|
+
@pupu = pupu
|
17
23
|
@output = Array.new
|
18
|
-
@files = Array.new
|
19
24
|
@dependencies = Array.new
|
20
25
|
@path = pupu.file("config.rb")
|
21
26
|
end
|
@@ -54,8 +59,8 @@ module Pupu
|
|
54
59
|
if params[:if]
|
55
60
|
tag = "<!--[if #{params[:if]}]>" + tag + "<![endif]-->"
|
56
61
|
end
|
57
|
-
unless
|
58
|
-
|
62
|
+
unless files.include?(path)
|
63
|
+
files.push(path)
|
59
64
|
@output.push(tag)
|
60
65
|
end
|
61
66
|
end
|
@@ -69,8 +74,8 @@ module Pupu
|
|
69
74
|
if condition
|
70
75
|
tag = "<!--[if #{condition}]>" + tag + "<![endif]-->"
|
71
76
|
end
|
72
|
-
unless
|
73
|
-
|
77
|
+
unless files.include?(path)
|
78
|
+
files.push(path)
|
74
79
|
@output.push(tag)
|
75
80
|
end
|
76
81
|
end
|
data/lib/pupu/version.rb
CHANGED