Sha256: f2ebe0301515cb472145984ab49240887c6a41fc397aa56bcbde2bf638d84440

Contents?: true

Size: 1.19 KB

Versions: 12

Compression:

Stored size: 1.19 KB

Contents

require 'ruby_fly/version'
require 'ruby_fly/commands'
require 'ruby_fly/rc'

module RubyFly
  class << self
    attr_writer :configuration

    def configuration
      @configuration ||= Configuration.new
    end

    def configure
      yield(configuration)
    end

    def reset!
      @configuration = nil
    end
  end

  module ClassMethods
    def login(opts = {})
      Commands::Login.new.execute(opts)
    end

    def status(opts = {})
      Commands::Status.new.execute(opts)
    end

    def get_pipeline(opts = {})
      Commands::GetPipeline.new.execute(opts)
    end

    def set_pipeline(opts = {})
      Commands::SetPipeline.new.execute(opts)
    end

    def unpause_pipeline(opts = {})
      Commands::UnpausePipeline.new.execute(opts)
    end

    def destroy_pipeline(opts = {})
      Commands::DestroyPipeline.new.execute(opts)
    end

    def version
      Commands::Version.new.execute
    end
  end
  extend ClassMethods

  def self.included(other)
    other.extend(ClassMethods)
  end

  class Configuration
    attr_accessor :binary, :stdin, :stdout, :stderr

    def initialize
      @binary = 'fly'
      @stdin = ''
      @stdout = $stdout
      @stderr = $stderr
    end
  end
end

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
ruby_fly-0.38.0.pre.2 lib/ruby_fly.rb
ruby_fly-0.38.0.pre.1 lib/ruby_fly.rb
ruby_fly-0.37.0 lib/ruby_fly.rb
ruby_fly-0.36.0.pre.5 lib/ruby_fly.rb
ruby_fly-0.36.0.pre.4 lib/ruby_fly.rb
ruby_fly-0.36.0.pre.3 lib/ruby_fly.rb
ruby_fly-0.36.0.pre.2 lib/ruby_fly.rb
ruby_fly-0.36.0.pre.1 lib/ruby_fly.rb
ruby_fly-0.35.0 lib/ruby_fly.rb
ruby_fly-0.34.0.pre.1 lib/ruby_fly.rb
ruby_fly-0.33.0 lib/ruby_fly.rb
ruby_fly-0.32.0.pre.1 lib/ruby_fly.rb