bonethug 0.0.62 → 0.0.63

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/config/deploy.rb CHANGED
@@ -128,7 +128,7 @@ task :update_packages => :environment do
128
128
  queue! %[php #{deploy_to}/current/public/framework/cli-script.php dev/build] if ['silverstripe','silverstripe3'].include? deploy.get('project_type')
129
129
  end
130
130
 
131
- desc "Sets up an environemt"
131
+ desc "Sets up an environment"
132
132
  task :setup_env => :environment do
133
133
  Bonethug::Installer.get_setup_env_cmds.each do |cmd|
134
134
  queue! %[#{cmd}]
data/lib/bonethug/cli.rb CHANGED
@@ -43,12 +43,24 @@ module Bonethug
43
43
  return
44
44
  end
45
45
 
46
- if env == 'local'
47
- gem_dir = File.expand_path File.dirname(__FILE__) + '/../..'
48
- script = gem_dir '/scripts/ubuntu_setup.sh'
46
+ # find the file
47
+ gem_dir = File.expand_path File.dirname(__FILE__) + '/../..'
48
+ script = gem_dir + '/scripts/ubuntu_setup.sh'
49
+
50
+ if env == 'show'
51
+
52
+ puts "Pre"
53
+ puts File.read script
54
+
55
+ puts "Parsed"
56
+ puts Installer.parse_sh File.read(script)
57
+
58
+ elsif env == 'local'
49
59
  exec 'sudo bash ' + script
60
+
50
61
  else
51
62
  exec "export to=#{env} && bundle exec mina -f .bonethug/deploy.rb setup_env --verbose"
63
+
52
64
  end
53
65
 
54
66
  when 'init', 'update'
@@ -130,14 +130,20 @@ module Bonethug
130
130
  self
131
131
  end
132
132
 
133
+ def self.get_setup_script
134
+ @@bonthug_gem_dir + '/scripts/ubuntu_setup.sh'
135
+ end
136
+
137
+ def self.get_setup_script_content
138
+ File.read self.get_setup_script
139
+ end
140
+
133
141
  def self.get_setup_env_cmds
134
- File.read(@@bonthug_gem_dir + '/scripts/ubuntu_setup.sh')
135
- .split("\n")
136
- .each { |line|
137
- return false if line =~ /^[\s\t]+$/
138
- return false if line =~ /^[\s\t]*#/
139
- true
140
- }
142
+ self.parse_sh self.get_setup_script_content
143
+ end
144
+
145
+ def self.parse_sh(content)
146
+ content.split("\n").select { |line| !(line =~ /^[\s\t]+$/ || line =~ /^[\s\t]*#/ || line.strip.length == 0) }
141
147
  end
142
148
 
143
149
  protected
@@ -1,6 +1,6 @@
1
1
 
2
2
  module Bonethug
3
- VERSION = "0.0.62"
4
- BUILD_DATE = "2013-10-17 20:20:15 +1300"
3
+ VERSION = "0.0.63"
4
+ BUILD_DATE = "2013-10-17 21:55:52 +1300"
5
5
  end
6
6
 
@@ -45,7 +45,7 @@ namespace :thug do
45
45
  update_version_file
46
46
 
47
47
  # invoke the build script
48
- system 'git commit -am "commit to build for v #{Bonethug::VERSION}" && rake build'
48
+ system 'git commit -am "commit to build for v ' + Bonethug::VERSION + '" && rake build'
49
49
 
50
50
  end
51
51
 
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.62
4
+ version: 0.0.63
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: