capistrano-s3 0.2.7 → 0.2.9
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/.gitignore +2 -1
- data/.travis.yml +13 -0
- data/CHANGELOG.md +21 -0
- data/CONTRIBUTING.md +10 -4
- data/Gemfile +15 -0
- data/Gemfile.lock +38 -16
- data/README.md +29 -26
- data/Rakefile +11 -1
- data/capistrano-s3.gemspec +8 -8
- data/certs/j15e.pem +17 -15
- data/lib/capistrano/s3.rb +30 -27
- data/lib/capistrano/s3/publisher.rb +4 -4
- data/lib/capistrano/s3/version.rb +5 -0
- data/spec/publisher_spec.rb +18 -0
- data/spec/sample/fonts/cantarell-regular-webfont.eot +0 -0
- data/spec/sample/fonts/cantarell-regular-webfont.svg +18 -0
- data/spec/sample/fonts/cantarell-regular-webfont.ttf +0 -0
- data/spec/sample/fonts/cantarell-regular-webfont.woff +0 -0
- data/spec/spec_helper.rb +8 -0
- metadata +57 -62
- metadata.gz.sig +0 -0
- data/NEWS.md +0 -28
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
MWQ0YmJlNWU2Nzc3YmY0NTY5NmNiNTdhZGFjYWRmNjdlNmRiZDkxYWE5N2Jk
|
10
|
-
YzcxMDdiNzllZjE1ZDYzNzQ1ZmNkMzA3OTRkNWNkYjJkMjcwOGI1Y2Q5NWVl
|
11
|
-
Njc0MTE1ZmI0ODRmOTNmMDI4NGI2YTlkMTQ5OGU2MGI5MzNjOGY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZmUzYTczODdmYTJhNWQyYTI2NzljNDJiYzA2NGJiZDk1NTA0ZjAwNmQzZTNh
|
14
|
-
NmM0ZWZlNTNlZmU5N2U5NTU1NjdjMjdlZjE4OGY3ZGI0OTE5N2EzNTBlYzdi
|
15
|
-
NWRhZmMxNTMxOTA0ZjVlYmVlNzhkOWY4MWZkZWIwMGUyMjEzZWQ=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: b12f7b07b986dd3dee527b494dd54417b118eb27
|
4
|
+
data.tar.gz: a9bab13818c1d0b9fa525ab1f8c1d8f72da73730
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: b1bee700dbef6e1a1bd813fd575cfe62496f99fd34eb6b6b9e851451d20a300625ecf2f054bbc9b5d3bbeef23b1bb3b7853032f2d6643b0af94d22ea01942bfa
|
7
|
+
data.tar.gz: a420ef9a7b65dcedabfa08ae6970422517f5196d1a95bbc8e61db6b30448e71df3d3192edae61e4a8daa2d69e978faffd175f1fb5341c3c26b6becf6a6f5c7c4
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/.gitignore
CHANGED
@@ -1 +1,2 @@
|
|
1
|
-
*.gem
|
1
|
+
*.gem
|
2
|
+
.last_published
|
data/.travis.yml
ADDED
data/CHANGELOG.md
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
# CHANGELOG
|
2
|
+
|
3
|
+
## v0.2.9
|
4
|
+
|
5
|
+
Bugfix : fix gemspec dependencies
|
6
|
+
|
7
|
+
## v0.2.8 (yanked)
|
8
|
+
|
9
|
+
Improvement : lock dependency to Capistrano v2 for current version
|
10
|
+
Improvement : Update spec for new AWS SDK
|
11
|
+
|
12
|
+
## v0.2.7
|
13
|
+
|
14
|
+
Bugfix : support non-standard file extensions. (#14) @barvaz
|
15
|
+
|
16
|
+
## v0.2.6
|
17
|
+
|
18
|
+
Feature : Adds ability to specify redirect location for files. (#13) @aledovsky
|
19
|
+
Feature : Adds S3 endpoint selection option. (#11) @aledovsky
|
20
|
+
Improvement : Require fileutils to support newer rubies. (#10) @douglasjarquin
|
21
|
+
Bugfix : Pass a string to the content_type option (#11) @douglasjarquin
|
data/CONTRIBUTING.md
CHANGED
@@ -4,19 +4,25 @@
|
|
4
4
|
|
5
5
|
We love to work with people around the globe and make earth a better place for mankind!
|
6
6
|
|
7
|
+
## Submit a pull request
|
8
|
+
|
7
9
|
Please follow theses simples steps to contribute to this project :
|
8
10
|
|
9
|
-
1.
|
11
|
+
1. Run the tests before & after doing anything.
|
10
12
|
|
11
|
-
2.
|
13
|
+
2. Add specs regarding your code modification.
|
12
14
|
|
13
15
|
3. Squash or fixup your commits to achieve a clean commit log.
|
14
16
|
|
15
|
-
4.
|
17
|
+
4. Rebase your code onto upstream master (this repository) if not up to date.
|
18
|
+
|
19
|
+
5. Submit a pull request explaining changes.
|
20
|
+
|
21
|
+
Thank you!
|
16
22
|
|
17
23
|
## Running the tests
|
18
24
|
|
19
|
-
|
25
|
+
As simple as running the `rake` command. The default `rake` task is `rake spec`.
|
20
26
|
|
21
27
|
## Syntax
|
22
28
|
|
data/Gemfile
CHANGED
data/Gemfile.lock
CHANGED
@@ -1,41 +1,63 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
capistrano-s3 (0.2.
|
5
|
-
aws-sdk
|
6
|
-
capistrano
|
7
|
-
mime-types
|
4
|
+
capistrano-s3 (0.2.9)
|
5
|
+
aws-sdk (>= 1.11)
|
6
|
+
capistrano (< 3)
|
7
|
+
mime-types (>= 1.23)
|
8
8
|
|
9
9
|
GEM
|
10
10
|
remote: https://rubygems.org/
|
11
11
|
specs:
|
12
|
-
|
12
|
+
awesome_print (1.2.0)
|
13
|
+
aws-sdk (1.42.0)
|
13
14
|
json (~> 1.4)
|
14
15
|
nokogiri (>= 1.4.4)
|
15
|
-
|
16
|
-
capistrano (2.14.2)
|
16
|
+
capistrano (2.15.5)
|
17
17
|
highline
|
18
18
|
net-scp (>= 1.0.0)
|
19
19
|
net-sftp (>= 2.0.0)
|
20
20
|
net-ssh (>= 2.0.14)
|
21
21
|
net-ssh-gateway (>= 1.1.0)
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
22
|
+
diff-lcs (1.2.5)
|
23
|
+
gem-release (0.7.3)
|
24
|
+
highline (1.6.21)
|
25
|
+
json (1.8.1)
|
26
|
+
metaclass (0.0.4)
|
27
|
+
mime-types (2.3)
|
28
|
+
mini_portile (0.6.0)
|
29
|
+
mocha (1.1.0)
|
30
|
+
metaclass (~> 0.0.1)
|
31
|
+
net-scp (1.2.1)
|
26
32
|
net-ssh (>= 2.6.5)
|
27
|
-
net-sftp (2.1.
|
33
|
+
net-sftp (2.1.2)
|
28
34
|
net-ssh (>= 2.6.5)
|
29
|
-
net-ssh (2.
|
35
|
+
net-ssh (2.9.1)
|
30
36
|
net-ssh-gateway (1.2.0)
|
31
37
|
net-ssh (>= 2.6.5)
|
32
|
-
nokogiri (1.
|
33
|
-
|
34
|
-
|
38
|
+
nokogiri (1.6.2.1)
|
39
|
+
mini_portile (= 0.6.0)
|
40
|
+
rake (10.3.2)
|
41
|
+
rspec (3.0.0)
|
42
|
+
rspec-core (~> 3.0.0)
|
43
|
+
rspec-expectations (~> 3.0.0)
|
44
|
+
rspec-mocks (~> 3.0.0)
|
45
|
+
rspec-core (3.0.0)
|
46
|
+
rspec-support (~> 3.0.0)
|
47
|
+
rspec-expectations (3.0.0)
|
48
|
+
diff-lcs (>= 1.2.0, < 2.0)
|
49
|
+
rspec-support (~> 3.0.0)
|
50
|
+
rspec-mocks (3.0.0)
|
51
|
+
rspec-support (~> 3.0.0)
|
52
|
+
rspec-support (3.0.0)
|
35
53
|
|
36
54
|
PLATFORMS
|
37
55
|
ruby
|
38
56
|
|
39
57
|
DEPENDENCIES
|
58
|
+
awesome_print
|
40
59
|
capistrano-s3!
|
60
|
+
gem-release
|
61
|
+
mocha
|
41
62
|
rake
|
63
|
+
rspec
|
data/README.md
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
> Enables static websites deployment to Amazon S3 website buckets using Capistrano.
|
4
4
|
|
5
|
+
[![Build Status](https://travis-ci.org/hooktstudios/capistrano-s3.png?branch=master)](https://travis-ci.org/hooktstudios/capistrano-s3)
|
5
6
|
[![Dependency Status](https://gemnasium.com/hooktstudios/capistrano-s3.png)](https://gemnasium.com/hooktstudios/capistrano-s3)
|
6
7
|
[![Code Climate](https://codeclimate.com/github/hooktstudios/capistrano-s3.png)](https://codeclimate.com/github/hooktstudios/capistrano-s3)
|
7
8
|
[![Gem Version](https://badge.fury.io/rb/capistrano-s3.png)](https://rubygems.org/gems/capistrano-s3)
|
@@ -14,24 +15,24 @@ To learn how to setup your website bucket, see [Amazon Documentation](http://doc
|
|
14
15
|
|
15
16
|
## Getting started
|
16
17
|
|
17
|
-
Create a project `Gemfile` :
|
18
|
-
|
19
18
|
```ruby
|
19
|
+
# Gemfile
|
20
20
|
source 'https://rubygems.org'
|
21
21
|
gem 'capistrano-s3'
|
22
22
|
```
|
23
23
|
|
24
24
|
### Setup
|
25
25
|
|
26
|
-
Install
|
26
|
+
Install gems with bundle, init capistrano & create your public folder that will be published :
|
27
27
|
|
28
28
|
bundle install
|
29
29
|
bundle exec capify .
|
30
30
|
mkdir public
|
31
31
|
|
32
|
-
###
|
32
|
+
### Deploy configuration
|
33
33
|
|
34
|
-
|
34
|
+
Replace `deploy.rb` content generated by capify
|
35
|
+
with these simple Amazon S3 configurations :
|
35
36
|
|
36
37
|
```ruby
|
37
38
|
# config/deploy.rb
|
@@ -42,38 +43,27 @@ set :access_key_id, "CHANGETHIS"
|
|
42
43
|
set :secret_access_key, "CHANGETHIS"
|
43
44
|
```
|
44
45
|
|
45
|
-
_Note_: If you are using S3 in non-default region (e.g. EU), you should provide
|
46
|
-
corresponding
|
47
|
-
[endpoint](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
|
48
|
-
via configuration option
|
49
|
-
```ruby
|
50
|
-
set :s3_endpoint, 's3-eu-west-1.amazonaws.com'
|
51
|
-
```
|
52
|
-
|
53
46
|
### Deploying
|
54
47
|
|
55
|
-
Add content to you public folder and
|
56
|
-
|
57
|
-
cap deploy
|
48
|
+
Add content to you public folder and run `cap deploy`.
|
58
49
|
|
59
50
|
If you want to deploy to multiple buckets, have a look at
|
60
51
|
[Capistrano multistage](https://github.com/capistrano/capistrano/wiki/2.x-Multistage-Extension)
|
61
52
|
and configure a bucket per stage configuration.
|
62
53
|
|
63
|
-
|
54
|
+
## Advanced options
|
55
|
+
|
56
|
+
### Custom endpoint
|
57
|
+
|
58
|
+
If your bucket is not in the default US Standard region,
|
59
|
+
set [endpoint](http://docs.aws.amazon.com/general/latest/gr/rande.html#s3_region)
|
60
|
+
with :
|
64
61
|
|
65
|
-
Use `:redirect_options` to natively redirect (via HTTP 301 status code)
|
66
|
-
any hosted page. For example:
|
67
62
|
```ruby
|
68
|
-
set :
|
69
|
-
'index.html' => 'http://example.org',
|
70
|
-
'another.html' => '/test.html',
|
71
|
-
}
|
63
|
+
set :s3_endpoint, 's3-eu-west-1.amazonaws.com'
|
72
64
|
```
|
73
|
-
Valid redirect destination should either start with `http` or `https` scheme,
|
74
|
-
or begin with leading slash `/`.
|
75
65
|
|
76
|
-
|
66
|
+
### Write options
|
77
67
|
|
78
68
|
capistrano-s3 sets files `:content_type` and `:acl` to `:public_read`, add or override with :
|
79
69
|
|
@@ -85,6 +75,19 @@ set :bucket_write_options, {
|
|
85
75
|
|
86
76
|
See aws-sdk [S3Client.put_object doc](http://docs.aws.amazon.com/AWSRubySDK/latest/AWS/S3/Client.html#put_object-instance_method) for all available options.
|
87
77
|
|
78
|
+
### Redirecting
|
79
|
+
|
80
|
+
Use `:redirect_options` to natively redirect (via HTTP 301 status code)
|
81
|
+
any hosted page. For example:
|
82
|
+
```ruby
|
83
|
+
set :redirect_options, {
|
84
|
+
'index.html' => 'http://example.org',
|
85
|
+
'another.html' => '/test.html',
|
86
|
+
}
|
87
|
+
```
|
88
|
+
Valid redirect destination should either start with `http` or `https` scheme,
|
89
|
+
or begin with leading slash `/`.
|
90
|
+
|
88
91
|
## Example of usage
|
89
92
|
|
90
93
|
Our Ruby stack for static websites :
|
data/Rakefile
CHANGED
data/capistrano-s3.gemspec
CHANGED
@@ -1,4 +1,6 @@
|
|
1
|
-
#
|
1
|
+
# encoding: utf-8
|
2
|
+
$:.unshift(File.dirname(__FILE__) + '/lib')
|
3
|
+
require 'capistrano/s3/version'
|
2
4
|
|
3
5
|
Gem::Specification.new do |s|
|
4
6
|
s.authors = ['Jean-Philippe Doyle','Josh Delsman','Aleksandrs Ļedovskis','Douglas Jarquin', 'Amit Barvaz']
|
@@ -12,14 +14,12 @@ Gem::Specification.new do |s|
|
|
12
14
|
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
13
15
|
s.name = 'capistrano-s3'
|
14
16
|
s.require_paths = ['lib']
|
15
|
-
s.version =
|
17
|
+
s.version = Capistrano::S3::VERSION
|
16
18
|
s.cert_chain = ['certs/j15e.pem']
|
17
|
-
s.signing_key = File.expand_path(
|
19
|
+
s.signing_key = File.expand_path("~/.ssh/gem-private_key.pem") if $0 =~ /gem\z/
|
18
20
|
|
19
21
|
# Gem dependencies
|
20
|
-
s.add_dependency 'aws-sdk'
|
21
|
-
s.add_dependency 'capistrano'
|
22
|
-
s.add_dependency 'mime-types'
|
23
|
-
|
24
|
-
s.add_development_dependency 'rake'
|
22
|
+
s.add_dependency 'aws-sdk', '>= 1.11'
|
23
|
+
s.add_dependency 'capistrano', '< 3'
|
24
|
+
s.add_dependency 'mime-types', '>= 1.23'
|
25
25
|
end
|
data/certs/j15e.pem
CHANGED
@@ -1,20 +1,22 @@
|
|
1
1
|
-----BEGIN CERTIFICATE-----
|
2
|
-
|
2
|
+
MIIDmjCCAoKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBJMRswGQYDVQQDDBJqZWFu
|
3
3
|
cGhpbGlwcGUuZG95bGUxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT
|
4
|
-
|
4
|
+
8ixkARkWA2NvbTAeFw0xNDA0MjkyMDM5MjNaFw0xNTA0MjkyMDM5MjNaMEkxGzAZ
|
5
5
|
BgNVB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6UKRvSiT+3S0gGyfrybepm9ZFiQVFrFkgLQ+Lt/0vzBJD
|
19
|
+
osc8G2grd5N2ieCykW2dfdKftrAoHy9zstg0CTTkFHaoQesLfEE6HdGImfIe2qpJ
|
20
|
+
vo0Ni/EOoxL0d1qrp9TiARbe5JDIK4KWKJcyJrsOCnAUNwfqwf0riBGpsnCRwQi7
|
21
|
+
c8m4yoP9xz6wjpS7gxQ=
|
20
22
|
-----END CERTIFICATE-----
|
data/lib/capistrano/s3.rb
CHANGED
@@ -1,40 +1,43 @@
|
|
1
1
|
require 'capistrano'
|
2
2
|
require 'capistrano/s3/publisher'
|
3
|
+
require 'capistrano/s3/version'
|
3
4
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
Capistrano::Configuration.instance(true).load do
|
9
|
-
def _cset(name, *args, &block)
|
10
|
-
set(name, *args, &block) if !exists?(name)
|
5
|
+
module Capistrano
|
6
|
+
unless Configuration.respond_to?(:instance)
|
7
|
+
abort "capistrano-s3 requires Capistrano 2.0 or newer"
|
11
8
|
end
|
12
9
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
10
|
+
Configuration.instance(true).load do
|
11
|
+
def _cset(name, *args, &block)
|
12
|
+
set(name, *args, &block) if !exists?(name)
|
13
|
+
end
|
14
|
+
|
15
|
+
_cset :deployment_path, Dir.pwd.gsub("\n", "") + "/public"
|
16
|
+
_cset :bucket_write_options, :acl => :public_read
|
17
|
+
_cset :s3_endpoint, 's3.amazonaws.com'
|
18
|
+
_cset :redirect_options, {}
|
17
19
|
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
20
|
+
# Deployment recipes
|
21
|
+
namespace :deploy do
|
22
|
+
namespace :s3 do
|
23
|
+
desc "Empties bucket of all files. Caution when using this command, as it cannot be undone!"
|
24
|
+
task :empty do
|
25
|
+
S3::Publisher.clear!(s3_endpoint, access_key_id, secret_access_key, bucket)
|
26
|
+
end
|
27
|
+
|
28
|
+
desc "Upload files to the bucket in the current state"
|
29
|
+
task :upload_files do
|
30
|
+
extra_options = { :write => bucket_write_options, :redirect => redirect_options }
|
31
|
+
S3::Publisher.publish!(s3_endpoint, access_key_id, secret_access_key,
|
32
|
+
bucket, deployment_path, extra_options)
|
33
|
+
end
|
24
34
|
end
|
25
35
|
|
26
|
-
|
27
|
-
|
28
|
-
extra_options = { :write => bucket_write_options, :redirect => redirect_options }
|
29
|
-
Publisher.publish!(s3_endpoint, access_key_id, secret_access_key,
|
30
|
-
bucket, deployment_path, extra_options)
|
36
|
+
task :update do
|
37
|
+
s3.upload_files
|
31
38
|
end
|
32
|
-
end
|
33
39
|
|
34
|
-
|
35
|
-
s3.upload_files
|
40
|
+
task :restart do; end
|
36
41
|
end
|
37
|
-
|
38
|
-
task :restart do; end
|
39
42
|
end
|
40
43
|
end
|
@@ -2,7 +2,7 @@ require 'aws/s3'
|
|
2
2
|
require 'mime/types'
|
3
3
|
require 'fileutils'
|
4
4
|
|
5
|
-
module Publisher
|
5
|
+
module Capistrano::S3::Publisher
|
6
6
|
|
7
7
|
LAST_PUBLISHED_FILE = '.last_published'
|
8
8
|
|
@@ -72,9 +72,9 @@ module Publisher
|
|
72
72
|
:acl => :public_read,
|
73
73
|
}
|
74
74
|
|
75
|
-
options.merge!(
|
76
|
-
options.merge!(
|
77
|
-
options.merge!(extra_options[:write])
|
75
|
+
options.merge!(self.build_content_type_hash(file))
|
76
|
+
options.merge!(self.build_redirect_hash(path, extra_options[:redirect]))
|
77
|
+
options.merge!(extra_options[:write]) if extra_options[:write]
|
78
78
|
|
79
79
|
s3.put_object(options)
|
80
80
|
end
|
@@ -0,0 +1,18 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Capistrano::S3::Publisher do
|
4
|
+
before do
|
5
|
+
@root = File.expand_path('../', __FILE__)
|
6
|
+
publish_file = Capistrano::S3::Publisher::LAST_PUBLISHED_FILE
|
7
|
+
FileUtils.rm(publish_file) if File.exist?(publish_file)
|
8
|
+
end
|
9
|
+
|
10
|
+
context "on publish!" do
|
11
|
+
it "publish all files" do
|
12
|
+
AWS::S3::Client::V20060301.any_instance.expects(:put_object).times(4)
|
13
|
+
|
14
|
+
path = File.join(@root, 'sample')
|
15
|
+
Capistrano::S3::Publisher.publish!('s3.amazonaws.com', 'abc', '123', 'mybucket.amazonaws.com', path, {})
|
16
|
+
end
|
17
|
+
end
|
18
|
+
end
|
Binary file
|
@@ -0,0 +1,18 @@
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" >
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
4
|
+
<metadata></metadata>
|
5
|
+
<defs>
|
6
|
+
<font id="cantarellregular" horiz-adv-x="748" >
|
7
|
+
<font-face units-per-em="2048" ascent="1513" descent="-535" />
|
8
|
+
<missing-glyph horiz-adv-x="559" />
|
9
|
+
<glyph horiz-adv-x="2048" />
|
10
|
+
<glyph horiz-adv-x="2048" />
|
11
|
+
<glyph unicode="
" horiz-adv-x="682" />
|
12
|
+
<glyph unicode=" " horiz-adv-x="559" />
|
13
|
+
<glyph unicode="	" horiz-adv-x="559" />
|
14
|
+
<glyph unicode=" " horiz-adv-x="559" />
|
15
|
+
<glyph unicode="A" horiz-adv-x="1382" d="M129 0l506 1421h192l506 -1421h-172l-143 414h-588l-143 -414h-158zM481 561h484l-240 694z" />
|
16
|
+
<glyph unicode="" horiz-adv-x="985" d="M0 0v985h985v-985h-985z" />
|
17
|
+
</font>
|
18
|
+
</defs></svg>
|
Binary file
|
Binary file
|
data/spec/spec_helper.rb
ADDED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: capistrano-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.9
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Jean-Philippe Doyle
|
@@ -12,92 +12,73 @@ authors:
|
|
12
12
|
autorequire:
|
13
13
|
bindir: bin
|
14
14
|
cert_chain:
|
15
|
-
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
SzNZMk05b1l5Qm1kZmVtNm02MTRTT3JPRkJJR2ptRjQKa3pnRjRPMk9MKzhP
|
40
|
-
MjN3ZTRFMUx2ZlJuNWdWNzdEaWo2czlWNEhIek1CdUx3bk5iOFQrNmxPblVX
|
41
|
-
YnRpSWRkRAplOGM4aTdQbHJ6aFZKLzhzWFVKc0NreUU4ZDJNeVJ5amx4TT0K
|
42
|
-
LS0tLS1FTkQgQ0VSVElGSUNBVEUtLS0tLQo=
|
43
|
-
date: 2013-04-18 00:00:00.000000000 Z
|
15
|
+
- |
|
16
|
+
-----BEGIN CERTIFICATE-----
|
17
|
+
MIIDmjCCAoKgAwIBAgIBATANBgkqhkiG9w0BAQUFADBJMRswGQYDVQQDDBJqZWFu
|
18
|
+
cGhpbGlwcGUuZG95bGUxFTATBgoJkiaJk/IsZAEZFgVnbWFpbDETMBEGCgmSJomT
|
19
|
+
8ixkARkWA2NvbTAeFw0xNDA0MjkyMDM5MjNaFw0xNTA0MjkyMDM5MjNaMEkxGzAZ
|
20
|
+
BgNVBAMMEmplYW5waGlsaXBwZS5kb3lsZTEVMBMGCgmSJomT8ixkARkWBWdtYWls
|
21
|
+
MRMwEQYKCZImiZPyLGQBGRYDY29tMIIBIjANBgkqhkiG9w0BAQEFAAOCAQ8AMIIB
|
22
|
+
CgKCAQEAoy9v4jCylD10QNplfQn2RjDj7e+GOFn1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|
dependencies:
|
45
40
|
- !ruby/object:Gem::Dependency
|
46
41
|
name: aws-sdk
|
47
42
|
requirement: !ruby/object:Gem::Requirement
|
48
43
|
requirements:
|
49
|
-
- -
|
44
|
+
- - ">="
|
50
45
|
- !ruby/object:Gem::Version
|
51
|
-
version: '
|
46
|
+
version: '1.11'
|
52
47
|
type: :runtime
|
53
48
|
prerelease: false
|
54
49
|
version_requirements: !ruby/object:Gem::Requirement
|
55
50
|
requirements:
|
56
|
-
- -
|
51
|
+
- - ">="
|
57
52
|
- !ruby/object:Gem::Version
|
58
|
-
version: '
|
53
|
+
version: '1.11'
|
59
54
|
- !ruby/object:Gem::Dependency
|
60
55
|
name: capistrano
|
61
56
|
requirement: !ruby/object:Gem::Requirement
|
62
57
|
requirements:
|
63
|
-
- -
|
58
|
+
- - "<"
|
64
59
|
- !ruby/object:Gem::Version
|
65
|
-
version: '
|
60
|
+
version: '3'
|
66
61
|
type: :runtime
|
67
62
|
prerelease: false
|
68
63
|
version_requirements: !ruby/object:Gem::Requirement
|
69
64
|
requirements:
|
70
|
-
- -
|
65
|
+
- - "<"
|
71
66
|
- !ruby/object:Gem::Version
|
72
|
-
version: '
|
67
|
+
version: '3'
|
73
68
|
- !ruby/object:Gem::Dependency
|
74
69
|
name: mime-types
|
75
70
|
requirement: !ruby/object:Gem::Requirement
|
76
71
|
requirements:
|
77
|
-
- -
|
72
|
+
- - ">="
|
78
73
|
- !ruby/object:Gem::Version
|
79
|
-
version: '
|
74
|
+
version: '1.23'
|
80
75
|
type: :runtime
|
81
76
|
prerelease: false
|
82
77
|
version_requirements: !ruby/object:Gem::Requirement
|
83
78
|
requirements:
|
84
|
-
- -
|
79
|
+
- - ">="
|
85
80
|
- !ruby/object:Gem::Version
|
86
|
-
version: '
|
87
|
-
- !ruby/object:Gem::Dependency
|
88
|
-
name: rake
|
89
|
-
requirement: !ruby/object:Gem::Requirement
|
90
|
-
requirements:
|
91
|
-
- - ! '>='
|
92
|
-
- !ruby/object:Gem::Version
|
93
|
-
version: '0'
|
94
|
-
type: :development
|
95
|
-
prerelease: false
|
96
|
-
version_requirements: !ruby/object:Gem::Requirement
|
97
|
-
requirements:
|
98
|
-
- - ! '>='
|
99
|
-
- !ruby/object:Gem::Version
|
100
|
-
version: '0'
|
81
|
+
version: '1.23'
|
101
82
|
description: Enables static websites deployment to Amazon S3 website buckets using
|
102
83
|
Capistrano.
|
103
84
|
email:
|
@@ -106,18 +87,26 @@ executables: []
|
|
106
87
|
extensions: []
|
107
88
|
extra_rdoc_files: []
|
108
89
|
files:
|
109
|
-
- .gitignore
|
90
|
+
- ".gitignore"
|
91
|
+
- ".travis.yml"
|
92
|
+
- CHANGELOG.md
|
110
93
|
- CONTRIBUTING.md
|
111
94
|
- Gemfile
|
112
95
|
- Gemfile.lock
|
113
96
|
- LICENSE
|
114
|
-
- NEWS.md
|
115
97
|
- README.md
|
116
98
|
- Rakefile
|
117
99
|
- capistrano-s3.gemspec
|
118
100
|
- certs/j15e.pem
|
119
101
|
- lib/capistrano/s3.rb
|
120
102
|
- lib/capistrano/s3/publisher.rb
|
103
|
+
- lib/capistrano/s3/version.rb
|
104
|
+
- spec/publisher_spec.rb
|
105
|
+
- spec/sample/fonts/cantarell-regular-webfont.eot
|
106
|
+
- spec/sample/fonts/cantarell-regular-webfont.svg
|
107
|
+
- spec/sample/fonts/cantarell-regular-webfont.ttf
|
108
|
+
- spec/sample/fonts/cantarell-regular-webfont.woff
|
109
|
+
- spec/spec_helper.rb
|
121
110
|
homepage: http://github.com/hooktstudios/capistrano-s3
|
122
111
|
licenses:
|
123
112
|
- MIT
|
@@ -128,18 +117,24 @@ require_paths:
|
|
128
117
|
- lib
|
129
118
|
required_ruby_version: !ruby/object:Gem::Requirement
|
130
119
|
requirements:
|
131
|
-
- -
|
120
|
+
- - ">="
|
132
121
|
- !ruby/object:Gem::Version
|
133
122
|
version: '0'
|
134
123
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
135
124
|
requirements:
|
136
|
-
- -
|
125
|
+
- - ">="
|
137
126
|
- !ruby/object:Gem::Version
|
138
127
|
version: '0'
|
139
128
|
requirements: []
|
140
129
|
rubyforge_project:
|
141
|
-
rubygems_version: 2.0
|
130
|
+
rubygems_version: 2.2.0
|
142
131
|
signing_key:
|
143
132
|
specification_version: 4
|
144
133
|
summary: Build and deploy a static website to Amazon S3
|
145
|
-
test_files:
|
134
|
+
test_files:
|
135
|
+
- spec/publisher_spec.rb
|
136
|
+
- spec/sample/fonts/cantarell-regular-webfont.eot
|
137
|
+
- spec/sample/fonts/cantarell-regular-webfont.svg
|
138
|
+
- spec/sample/fonts/cantarell-regular-webfont.ttf
|
139
|
+
- spec/sample/fonts/cantarell-regular-webfont.woff
|
140
|
+
- spec/spec_helper.rb
|
metadata.gz.sig
CHANGED
Binary file
|
data/NEWS.md
DELETED
@@ -1,28 +0,0 @@
|
|
1
|
-
# capistrano-s3 changes
|
2
|
-
|
3
|
-
## New in 0.2.7
|
4
|
-
|
5
|
-
* Bugfix : support non-standard file extensions. (#14) @barvaz
|
6
|
-
|
7
|
-
## New in 0.2.6
|
8
|
-
|
9
|
-
* Feature : Adds ability to specify redirect location for files. (#13) @aledovsky
|
10
|
-
* Feature : Adds S3 endpoint selection option. (#11) @aledovsky
|
11
|
-
* Improvement : Require fileutils to support newer rubies. (#10) @douglasjarquin
|
12
|
-
* Bugfix : Pass a string to the content_type option (#11) @douglasjarquin
|
13
|
-
|
14
|
-
## New in 0.2.5
|
15
|
-
|
16
|
-
* Improvement : signed gem.
|
17
|
-
|
18
|
-
## New in 0.2.4
|
19
|
-
|
20
|
-
* Bugfix : fixed error when .last_publish doesn't exist yet.
|
21
|
-
|
22
|
-
## New in 0.2.3
|
23
|
-
|
24
|
-
* Bugfix : fixed error when no specific bucket_write_options is set.
|
25
|
-
|
26
|
-
## New in 0.2.2
|
27
|
-
|
28
|
-
* Bugfix : fixed an error caused previously by removing SASS & HAML dependency.
|