genius-builder 0.1.1 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/genius +11 -1
- data/lib/genius.rh +11 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5e779a5692b018a7715aca949c3b96274b8e67661996ec41e9e0cf90e3a81833
|
4
|
+
data.tar.gz: 2a2b6e31b4f0e64e48d5783e2d95212e020e9d18b7b474535dfe5e72bfef7cfe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 710ff1f94d30e2c1de2a4f3eaa7c373cda2804bc6f668e9561c2723bea20b2f66bd577eb64c87db069e4fd62dddf32fad0df02b8a9ff042bf422ff8ecf4fc81e
|
7
|
+
data.tar.gz: d1a258fc755b900b0b8042ef7e83fe45feb28ff1245ca7626c7158e2c67508b529db4b3f255070a0f6b81655724420ed9a828f069281f858d822f06258d65b62
|
data/bin/genius
CHANGED
@@ -120,6 +120,16 @@ Dir["**/*"].each do |file|
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
+
# If given the name of an existing pattern, run that instead
|
124
|
+
if Genius.build_tools.key? ARGV[0]
|
125
|
+
Genius.build_tools[ARGV[0]].build(file_set)
|
126
|
+
exit
|
127
|
+
elsif Genius.build_groups.key? ARGV[0]
|
128
|
+
group = Genius.build_groups[ARGV[0]]
|
129
|
+
group.build(file_set.filter{|k,v| group.extensions.include?(k)})
|
130
|
+
exit
|
131
|
+
end
|
132
|
+
|
123
133
|
# Check for build tool patterns, terminating after build completion if one is matched
|
124
134
|
Genius.build_tools.each do |name, tool|
|
125
135
|
if tool.files.any? {|f| File.exist?(f) && !File.directory?(f)}
|
@@ -146,4 +156,4 @@ end
|
|
146
156
|
# Build based on commands specified by most populous build group,
|
147
157
|
# passing only the files with extensions specified by that group.
|
148
158
|
group = group_counts.max_by{|k,v| v}[0]
|
149
|
-
|
159
|
+
group.build(file_set.filter{|k,v| group.extensions.include?(k)})
|
data/lib/genius.rh
CHANGED
@@ -120,6 +120,16 @@ Dir["**/*"].each do |file|
|
|
120
120
|
end
|
121
121
|
end
|
122
122
|
|
123
|
+
# If given the name of an existing pattern, run that instead
|
124
|
+
if Genius.build_tools.key? ARGV[0]
|
125
|
+
Genius.build_tools[ARGV[0]].build(file_set)
|
126
|
+
exit
|
127
|
+
elsif Genius.build_groups.key? ARGV[0]
|
128
|
+
group = Genius.build_groups[ARGV[0]]
|
129
|
+
group.build(file_set.filter{|k,v| group.extensions.include?(k)})
|
130
|
+
exit
|
131
|
+
end
|
132
|
+
|
123
133
|
# Check for build tool patterns, terminating after build completion if one is matched
|
124
134
|
Genius.build_tools.each do |name, tool|
|
125
135
|
if tool.files.any? {|f| File.exist?(f) && !File.directory?(f)}
|
@@ -146,4 +156,4 @@ end
|
|
146
156
|
# Build based on commands specified by most populous build group,
|
147
157
|
# passing only the files with extensions specified by that group.
|
148
158
|
group = group_counts.max_by{|k,v| v}[0]
|
149
|
-
|
159
|
+
group.build(file_set.filter{|k,v| group.extensions.include?(k)})
|