Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class GitRidOfShadowing < DataMunger::Script
- # a frozen copy of the required texpert functionality
- class Texpert < ActiveRecord::Base
- def unshadow!
- new_status = case self.status
- when "shadowing" then "texpert"
- when "deactived_shadowing" then "deactivated_texpert"
- end
- if new_status
- self.status = new_status
- self.save(false)
- end
- end
- end
- self.deployment_locations = [:us_master, :uk_master] # if this is omitted it happens in all locations
- self.environments = [:production, :staging] # if this is omitted it happens in all environments
- def self.run
- Texpert.find_all_by_status("shadowing").each do |t|
- t.unshadow!
- end
- end
- end
Add Comment
Please, Sign In to add comment