regen 0.0.4 → 0.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (3) hide show
  1. checksums.yaml +4 -4
  2. data/lib/regen.rb +3 -2
  3. metadata +1 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: e6a79edaffc766dd439bd277518e19a394790476
4
- data.tar.gz: 35e6f61a969efdecb18c8117d9088c8fc9af9fb6
3
+ metadata.gz: 4b69280f936ec8dbe2c2c950e47e84b148705332
4
+ data.tar.gz: 4e33fdd073ccba7f4061dc6cfba3ecc85159b2cd
5
5
  SHA512:
6
- metadata.gz: e2f092b9b3bed5176be45ac06206987c1aa9ae9c9cfbbcd41af07f8328ac23d31e8a978dda48367b09f37f4d0e0db876a657b7b4fbe5f9782234a9ef81c172f5
7
- data.tar.gz: 82977d176b76d0608cc6d6fa27dff2b51360bac7f1f91e56f029c79b29cbb97b89d534ac3859b5488fbfabfd30b32f4ad882e478de333df382e0155f74119b6f
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` unless clones.include?(template)
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
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: regen
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joiey Seeley