lib/itamae/resource/link.rb in itamae-1.2.15 vs lib/itamae/resource/link.rb in itamae-1.2.16

- old
+ new

@@ -4,10 +4,11 @@ module Resource class Link < Base define_attribute :action, default: :create define_attribute :link, type: String, default_name: true define_attribute :to, type: String, required: true + define_attribute :force, default: false def pre_action case @current_action when :create attributes.exist = true @@ -22,10 +23,10 @@ end end def action_create(options) unless run_specinfra(:check_file_is_linked_to, attributes.link, attributes.to) - run_specinfra(:link_file_to, attributes.link, attributes.to) + run_specinfra(:link_file_to, attributes.link, attributes.to, force: attributes.force) end end end end end