jekyll-s3 2.1.1 → 2.1.2
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/README.md +6 -12
- data/changelog.md +5 -0
- data/jekyll-s3.gemspec +1 -1
- data/lib/jekyll-s3/uploader.rb +2 -2
- data/spec/lib/config_loader_spec.rb +10 -0
- data/spec/sample_files/hyde_site/_jekyll_s3.yml +3 -0
- data/spec/sample_files/hyde_site/_site/index.html +1 -0
- metadata +8 -2
data/README.md
CHANGED
@@ -16,7 +16,7 @@ Deploy your jekyll site to S3.
|
|
16
16
|
|
17
17
|
gem install jekyll-s3
|
18
18
|
|
19
|
-
##
|
19
|
+
## Usage
|
20
20
|
|
21
21
|
* Go to your jekyll site directory
|
22
22
|
* Run `jekyll-s3`. It generates a configuration file called `_jekyll_s3.yml` that looks like this:
|
@@ -25,13 +25,9 @@ s3_id: YOUR_AWS_S3_ACCESS_KEY_ID
|
|
25
25
|
s3_secret: YOUR_AWS_S3_SECRET_ACCESS_KEY
|
26
26
|
s3_bucket: your.blog.bucket.com
|
27
27
|
</pre>
|
28
|
-
|
29
28
|
* Edit it with your details (you can use [ERB](http://ruby-doc.org/stdlib-1.9.3/libdoc/erb/rdoc/ERB.html) in the file)
|
30
29
|
* [Configure your S3 bucket to function like a website](http://docs.amazonwebservices.com/AmazonS3/latest/dev/HostingWebsiteOnS3Setup.html)
|
31
|
-
|
32
|
-
## Deploy!
|
33
|
-
|
34
|
-
* Run `jekyll-s3`. Done.
|
30
|
+
* Run `jekyll-s3` to push your Jekyll blog to S3
|
35
31
|
|
36
32
|
## Additional features
|
37
33
|
|
@@ -56,12 +52,10 @@ It is easy to deliver your S3-based web site via Cloudfront, the CDN of Amazon.
|
|
56
52
|
|
57
53
|
### The headless mode
|
58
54
|
|
59
|
-
Jekyll-s3 has a headless mode,
|
60
|
-
disabled.
|
55
|
+
Jekyll-s3 has a headless mode, where human interactions are disabled.
|
61
56
|
|
62
|
-
In the headless mode,
|
63
|
-
bucket that are not on your local computer.
|
64
|
-
unpublish blog posts.)
|
57
|
+
In the headless mode, `jekyll-s3` will automatically delete the files on the S3
|
58
|
+
bucket that are not on your local computer.
|
65
59
|
|
66
60
|
Enable the headless mode by adding the `--headless` or `-h` argument after
|
67
61
|
`jekyll-s3`.
|
@@ -72,7 +66,7 @@ Enable the headless mode by adding the `--headless` or `-h` argument after
|
|
72
66
|
|
73
67
|
Jekyll-s3 supports only S3 buckets that are in the US Standard region. If your
|
74
68
|
bucket is currently on some other region, you can set a non-existing
|
75
|
-
bucket in
|
69
|
+
bucket in `_jekyll_s3.yml` and then run `jekyll-s3`. Jekyll-s3 will then create
|
76
70
|
the bucket in the US Standard region.
|
77
71
|
|
78
72
|
## Development
|
data/changelog.md
CHANGED
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 = "2.1.
|
6
|
+
s.version = "2.1.2"
|
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
@@ -55,8 +55,8 @@ module Jekyll
|
|
55
55
|
mime_type = MIME::Types.type_for(file)
|
56
56
|
upload_succeeded = s3.buckets[config['s3_bucket']].objects[file].write(
|
57
57
|
File.read("#{site_dir}/#{file}"),
|
58
|
-
:content_type => mime_type.first
|
59
|
-
:reduced_redundancy => config['s3_reduced_redundancy']
|
58
|
+
:content_type => mime_type.first,
|
59
|
+
:reduced_redundancy => config['s3_reduced_redundancy']
|
60
60
|
)
|
61
61
|
if upload_succeeded
|
62
62
|
puts("Upload #{file}: Success!")
|
@@ -0,0 +1,10 @@
|
|
1
|
+
require 'spec_helper'
|
2
|
+
|
3
|
+
describe Jekyll::S3::ConfigLoader do
|
4
|
+
it 'supports eRuby syntax in _jekyll_s3.yml' do
|
5
|
+
config = Jekyll::S3::ConfigLoader.load_configuration('spec/sample_files/hyde_site/_site')
|
6
|
+
config['s3_id'].should eq('hello')
|
7
|
+
config['s3_secret'].should eq('world')
|
8
|
+
config['s3_bucket'].should eq('galaxy')
|
9
|
+
end
|
10
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
<div>Hello world</div>
|
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: 2.1.
|
4
|
+
version: 2.1.2
|
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: 2012-12-
|
13
|
+
date: 2012-12-30 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: aws-sdk
|
@@ -268,9 +268,12 @@ files:
|
|
268
268
|
- lib/jekyll-s3/keyboard.rb
|
269
269
|
- lib/jekyll-s3/retry.rb
|
270
270
|
- lib/jekyll-s3/uploader.rb
|
271
|
+
- spec/lib/config_loader_spec.rb
|
271
272
|
- spec/lib/keyboard_spec.rb
|
272
273
|
- spec/lib/retry_spec.rb
|
273
274
|
- spec/lib/upload_spec.rb
|
275
|
+
- spec/sample_files/hyde_site/_jekyll_s3.yml
|
276
|
+
- spec/sample_files/hyde_site/_site/index.html
|
274
277
|
- spec/spec_helper.rb
|
275
278
|
homepage: https://github.com/laurilehmijoki/jekyll-s3
|
276
279
|
licenses: []
|
@@ -331,7 +334,10 @@ test_files:
|
|
331
334
|
- features/support/test_site_dirs/unpublish-a-post.com/_jekyll_s3.yml
|
332
335
|
- features/support/test_site_dirs/unpublish-a-post.com/_site/css/styles.css
|
333
336
|
- features/support/vcr.rb
|
337
|
+
- spec/lib/config_loader_spec.rb
|
334
338
|
- spec/lib/keyboard_spec.rb
|
335
339
|
- spec/lib/retry_spec.rb
|
336
340
|
- spec/lib/upload_spec.rb
|
341
|
+
- spec/sample_files/hyde_site/_jekyll_s3.yml
|
342
|
+
- spec/sample_files/hyde_site/_site/index.html
|
337
343
|
- spec/spec_helper.rb
|