Files
fn-serverless/cli/langs/ruby.go
Travis Reeder 48e3781d5e Rename to GitHub (#3)
* circle

* Rename to github and fn->cli

*  Rename to github and fn->cli
2017-07-26 10:50:19 -07:00

36 lines
693 B
Go

package langs
type RubyLangHelper struct {
BaseHelper
}
func (lh *RubyLangHelper) BuildFromImage() string {
return "funcy/ruby:dev"
}
func (lh *RubyLangHelper) RunFromImage() string {
return "funcy/ruby"
}
func (h *RubyLangHelper) DockerfileBuildCmds() []string {
r := []string{}
if exists("Gemfile") {
r = append(r,
"ADD Gemfile* /function/",
"RUN bundle install",
)
}
return r
}
func (h *RubyLangHelper) DockerfileCopyCmds() []string {
return []string{
"COPY --from=build-stage /usr/lib/ruby/gems/ /usr/lib/ruby/gems/", // skip this if no Gemfile? Does it matter?
"ADD . /function/",
}
}
func (lh *RubyLangHelper) Entrypoint() string {
return "ruby func.rb"
}