regen 0.0.4 → 0.0.5
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/regen.rb +3 -2
- metadata +1 -1
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 4b69280f936ec8dbe2c2c950e47e84b148705332
|
|
4
|
+
data.tar.gz: 4e33fdd073ccba7f4061dc6cfba3ecc85159b2cd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: bc7c2b61a9ff873ebce611c5050db9657668a7547aaf269937d6832c34159242bee93a1baade74b296c3ccaf86ea071b4ed3b90421d415c21ecf80c5e658fabf
|
|
7
|
+
data.tar.gz: e10f7a4d8924aba90143ee12523424c203871a24e619143768e685894a25faf5362c2cae0e8d4113889b72762754f5d807e00d8de5a3cc98fbd30fff11fc42f8
|
data/lib/regen.rb
CHANGED
|
@@ -27,6 +27,7 @@ clones = []
|
|
|
27
27
|
if options[:config_file].match(/http|https/)
|
|
28
28
|
`git clone #{options[:config_file]} rgen_clone_tmp`
|
|
29
29
|
clones << options[:config_file]
|
|
30
|
+
options[:config_file] = './rgen_clone_tmp/regen.json'
|
|
30
31
|
end
|
|
31
32
|
|
|
32
33
|
file = File.read(options[:config_file])
|
|
@@ -51,9 +52,10 @@ Dir.chdir(start_dir)
|
|
|
51
52
|
Dir.mkdir "./rgen_tmp"
|
|
52
53
|
data["ignore"] ||= []
|
|
53
54
|
data["templates"] ||= []
|
|
55
|
+
FileUtils.remove_dir "rgen_clone_tmp", true
|
|
54
56
|
data["templates"].each do |template|
|
|
55
57
|
if template.match(/http|https/)
|
|
56
|
-
`git clone #{template} rgen_clone_tmp`
|
|
58
|
+
`git clone #{template} rgen_clone_tmp`
|
|
57
59
|
Dir.foreach("rgen_clone_tmp") do |x|
|
|
58
60
|
unless [".", ".."].include?(x)
|
|
59
61
|
FileUtils.mv("rgen_clone_tmp/#{x}", "rgen_tmp/") unless data["ignore"].include?(x)
|
|
@@ -65,7 +67,6 @@ data["templates"].each do |template|
|
|
|
65
67
|
end
|
|
66
68
|
end
|
|
67
69
|
|
|
68
|
-
#binding.pry
|
|
69
70
|
`cp -R ./rgen_tmp/ #{options[:destination]}`
|
|
70
71
|
|
|
71
72
|
# Running any post commands that should come after the
|