jekyll-s3 2.2.0 → 2.2.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.
data/README.md CHANGED
@@ -67,9 +67,9 @@ Enable the headless mode by adding the `--headless` or `-h` argument after
67
67
  ### Only S3 buckets in the US Standard region work
68
68
 
69
69
  Jekyll-s3 supports only S3 buckets that are in the US Standard region. If your
70
- bucket is currently on some other region, you can set a non-existing
71
- bucket in `_jekyll_s3.yml` and then run `jekyll-s3`. Jekyll-s3 will then create
72
- the bucket in the US Standard region.
70
+ bucket is currently on some other region, you can set a non-existing bucket in
71
+ `_jekyll_s3.yml` and then run `configure-s3-website --config-file
72
+ _jekyll_s3.yml`. This creates you a bucket in the US Standard region.
73
73
 
74
74
  ## Development
75
75
 
data/changelog.md CHANGED
@@ -1,5 +1,10 @@
1
1
  # Changelog
2
2
 
3
+ ## 2.2.1
4
+
5
+ * Upload also dot files
6
+ ([#16](https://github.com/laurilehmijoki/jekyll-s3/pull/16))
7
+
3
8
  ## 2.2.0
4
9
 
5
10
  * Automatically configure the S3 bucket to function as a website.
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.2.0"
6
+ s.version = "2.2.1"
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"]
@@ -16,7 +16,7 @@ distribution, making it easy to deliver your blog via the CDN.}
16
16
  s.default_executable = %q{jekyll-s3}
17
17
 
18
18
  s.add_dependency 'aws-sdk', '~> 1.8.0'
19
- s.add_dependency 'filey-diff', '~> 0.0.2'
19
+ s.add_dependency 'filey-diff', '~> 1.0.0'
20
20
  s.add_dependency 'simple-cloudfront-invalidator', '~> 1.0.0'
21
21
  s.add_dependency 'erubis', '~> 2.7.0'
22
22
  s.add_dependency 'mime-types', '= 1.19'
@@ -84,7 +84,7 @@ module Jekyll
84
84
  end
85
85
 
86
86
  def self.load_all_local_files(site_dir)
87
- Dir[site_dir + '/**/*'].
87
+ Dir[site_dir + '/**/{*,.*}'].
88
88
  delete_if { |f| File.directory?(f) }.
89
89
  map { |f| f.gsub(site_dir + '/', '') }
90
90
  end
@@ -1,86 +1,98 @@
1
1
  require 'spec_helper'
2
2
 
3
3
  describe Jekyll::S3::Uploader do
4
- describe 'reduced redundancy setting' do
5
- let(:config) {
6
- { 's3_reduced_redundancy' => true }
7
- }
4
+ context '#upload_file' do
5
+ describe 'reduced redundancy setting' do
6
+ let(:config) {
7
+ { 's3_reduced_redundancy' => true }
8
+ }
8
9
 
9
- it 'allows storing a file under the Reduced Redundancy Storage' do
10
- file_to_upload = 'index.html'
11
- s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
12
- s3_object.should_receive(:write).with(
13
- anything(),
14
- :content_type => 'text/html',
15
- :reduced_redundancy => true
16
- )
10
+ it 'allows storing a file under the Reduced Redundancy Storage' do
11
+ file_to_upload = 'index.html'
12
+ s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
13
+ s3_object.should_receive(:write).with(
14
+ anything(),
15
+ :content_type => 'text/html',
16
+ :reduced_redundancy => true
17
+ )
18
+ end
19
+ Jekyll::S3::Uploader.send(:upload_file,
20
+ file_to_upload,
21
+ s3_client,
22
+ config,
23
+ 'features/support/test_site_dirs/my.blog.com/_site')
17
24
  end
18
- Jekyll::S3::Uploader.send(:upload_file,
19
- file_to_upload,
20
- s3_client,
21
- config,
22
- 'features/support/test_site_dirs/my.blog.com/_site')
23
25
  end
24
- end
25
26
 
26
- describe 'content type resolving' do
27
- let(:config) {
28
- { 's3_reduced_redundancy' => false }
29
- }
27
+ describe 'content type resolving' do
28
+ let(:config) {
29
+ { 's3_reduced_redundancy' => false }
30
+ }
31
+
32
+ it 'adds the content type of the uploaded CSS file into the S3 object' do
33
+ file_to_upload = 'css/styles.css'
34
+ s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
35
+ s3_object.should_receive(:write).with(
36
+ anything(),
37
+ :content_type => 'text/css',
38
+ :reduced_redundancy => false
39
+ )
40
+ end
41
+ Jekyll::S3::Uploader.send(:upload_file,
42
+ file_to_upload,
43
+ s3_client,
44
+ config,
45
+ 'features/support/test_site_dirs/my.blog.com/_site')
46
+ end
30
47
 
31
- it 'adds the content type of the uploaded CSS file into the S3 object' do
32
- file_to_upload = 'css/styles.css'
33
- s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
34
- s3_object.should_receive(:write).with(
35
- anything(),
36
- :content_type => 'text/css',
37
- :reduced_redundancy => false
38
- )
48
+ it 'adds the content type of the uploaded HTML file into the S3 object' do
49
+ file_to_upload = 'index.html'
50
+ s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
51
+ s3_object.should_receive(:write).with(
52
+ anything(),
53
+ :content_type => 'text/html',
54
+ :reduced_redundancy => false
55
+ )
56
+ end
57
+ Jekyll::S3::Uploader.send(:upload_file,
58
+ file_to_upload,
59
+ s3_client,
60
+ config,
61
+ 'features/support/test_site_dirs/my.blog.com/_site')
39
62
  end
40
- Jekyll::S3::Uploader.send(:upload_file,
41
- file_to_upload,
42
- s3_client,
43
- config,
44
- 'features/support/test_site_dirs/my.blog.com/_site')
45
63
  end
46
64
 
47
- it 'adds the content type of the uploaded HTML file into the S3 object' do
48
- file_to_upload = 'index.html'
49
- s3_client = create_verifying_s3_client(file_to_upload) do |s3_object|
50
- s3_object.should_receive(:write).with(
51
- anything(),
52
- :content_type => 'text/html',
53
- :reduced_redundancy => false
54
- )
65
+ def create_verifying_s3_client(file_to_upload, &block)
66
+ def create_objects(file_to_upload, &block)
67
+ def create_html_s3_object(file_to_upload, &block)
68
+ s3_object = stub('s3_object')
69
+ yield s3_object
70
+ s3_object
71
+ end
72
+ objects = {}
73
+ objects[file_to_upload] = create_html_s3_object(file_to_upload, &block)
74
+ objects
55
75
  end
56
- Jekyll::S3::Uploader.send(:upload_file,
57
- file_to_upload,
58
- s3_client,
59
- config,
60
- 'features/support/test_site_dirs/my.blog.com/_site')
76
+ def create_bucket(file_to_upload, &block)
77
+ bucket = stub('bucket')
78
+ bucket.stub(:objects => create_objects(file_to_upload, &block))
79
+ bucket
80
+ end
81
+ buckets = stub('buckets')
82
+ buckets.stub(:[] => create_bucket(file_to_upload, &block))
83
+ s3 = stub('s3')
84
+ s3.stub(:buckets => buckets)
85
+ s3
61
86
  end
62
87
  end
63
88
 
64
- def create_verifying_s3_client(file_to_upload, &block)
65
- def create_objects(file_to_upload, &block)
66
- def create_html_s3_object(file_to_upload, &block)
67
- s3_object = stub('s3_object')
68
- yield s3_object
69
- s3_object
89
+ context '#load_all_local_files' do
90
+ describe 'dotfile support' do
91
+ it 'loads also dotfiles' do
92
+ files = Jekyll::S3::Uploader.send(:load_all_local_files,
93
+ 'spec/sample_files/hyde_site/_site')
94
+ files.should eq(['index.html', '.vimrc'])
70
95
  end
71
- objects = {}
72
- objects[file_to_upload] = create_html_s3_object(file_to_upload, &block)
73
- objects
74
- end
75
- def create_bucket(file_to_upload, &block)
76
- bucket = stub('bucket')
77
- bucket.stub(:objects => create_objects(file_to_upload, &block))
78
- bucket
79
96
  end
80
- buckets = stub('buckets')
81
- buckets.stub(:[] => create_bucket(file_to_upload, &block))
82
- s3 = stub('s3')
83
- s3.stub(:buckets => buckets)
84
- s3
85
97
  end
86
98
  end
@@ -0,0 +1,5 @@
1
+ " Disable the arrow keys in the normal mode – using them there only slows you down. Use hkjl instead.
2
+ map <Left> :echo "no!"<cr>
3
+ map <Right> :echo "no!"<cr>
4
+ map <Up> :echo "no!"<cr>
5
+ map <Down> :echo "no!"<cr>
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.2.0
4
+ version: 2.2.1
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-30 00:00:00.000000000 Z
13
+ date: 2012-12-31 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: aws-sdk
@@ -35,7 +35,7 @@ dependencies:
35
35
  requirements:
36
36
  - - ~>
37
37
  - !ruby/object:Gem::Version
38
- version: 0.0.2
38
+ version: 1.0.0
39
39
  type: :runtime
40
40
  prerelease: false
41
41
  version_requirements: !ruby/object:Gem::Requirement
@@ -43,7 +43,7 @@ dependencies:
43
43
  requirements:
44
44
  - - ~>
45
45
  - !ruby/object:Gem::Version
46
- version: 0.0.2
46
+ version: 1.0.0
47
47
  - !ruby/object:Gem::Dependency
48
48
  name: simple-cloudfront-invalidator
49
49
  requirement: !ruby/object:Gem::Requirement
@@ -289,6 +289,7 @@ files:
289
289
  - spec/lib/retry_spec.rb
290
290
  - spec/lib/upload_spec.rb
291
291
  - spec/sample_files/hyde_site/_jekyll_s3.yml
292
+ - spec/sample_files/hyde_site/_site/.vimrc
292
293
  - spec/sample_files/hyde_site/_site/index.html
293
294
  - spec/spec_helper.rb
294
295
  homepage: https://github.com/laurilehmijoki/jekyll-s3
@@ -355,5 +356,6 @@ test_files:
355
356
  - spec/lib/retry_spec.rb
356
357
  - spec/lib/upload_spec.rb
357
358
  - spec/sample_files/hyde_site/_jekyll_s3.yml
359
+ - spec/sample_files/hyde_site/_site/.vimrc
358
360
  - spec/sample_files/hyde_site/_site/index.html
359
361
  - spec/spec_helper.rb