Sha256: 33a389b18ab77052b2206ba313a607deccff4f0f1867b564323a0204389a34da

Contents?: true

Size: 1.98 KB

Versions: 32

Compression:

Stored size: 1.98 KB

Contents

require 'spec_helper'

describe SimpleDeploy do

  describe "an artifact" do

    context "when unencrypted" do
      before do
        @artifact = SimpleDeploy::Artifact.new :bucket_prefix => 'test_prefix',
                                               :domain        => 'us-west-1',
                                               :id            => 'abc123',
                                               :name          => 'myapp',
                                               :region        => 'us-west-1',
                                               :encrypted     => false
      end

      it "should return the endpoints for the artifact" do
        endpoints = { "s3"    => "s3://test_prefix-us-west-1/us-west-1/abc123.tar.gz", 
                      "http"  => "http://s3-us-west-1.amazonaws.com/test_prefix-us-west-1/us-west-1/abc123.tar.gz",
                      "https" => "https://s3-us-west-1.amazonaws.com/test_prefix-us-west-1/us-west-1/abc123.tar.gz" }
        @artifact.endpoints.should == endpoints
      end
    end

    context "when encrypted" do
      before do
        @artifact = SimpleDeploy::Artifact.new :bucket_prefix => 'test_prefix',
                                               :domain        => 'us-west-1',
                                               :id            => 'abc123',
                                               :name          => 'myapp',
                                               :region        => 'us-west-1',
                                               :encrypted     => true
      end

      it "should return the endpoints for the artifact" do
        endpoints = { "s3"    => "s3://test_prefix-us-west-1/us-west-1/abc123.tar.gz.gpg", 
                      "http"  => "http://s3-us-west-1.amazonaws.com/test_prefix-us-west-1/us-west-1/abc123.tar.gz.gpg",
                      "https" => "https://s3-us-west-1.amazonaws.com/test_prefix-us-west-1/us-west-1/abc123.tar.gz.gpg" }
        @artifact.endpoints.should == endpoints
      end
    end
  end
end

Version data entries

32 entries across 32 versions & 1 rubygems

Version Path
simple_deploy-0.10.2 spec/artifact_spec.rb
simple_deploy-0.10.1 spec/artifact_spec.rb
simple_deploy-0.10.0 spec/artifact_spec.rb
simple_deploy-0.10.0.beta.3 spec/artifact_spec.rb
simple_deploy-0.10.0.beta.2 spec/artifact_spec.rb
simple_deploy-0.10.0.beta.1 spec/artifact_spec.rb
simple_deploy-0.9.2 spec/artifact_spec.rb
simple_deploy-0.9.1 spec/artifact_spec.rb
simple_deploy-0.9.0 spec/artifact_spec.rb
simple_deploy-0.8.2 spec/artifact_spec.rb
simple_deploy-0.8.2.beta1 spec/artifact_spec.rb
simple_deploy-0.8.1.beta1 spec/artifact_spec.rb
simple_deploy-0.8.0 spec/artifact_spec.rb
simple_deploy-0.7.8 spec/artifact_spec.rb
simple_deploy-0.7.7 spec/artifact_spec.rb
simple_deploy-0.7.7.beta.1 spec/artifact_spec.rb
simple_deploy-0.7.6 spec/artifact_spec.rb
simple_deploy-0.7.6.beta.6 spec/artifact_spec.rb
simple_deploy-0.7.6.beta.5 spec/artifact_spec.rb
simple_deploy-0.7.6.beta.3 spec/artifact_spec.rb