Sha256: 21c42372a90bbfac299798eae566d5b007e91fda615206d3448988768b20ec00

Contents?: true

Size: 432 Bytes

Versions: 9

Compression:

Stored size: 432 Bytes

Contents

module Octodmin::Controllers::Deploys
  class Create
    include Octodmin::Action
    expose :message

    def call(params)
      self.format = :json

      site = Octodmin::Site.new
      site.process

      options = site.config["octodmin"]["deploys"].first
      Octopress::Deploy.push(options)

      @message = "Deployed successfully"
    rescue SystemExit => e
      halt 400, JSON.dump(errors: [e.message])
    end
  end
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
octodmin-0.3.5 app/controllers/deploys/create.rb
octodmin-0.3.4 app/controllers/deploys/create.rb
octodmin-0.3.3 app/controllers/deploys/create.rb
octodmin-0.3.2 app/controllers/deploys/create.rb
octodmin-0.3.1 app/controllers/deploys/create.rb
octodmin-0.3.0 app/controllers/deploys/create.rb
octodmin-0.2.1 app/controllers/deploys/create.rb
octodmin-0.2.0 app/controllers/deploys/create.rb
octodmin-0.1.0 app/controllers/deploys/create.rb