genius-builder 0.1.1 → 0.2.0

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/genius +11 -1
  3. data/lib/genius.rh +11 -1
  4. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: f3b88f0b419d9b88da858d6ace39842c451d11c26c49e6f20e654b4f8d64e602
4
- data.tar.gz: a5f4b88ac27ff2f2b3bf46eab490e89736366a30f9bc65671426762e5af0a4cc
3
+ metadata.gz: 5e779a5692b018a7715aca949c3b96274b8e67661996ec41e9e0cf90e3a81833
4
+ data.tar.gz: 2a2b6e31b4f0e64e48d5783e2d95212e020e9d18b7b474535dfe5e72bfef7cfe
5
5
  SHA512:
6
- metadata.gz: 40b9ab31c924e9928580ea4360f58b17004a3962065ee53fc421379e963c4d4cbefde63ca6b51603c4605798d3df7a75f0116f86989a491c54358d2cffd9594a
7
- data.tar.gz: 9f38a77fad22d58dee046d5299aaa58424fef0789823b085f03fa14deba1c1452923965b200e7576c3a17fe3a98b21237c899734b4dfec2aecff7bad16118d52
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
- Genius.build_groups[group.name].build(file_set.filter{|k,v| group.extensions.include?(k)})
159
+ group.build(file_set.filter{|k,v| group.extensions.include?(k)})
@@ -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
- Genius.build_groups[group.name].build(file_set.filter{|k,v| group.extensions.include?(k)})
159
+ group.build(file_set.filter{|k,v| group.extensions.include?(k)})
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: genius-builder
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1
4
+ version: 0.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kellen Watt