Sha256: 3c7310a9fd1e59257bdc180c14c262482cd4eeabd927542789c640585bd8283a

Contents?: true

Size: 502 Bytes

Versions: 9

Compression:

Stored size: 502 Bytes

Contents

module OdaniaOps
	module Implementations
		module Backup
			class Mysql
				attr_accessor :template, :host, :opts

				def initialize(host, opts)
					self.host = host
					self.opts = opts
					self.template = File.new(File.join(BASE_DIR, 'templates', 'backup', 'mysql.rb.erb')).read
				end

				def render
					Erubis::Eruby.new(self.template).result(binding)
				end

				def write(target_file)
					File.write(target_file, self.render)
					`chmod +x #{target_file}`
				end
			end
		end
	end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
odania_ops-0.0.14 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.13 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.12 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.11 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.10 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.9 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.8 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.7 lib/odania_ops/implementations/backup/mysql.rb
odania_ops-0.0.6 lib/odania_ops/implementations/backup/mysql.rb