jekyll-s3 3.0.0 → 3.1.0
Sign up to get free protection for your applications and to get access to all the features.
- data/README.md +1 -0
- data/changelog.md +4 -0
- data/example-configurations.md +17 -0
- data/features/jekyll-s3-upload.feature +10 -1
- data/jekyll-s3.gemspec +1 -1
- data/lib/jekyll-s3/uploader.rb +10 -3
- metadata +3 -9
data/README.md
CHANGED
data/changelog.md
CHANGED
data/example-configurations.md
CHANGED
@@ -41,3 +41,20 @@ Above, we store the AWS credentials and the id of the CloudFront distribution as
|
|
41
41
|
environment variables. It's convenient, since you can keep the `_jekyll_s3.yml`
|
42
42
|
in a public Git repo, and thus have your deployment configurations
|
43
43
|
version-controlled.
|
44
|
+
|
45
|
+
## Using redirects
|
46
|
+
|
47
|
+
````yaml
|
48
|
+
s3_id: hello
|
49
|
+
s3_secret: galaxy
|
50
|
+
redirects:
|
51
|
+
index.php: /
|
52
|
+
about.php: about.html
|
53
|
+
routing_rules:
|
54
|
+
- condition:
|
55
|
+
key_prefix_equals: code/repositories/git/
|
56
|
+
redirect:
|
57
|
+
host_name: git.johnny.com
|
58
|
+
replace_key_prefix_with: ""
|
59
|
+
http_redirect_code: 301
|
60
|
+
````
|
@@ -35,12 +35,21 @@ Feature: upload Jekyll site to S3
|
|
35
35
|
Scenario: Upload a new blog post and change an old post
|
36
36
|
When my Jekyll site is in "features/support/test_site_dirs/new-and-changed-files.com"
|
37
37
|
Then jekyll-s3 will push my blog to S3
|
38
|
-
And the output should
|
38
|
+
And the output should contain
|
39
39
|
"""
|
40
40
|
Deploying _site/* to jekyll-s3-test.net
|
41
41
|
Uploading 1 new and 1 changed file(s)
|
42
|
+
"""
|
43
|
+
And the output should contain
|
44
|
+
"""
|
42
45
|
Upload css/styles.css: Success!
|
46
|
+
"""
|
47
|
+
And the output should contain
|
48
|
+
"""
|
43
49
|
Upload index.html: Success!
|
50
|
+
"""
|
51
|
+
And the output should contain
|
52
|
+
"""
|
44
53
|
Done! Go visit: http://jekyll-s3-test.net.s3-website-us-east-1.amazonaws.com/index.html
|
45
54
|
|
46
55
|
"""
|
data/jekyll-s3.gemspec
CHANGED
@@ -3,7 +3,7 @@ $:.push File.expand_path("../lib", __FILE__)
|
|
3
3
|
|
4
4
|
Gem::Specification.new do |s|
|
5
5
|
s.name = "jekyll-s3"
|
6
|
-
s.version = "3.
|
6
|
+
s.version = "3.1.0"
|
7
7
|
s.platform = Gem::Platform::RUBY
|
8
8
|
s.authors = ["Philippe Creux", "Lauri Lehmijoki"]
|
9
9
|
s.email = ["pcreux@gmail.com", "lauri.lehmijoki@iki.fi"]
|
data/lib/jekyll-s3/uploader.rb
CHANGED
@@ -54,13 +54,20 @@ module Jekyll
|
|
54
54
|
pre_upload_report << "#{changed_files.length} changed" if changed_files.length > 0
|
55
55
|
pre_upload_report << "file(s)"
|
56
56
|
puts pre_upload_report.join(' ')
|
57
|
-
to_upload
|
58
|
-
upload_file(f, s3, config, site_dir)
|
59
|
-
end
|
57
|
+
upload_in_parallel to_upload, s3, config, site_dir
|
60
58
|
end
|
61
59
|
[new_files.length, changed_files.length, changed_files]
|
62
60
|
end
|
63
61
|
|
62
|
+
def self.upload_in_parallel(files_to_upload, s3, config, site_dir)
|
63
|
+
threads = files_to_upload.map do |f|
|
64
|
+
Thread.new {
|
65
|
+
upload_file(f, s3, config, site_dir)
|
66
|
+
}
|
67
|
+
end
|
68
|
+
threads.each { |thread| thread.join }
|
69
|
+
end
|
70
|
+
|
64
71
|
def self.upload_file(file, s3, config, site_dir)
|
65
72
|
Retry.run_with_retry do
|
66
73
|
upload = Upload.new(file, s3, config, site_dir)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jekyll-s3
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.
|
4
|
+
version: 3.1.0
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2013-06-
|
13
|
+
date: 2013-06-17 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -340,21 +340,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
340
340
|
- - ! '>='
|
341
341
|
- !ruby/object:Gem::Version
|
342
342
|
version: '0'
|
343
|
-
segments:
|
344
|
-
- 0
|
345
|
-
hash: 2932196294779507205
|
346
343
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
347
344
|
none: false
|
348
345
|
requirements:
|
349
346
|
- - ! '>='
|
350
347
|
- !ruby/object:Gem::Version
|
351
348
|
version: '0'
|
352
|
-
segments:
|
353
|
-
- 0
|
354
|
-
hash: 2932196294779507205
|
355
349
|
requirements: []
|
356
350
|
rubyforge_project:
|
357
|
-
rubygems_version: 1.8.
|
351
|
+
rubygems_version: 1.8.24
|
358
352
|
signing_key:
|
359
353
|
specification_version: 3
|
360
354
|
summary: Push your Jekyll blog to S3
|