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 CHANGED
@@ -313,4 +313,5 @@ Contributors (in alphabetical order)
313
313
  * Michael Bleigh
314
314
  * Shigeaki Matsumura
315
315
  * stanislas
316
+ * Trevor Fitzgerald
316
317
  * Zee Spencer
@@ -2,6 +2,10 @@
2
2
 
3
3
  This project uses [Semantic Versioning](http://semver.org).
4
4
 
5
+ ## 3.1.0
6
+
7
+ * Upload files in parallel
8
+
5
9
  ## 3.0.0
6
10
 
7
11
  * Set `text/html; charset=utf-8` as the `content_type` for each `text/html`
@@ -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 equal
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
  """
@@ -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.0.0"
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"]
@@ -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.each do |f|
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.0.0
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-14 00:00:00.000000000 Z
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.25
351
+ rubygems_version: 1.8.24
358
352
  signing_key:
359
353
  specification_version: 3
360
354
  summary: Push your Jekyll blog to S3