s3deployer 0.0.1.dev → 0.0.1
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.
- metadata +6 -13
- data/.rvmrc +0 -1
- data/Gemfile +0 -3
- data/Gemfile.lock +0 -22
- data/Rakefile +0 -1
- data/lib/s3deployer/version.rb +0 -3
- data/lib/s3deployer.rb +0 -29
- data/s3deployer.gemspec +0 -16
metadata
CHANGED
@@ -1,8 +1,8 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: s3deployer
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.1
|
5
|
-
prerelease:
|
4
|
+
version: 0.0.1
|
5
|
+
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
8
8
|
- Zee Spencer
|
@@ -13,7 +13,7 @@ date: 2012-03-10 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: aws-s3
|
16
|
-
requirement: &
|
16
|
+
requirement: &70164276681040 !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: *70164276681040
|
25
25
|
description: A simple way to deploy a directory to Amazon s3
|
26
26
|
email:
|
27
27
|
- zee@zeespencer.com
|
@@ -29,14 +29,7 @@ executables: []
|
|
29
29
|
extensions: []
|
30
30
|
extra_rdoc_files: []
|
31
31
|
files:
|
32
|
-
- .rvmrc
|
33
|
-
- Gemfile
|
34
|
-
- Gemfile.lock
|
35
32
|
- README.markdown
|
36
|
-
- Rakefile
|
37
|
-
- lib/s3deployer.rb
|
38
|
-
- lib/s3deployer/version.rb
|
39
|
-
- s3deployer.gemspec
|
40
33
|
homepage: https://github.com/zspencer/s3deployer
|
41
34
|
licenses: []
|
42
35
|
post_install_message:
|
@@ -52,9 +45,9 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
52
45
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
53
46
|
none: false
|
54
47
|
requirements:
|
55
|
-
- - ! '
|
48
|
+
- - ! '>='
|
56
49
|
- !ruby/object:Gem::Version
|
57
|
-
version:
|
50
|
+
version: '0'
|
58
51
|
requirements: []
|
59
52
|
rubyforge_project:
|
60
53
|
rubygems_version: 1.8.17
|
data/.rvmrc
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
rvm 1.9.3@s3deployer --create
|
data/Gemfile
DELETED
data/Gemfile.lock
DELETED
@@ -1,22 +0,0 @@
|
|
1
|
-
PATH
|
2
|
-
remote: .
|
3
|
-
specs:
|
4
|
-
s3deployer (0.0.1)
|
5
|
-
aws-s3
|
6
|
-
|
7
|
-
GEM
|
8
|
-
remote: http://rubygems.org/
|
9
|
-
specs:
|
10
|
-
aws-s3 (0.6.2)
|
11
|
-
builder
|
12
|
-
mime-types
|
13
|
-
xml-simple
|
14
|
-
builder (3.0.0)
|
15
|
-
mime-types (1.17.2)
|
16
|
-
xml-simple (1.1.1)
|
17
|
-
|
18
|
-
PLATFORMS
|
19
|
-
ruby
|
20
|
-
|
21
|
-
DEPENDENCIES
|
22
|
-
s3deployer!
|
data/Rakefile
DELETED
@@ -1 +0,0 @@
|
|
1
|
-
require "bundler/gem_tasks"
|
data/lib/s3deployer/version.rb
DELETED
data/lib/s3deployer.rb
DELETED
@@ -1,29 +0,0 @@
|
|
1
|
-
require 'aws/s3'
|
2
|
-
class S3Deployer
|
3
|
-
attr_accessor :directory_to_deploy, :bucket_name
|
4
|
-
def initialize(bucket_name, directory_to_deploy)
|
5
|
-
@directory_to_deploy = directory_to_deploy
|
6
|
-
@bucket_name = bucket_name
|
7
|
-
end
|
8
|
-
def deploy
|
9
|
-
iterate_through_and_deploy(directory_to_deploy)
|
10
|
-
end
|
11
|
-
|
12
|
-
def iterate_through_and_deploy(dir)
|
13
|
-
Dir.foreach(dir) do |item|
|
14
|
-
next if item[0] == "."
|
15
|
-
item_location = "#{dir}/#{item}"
|
16
|
-
if File.directory?(item_location)
|
17
|
-
iterate_through_and_deploy(item_location)
|
18
|
-
else
|
19
|
-
upload_item(item_location)
|
20
|
-
end
|
21
|
-
end
|
22
|
-
end
|
23
|
-
|
24
|
-
def upload_item(item)
|
25
|
-
s3_name = item.gsub(directory_to_deploy,'')
|
26
|
-
puts "uploading #{item} as #{s3_name}"
|
27
|
-
AWS::S3::S3Object.store(s3_name, open(item), bucket_name)
|
28
|
-
end
|
29
|
-
end
|
data/s3deployer.gemspec
DELETED
@@ -1,16 +0,0 @@
|
|
1
|
-
$:.push("lib")
|
2
|
-
require 's3deployer/version'
|
3
|
-
|
4
|
-
Gem::Specification.new do |s|
|
5
|
-
s.name = 's3deployer'
|
6
|
-
s.version = S3Deployer::VERSION
|
7
|
-
s.platform = Gem::Platform::RUBY
|
8
|
-
s.authors = ['Zee Spencer']
|
9
|
-
s.email = ['zee@zeespencer.com']
|
10
|
-
s.homepage = 'https://github.com/zspencer/s3deployer'
|
11
|
-
s.description = "A simple way to deploy a directory to Amazon s3"
|
12
|
-
s.summary = "A simple way to deploy a directory to Amazon s3"
|
13
|
-
s.files = `git ls-files`.split("\n")
|
14
|
-
s.require_paths = ['lib']
|
15
|
-
s.add_dependency("aws-s3")
|
16
|
-
end
|