kstrano 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 (2) hide show
  1. data/bin/kumafy +22 -1
  2. metadata +1 -1
data/bin/kumafy CHANGED
@@ -57,8 +57,9 @@ def update_deploy_config(ui, base, context, force)
57
57
  #end
58
58
 
59
59
  if write_deploy
60
+ dirname = File.basename(Dir.getwd)
60
61
  deploy_gist = get_plain_secure(DEPLOY_GIST).body
61
- context["app_name"] ||= ui.ask("What's the name of the application?")
62
+ context["app_name"] = ui.ask("What's the name of the application?") { |q| q.default = dirname }
62
63
  app_name = context["app_name"]
63
64
  deploy_gist.gsub!(/(:application,\s)(\"\")/, '\1' + "\"#{app_name}\"")
64
65
  deploy_gist.gsub!(/(:admin_runner,\s)(\"\")/, '\1' + "\"#{app_name}\"")
@@ -193,6 +194,25 @@ def validate_path
193
194
  end
194
195
  end
195
196
 
197
+ def update_vendors(base)
198
+ vendors = File.join(base, "bin", "vendors")
199
+ fcontent = ""
200
+ File.open(vendors, "r") do |f|
201
+ f.each do |line|
202
+ fcontent << line
203
+ end
204
+ end
205
+
206
+ File.open(vendors, "w") do |f|
207
+ fcontent.each_line do |line|
208
+ f.print line
209
+ if line.include? "git clone %s %s"
210
+ f.print " system(sprintf('cd %s && git config core.filemode false', escapeshellarg($installDir)));" + "\r\n"
211
+ end
212
+ end
213
+ end
214
+ end
215
+
196
216
  force = false
197
217
 
198
218
  OptionParser.new do |opts|
@@ -247,5 +267,6 @@ puts "[end] kcapifony"
247
267
  update_capfile base, context, force
248
268
  update_deploy_config ui, base, context, force
249
269
  update_jenkins_config ui, base, context, force
270
+ update_vendors base
250
271
 
251
272
  puts "[done] project kumafied!"
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: kstrano
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.4
4
+ version: 0.0.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: