bonethug 0.0.33 → 0.0.35

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.
data/lib/bonethug/cli.rb CHANGED
@@ -41,7 +41,47 @@ module Bonethug
41
41
  # run the initaliser
42
42
  Installer.bonethugise(location, task.to_sym)
43
43
 
44
- when 'deploy', 'setup', 'remote-backup', 'local-backup', 'sync-backup-to', 'sync-backup-from', 'sync-local-to', 'sync-local-from', 'init-db', 'force-unlock', 'cleanup'
44
+ when 'run',
45
+ 'rake',
46
+ 'drush',
47
+ 'sake'
48
+
49
+ # get env
50
+ environment = ARGV.last
51
+
52
+ # handle args
53
+ if task == 'run'
54
+ cmd_task = ARGV[1]
55
+ args = ARGV[2..(ARGV.length-2)]
56
+ else
57
+ case task
58
+ when 'rake'
59
+ cmd_task = 'rake'
60
+ when 'drush'
61
+ cmd_task = 'vendor/drush/drush'
62
+ when 'sake'
63
+ cmd_task = 'public/framework/sake'
64
+ end
65
+ args = ARGV[1..(ARGV.length-2)]
66
+ end
67
+
68
+ # build command
69
+ run = "\"run[#{cmd_task} #{args.join(' ')}]\""
70
+
71
+ # do it!
72
+ exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb #{run} --verbose"
73
+
74
+ when 'deploy',
75
+ 'setup',
76
+ 'remote-backup',
77
+ 'local-backup',
78
+ 'sync-backup-to',
79
+ 'sync-backup-from',
80
+ 'sync-local-to',
81
+ 'sync-local-from',
82
+ 'init-db',
83
+ 'force-unlock',
84
+ 'cleanup'
45
85
 
46
86
  # handle args
47
87
  environment = ARGV[1]
@@ -66,7 +106,7 @@ module Bonethug
66
106
  when 'force-unlock'
67
107
  exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:force_unlock --verbose"
68
108
  when 'cleanup'
69
- exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:cleanup --verbose"
109
+ exec "export to=#{environment} && bundle exec mina -f .bonethug/deploy.rb deploy:cleanup --verbose"
70
110
 
71
111
  # Snapshot Backup
72
112
  when 'remote-backup'
@@ -233,10 +233,15 @@ module Bonethug
233
233
  if project_type
234
234
  bonethug_files = @@conf.get 'project_types.' + project_type + '.bonethug_files'
235
235
  bonethug_files.each do |index, file|
236
+
237
+ # push some output
236
238
  puts 'Handling ' + index.to_s + ':' + file.to_s
239
+
240
+ # do the copy
237
241
  src_file = @@bonthug_gem_dir + '/skel/project_types/' + project_type + '/' + file
238
242
  dst_file = target + '/' + file
239
243
  FileUtils.cp src_file, dst_file
244
+
240
245
  end
241
246
  else
242
247
  puts "Couldn't find project type in " + target_cnf
@@ -1,3 +1,3 @@
1
1
  module Bonethug
2
- VERSION = "0.0.33"
2
+ VERSION = "0.0.35"
3
3
  end
@@ -1,5 +1,6 @@
1
1
  {
2
2
  "require": {
3
- "symfony/yaml" : "2.3.*@dev"
3
+ "symfony/yaml" : "2.3.*@dev",
4
+ "drush/drush" : "dev-master"
4
5
  }
5
6
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bonethug
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.33
4
+ version: 0.0.35
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: