Sha256: 3899afeff0d6cf5bf33d69f454a06ae173e75f9bf8796ff26bb0b71ba9f9e502

Contents?: true

Size: 1 KB

Versions: 18

Compression:

Stored size: 1 KB

Contents

require 'fog/core/collection'
require 'fog/aws/models/beanstalk/version'

module Fog
  module AWS
    class ElasticBeanstalk

      class Versions < Fog::Collection
        model Fog::AWS::ElasticBeanstalk::Version

        def all(options={})
          data = connection.describe_application_versions(options).body['DescribeApplicationVersionsResult']['ApplicationVersions']
          load(data) # data is an array of attribute hashes
        end

        def get(application_name, version_label)
          if data = connection.describe_application_versions({
                                                                 'ApplicationName' => application_name,
                                                                 'VersionLabels' => [version_label]
                                                             }).body['DescribeApplicationVersionsResult']['ApplicationVersions']
            if data.length == 1
              new(data.first)
            end

          end
        end

      end
    end
  end
end

Version data entries

18 entries across 18 versions & 9 rubygems

Version Path
fog-nirvanix-1.8.2 lib/fog/aws/models/beanstalk/versions.rb
fog-nirvanix-1.8.1 lib/fog/aws/models/beanstalk/versions.rb
fog-parser-fix-1.6.1 lib/fog/aws/models/beanstalk/versions.rb
fog-test-again-1.6.0 lib/fog/aws/models/beanstalk/versions.rb
fog-parser-fix-1.6.0 lib/fog/aws/models/beanstalk/versions.rb
ey-vendored-backup-3.0.27 vendor/gems/fog/lib/fog/aws/models/beanstalk/versions.rb
fog-sgonyea-1.8.1 lib/fog/aws/models/beanstalk/versions.rb
fog-1.8.0 lib/fog/aws/models/beanstalk/versions.rb
fog-maestrodev-1.7.0.20121114190951 lib/fog/aws/models/beanstalk/versions.rb
fog-1.7.0 lib/fog/aws/models/beanstalk/versions.rb
fog-1.6.0 lib/fog/aws/models/beanstalk/versions.rb
fog-1.5.0 lib/fog/aws/models/beanstalk/versions.rb
fog-1.4.0 lib/fog/aws/models/beanstalk/versions.rb
michiels-fog-1.3.1 lib/fog/aws/models/beanstalk/versions.rb
ftl-0.2.0 vendor/bundle/gems/fog-1.3.1/lib/fog/aws/models/beanstalk/versions.rb
fog-1.3.1 lib/fog/aws/models/beanstalk/versions.rb
fog-1.3.0 lib/fog/aws/models/beanstalk/versions.rb
fog-1.2.0 lib/fog/aws/models/beanstalk/versions.rb