aml 0.0.3 → 0.0.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.
- checksums.yaml +4 -4
- data/lib/aml.rb +1 -0
- data/lib/aml/compile.rb +14 -12
- data/lib/aml/watch.rb +2 -2
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a98badb3128b249e2d67f97138c00077cf9c29c9
|
4
|
+
data.tar.gz: ff741aa149c9b20fa610348db5ec7269f53d91f7
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d63d25dfd2b9677de627606cc2695fb35a7ab79653471aa445fd5051a7d15244d0a974ec29d0e3dc203078779f5fbd4b22e48969965312a94d041507df23347e
|
7
|
+
data.tar.gz: ab2c457d4b293613ba8faf02e5dc7458d023cf5d3635f40d0352ab48ddc13181bace788cba48a8610c06461869d0cdb7838c9c594c6b28addda98b156f5c65b7
|
data/lib/aml.rb
CHANGED
@@ -107,6 +107,7 @@ module AbstractMarkupLanguage
|
|
107
107
|
if(error.count == 0)
|
108
108
|
error.log_delete
|
109
109
|
if argument.read('build') == 'false'
|
110
|
+
#print "\r\b\e[0K#{Gem.loaded_specs['aml'].summary.to_s} is watching #{files.count-1} partial instance#{files.count-1 != 1 ? "s" : ""}""... (#{argument.read('aml-watch-instance').to_i+1}) "
|
110
111
|
print "\r\b\e[0K#{Gem.loaded_specs['aml'].summary.to_s} is watching #{files.count-1} partial instance#{files.count-1 != 1 ? "s" : ""}""... (#{argument.read('aml-watch-instance').to_i+1}) "
|
111
112
|
watch = Watch.new(files, arguments, argument.read('aml-watch-instance').to_i+1, argument.read('build'))
|
112
113
|
else
|
data/lib/aml/compile.rb
CHANGED
@@ -57,11 +57,13 @@ class Compile
|
|
57
57
|
%w"text value".each do |key|
|
58
58
|
line[key.to_sym] = line[key.to_sym].to_s.gsub(regex){mixin_attributes[$1.to_sym]} if line.has_key?(key.to_sym)
|
59
59
|
end
|
60
|
-
|
61
|
-
|
62
|
-
attributes
|
60
|
+
if(line.has_key?(:attributes))
|
61
|
+
attributes = line[:attributes].clone
|
62
|
+
attributes.each do |k,v|
|
63
|
+
attributes[k] = v.to_s.gsub(regex){mixin_attributes[$1.to_sym]}
|
64
|
+
end
|
65
|
+
line[:attributes] = attributes
|
63
66
|
end
|
64
|
-
line[:attributes] = attributes
|
65
67
|
end
|
66
68
|
line
|
67
69
|
end
|
@@ -72,15 +74,15 @@ class Compile
|
|
72
74
|
lines.delete_at index
|
73
75
|
mixin = definition.mixin(line[:name],line[:bundle])
|
74
76
|
if(mixin.is_a?(Hash))
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
79
|
-
|
80
|
-
|
81
|
-
|
77
|
+
mixin = mixin.clone
|
78
|
+
mixin[:structure].each_with_index do |mline,mindex|
|
79
|
+
mixin_line = mline.clone
|
80
|
+
mixin_line[:index] += line[:index]
|
81
|
+
mixin_line[:number] = line[:number]
|
82
|
+
line_attribute_replace(mixin_line,mixin[:attribute],line[:attributes])
|
83
|
+
lines.insert(index+mindex,mixin_line)
|
84
|
+
end
|
82
85
|
end
|
83
|
-
end
|
84
86
|
break
|
85
87
|
end
|
86
88
|
end
|
data/lib/aml/watch.rb
CHANGED
@@ -16,7 +16,7 @@ class Watch
|
|
16
16
|
Kernel.sleep sleep until file_updated?
|
17
17
|
rescue SystemExit,Interrupt
|
18
18
|
puts ""
|
19
|
-
Kernel.exit
|
19
|
+
Kernel.exit!
|
20
20
|
end
|
21
21
|
end
|
22
22
|
end
|
@@ -27,7 +27,7 @@ class Watch
|
|
27
27
|
@last_mtimes[filename] = mtime
|
28
28
|
if(updated)
|
29
29
|
exec("aml #{@arguments} --aml-watch-instance #{@instance}")
|
30
|
-
Kernel.exit
|
30
|
+
Kernel.exit!
|
31
31
|
return true
|
32
32
|
end
|
33
33
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: aml
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Daniel Esquivias
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-07
|
11
|
+
date: 2013-11-07 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: Abstract Markup Language is a robust and feature rich markup language
|
14
14
|
designed to avoid repetition and promote clear, well-indented markup.
|