lib/vagrant-invade/helper/checksum.rb in vagrant-invade-0.7.0 vs lib/vagrant-invade/helper/checksum.rb in vagrant-invade-0.8.0
- old
+ new
@@ -2,17 +2,16 @@
module Invade
module Helper
class Checksum
- attr_accessor :env, :root_path, :vagrantfile, :data
+ attr_accessor :data, :root_path, :vagrantfile
- def initialize(env)
- @env = env
+ def initialize(data)
+ @data = data
@root_path = Dir.pwd
@vagrantfile = ENV['VAGRANT_VAGRANTFILE'] ? vagrantfile_name = ENV['VAGRANT_VAGRANTFILE'] : vagrantfile_name = "Vagrantfile"
- @data = env[:invade]['vagrantfile']
end
# Compare Vagrantfile <=> invade.yml with MD5 checksum
def check()
@@ -25,10 +24,10 @@
end
true
end
- def get_checksum_of_data(data)
+ def get_checksum_of_data
begin
checksum = Digest::MD5.hexdigest(@data)
rescue StandardError => e
fail e