Sha256: d56936a135a3fb350409169057df82fbb20063860cc7d217425d02477d7bdf61

Contents?: true

Size: 830 Bytes

Versions: 18

Compression:

Stored size: 830 Bytes

Contents

class StubApp < OpenStruct
  def vhosts
    services.map(&:vhosts).flatten
  end

  def each_vhost(&block)
    return enum_for(:each_vhost) if block.nil?
    vhosts.each(&block)
  end

  def each_service(&block)
    return enum_for(:each_service) if block.nil?
    services.each(&block)
  end

  def each_configuration(&block)
    return enum_for(:each_configuration) if block.nil?
    configurations.each(&block)
  end
end

Fabricator(:app, from: :stub_app) do
  id { Fabricate.sequence(:app_id) { |i| i } }
  handle 'hello'
  status 'provisioned'
  git_repo { Fabricate.sequence(:app_git_repo) { |i| "git://#{i}.git" } }
  account
  services { [] }
  configurations { [] }
  current_configuration { nil }
  errors { Aptible::Resource::Errors.new }
  created_at { Time.now }

  after_create { |app| app.account.apps << app }
end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
aptible-cli-0.24.2 spec/fabricators/app_fabricator.rb
aptible-cli-0.24.1 spec/fabricators/app_fabricator.rb
aptible-cli-0.24.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.23.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.22.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.21.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.20.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.9 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.7 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.6 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.4 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.3 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.2 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.1 spec/fabricators/app_fabricator.rb
aptible-cli-0.19.0 spec/fabricators/app_fabricator.rb
aptible-cli-0.18.3 spec/fabricators/app_fabricator.rb
aptible-cli-0.18.2 spec/fabricators/app_fabricator.rb
aptible-cli-0.18.1 spec/fabricators/app_fabricator.rb