lib/cide/build/config.rb in cide-0.2.0 vs lib/cide/build/config.rb in cide-0.4.0
- old
+ new
@@ -19,38 +19,45 @@
end
"<#{out.join(' ')}>"
end
end
+ class FileAdd
+ include Virtus.model(strict: true)
+ include NiceInspect
+ attribute :src, Array[String], default: []
+ attribute :dest, String
+ end
+
class Step
include Virtus.model(strict: true)
include NiceInspect
- attribute :add, Array[String], default: []
- attribute :forward_env, Array[String], default: []
+ attribute :add, Array[FileAdd], default: []
+ attribute :env, Hash[String, String], default: {}
attribute :run, Array[String], default: []
end
class Link
include Virtus.model
include NiceInspect
attribute :name, String
attribute :image, String
- attribute :env, Hash[String, String]
+ attribute :env, Hash[String, String], default: {}
attribute :run, String
# Container ID added after the fact
attr_accessor :id
end
include Virtus.model(strict: true)
include NiceInspect
attribute :from, String, default: 'ubuntu'
- attribute :as_root, Array[String], default: []
+ attribute :as_root, Step, required: false
attribute :use_ssh, Boolean, default: false
attribute :before, Step, required: false
- attribute :forward_env, Array[String], default: []
+ attribute :env, Hash[String, String], default: {}
attribute :export_dir, String, required: false
attribute :links, Array[Link], default: []
- attribute :run, String, default: 'script/ci'
+ attribute :run, Array[String], default: ['script/ci']
attr_reader :warnings, :errors
def initialize(*)
super