s3deployer 0.0.3 → 0.0.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/lib/s3deployer/version.rb +1 -1
 - data/lib/s3deployer.rb +3 -1
 - data/spec/s3deployer_spec.rb +4 -1
 - metadata +3 -3
 
    
        data/lib/s3deployer/version.rb
    CHANGED
    
    
    
        data/lib/s3deployer.rb
    CHANGED
    
    | 
         @@ -2,7 +2,9 @@ require 'aws/s3' 
     | 
|
| 
       2 
2 
     | 
    
         
             
            class S3Deployer
         
     | 
| 
       3 
3 
     | 
    
         
             
              attr_accessor :directory_to_deploy, :bucket_name
         
     | 
| 
       4 
4 
     | 
    
         
             
              def initialize(access_key, secret_key)
         
     | 
| 
       5 
     | 
    
         
            -
                AWS::S3::Base.establish_connection!( 
     | 
| 
      
 5 
     | 
    
         
            +
                AWS::S3::Base.establish_connection!({
         
     | 
| 
      
 6 
     | 
    
         
            +
                    :access_key_id => access_key,
         
     | 
| 
      
 7 
     | 
    
         
            +
                    :secret_access_key => secret_key})
         
     | 
| 
       6 
8 
     | 
    
         
             
              end
         
     | 
| 
       7 
9 
     | 
    
         
             
              def deploy(directory_to_deploy, bucket_name)
         
     | 
| 
       8 
10 
     | 
    
         
             
                @bucket_name = bucket_name
         
     | 
    
        data/spec/s3deployer_spec.rb
    CHANGED
    
    | 
         @@ -11,7 +11,10 @@ describe S3Deployer do 
     | 
|
| 
       11 
11 
     | 
    
         
             
              describe "instantiation" do
         
     | 
| 
       12 
12 
     | 
    
         
             
                it "Connects to Amazon S3 with access and secret keys" do
         
     | 
| 
       13 
13 
     | 
    
         
             
                  S3Deployer.new("abc", "123")
         
     | 
| 
       14 
     | 
    
         
            -
                  AWS::S3::Base.should have_received(:establish_connection!).with( 
     | 
| 
      
 14 
     | 
    
         
            +
                  AWS::S3::Base.should have_received(:establish_connection!).with({
         
     | 
| 
      
 15 
     | 
    
         
            +
                    :access_key_id=>'abc',
         
     | 
| 
      
 16 
     | 
    
         
            +
                    :secret_access_key=>'123'
         
     | 
| 
      
 17 
     | 
    
         
            +
                  })
         
     | 
| 
       15 
18 
     | 
    
         
             
                end
         
     | 
| 
       16 
19 
     | 
    
         
             
              end
         
     | 
| 
       17 
20 
     | 
    
         
             
              describe "deploy" do
         
     | 
    
        metadata
    CHANGED
    
    | 
         @@ -1,7 +1,7 @@ 
     | 
|
| 
       1 
1 
     | 
    
         
             
            --- !ruby/object:Gem::Specification
         
     | 
| 
       2 
2 
     | 
    
         
             
            name: s3deployer
         
     | 
| 
       3 
3 
     | 
    
         
             
            version: !ruby/object:Gem::Version
         
     | 
| 
       4 
     | 
    
         
            -
              version: 0.0. 
     | 
| 
      
 4 
     | 
    
         
            +
              version: 0.0.4
         
     | 
| 
       5 
5 
     | 
    
         
             
              prerelease: 
         
     | 
| 
       6 
6 
     | 
    
         
             
            platform: ruby
         
     | 
| 
       7 
7 
     | 
    
         
             
            authors:
         
     | 
| 
         @@ -13,7 +13,7 @@ date: 2012-03-12 00:00:00.000000000 Z 
     | 
|
| 
       13 
13 
     | 
    
         
             
            dependencies:
         
     | 
| 
       14 
14 
     | 
    
         
             
            - !ruby/object:Gem::Dependency
         
     | 
| 
       15 
15 
     | 
    
         
             
              name: aws-s3
         
     | 
| 
       16 
     | 
    
         
            -
              requirement: & 
     | 
| 
      
 16 
     | 
    
         
            +
              requirement: &70290852195300 !ruby/object:Gem::Requirement
         
     | 
| 
       17 
17 
     | 
    
         
             
                none: false
         
     | 
| 
       18 
18 
     | 
    
         
             
                requirements:
         
     | 
| 
       19 
19 
     | 
    
         
             
                - - ! '>='
         
     | 
| 
         @@ -21,7 +21,7 @@ dependencies: 
     | 
|
| 
       21 
21 
     | 
    
         
             
                    version: '0'
         
     | 
| 
       22 
22 
     | 
    
         
             
              type: :runtime
         
     | 
| 
       23 
23 
     | 
    
         
             
              prerelease: false
         
     | 
| 
       24 
     | 
    
         
            -
              version_requirements: * 
     | 
| 
      
 24 
     | 
    
         
            +
              version_requirements: *70290852195300
         
     | 
| 
       25 
25 
     | 
    
         
             
            description: A simple way to deploy a directory to Amazon s3
         
     | 
| 
       26 
26 
     | 
    
         
             
            email:
         
     | 
| 
       27 
27 
     | 
    
         
             
            - zee@zeespencer.com
         
     |